MainWindow

class MainWindow

Inherits from QMainWindow

Public Types

enum MenuType

Values:

File
Edit
View
Windows
Debug
Help
Plugins

Public Functions

MainWindow(QWidget *parent = nullptr)
~MainWindow()
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()
void openProject(const QString &project_name)
void initUI()
bool saveProject(bool quit = false)

Return
if quit is true, false if the application should not close
Parameters
  • quit: whether to show destructive button in dialog

bool saveProjectAs(bool quit = false)

Return
false if the application should not close
Parameters
  • quit: whether to show destructive button in dialog

void closeEvent(QCloseEvent *event)
void paintEvent(QPaintEvent *event)
void readSettingsOrDefault()
void saveSettings()
void readDebugSettings()
void saveDebugSettings()
void setFilename(const QString &fn)
void refreshOmniBar(const QStringList &flags)
void addWidget(QDockWidget *widget)
void addMemoryDockWidget(MemoryDockWidget *widget)
void removeWidget(QDockWidget *widget)
void addExtraWidget(CutterDockWidget *extraDock)
MemoryDockWidget *addNewMemoryWidget(MemoryWidgetType type, RVA address, bool synchronized = true)
void addPluginDockWidget(QDockWidget *dockWidget, QAction *action)
QMenu *getMenuByType(MenuType type)

Getter for MainWindow’s different menus.

Return
The requested menu or nullptr if “type” is invalid
Parameters
  • type: The type which represents the desired menu

void addMenuFileAction(QAction *action)
void updateDockActionChecked(QAction *action)
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)
void setCurrentMemoryWidget(MemoryDockWidget *memoryWidget)

Public Members

bool responsive

Public Slots

void finalizeOpen()
void refreshAll()
void seekToFunctionLastInstruction()
void seekToFunctionStart()
void setPanelLock()
void setTabLocation()
void on_actionLock_triggered()
void on_actionLockUnlock_triggered()
void on_actionTabs_triggered()
void lockUnlock_Docks(bool what)
void on_actionRun_Script_triggered()
void toggleResponsive(bool maybe)
void openNewFileFailed()
void toggleOverview(bool visibility, GraphWidget *targetGraph)