diff options
Diffstat (limited to 'src/citra_qt/debugger/graphics_breakpoints_p.h')
| -rw-r--r-- | src/citra_qt/debugger/graphics_breakpoints_p.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/citra_qt/debugger/graphics_breakpoints_p.h b/src/citra_qt/debugger/graphics_breakpoints_p.h new file mode 100644 index 000000000..232bfc863 --- /dev/null +++ b/src/citra_qt/debugger/graphics_breakpoints_p.h | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include <memory> | ||
| 8 | |||
| 9 | #include <QAbstractListModel> | ||
| 10 | |||
| 11 | #include "video_core/debug_utils/debug_utils.h" | ||
| 12 | |||
| 13 | class BreakPointModel : public QAbstractListModel { | ||
| 14 | Q_OBJECT | ||
| 15 | |||
| 16 | public: | ||
| 17 | enum { | ||
| 18 | Role_IsEnabled = Qt::UserRole, | ||
| 19 | }; | ||
| 20 | |||
| 21 | BreakPointModel(std::shared_ptr<Pica::DebugContext> context, QObject* parent); | ||
| 22 | |||
| 23 | int columnCount(const QModelIndex& parent = QModelIndex()) const override; | ||
| 24 | int rowCount(const QModelIndex& parent = QModelIndex()) const override; | ||
| 25 | QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; | ||
| 26 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; | ||
| 27 | |||
| 28 | bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); | ||
| 29 | |||
| 30 | public slots: | ||
| 31 | void OnBreakPointHit(Pica::DebugContext::Event event); | ||
| 32 | void OnResumed(); | ||
| 33 | |||
| 34 | private: | ||
| 35 | std::weak_ptr<Pica::DebugContext> context_weak; | ||
| 36 | bool at_breakpoint; | ||
| 37 | Pica::DebugContext::Event active_breakpoint; | ||
| 38 | }; | ||