| 54 | |
| 55 | |
| 56 | class DebugBreakpointsListModel : public QAbstractTableModel |
| 57 | { |
| 58 | Q_OBJECT |
| 59 | |
| 60 | protected: |
| 61 | QWidget* m_owner; |
| 62 | ViewFrame* m_view; |
| 63 | std::vector<BreakpointItem> m_items; |
| 64 | |
| 65 | public: |
| 66 | enum ColumnHeaders |
| 67 | { |
| 68 | //EnabledColumn, |
| 69 | LocationColumn, |
| 70 | AddressColumn, |
| 71 | }; |
| 72 | |
| 73 | DebugBreakpointsListModel(QWidget* parent, ViewFrame* view); |
| 74 | virtual ~DebugBreakpointsListModel(); |
| 75 | |
| 76 | virtual QModelIndex index(int row, int col, const QModelIndex& parent = QModelIndex()) const override; |
| 77 | |
| 78 | virtual int rowCount(const QModelIndex& parent = QModelIndex()) const override |
| 79 | { |
| 80 | (void)parent; |
| 81 | return (int)m_items.size(); |
| 82 | } |
| 83 | virtual int columnCount(const QModelIndex& parent = QModelIndex()) const override |
| 84 | { |
| 85 | (void)parent; |
| 86 | return 2; |
| 87 | } |
| 88 | BreakpointItem getRow(int row) const; |
| 89 | virtual QVariant data(const QModelIndex& i, int role) const override; |
| 90 | virtual QVariant headerData(int column, Qt::Orientation orientation, int role) const override; |
| 91 | void updateRows(std::vector<BreakpointItem> newRows); |
| 92 | }; |
| 93 | |
| 94 | |
| 95 | class DebugBreakpointsItemDelegate : public QStyledItemDelegate |
nothing calls this directly
no outgoing calls
no test coverage detected