mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add support for remembering settings
Use QSettings to provide persistent storage of settings. For example, we store and restore the size of the MainWindow. We use the organisation name hohndel.org and keep subsurface as the application name. A section is specified for things to do with the MainWindow; other sections could be added e.g. for preferred units? Signed-off-by: Amit Chaudhuri <amit.k.chaudhuri@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
1d0d42f861
commit
89f02c42aa
2 changed files with 42 additions and 0 deletions
|
@ -66,12 +66,17 @@ private Q_SLOTS:
|
|||
void on_actionAboutSubsurface_triggered();
|
||||
void on_actionUserManual_triggered();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *);
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
DiveTripModel *model;
|
||||
QSortFilterProxyModel *sortModel;
|
||||
QString filter();
|
||||
bool askSaveChanges();
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue