Desktop: handle environmental states in Information tab

Create a preference setting on the General Settings page. The setting is saved
with the other preferences.

Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
willemferguson 2019-11-28 10:47:12 +02:00 committed by Dirk Hohndel
parent 33e49637ec
commit 7dc8a9850d
5 changed files with 29 additions and 0 deletions

View file

@ -22,6 +22,8 @@ class qPrefGeneral : public QObject {
Q_PROPERTY(bool diveshareExport_private READ diveshareExport_private WRITE set_diveshareExport_private NOTIFY diveshareExport_privateChanged);
Q_PROPERTY(bool filterFullTextNotes READ filterFullTextNotes WRITE set_filterFullTextNotes NOTIFY filterFullTextNotesChanged)
Q_PROPERTY(bool filterCaseSensitive READ filterCaseSensitive WRITE set_filterCaseSensitive NOTIFY filterCaseSensitiveChanged)
Q_PROPERTY(bool extraEnvironmentalDefault READ extraEnvironmentalDefault WRITE set_extraEnvironmentalDefault NOTIFY extraEnvironmentalDefaultChanged);
public:
qPrefGeneral(QObject *parent = NULL);
@ -48,6 +50,7 @@ public:
static bool diveshareExport_private() { return st_diveshareExport_private; }
static bool filterFullTextNotes() { return prefs.filterFullTextNotes; }
static bool filterCaseSensitive() { return prefs.filterCaseSensitive; }
static bool extraEnvironmentalDefault() { return prefs.extraEnvironmentalDefault; }
public slots:
static void set_auto_recalculate_thumbnails(bool value);
@ -65,6 +68,7 @@ public slots:
static void set_diveshareExport_private(bool value);
static void set_filterFullTextNotes(bool value);
static void set_filterCaseSensitive(bool value);
static void set_extraEnvironmentalDefault(bool value);
signals:
void auto_recalculate_thumbnailsChanged(bool value);
@ -81,7 +85,9 @@ signals:
void diveshareExport_uidChanged(const QString& value);
void diveshareExport_privateChanged(bool value);
void filterFullTextNotesChanged(bool value);
void salinityEditDefaultChanged(bool value);
void filterCaseSensitiveChanged(bool value);
void extraEnvironmentalDefaultChanged(bool value);
private:
static void disk_auto_recalculate_thumbnails(bool doSync);
@ -97,6 +103,7 @@ private:
static void disk_use_default_file(bool doSync);
static void disk_filterFullTextNotes(bool doSync);
static void disk_filterCaseSensitive(bool doSync);
static void disk_extraEnvironmentalDefault(bool doSync);
// class variables are load only
static void load_diveshareExport_uid();