2017-10-10 10:17:05 +00:00
|
|
|
#ifndef DISASSEMBLYCONTEXTMENU_H
|
|
|
|
#define DISASSEMBLYCONTEXTMENU_H
|
|
|
|
|
|
|
|
#include "cutter.h"
|
|
|
|
#include <QMenu>
|
2017-11-03 11:31:20 +00:00
|
|
|
#include <QKeySequence>
|
2017-10-10 10:17:05 +00:00
|
|
|
|
|
|
|
class DisassemblyContextMenu : public QMenu {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
DisassemblyContextMenu(RVA offset, QWidget *parent = nullptr);
|
2017-11-03 11:31:20 +00:00
|
|
|
~DisassemblyContextMenu() = default;
|
|
|
|
|
|
|
|
DisassemblyContextMenu(QWidget *parent = nullptr);
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void setOffset(RVA offset);
|
|
|
|
|
|
|
|
void on_actionAddComment_triggered();
|
|
|
|
void on_actionAddFlag_triggered();
|
|
|
|
void on_actionRename_triggered();
|
|
|
|
void on_actionXRefs_triggered();
|
|
|
|
void on_actionDisplayOptions_triggered();
|
2017-10-10 10:17:05 +00:00
|
|
|
|
2017-11-03 11:31:20 +00:00
|
|
|
private:
|
|
|
|
void init();
|
|
|
|
|
|
|
|
QKeySequence getCommentSequence() const;
|
|
|
|
QKeySequence getAddFlagSequence() const;
|
|
|
|
QKeySequence getRenameSequence() const;
|
|
|
|
QKeySequence getXRefSequence() const;
|
|
|
|
QKeySequence getDisplayOptionsSequence() const;
|
2017-10-10 10:17:05 +00:00
|
|
|
private:
|
|
|
|
RVA offset;
|
|
|
|
QAction actionAddComment;
|
|
|
|
QAction actionAddFlag;
|
|
|
|
QAction actionRename;
|
|
|
|
QAction actionXRefs;
|
|
|
|
QAction actionDisplayOptions;
|
|
|
|
};
|
|
|
|
#endif // DISASSEMBLYCONTEXTMENU_H
|