mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-26 06:45:25 +00:00
567f852c3a
* Seperate addressable item list widget from ListDockWidget. * Convert ResourceWidget, strings widget, flags widget, search widget, MemoryMapWidget, xrefs dialog * Don't silently overwrite comment in add comment action.
49 lines
1.1 KiB
C++
49 lines
1.1 KiB
C++
#ifndef ADDRESSABLEITEMCONTEXTMENU_H
|
|
#define ADDRESSABLEITEMCONTEXTMENU_H
|
|
|
|
#include "core/Cutter.h"
|
|
#include <QMenu>
|
|
#include <QKeySequence>
|
|
|
|
class AddressableItemContextMenu : public QMenu
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
AddressableItemContextMenu(QWidget *parent, MainWindow *mainWindow);
|
|
~AddressableItemContextMenu();
|
|
|
|
/**
|
|
* @brief Configure if addressable item refers to whole function or specific address
|
|
* @param wholeFunciton
|
|
*/
|
|
void setWholeFunction(bool wholeFunciton);
|
|
public slots:
|
|
void setOffset(RVA offset);
|
|
void setTarget(RVA offset, QString name = QString());
|
|
void clearTarget();
|
|
signals:
|
|
void xrefsTriggered();
|
|
private:
|
|
void onActionCopyAddress();
|
|
void onActionShowXrefs();
|
|
void onActionAddComment();
|
|
|
|
virtual void aboutToShowSlot();
|
|
|
|
MainWindow *mainWindow;
|
|
|
|
RVA offset;
|
|
bool hasTarget = false;
|
|
protected:
|
|
void setHasTarget(bool hasTarget);
|
|
QAction actionShowInMenu;
|
|
QAction actionCopyAddress;
|
|
QAction actionShowXrefs;
|
|
QAction actionAddcomment;
|
|
|
|
QString name;
|
|
bool wholeFunction = false;
|
|
};
|
|
#endif // ADDRESSABLEITEMCONTEXTMENU_H
|