Mercurial > hg > octave-terminal
changeset 13398:877f82caaee3
Quint saves and restores it's window state.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Mon, 11 Apr 2011 16:45:28 +0200 |
parents | 54756573cc1b |
children | d5566981b3ac |
files | gui//src/MainWindow.cpp |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gui//src/MainWindow.cpp +++ b/gui//src/MainWindow.cpp @@ -20,7 +20,7 @@ #include <QMenu> #include <QAction> #include <QtWebKit/QWebView> - +#include <QSettings> #include "MainWindow.h" MainWindow::MainWindow(QWidget *parent) @@ -32,6 +32,9 @@ } MainWindow::~MainWindow() { + QSettings settings("GNU", "Quint"); + settings.setValue("MainWindow/geometry", saveGeometry()); + settings.setValue("MainWindow/windowState", saveState()); } void MainWindow::constructWindow() { @@ -46,6 +49,10 @@ addDockWidget(Qt::LeftDockWidgetArea, m_variablesDockWidget); addDockWidget(Qt::LeftDockWidgetArea, m_historyDockWidget); addDockWidget(Qt::RightDockWidgetArea, m_filesDockWidget); + + QSettings settings("GNU", "Quint"); + restoreGeometry(settings.value("MainWindow/geometry").toByteArray()); + restoreState(settings.value("MainWindow/windowState").toByteArray()); } void MainWindow::establishOctaveLink() {