summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@nokia.com>2010-10-27 11:44:29 +0200
committerYoann Lopes <yoann.lopes@nokia.com>2010-10-27 11:44:29 +0200
commit642202bc81c8a53ffb21a0d6f60d4e072d6c7788 (patch)
treecb9252fc1ff3835e09c6f739700eacffd72d2204
parentbf4f5d5fd15407b72a109ba3f4fa7dea0f1071ec (diff)
Save panels visibility in app settings.
-rw-r--r--src/mainwindow.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index f977859..207cd7e 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -816,6 +816,9 @@ void MainWindow::saveWindowSettings()
settings.setValue("size", size());
settings.setValue("maximized", isMaximized());
settings.setValue("pos", pos());
+ settings.setValue("show-explorer", ui->dockWidget->isVisible());
+ settings.setValue("show-panel", ui->frame->isVisible());
+ settings.setValue("show-output", ui->outputDock->isVisible());
}
/**************************************************************************************************
@@ -885,12 +888,22 @@ void MainWindow::restoreWindowSettings()
QSize size = settings.value("size", QSize(880, 600)).toSize();
bool maximized = settings.value("maximized", false).toBool();
QPoint pos = settings.value("pos").toPoint();
+ bool showExplorer = settings.value("show-explorer", true).toBool();
+ bool showPanel = settings.value("show-panel", true).toBool();
+ bool showOutput = settings.value("show-output", true).toBool();
resize(size);
if (!pos.isNull())
move(pos);
if (maximized)
showMaximized();
+
+ ui->actionShow_Explorer->setChecked(showExplorer);
+ ui->actionShow_Run_Panel->setChecked(showPanel);
+ ui->actionShow_Output->setChecked(showOutput);
+ ui->dockWidget->setVisible(showExplorer);
+ ui->frame->setVisible(showPanel);
+ ui->outputDock->setVisible(showOutput);
}
/**************************************************************************************************