From 5ecfc48d057a78b193b0f4f9c67e18240ad4e42c Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 13 May 2018 11:30:43 +0200 Subject: New MainWindow layout mockup. --- src/settings.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/settings.cc') diff --git a/src/settings.cc b/src/settings.cc index af34b70..3573f58 100644 --- a/src/settings.cc +++ b/src/settings.cc @@ -36,23 +36,23 @@ Settings::~Settings() { } -void Settings::loadGeometry(QSize& size, QPoint& pos) const +void Settings::loadGeometry(QByteArray &state, QByteArray &geometry) const { QSettings settings; settings.beginGroup("MainWindow"); - size = settings.value("size", QSize(700, 800)).toSize(); - pos = settings.value("pos", QPoint(0, 0)).toPoint(); + state = settings.value("state").toByteArray(); + geometry = settings.value("geometry").toByteArray(); settings.endGroup(); } -void Settings::saveGeometry(const QSize& size, const QPoint& pos) +void Settings::saveGeometry(const QByteArray &state, const QByteArray &geometry) { QSettings settings; settings.beginGroup("MainWindow"); - settings.setValue("size", size); - settings.setValue("pos", pos); + settings.setValue("state", state); + settings.setValue("geometry", geometry); settings.endGroup(); } -- cgit v1.2.3