MainWindow

class MainWindow : public QMainWindow

Public Types

enum MenuType

Values:

enumerator File
enumerator Edit
enumerator View
enumerator Windows
enumerator Debug
enumerator Help
enumerator Plugins
enum AddressTypeHint

Values:

enumerator Function
enumerator Data
enumerator Unknown
enum ContextMenuType

Values:

enumerator Disassembly
enumerator Addressable

Public Functions

explicit MainWindow(QWidget *parent = nullptr)
~MainWindow() override
void openNewFile(InitialOptions &options, bool skipOptionsDialog = false)
void displayNewFileDialog()
void displayWelcomeDialog()

displays the WelocmeDialog

Upon first execution of Cutter, the WelcomeDialog would be showed to the user. The Welcome dialog would be showed after a reset of Cutter’s preferences by the user.

void closeNewFileDialog()
bool openProject(const QString &project_name)
RzProjectErr saveProject(bool *canceled)
RzProjectErr saveProjectAs(bool *canceled)
void showProjectSaveError(RzProjectErr err)
void closeEvent(QCloseEvent *event) override
void paintEvent(QPaintEvent *event) override
void readSettings()
void saveSettings()
void setFilename(const QString &fn)
void refreshOmniBar(const QStringList &flags)
void addWidget(CutterDockWidget *widget)
void addMemoryDockWidget(MemoryDockWidget *widget)
void removeWidget(CutterDockWidget *widget)
void addExtraWidget(CutterDockWidget *extraDock)
MemoryDockWidget *addNewMemoryWidget(MemoryWidgetType type, RVA address, bool synchronized = true)
inline void addPluginDockWidget(CutterDockWidget *dockWidget, QAction*)
void addPluginDockWidget(CutterDockWidget *dockWidget)
QMenu *getMenuByType(MenuType type)

Getter for MainWindow’s different menus.

Parameters

type – The type which represents the desired menu

Returns

The requested menu or nullptr if “type” is invalid

void addMenuFileAction(QAction *action)
inline QString getFilename() const
void messageBoxWarning(QString title, QString message)

Show a warning message box.

This API can either be used in Cutter internals, or by Python plugins.

QString getUniqueObjectName(const QString &widgetType) const
void showMemoryWidget()
void showMemoryWidget(MemoryWidgetType type)
QMenu *createShowInMenu(QWidget *parent, RVA address, AddressTypeHint addressType = AddressTypeHint::Unknown)
void setCurrentMemoryWidget(MemoryDockWidget *memoryWidget)
MemoryDockWidget *getLastMemoryWidget()
QMenu *getContextMenuExtensions(ContextMenuType type)

Fetches the pointer to a context menu extension of type.

Parameters

type – - the type of the context menu

Returns

plugins submenu of the selected context menu

Public Members

bool responsive

Public Slots

void finalizeOpen()
void refreshAll()
void seekToFunctionLastInstruction()
void seekToFunctionStart()
void setTabLocation()
void on_actionTabs_triggered()
void on_actionAnalyze_triggered()

A signal that creates an AsyncTask to re-analyze the current file.

void lockDocks(bool lock)
void on_actionRun_Script_triggered()
void toggleResponsive(bool maybe)
void openNewFileFailed()
void toggleOverview(bool visibility, GraphWidget *targetGraph)