def data(self, QModelIndex, int_role=None): if not QModelIndex.isValid(): return QVariant() if int_role == Qt.BackgroundColorRole: address = self.current_address + QModelIndex.row() * self.column_count + QModelIndex.column() if SysUtils.modulo_address(address, GDB_Engine.inferior_arch) in self.breakpoint_list: return QVariant(QColor(Qt.red)) elif int_role != Qt.DisplayRole: return QVariant() if self.data_array is None: return QVariant() return QVariant( SysUtils.aob_to_str(self.data_array[QModelIndex.row() * self.column_count + QModelIndex.column()]))
def data(self, QModelIndex, int_role=None): if not QModelIndex.isValid(): return QVariant() if int_role == Qt.BackgroundColorRole: if QModelIndex.row() * self.column_count + QModelIndex.column( ) in self.breakpoint_list: return QVariant(QColor(Qt.red)) elif int_role != Qt.DisplayRole: return QVariant() if self.data_array is None: return QVariant() return QVariant( SysUtils.aob_to_str( self.data_array[QModelIndex.row() * self.column_count + QModelIndex.column()]))