cutter/src/widgets/PseudocodeWidget.h

61 lines
1.3 KiB
C
Raw Normal View History

#ifndef PSEUDOCODEWIDGET_H
#define PSEUDOCODEWIDGET_H
#include <memory>
#include "core/Cutter.h"
#include "MemoryDockWidget.h"
#include "Decompiler.h"
2018-03-21 20:32:32 +00:00
namespace Ui {
class PseudocodeWidget;
}
class QTextEdit;
2019-07-11 13:21:54 +00:00
class QSyntaxHighlighter;
class QTextCursor;
class DisassemblyContextMenu;
struct DecompiledCodeTextLine;
class PseudocodeWidget : public MemoryDockWidget
{
2018-03-21 20:32:32 +00:00
Q_OBJECT
protected:
DisassemblyContextMenu *mCtxMenu;
public:
explicit PseudocodeWidget(MainWindow *main, QAction *action = nullptr);
~PseudocodeWidget();
public slots:
void showDisasContextMenu(const QPoint &pt);
private slots:
void fontsUpdated();
void colorsUpdatedSlot();
void refreshPseudocode();
2019-07-16 18:33:05 +00:00
void decompilerSelected();
void cursorPositionChanged();
void seekChanged();
void decompilationFinished(AnnotatedCode code);
private:
std::unique_ptr<Ui::PseudocodeWidget> ui;
2019-07-11 13:21:54 +00:00
QSyntaxHighlighter *syntaxHighlighter;
bool decompilerSelectionEnabled;
AnnotatedCode code;
bool seekFromCursor = false;
void doRefresh(RVA addr);
void setupFonts();
void updateSelection();
void connectCursorPositionChanged(bool disconnect);
void updateCursorPosition();
QString getWindowTitle() const override;
};
#endif // PSEUDOCODEWIDGET_H