MainWindow

class MainWindow

Public Types

enum MenuType

Values:

File
Edit
View
Windows
Debug
Help
Plugins

Public Functions

MainWindow(QWidget *parent)
~MainWindow()
void openNewFile(InitialOptions &options, bool skipOptionsDialog)
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)

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)

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 addToDockWidgetList(QDockWidget *dockWidget)
void addDockWidgetAction(QDockWidget *dockWidget, QAction *action)
void addExtraWidget(CutterDockWidget *extraDock)
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.

Public Members

bool responsive

Public Slots

void finalizeOpen()
void refreshAll()
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)