(self, imports)
Fills the ImportsList with data
Fills the ImportsList with data
Fills the ImportsList with data
def set_imports(self, imports):
        """ Fills the ImportsList with data
        """
        if self.imports_list is None:
            return

        self.imports_list.clear()
        for import_ in imports:
            name = QStandardItem()
            name.setTextAlignment(Qt.AlignLeft)
            if 'name' in import_:
                name.setText(import_['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 import_:
                address.setText(str_fmt.format(int(import_['address'], 16)))

            module = QStandardItem()
            if 'module' in import_:
                module.setTextAlignment(Qt.AlignLeft)
                module.setText(import_['module'])

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

            self.imports_model.appendRow([name, address, module, type_])
def set_imports ( self , imports ) : if self . imports_list is None : return self . imports_list . clear ( ) for import_ in imports : name = QStandardItem ( ) name . setTextAlignment ( Qt . AlignLeft ) if 'name' in import_ : name . setText ( import_ [ '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 import_ : address . setText ( str_fmt . format ( int ( import_ [ 'address' ] , 16 ) ) ) module = QStandardItem ( ) if 'module' in import_ : module . setTextAlignment ( Qt . AlignLeft ) module . setText ( import_ [ 'module' ] ) type_ = QStandardItem ( ) if 'type' in import_ : type_ . setTextAlignment ( Qt . AlignLeft ) type_ . setText ( import_ [ 'type' ] ) self . imports_model . appendRow ( [ name , address , module , type_ ] )