| 58 | |
| 59 | |
| 60 | class DebugModulesListModel : public QAbstractTableModel |
| 61 | { |
| 62 | Q_OBJECT |
| 63 | |
| 64 | protected: |
| 65 | QWidget* m_owner; |
| 66 | ViewFrame* m_view; |
| 67 | std::vector<ModuleItem> m_items; |
| 68 | |
| 69 | public: |
| 70 | enum ColumnHeaders |
| 71 | { |
| 72 | AddressColumn, |
| 73 | EndAddressColumn, |
| 74 | SizeColumn, |
| 75 | NameColumn, |
| 76 | PathColumn, |
| 77 | }; |
| 78 | |
| 79 | DebugModulesListModel(QWidget* parent, ViewFrame* view); |
| 80 | virtual ~DebugModulesListModel(); |
| 81 | |
| 82 | virtual QModelIndex index(int row, int col, const QModelIndex& parent = QModelIndex()) const override; |
| 83 | |
| 84 | virtual int rowCount(const QModelIndex& parent = QModelIndex()) const override |
| 85 | { |
| 86 | (void)parent; |
| 87 | return (int)m_items.size(); |
| 88 | } |
| 89 | virtual int columnCount(const QModelIndex& parent = QModelIndex()) const override |
| 90 | { |
| 91 | (void)parent; |
| 92 | return 5; |
| 93 | } |
| 94 | ModuleItem getRow(int row) const; |
| 95 | virtual QVariant data(const QModelIndex& i, int role) const override; |
| 96 | virtual QVariant headerData(int column, Qt::Orientation orientation, int role) const override; |
| 97 | void updateRows(std::vector<DebugModule> newModules); |
| 98 | }; |
| 99 | |
| 100 | |
| 101 | class DebugModulesItemDelegate : public QStyledItemDelegate |
nothing calls this directly
no outgoing calls
no test coverage detected