(self, exports)
Fills the ExportsList with data
Fills the ExportsList with data
Fills the ExportsList with data
def set_exports(self, exports):
        """ Fills the ExportsList with data
        """
        if self.exports_list is None:
            return

        self.exports_list.clear()
        for export in exports:
            name = QStandardItem()
            name.setTextAlignment(Qt.AlignLeft)
            if 'name' in export:
                name.setText(export['name'])

            address = QStandardItem()
            address.setTextAlignment(Qt.AlignCenter)
            str_fmt = '0x{0:X}'
            if not self.uppercase_hex:
                str_fmt = '0x{0:x}'

            if 'address' in export:
                address.setText(str_fmt.format(int(export['address'], 16)))

            type_ = QStandardItem()
            type_.setTextAlignment(Qt.AlignLeft)
            if 'type' in export:
                type_.setText(export['type'])

            self.exports_model.appendRow([name, address, type_])
def set_exports ( self , exports ) : if self . exports_list is None : return self . exports_list . clear ( ) for export in exports : name = QStandardItem ( ) name . setTextAlignment ( Qt . AlignLeft ) if 'name' in export : name . setText ( export [ 'name' ] ) address = QStandardItem ( ) address . setTextAlignment ( Qt . AlignCenter ) str_fmt = '0x{0:X}' if not self . uppercase_hex : str_fmt = '0x{0:x}' if 'address' in export : address . setText ( str_fmt . format ( int ( export [ 'address' ] , 16 ) ) ) type_ = QStandardItem ( ) type_ . setTextAlignment ( Qt . AlignLeft ) if 'type' in export : type_ . setText ( export [ 'type' ] ) self . exports_model . appendRow ( [ name , address , type_ ] )