Save/Restore window positions

- #29 - Settings window
- #28 - zboard
- #27 - turnstile
- turnstile progress
- import keys
- export keys
This commit is contained in:
adityapk00
2018-11-06 07:58:20 -08:00
parent 6e1d621b87
commit 23018c19cd
4 changed files with 24 additions and 6 deletions

View File

@@ -122,4 +122,13 @@ QString Settings::getZECUSDDisplayFormat(double bal) {
return getZECDisplayFormat(bal) % " (" % getUSDFormat(bal) % ")";
else
return getZECDisplayFormat(bal);
}
void Settings::saveRestore(QDialog* d) {
d->restoreGeometry(QSettings().value(d->objectName() % "geometry").toByteArray());
QObject::connect(d, &QDialog::finished, [=](auto) {
QSettings().setValue(d->objectName() % "geometry", d->saveGeometry());
});
}