diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-05-27 15:42:22 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2018-05-27 23:08:12 +0300 |
commit | 308e079ad6414152fe72ba0784582734d6801b75 (patch) | |
tree | 2add927a9dd6d4e967c754f1ce4533444deddcf8 /core/subsurface-qt/SettingsObjectWrapper.h | |
parent | 23d38a982deafb6ef12f597a355dc4eae24b832f (diff) | |
download | subsurface-308e079ad6414152fe72ba0784582734d6801b75.tar.gz |
Dive pictures: automatically recalculate thumbnails
If a thumbnail and the original picture can be accessed and the
modification date of the thumbnail is before the modification date
of the picture, recalculate the thumbnail.
This causes more disk access and might give strange effects for
picture files with messed up file timestamps (i.e. lying in the
future) or messed up computer clocks (i.e. running in the past).
Therefore, add a preference option to disable the new behavior.
Default is set to enabled.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/subsurface-qt/SettingsObjectWrapper.h')
-rw-r--r-- | core/subsurface-qt/SettingsObjectWrapper.h | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/core/subsurface-qt/SettingsObjectWrapper.h b/core/subsurface-qt/SettingsObjectWrapper.h index f2c6745d8..a56175ea7 100644 --- a/core/subsurface-qt/SettingsObjectWrapper.h +++ b/core/subsurface-qt/SettingsObjectWrapper.h @@ -552,13 +552,14 @@ private: class GeneralSettingsObjectWrapper : public QObject { Q_OBJECT - Q_PROPERTY(QString default_filename READ defaultFilename WRITE setDefaultFilename NOTIFY defaultFilenameChanged) - Q_PROPERTY(QString default_cylinder READ defaultCylinder WRITE setDefaultCylinder NOTIFY defaultCylinderChanged) - Q_PROPERTY(short default_file_behavior READ defaultFileBehavior WRITE setDefaultFileBehavior NOTIFY defaultFileBehaviorChanged) - Q_PROPERTY(bool use_default_file READ useDefaultFile WRITE setUseDefaultFile NOTIFY useDefaultFileChanged) - Q_PROPERTY(int defaultsetpoint READ defaultSetPoint WRITE setDefaultSetPoint NOTIFY defaultSetPointChanged) - Q_PROPERTY(int o2consumption READ o2Consumption WRITE setO2Consumption NOTIFY o2ConsumptionChanged) - Q_PROPERTY(int pscr_ratio READ pscrRatio WRITE setPscrRatio NOTIFY pscrRatioChanged) + Q_PROPERTY(QString default_filename READ defaultFilename WRITE setDefaultFilename NOTIFY defaultFilenameChanged) + Q_PROPERTY(QString default_cylinder READ defaultCylinder WRITE setDefaultCylinder NOTIFY defaultCylinderChanged) + Q_PROPERTY(short default_file_behavior READ defaultFileBehavior WRITE setDefaultFileBehavior NOTIFY defaultFileBehaviorChanged) + Q_PROPERTY(bool use_default_file READ useDefaultFile WRITE setUseDefaultFile NOTIFY useDefaultFileChanged) + Q_PROPERTY(int defaultsetpoint READ defaultSetPoint WRITE setDefaultSetPoint NOTIFY defaultSetPointChanged) + Q_PROPERTY(int o2consumption READ o2Consumption WRITE setO2Consumption NOTIFY o2ConsumptionChanged) + Q_PROPERTY(int pscr_ratio READ pscrRatio WRITE setPscrRatio NOTIFY pscrRatioChanged) + Q_PROPERTY(bool auto_recalculate_thumbnails READ autoRecalculateThumbnails WRITE setAutoRecalculateThumbnails NOTIFY autoRecalculateThumbnailsChanged) public: GeneralSettingsObjectWrapper(QObject *parent); @@ -569,15 +570,17 @@ public: int defaultSetPoint() const; int o2Consumption() const; int pscrRatio() const; + bool autoRecalculateThumbnails() const; public slots: - void setDefaultFilename (const QString& value); - void setDefaultCylinder (const QString& value); - void setDefaultFileBehavior (short value); - void setUseDefaultFile (bool value); - void setDefaultSetPoint (int value); - void setO2Consumption (int value); - void setPscrRatio (int value); + void setDefaultFilename (const QString& value); + void setDefaultCylinder (const QString& value); + void setDefaultFileBehavior (short value); + void setUseDefaultFile (bool value); + void setDefaultSetPoint (int value); + void setO2Consumption (int value); + void setPscrRatio (int value); + void setAutoRecalculateThumbnails (bool value); signals: void defaultFilenameChanged(const QString& value); @@ -587,6 +590,7 @@ signals: void defaultSetPointChanged(int value); void o2ConsumptionChanged(int value); void pscrRatioChanged(int value); + void autoRecalculateThumbnailsChanged(int value); private: const QString group = QStringLiteral("GeneralSettings"); }; |