forked from qt-creator/qt-creator
Core: Refactor handling of "window state" actions out of MainWindow
Currently the actions for fullscreen, minimize and zoom only apply to the main window, even if a different window is active. Refactor the handling of these actions into a WindowSupport class, and use that instead for the main window. In a second step, this will be used to add the functionality to the corresponding external windows (e.g. help and editor windows) Change-Id: Ief2c880f40948c3bb724196d6e0cfe888b8ece89 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -76,6 +76,7 @@ class ToolSettings;
|
||||
class MimeTypeSettings;
|
||||
class StatusBarManager;
|
||||
class VersionDialog;
|
||||
class WindowSupport;
|
||||
class SystemEditor;
|
||||
|
||||
class MainWindow : public Utils::AppMainWindow
|
||||
@@ -107,8 +108,6 @@ public:
|
||||
|
||||
void setOverrideColor(const QColor &color);
|
||||
|
||||
void updateFullScreenAction();
|
||||
|
||||
bool isNewItemDialogRunning() const;
|
||||
|
||||
signals:
|
||||
@@ -119,7 +118,6 @@ public slots:
|
||||
void newFile();
|
||||
void openFileWith();
|
||||
void exit();
|
||||
void toggleFullScreen();
|
||||
|
||||
void showNewItemDialog(const QString &title,
|
||||
const QList<IWizardFactory *> &factories,
|
||||
@@ -167,6 +165,7 @@ private:
|
||||
Context m_additionalContexts;
|
||||
SettingsDatabase *m_settingsDatabase;
|
||||
mutable QPrinter *m_printer;
|
||||
WindowSupport *m_windowSupport;
|
||||
ActionManager *m_actionManager;
|
||||
EditorManager *m_editorManager;
|
||||
ExternalToolManager *m_externalToolManager;
|
||||
@@ -205,9 +204,6 @@ private:
|
||||
QAction *m_optionsAction;
|
||||
QAction *m_toggleSideBarAction;
|
||||
QAction *m_toggleModeSelectorAction;
|
||||
QAction *m_toggleFullScreenAction;
|
||||
QAction *m_minimizeAction;
|
||||
QAction *m_zoomAction;
|
||||
|
||||
QToolButton *m_toggleSideBarButton;
|
||||
QColor m_overrideColor;
|
||||
|
||||
Reference in New Issue
Block a user