"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libs/ui/KisMainWindow.cpp" between
krita-5.1.3.tar.xz and krita-5.1.4.tar.xz

About: Krita is a painting program offering art tools for everyone (concept art, texture and matte painters, illustrations and comics).

KisMainWindow.cpp  (krita-5.1.3.tar.xz):KisMainWindow.cpp  (krita-5.1.4.tar.xz)
skipping to change at line 241 skipping to change at line 241
KisAction *importAnimation {nullptr}; KisAction *importAnimation {nullptr};
KisAction *importVideoAnimation {nullptr}; KisAction *importVideoAnimation {nullptr};
KisAction *renderAnimation {nullptr}; KisAction *renderAnimation {nullptr};
KisAction *renderAnimationAgain {nullptr}; KisAction *renderAnimationAgain {nullptr};
KisAction *closeAll {nullptr}; KisAction *closeAll {nullptr};
KisAction *importFile {nullptr}; KisAction *importFile {nullptr};
KisAction *exportFile {nullptr}; KisAction *exportFile {nullptr};
KisAction *exportFileAdvance {nullptr}; KisAction *exportFileAdvance {nullptr};
KisAction *undo {nullptr}; KisAction *undo {nullptr};
KisAction *redo {nullptr}; KisAction *redo {nullptr};
KisAction *newWindow {nullptr};
KisAction *close {nullptr}; KisAction *close {nullptr};
KisAction *mdiCascade {nullptr}; KisAction *mdiCascade {nullptr};
KisAction *mdiTile {nullptr}; KisAction *mdiTile {nullptr};
KisAction *mdiNextWindow {nullptr}; KisAction *mdiNextWindow {nullptr};
KisAction *mdiPreviousWindow {nullptr}; KisAction *mdiPreviousWindow {nullptr};
KisAction *toggleDockers {nullptr}; KisAction *toggleDockers {nullptr};
KisAction *resetConfigurations {nullptr}; KisAction *resetConfigurations {nullptr};
KisAction *toggleDockerTitleBars {nullptr}; KisAction *toggleDockerTitleBars {nullptr};
#ifndef Q_OS_ANDROID
KisAction *toggleDetachCanvas {nullptr}; KisAction *toggleDetachCanvas {nullptr};
KisAction *newWindow {nullptr};
#endif
KisAction *fullScreenMode {nullptr}; KisAction *fullScreenMode {nullptr};
KisAction *showSessionManager {nullptr}; KisAction *showSessionManager {nullptr};
KisAction *commandBarAction {nullptr}; KisAction *commandBarAction {nullptr};
KisAction *expandingSpacers[2]; KisAction *expandingSpacers[2];
KActionMenu *styleMenu {nullptr}; KActionMenu *styleMenu {nullptr};
QActionGroup* styleActions {nullptr}; QActionGroup* styleActions {nullptr};
QMap<QString, QAction*> actionMap; QMap<QString, QAction*> actionMap;
KActionMenu *dockWidgetMenu {nullptr}; KActionMenu *dockWidgetMenu {nullptr};
skipping to change at line 958 skipping to change at line 960
} }
bool KisMainWindow::canvasDetached() const bool KisMainWindow::canvasDetached() const
{ {
return centralWidget() != d->widgetStack; return centralWidget() != d->widgetStack;
} }
void KisMainWindow::setCanvasDetached(bool detach) void KisMainWindow::setCanvasDetached(bool detach)
{ {
#ifdef Q_OS_ANDROID
if (detach) {
QMessageBox::warning(this, i18nc("@title:window", "Krita"),
"Detach Canvas is unsupported on Android");
}
#else
if (detach == canvasDetached()) return; if (detach == canvasDetached()) return;
QWidget *outgoingWidget = centralWidget() ? takeCentralWidget() : nullptr; QWidget *outgoingWidget = centralWidget() ? takeCentralWidget() : nullptr;
QWidget *incomingWidget = d->canvasWindow->swapMainWidget(outgoingWidget); QWidget *incomingWidget = d->canvasWindow->swapMainWidget(outgoingWidget);
if (incomingWidget) { if (incomingWidget) {
setCentralWidget(incomingWidget); setCentralWidget(incomingWidget);
} }
if (detach) { if (detach) {
d->canvasWindow->show(); d->canvasWindow->show();
} else { } else {
d->canvasWindow->hide(); d->canvasWindow->hide();
} }
d->toggleDetachCanvas->setChecked(detach); d->toggleDetachCanvas->setChecked(detach);
#endif
} }
QWidget * KisMainWindow::canvasWindow() const QWidget * KisMainWindow::canvasWindow() const
{ {
return d->canvasWindow; return d->canvasWindow;
} }
void KisMainWindow::setReadWrite(bool readwrite) void KisMainWindow::setReadWrite(bool readwrite)
{ {
d->saveAction->setEnabled(readwrite); d->saveAction->setEnabled(readwrite);
skipping to change at line 2465 skipping to change at line 2474
if (!primaryWindow) return; if (!primaryWindow) return;
swapWorkspaces(this, primaryWindow); swapWorkspaces(this, primaryWindow);
} }
} }
void KisMainWindow::updateWindowMenu() void KisMainWindow::updateWindowMenu()
{ {
QMenu *menu = d->windowMenu->menu(); QMenu *menu = d->windowMenu->menu();
menu->clear(); menu->clear();
#ifndef Q_OS_ANDROID
menu->addAction(d->newWindow); menu->addAction(d->newWindow);
#endif
menu->addAction(d->documentMenu); menu->addAction(d->documentMenu);
QMenu *docMenu = d->documentMenu->menu(); QMenu *docMenu = d->documentMenu->menu();
docMenu->clear(); docMenu->clear();
QFontMetrics fontMetrics = docMenu->fontMetrics(); QFontMetrics fontMetrics = docMenu->fontMetrics();
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
QRect geom = this->geometry(); QRect geom = this->geometry();
QPoint p(geom.width() / 2 + geom.left(), geom.height() / 2 + geom.top()); QPoint p(geom.width() / 2 + geom.left(), geom.height() / 2 + geom.top());
QScreen *screen = qApp->screenAt(p); QScreen *screen = qApp->screenAt(p);
skipping to change at line 2718 skipping to change at line 2729
{ {
KisDocument *doc = qobject_cast<KisDocument*>(document); KisDocument *doc = qobject_cast<KisDocument*>(document);
KisView *view = addViewAndNotifyLoadingCompleted(doc, subWindow); KisView *view = addViewAndNotifyLoadingCompleted(doc, subWindow);
d->actionManager()->updateGUI(); d->actionManager()->updateGUI();
return view; return view;
} }
void KisMainWindow::newWindow() void KisMainWindow::newWindow()
{ {
#ifdef Q_OS_ANDROID
// Check if current mainwindow exists, just to be sure.
if (KisPart::instance()->currentMainwindow()) {
QMessageBox::warning(this, i18nc("@title:window", "Krita"),
"Creating a New Main Window is unsupported on Andro
id");
return;
}
#endif
KisMainWindow *mainWindow = KisPart::instance()->createMainWindow(); KisMainWindow *mainWindow = KisPart::instance()->createMainWindow();
mainWindow->initializeGeometry(); mainWindow->initializeGeometry();
mainWindow->show(); mainWindow->show();
} }
void KisMainWindow::closeCurrentWindow() void KisMainWindow::closeCurrentWindow()
{ {
if (d->mdiArea->currentSubWindow()) { if (d->mdiArea->currentSubWindow()) {
d->mdiArea->currentSubWindow()->close(); d->mdiArea->currentSubWindow()->close();
d->actionManager()->updateGUI(); d->actionManager()->updateGUI();
skipping to change at line 2872 skipping to change at line 2891
connect(this, SIGNAL(themeChanged()), d->welcomePage, SLOT(slotUpdateThemeCo lors()), Qt::UniqueConnection); connect(this, SIGNAL(themeChanged()), d->welcomePage, SLOT(slotUpdateThemeCo lors()), Qt::UniqueConnection);
d->toggleDockers = actionManager->createAction("view_toggledockers"); d->toggleDockers = actionManager->createAction("view_toggledockers");
KisConfig(true).showDockers(true); KisConfig(true).showDockers(true);
d->toggleDockers->setChecked(true); d->toggleDockers->setChecked(true);
connect(d->toggleDockers, SIGNAL(toggled(bool)), SLOT(toggleDockersVisibilit y(bool))); connect(d->toggleDockers, SIGNAL(toggled(bool)), SLOT(toggleDockersVisibilit y(bool)));
d->resetConfigurations = actionManager->createAction("reset_configurations" ); d->resetConfigurations = actionManager->createAction("reset_configurations" );
connect(d->resetConfigurations, SIGNAL(triggered()), this, SLOT(slotResetCon figurations())); connect(d->resetConfigurations, SIGNAL(triggered()), this, SLOT(slotResetCon figurations()));
#ifndef Q_OS_ANDROID
d->toggleDetachCanvas = actionManager->createAction("view_detached_canvas"); d->toggleDetachCanvas = actionManager->createAction("view_detached_canvas");
d->toggleDetachCanvas->setChecked(false); d->toggleDetachCanvas->setChecked(false);
connect(d->toggleDetachCanvas, SIGNAL(toggled(bool)), SLOT(setCanvasDetached (bool))); connect(d->toggleDetachCanvas, SIGNAL(toggled(bool)), SLOT(setCanvasDetached (bool)));
#endif
setCanvasDetached(false); setCanvasDetached(false);
d->toggleDockerTitleBars = actionManager->createAction("view_toggledockertit lebars"); d->toggleDockerTitleBars = actionManager->createAction("view_toggledockertit lebars");
d->toggleDockerTitleBars->setChecked(KisConfig(false).showDockerTitleBars()) ; d->toggleDockerTitleBars->setChecked(KisConfig(false).showDockerTitleBars()) ;
connect(d->toggleDockerTitleBars, SIGNAL(toggled(bool)), SLOT(showDockerTitl eBars(bool))); connect(d->toggleDockerTitleBars, SIGNAL(toggled(bool)), SLOT(showDockerTitl eBars(bool)));
actionCollection()->addAction("settings_dockers_menu", d->dockWidgetMenu); actionCollection()->addAction("settings_dockers_menu", d->dockWidgetMenu);
actionCollection()->addAction("window", d->windowMenu); actionCollection()->addAction("window", d->windowMenu);
actionCollection()->addAction("style_menu", d->styleMenu); // for widget sty les: breeze, fusion, etc actionCollection()->addAction("style_menu", d->styleMenu); // for widget sty les: breeze, fusion, etc
skipping to change at line 2898 skipping to change at line 2919
d->mdiTile = actionManager->createAction("windows_tile"); d->mdiTile = actionManager->createAction("windows_tile");
connect(d->mdiTile, SIGNAL(triggered()), d->mdiArea, SLOT(tileSubWindows())) ; connect(d->mdiTile, SIGNAL(triggered()), d->mdiArea, SLOT(tileSubWindows())) ;
d->mdiNextWindow = actionManager->createAction("windows_next"); d->mdiNextWindow = actionManager->createAction("windows_next");
connect(d->mdiNextWindow, SIGNAL(triggered()), d->mdiArea, SLOT(activateNext SubWindow())); connect(d->mdiNextWindow, SIGNAL(triggered()), d->mdiArea, SLOT(activateNext SubWindow()));
d->mdiPreviousWindow = actionManager->createAction("windows_previous"); d->mdiPreviousWindow = actionManager->createAction("windows_previous");
connect(d->mdiPreviousWindow, SIGNAL(triggered()), d->mdiArea, SLOT(activate PreviousSubWindow())); connect(d->mdiPreviousWindow, SIGNAL(triggered()), d->mdiArea, SLOT(activate PreviousSubWindow()));
#ifndef Q_OS_ANDROID
d->newWindow = actionManager->createAction("view_newwindow"); d->newWindow = actionManager->createAction("view_newwindow");
connect(d->newWindow, SIGNAL(triggered(bool)), this, SLOT(newWindow())); connect(d->newWindow, SIGNAL(triggered(bool)), this, SLOT(newWindow()));
#endif
d->close = actionManager->createStandardAction(KStandardAction::Close, this, SLOT(closeCurrentWindow())); d->close = actionManager->createStandardAction(KStandardAction::Close, this, SLOT(closeCurrentWindow()));
d->showSessionManager = actionManager->createAction("file_sessions"); d->showSessionManager = actionManager->createAction("file_sessions");
connect(d->showSessionManager, SIGNAL(triggered(bool)), this, SLOT(slotShowS essionManager())); connect(d->showSessionManager, SIGNAL(triggered(bool)), this, SLOT(slotShowS essionManager()));
d->commandBarAction = actionManager->createAction("command_bar_open"); d->commandBarAction = actionManager->createAction("command_bar_open");
connect(d->commandBarAction, SIGNAL(triggered(bool)), this, SLOT(openCommand Bar())); connect(d->commandBarAction, SIGNAL(triggered(bool)), this, SLOT(openCommand Bar()));
actionManager->createStandardAction(KStandardAction::Preferences, this, SLOT (slotPreferences())); actionManager->createStandardAction(KStandardAction::Preferences, this, SLOT (slotPreferences()));
 End of changes. 12 change blocks. 
1 lines changed or deleted 25 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)