78 explicit
Settings(QObject* parent =
nullptr);
81 return values_.language;
84 return values_.themeMode;
87 return values_.autosaveOnClose;
90 return values_.autosaveIntervalMinutes;
93 return values_.importDefaultPath;
96 return values_.importPoppler;
99 return values_.importOpenCv;
102 return values_.importTesseract;
105 return values_.importParser;
108 return values_.importMatcher;
111 return values_.exportDefaultDirectory;
114 return values_.exportArchiveFormat;
117 return values_.exportIncludeFormulas;
120 return values_.analysisDefaultDateMode;
123 return values_.analysisDefaultYear;
126 return values_.toolbarShowBooking;
129 return values_.toolbarShowActors;
132 return values_.toolbarShowProperties;
135 return values_.toolbarShowContracts;
138 return values_.toolbarShowImport;
141 return values_.toolbarShowExport;
144 return values_.toolbarShowAnalysis;
147 return values_.toolbarShowAnnual;
150 return values_.toolbarShowSettings;
267 bool operator==(
const Values& other)
const;
270 static QString normalizeText(
const QString& value);
271 static QString normalizeThemeMode(
const QString& value);
272 static int normalizeArchiveFormat(
int value)
noexcept;
273 static int normalizeAutosaveIntervalMinutes(
int value)
noexcept;
274 static Values defaultValues();
276 template<
typename TValue,
typename TSignal>
277 void updateSetting(TValue& target, TValue value, TSignal signal) {
278 if (target == value) {
281 target = std::move(value);
286 void emitStateChanged();
287 void applyDefaults();
288 void loadFromPersistentStore();
289 void persistToStore()
const;
290 void captureSavedState();
291 void emitAllValueChanged();
bool toolbarShowExport() const noexcept
bool toolbarShowActors() const noexcept
void toolbarShowAnnualChanged()
void setToolbarShowExport(bool value)
void stateChanged()
Emitted when any settings value changes.
void importTesseractChanged()
bool hasChanges() const noexcept
Returns whether current values differ from the last saved state.
void setToolbarShowBooking(bool value)
void setAnalysisDefaultDateMode(const QString &value)
void analysisDefaultYearChanged()
void toolbarShowActorsChanged()
void setImportOpenCv(const QString &value)
QString importDefaultPath() const
int analysisDefaultYear() const noexcept
void setToolbarShowAnalysis(bool value)
void save()
Saves current settings to the platform settings store.
void importOpenCvChanged()
void setThemeMode(const QString &value)
void importDefaultPathChanged()
void setImportTesseract(const QString &value)
void setAnalysisDefaultYear(int value)
bool toolbarShowProperties
bool exportIncludeFormulas() const noexcept
QString exportDefaultDirectory
bool toolbarShowProperties() const noexcept
bool toolbarShowContracts
void analysisDefaultDateModeChanged()
bool toolbarShowBooking() const noexcept
QString analysisDefaultDateMode() const
void toolbarShowPropertiesChanged()
void autosaveOnCloseChanged()
void setExportArchiveFormat(int value)
void toolbarShowContractsChanged()
void setImportPoppler(const QString &value)
QString importTesseract() const
void toolbarShowExportChanged()
void load()
Loads persisted settings from the platform settings store.
int exportArchiveFormat() const noexcept
void importParserChanged()
void setToolbarShowImport(bool value)
void reset()
Emitted after settings have been reset to defaults.
void setAutosaveOnClose(bool value)
void importMatcherChanged()
void toolbarShowBookingChanged()
void toolbarShowImportChanged()
bool toolbarShowSettings() const noexcept
void setToolbarShowActors(bool value)
void setImportDefaultPath(const QString &value)
bool toolbarShowContracts() const noexcept
void setImportParser(const QString &value)
void setToolbarShowSettings(bool value)
QString themeMode() const
void resetToDefaults()
Restores default settings values in memory.
void saved()
Emitted after settings have been persisted.
bool toolbarShowAnalysis() const noexcept
void autosaveIntervalMinutesChanged()
Settings(QObject *parent=nullptr)
Creates the settings store exposed to QML.
void setLanguage(const QString &value)
int autosaveIntervalMinutes() const noexcept
void exportDefaultDirectoryChanged()
QString importDefaultPath
QString importParser() const
bool exportIncludeFormulas
void setExportDefaultDirectory(const QString &value)
void setToolbarShowProperties(bool value)
QString analysisDefaultDateMode
QString importMatcher() const
void exportArchiveFormatChanged()
void toolbarShowSettingsChanged()
QString importPoppler() const
bool toolbarShowImport() const noexcept
QString importOpenCv() const
int autosaveIntervalMinutes
void setAutosaveIntervalMinutes(int value)
void setToolbarShowContracts(bool value)
void toolbarShowAnalysisChanged()
void setExportIncludeFormulas(bool value)
bool toolbarShowAnnual() const noexcept
void setToolbarShowAnnual(bool value)
void importPopplerChanged()
bool autosaveOnClose() const noexcept
QString exportDefaultDirectory() const
void exportIncludeFormulasChanged()
void setImportMatcher(const QString &value)