cutter/src/dialogs/BreakpointsDialog.h
karliss 90c7bfab1e
Breakpoint editor dialog (#1975)
* Add breakpoint dialog for editing breakpoint properties
* Allow editing breakpoint using context menu from breakpointWidget and disassembly menu.
2020-01-04 20:05:49 +02:00

34 lines
910 B
C++

#pragma once
#include <QDialog>
#include <memory>
#include "CutterDescriptions.h"
namespace Ui {
class BreakpointsDialog;
}
class BreakpointsDialog : public QDialog
{
Q_OBJECT
public:
explicit BreakpointsDialog(bool editMode = false, QWidget *parent = nullptr);
BreakpointsDialog(const BreakpointDescription &editableBreakpoint, QWidget *parent = nullptr);
BreakpointsDialog(RVA address, QWidget *parent = nullptr);
~BreakpointsDialog();
BreakpointDescription getDescription();
static void createNewBreakpoint(RVA address = RVA_INVALID, QWidget *parent = nullptr);
static void editBreakpoint(const BreakpointDescription& breakpoint, QWidget *parent = nullptr);
private:
std::unique_ptr<Ui::BreakpointsDialog> ui;
bool editMode = false;
void refreshOkButton();
void onTypeChanged();
void configureCheckboxRestrictions();
int getHwPermissions();
};