1 // Copyright 2017 Dolphin Emulator Project
2 // Licensed under GPLv2+
3 // Refer to the license.txt file included.
4 
5 #pragma once
6 
7 #include <QDialog>
8 
9 #include "Common/CommonTypes.h"
10 
11 class BreakpointWidget;
12 class QCheckBox;
13 class QDialogButtonBox;
14 class QGroupBox;
15 class QLabel;
16 class QLineEdit;
17 class QRadioButton;
18 
19 class NewBreakpointDialog : public QDialog
20 {
21   Q_OBJECT
22 public:
23   explicit NewBreakpointDialog(BreakpointWidget* parent);
24 
25   void accept() override;
26 
27 private:
28   void CreateWidgets();
29   void ConnectWidgets();
30 
31   void OnBPTypeChanged();
32   void OnAddressTypeChanged();
33 
34   // Instruction BPs
35   QRadioButton* m_instruction_bp;
36   QGroupBox* m_instruction_box;
37   QLineEdit* m_instruction_address;
38 
39   // Memory BPs
40   QRadioButton* m_memory_bp;
41   QRadioButton* m_memory_use_address;
42   QRadioButton* m_memory_use_range;
43   QGroupBox* m_memory_box;
44   QLabel* m_memory_address_from_label;
45   QLineEdit* m_memory_address_from;
46   QLabel* m_memory_address_to_label;
47   QLineEdit* m_memory_address_to;
48   QRadioButton* m_memory_on_read;
49   QRadioButton* m_memory_on_read_and_write;
50   QRadioButton* m_memory_on_write;
51 
52   // Action
53   QRadioButton* m_do_log;
54   QRadioButton* m_do_break;
55   QRadioButton* m_do_log_and_break;
56 
57   QDialogButtonBox* m_buttons;
58   BreakpointWidget* m_parent;
59 };
60