Added logic to save/recall Qt family keyboard window location and size.

This commit is contained in:
mjbudd77 2022-03-06 04:59:13 -05:00
parent 6c42f9588c
commit 540b62f487
1 changed files with 10 additions and 0 deletions

View File

@ -28,6 +28,7 @@
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QFontDialog>
#include <QSettings>
#include "Qt/main.h"
#include "Qt/dface.h"
@ -516,6 +517,7 @@ FKBConfigDialog::FKBConfigDialog(QWidget *parent)
QPushButton *closeButton;
QTreeWidgetItem *item;
QMenuBar *menuBar;
QSettings settings;
setWindowTitle( "Family Keyboard" );
@ -585,13 +587,21 @@ FKBConfigDialog::FKBConfigDialog(QWidget *parent)
updateTimer->start(500); // 2hz
updateStatusLabel();
// Restore Window Geometry
restoreGeometry(settings.value("familyKeyboard/geometry").toByteArray());
}
//----------------------------------------------------------------------------
FKBConfigDialog::~FKBConfigDialog(void)
{
QSettings settings;
fkbWin = NULL;
updateTimer->stop();
// Save Window Geometry
settings.setValue("familyKeyboard/geometry", saveGeometry());
}
//----------------------------------------------------------------------------
QMenuBar *FKBConfigDialog::buildMenuBar(void)