8#ifndef KIS_MAIN_WINDOW_H
9#define KIS_MAIN_WINDOW_H
11#include "kritaui_export.h"
71 QMenu *createPopupMenu()
override;
80 virtual void showView(
KisView *view, QMdiSubWindow *subWindow = 0);
93 bool openDocument(
const QString &path, OpenFlags flags);
109 void showWelcomeScreen(
bool show);
121 bool saveDocument(
KisDocument *document,
bool saveas,
bool isExporting,
bool isAdvancedExporting =
false);
126 QDockWidget* dockWidget(
const QString &
id);
132 int viewCount()
const;
134 void saveWindowState(
bool restoreNormalState =
false);
144 bool restoreWorkspaceState(
const QByteArray &state);
151 QMdiSubWindow *subWindow = 0);
159 bool canvasDetached()
const;
170 bool hackIsSaving()
const;
173 bool installBundle(
const QString &fileName)
const;
179 QImage layoutThumbnail();
209 void sigFullscreenOnShow(
bool fullScreen);
218 void clearRecentFiles();
223 void removeRecentFile(QString url);
240 void slotFileOpen(
bool isImporting =
false);
248 void slotFileOpenRecent(
const QUrl &);
253 void slotPreferences();
261 void slotShowSessionManager();
268 KisView *newView(QObject *document, QMdiSubWindow *subWindow = 0);
270 void notifyChildViewDestroyed(
KisView *view);
273 void setActiveView(
KisView *view);
274 void unsetActiveView();
276 void subWindowActivated();
278 void windowFocused();
283 void setCanvasDetached(
bool detached);
288 void viewFullscreen(
bool fullScreen);
294 bool checkActiveBundlesAvailable();
295 bool checkPaintOpAvailable();
299 void slotLoadCompleted();
300 void slotLoadCanceled(
const QString &);
301 void slotSaveCompleted();
302 void slotSaveCanceled(
const QString &);
303 void forceDockTabFonts();
305 void slotUpdateWidgetStyle();
307 void slotUpdateSaveActionTitle(
const QString &documentPath);
308 void slotUpdateReadWriteMode(
bool readWrite);
313 void slotFileSaveAs();
326 void slotDocumentInfo();
331 bool slotFileCloseAll();
336 virtual void showAboutApplication();
346 void slotConfigureToolbars();
352 void slotNewToolbarConfig();
357 void slotResetConfigurations();
362 void slotToolbarToggled(
bool toggle);
367 void showDockerTitleBars(
bool show);
374 void slotImportFile();
381 void slotExportFile();
383 void slotExportAdvance();
388 void toggleDockersVisibility(
bool visible,
bool onWelcomePage =
false);
394 void slotThemeChanged();
398 void updateWindowMenu();
399 void updateSubwindowFlags();
400 void setActiveSubWindow(QWidget *window);
401 void configChanged();
404 void closeCurrentWindow();
408 void showErrorAndDie();
410 void initializeGeometry();
412 void switchTab(
int index);
414 void slotXmlGuiMakingChanges(
bool finished);
416 void orientationChanged();
418 void restoreWorkspace();
420 void openCommandBar();
422 void slotStoragesWarning(
const QString &location = QString());
427 void resizeEvent(QResizeEvent * e)
override;
428 void showEvent(QShowEvent *event)
override;
431 void dragMoveEvent(QDragMoveEvent *event)
override;
432 void dragLeaveEvent(QDragLeaveEvent *event)
override;
439 void dragMove(QDragMoveEvent *event);
449 void addView(
KisView *view, QMdiSubWindow *subWindow = 0);
462 bool openDocumentInternal(
const QString &path, KisMainWindow::OpenFlags f = KisMainWindow::OpenFlags());
464 void saveWindowSettings();
468 void createActions();
470 void applyToolBarLayout();
474 void customizeTabBar();
476 void setMainWindowLayoutForCurrentMainWidget(
int widgetIndex,
bool widgetIndexChanged);
477 void adjustLayoutForWelcomePage();
478 void applyActionIconOverridesFromLocalXML();
Q_DECLARE_FLAGS(KisUpdaterContextSnapshotEx, KisUpdaterContextSnapshotExTag)
KDE top level main window with predefined action layout
virtual bool windowsLayoutSavingAllowed() const
void closeEvent(QCloseEvent *) override
void guiLoadingFinished()
const KConfigGroup & windowStateConfig() const
void themeChanged()
This signal is emitted when the color theme changes.
KisViewManager * viewManager() const
QWidget * canvasWindow() const
void keyBindingsChanged()
This signal is emitted when the shortcut key configuration has changed.
void renderAnimationAgain()
void importVideoAnimation()
KisView * activeView() const
void restoringDone()
This signal is emitted right after the docker states have been successfully restored from config.
void activeViewChanged()
emitted when the current view has changed
A widget for displaying if no documents are open. This will display in the MDI area.
virtual QList< KoCanvasObserverBase * > canvasObservers() const =0
Q_DECLARE_OPERATORS_FOR_FLAGS(KisBaseRectsWalker::SubtreeVisitFlags)
QString icon
icon used in the sidebar. If left empty it will use the unknown icon
QString title
title used in the sidebar. If left empty it will be displayed as "Custom Document"
QWidget * widget
Pointer to the custom document widget.