Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
63 lines (52 sloc) 1.76 KB
#ifndef DISASSEMBLERACTIONS_H
#define DISASSEMBLERACTIONS_H
#include <QAction>
#include <QObject>
#include <QMenu>
#include <redasm/disassembler/listing/listingrenderer.h>
class DisassemblerActions : public QObject
{
Q_OBJECT
public:
enum { Rename = 0, XRefs, Follow, FollowPointerHexDump,
CallGraph, Goto, HexDump, HexDumpFunction, Comment,
Back, Forward, Copy,
ItemInformation };
public:
explicit DisassemblerActions(QWidget *parent = nullptr);
explicit DisassemblerActions(REDasm::ListingRenderer *renderer, QWidget *parent = nullptr);
void setCurrentRenderer(REDasm::ListingRenderer* renderer);
REDasm::ListingRenderer* renderer() const;
public slots:
bool followUnderCursor();
void setEnabled(bool b);
void popup(const QPoint& pos);
void copy();
private slots:
void adjustActions();
void goTo(address_t address);
void renameSymbolUnderCursor();
void showReferencesUnderCursor();
void printFunctionHexDump();
void followPointerHexDump();
void showCallGraph();
void showHexDump();
void addComment();
void goForward();
void goBack();
private:
QWidget* widget() const;
void createActions();
signals:
void hexDumpRequested(address_t address, u64 len);
void referencesRequested(address_t address);
void callGraphRequested(address_t address);
void itemInformationRequested();
void gotoDialogRequested();
void switchToHexDump();
private:
REDasm::ListingRenderer* m_renderer;
QHash<int, QAction*> m_actions;
QMenu* m_contextmenu;
};
#endif // DISASSEMBLERACTIONS_H
You can’t perform that action at this time.