Debian Codegraph @

src/BreakpointDialog.h

raw symbols SCIP
1 #ifndef BREAKPOINTDIALOG_OPENMSX_H
2 #define BREAKPOINTDIALOG_OPENMSX_H
3
4 #include "ui_BreakpointDialog.h"
5 #include "DebuggerData.h"
6 #include <QCompleter>
7 #include <QDialog>
8 #include <memory>
9
10 struct MemoryLayout;
11
12 class DebugSession;
13 class Symbol;
14
15 class BreakpointDialog : public QDialog, private Ui::BreakpointDialog
16 {
17 Q_OBJECT
18 public:
19 BreakpointDialog(const MemoryLayout& ml, DebugSession *session = nullptr, QWidget* parent = nullptr);
20
21 Breakpoint::Type type() const;
22 std::optional<AddressRange> addressRange(Symbol** symbol = nullptr) const;
23 Slot slot() const;
24 std::optional<uint8_t> segment() const;
25 QString condition() const;
26
27 void setData(Breakpoint::Type type, std::optional<AddressRange> range = {}, Slot slot = {},
28 std::optional<uint8_t> segment = {}, QString condition = {});
29
30 private:
31 std::optional<uint16_t> parseInput(const QLineEdit& ed, Symbol** symbol = nullptr) const;
32 void enableSlots();
33 void disableSlots();
34
35 void addressChanged(const QString& text);
36 void typeChanged(int i);
37 void slotChanged(int i);
38 void subslotChanged(int i);
39 void hasCondition(int state);
40
41 private:
42 const MemoryLayout& memLayout;
43 DebugSession* debugSession;
44 Symbol* currentSymbol;
45 int idxSlot, idxSubSlot;
46 int conditionHeight;
47 std::unique_ptr<QCompleter> jumpCompleter;
48 std::unique_ptr<QCompleter> allCompleter;
49 };
50
51 #endif // BREAKPOINTDIALOG_OPENMSX_H