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
|
|
|
|
2017-11-19 17:49:29 +00:00
|
|
|
class DisassemblyContextMenu : public QMenu
|
|
|
|
{
|
2017-10-10 10:17:05 +00:00
|
|
|
Q_OBJECT
|
2017-11-19 17:49:29 +00:00
|
|
|
|
2017-10-10 10:17:05 +00:00
|
|
|
public:
|
2017-11-19 17:49:29 +00:00
|
|
|
DisassemblyContextMenu(QWidget *parent = nullptr);
|
2017-11-03 11:31:20 +00:00
|
|
|
~DisassemblyContextMenu() = default;
|
|
|
|
|
2017-12-02 15:43:21 +00:00
|
|
|
signals:
|
|
|
|
void copy();
|
|
|
|
|
2017-11-03 11:31:20 +00:00
|
|
|
public slots:
|
|
|
|
void setOffset(RVA offset);
|
2017-12-02 15:43:21 +00:00
|
|
|
void setCanCopy(bool enabled);
|
2017-11-03 11:31:20 +00:00
|
|
|
|
2017-11-28 13:50:41 +00:00
|
|
|
private slots:
|
|
|
|
void aboutToShowSlot();
|
|
|
|
|
2017-12-02 15:43:21 +00:00
|
|
|
void on_actionCopy_triggered();
|
|
|
|
|
2017-11-03 11:31:20 +00:00
|
|
|
void on_actionAddComment_triggered();
|
|
|
|
void on_actionAddFlag_triggered();
|
|
|
|
void on_actionRename_triggered();
|
2017-11-30 14:16:39 +00:00
|
|
|
void on_actionRenameUsedHere_triggered();
|
2017-11-03 11:31:20 +00:00
|
|
|
void on_actionXRefs_triggered();
|
|
|
|
void on_actionDisplayOptions_triggered();
|
2017-10-10 10:17:05 +00:00
|
|
|
|
2017-11-28 13:13:22 +00:00
|
|
|
void on_actionSetBaseBinary_triggered();
|
|
|
|
void on_actionSetBaseOctal_triggered();
|
|
|
|
void on_actionSetBaseDecimal_triggered();
|
|
|
|
void on_actionSetBaseHexadecimal_triggered();
|
|
|
|
void on_actionSetBasePort_triggered();
|
|
|
|
void on_actionSetBaseIPAddr_triggered();
|
|
|
|
void on_actionSetBaseSyscall_triggered();
|
|
|
|
void on_actionSetBaseString_triggered();
|
|
|
|
|
2017-11-03 11:31:20 +00:00
|
|
|
private:
|
2017-12-02 15:43:21 +00:00
|
|
|
QKeySequence getCopySequence() const;
|
2017-11-03 11:31:20 +00:00
|
|
|
QKeySequence getCommentSequence() const;
|
|
|
|
QKeySequence getAddFlagSequence() const;
|
|
|
|
QKeySequence getRenameSequence() const;
|
2017-11-30 14:16:39 +00:00
|
|
|
QKeySequence getRenameUsedHereSequence() const;
|
2017-11-03 11:31:20 +00:00
|
|
|
QKeySequence getXRefSequence() const;
|
|
|
|
QKeySequence getDisplayOptionsSequence() const;
|
2017-11-19 17:49:29 +00:00
|
|
|
|
2017-10-10 10:17:05 +00:00
|
|
|
RVA offset;
|
2017-12-02 15:43:21 +00:00
|
|
|
bool canCopy;
|
|
|
|
|
|
|
|
QAction actionCopy;
|
|
|
|
QAction *copySeparator;
|
2017-11-19 17:49:29 +00:00
|
|
|
|
2017-10-10 10:17:05 +00:00
|
|
|
QAction actionAddComment;
|
|
|
|
QAction actionAddFlag;
|
|
|
|
QAction actionRename;
|
2017-11-30 14:16:39 +00:00
|
|
|
QAction actionRenameUsedHere;
|
2017-10-10 10:17:05 +00:00
|
|
|
QAction actionXRefs;
|
|
|
|
QAction actionDisplayOptions;
|
2017-11-28 13:13:22 +00:00
|
|
|
|
2017-11-28 13:50:41 +00:00
|
|
|
QMenu *setBaseMenu;
|
|
|
|
QAction *setBaseMenuAction;
|
2017-11-28 13:13:22 +00:00
|
|
|
QAction actionSetBaseBinary;
|
|
|
|
QAction actionSetBaseOctal;
|
|
|
|
QAction actionSetBaseDecimal;
|
|
|
|
QAction actionSetBaseHexadecimal;
|
|
|
|
QAction actionSetBasePort;
|
|
|
|
QAction actionSetBaseIPAddr;
|
|
|
|
QAction actionSetBaseSyscall;
|
|
|
|
QAction actionSetBaseString;
|
2017-10-10 10:17:05 +00:00
|
|
|
};
|
|
|
|
#endif // DISASSEMBLYCONTEXTMENU_H
|