mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-30 00:05:05 +00:00
59 lines
1.3 KiB
C
59 lines
1.3 KiB
C
|
#ifndef DECOMPILERCONTEXTMENU_H
|
||
|
#define DECOMPILERCONTEXTMENU_H
|
||
|
|
||
|
#include "core/Cutter.h"
|
||
|
#include <QMenu>
|
||
|
#include <QKeySequence>
|
||
|
|
||
|
class DecompilerContextMenu : public QMenu
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
DecompilerContextMenu(QWidget *parent, MainWindow *mainWindow);
|
||
|
~DecompilerContextMenu();
|
||
|
|
||
|
signals:
|
||
|
void copy();
|
||
|
|
||
|
public slots:
|
||
|
void setOffset(RVA offset);
|
||
|
void setCanCopy(bool enabled);
|
||
|
|
||
|
private slots:
|
||
|
void aboutToShowSlot();
|
||
|
|
||
|
void actionCopyTriggered();
|
||
|
|
||
|
private:
|
||
|
QKeySequence getCopySequence() const;
|
||
|
|
||
|
RVA offset;
|
||
|
MainWindow *mainWindow;
|
||
|
|
||
|
QAction actionCopy;
|
||
|
QAction *copySeparator;
|
||
|
|
||
|
void setActionCopy();
|
||
|
|
||
|
// I left out the following part from RAnnotatedCode. Probably, we will be returning/passing annotations
|
||
|
// from/to the function getThingUsedHere() and updateTargetMenuActions(). This block of comment will get removed in
|
||
|
// future PRs.
|
||
|
//
|
||
|
// struct ThingUsedHere {
|
||
|
// QString name;
|
||
|
// RVA offset;
|
||
|
// enum class Type {
|
||
|
// Var,
|
||
|
// Function,
|
||
|
// Flag,
|
||
|
// Address
|
||
|
// };
|
||
|
// Type type;
|
||
|
// };
|
||
|
// QVector<ThingUsedHere> getThingUsedHere(RVA offset);
|
||
|
|
||
|
// void updateTargetMenuActions(const QVector<ThingUsedHere> &targets);
|
||
|
};
|
||
|
|
||
|
#endif // DECOMPILERCONTEXTMENU_H
|