|
FOSSredder 0.5.0
|
Owns Settings view navigation and delegates persisted values. More...
#include <SettingsViewModel.h>


Signals | |
| void | changed () |
| Emitted when settings view model state changed. | |
Public Member Functions | |
| SettingsViewModel (QObject *parent=nullptr) | |
| Creates the settings view model. | |
| void | setNavigation (Navigation *value) |
| Sets the shell navigation object used by the settings page. | |
| void | setSettings (Settings *value) |
| Sets the settings state object used for persisted settings values. | |
| void | setActions (Actions *value) |
| Sets shell actions used for file browsing. | |
| void | setLanguageService (LanguageService *value) |
| Sets the language service used to build language options. | |
| int | currentCategory () const |
| Returns the currently selected settings category. | |
| QVariantList | categoryRows () const |
| Returns settings category rows for the sidebar. | |
| bool | canNavigateCategories () const noexcept |
| Returns whether category navigation is available. | |
| QVariantList | languageOptions () const |
| Returns available language options. | |
| int | languageIndex () const |
| Returns the selected language option index. | |
| QVariantList | themeModeOptions () const |
| Returns available theme mode options. | |
| int | themeModeIndex () const |
| Returns the selected theme mode index. | |
| QString | language () const |
| Returns the configured language code. | |
| void | setLanguage (const QString &value) |
| Updates the configured language code. | |
| QString | themeMode () const |
| Returns the configured theme mode. | |
| void | setThemeMode (const QString &value) |
| Updates the configured theme mode. | |
| bool | autosaveOnClose () const |
| Returns whether autosave on close is enabled. | |
| void | setAutosaveOnClose (bool value) |
| Updates whether autosave on close is enabled. | |
| QVariantList | autosaveIntervalOptions () const |
| Returns autosave interval options. | |
| int | autosaveIntervalIndex () const |
| Returns the selected autosave interval index. | |
| QString | importDefaultPath () const |
| Returns the default import path. | |
| void | setImportDefaultPath (const QString &value) |
| Updates the default import path. | |
| QString | importPoppler () const |
| Returns the configured Poppler path. | |
| void | setImportPoppler (const QString &value) |
| Updates the configured Poppler path. | |
| QString | importOpenCv () const |
| Returns the configured OpenCV path. | |
| void | setImportOpenCv (const QString &value) |
| Updates the configured OpenCV path. | |
| QString | importTesseract () const |
| Returns the configured Tesseract path. | |
| void | setImportTesseract (const QString &value) |
| Updates the configured Tesseract path. | |
| QString | importParser () const |
| Returns the configured import parser key. | |
| void | setImportParser (const QString &value) |
| Updates the configured import parser key. | |
| QString | importMatcher () const |
| Returns the configured import matcher key. | |
| void | setImportMatcher (const QString &value) |
| Updates the configured import matcher key. | |
| QString | exportDefaultDirectory () const |
| Returns the default export directory. | |
| void | setExportDefaultDirectory (const QString &value) |
| Updates the default export directory. | |
| int | exportArchiveFormat () const |
| Returns the configured export archive format index. | |
| void | setExportArchiveFormat (int value) |
| Updates the configured export archive format index. | |
| bool | exportIncludeFormulas () const |
| Returns whether exported spreadsheets include formulas. | |
| void | setExportIncludeFormulas (bool value) |
| Updates whether exported spreadsheets include formulas. | |
| bool | toolbarShowBooking () const |
| Returns whether the booking toolbar entry is visible. | |
| void | setToolbarShowBooking (bool value) |
| Updates whether the booking toolbar entry is visible. | |
| bool | toolbarShowImport () const |
| Returns whether the import toolbar entry is visible. | |
| void | setToolbarShowImport (bool value) |
| Updates whether the import toolbar entry is visible. | |
| bool | toolbarShowActors () const |
| Returns whether the actor toolbar entry is visible. | |
| void | setToolbarShowActors (bool value) |
| Updates whether the actor toolbar entry is visible. | |
| bool | toolbarShowExport () const |
| Returns whether the export toolbar entry is visible. | |
| void | setToolbarShowExport (bool value) |
| Updates whether the export toolbar entry is visible. | |
| bool | toolbarShowProperties () const |
| Returns whether the property toolbar entry is visible. | |
| void | setToolbarShowProperties (bool value) |
| Updates whether the property toolbar entry is visible. | |
| bool | toolbarShowAnalysis () const |
| Returns whether the analysis toolbar entry is visible. | |
| void | setToolbarShowAnalysis (bool value) |
| Updates whether the analysis toolbar entry is visible. | |
| bool | toolbarShowContracts () const |
| Returns whether the contract toolbar entry is visible. | |
| void | setToolbarShowContracts (bool value) |
| Updates whether the contract toolbar entry is visible. | |
| bool | toolbarShowAnnual () const |
| Returns whether the annual toolbar entry is visible. | |
| void | setToolbarShowAnnual (bool value) |
| Updates whether the annual toolbar entry is visible. | |
| bool | toolbarShowSettings () const |
| Returns whether the settings toolbar entry is visible. | |
| void | setToolbarShowSettings (bool value) |
| Updates whether the settings toolbar entry is visible. | |
| Q_INVOKABLE void | activate () |
| Activates the settings page state. | |
| Q_INVOKABLE void | navigateCategory (int delta) |
| Navigates settings categories by a relative delta. | |
| Q_INVOKABLE void | selectCategory (int category) |
| Selects a settings category. | |
| Q_INVOKABLE void | saveSettings () |
| Persists the current settings values. | |
| Q_INVOKABLE void | resetSettings () |
| Resets settings values to defaults. | |
| Q_INVOKABLE void | selectLanguageAt (int index) |
| Selects a language option by index. | |
| Q_INVOKABLE void | selectThemeModeAt (int index) |
| Selects a theme mode option by index. | |
| Q_INVOKABLE void | selectAutosaveIntervalAt (int index) |
| Selects an autosave interval option by index. | |
| Q_INVOKABLE void | browseImportPath () |
| Opens a browser for the import default path. | |
| Q_INVOKABLE void | browseExportDirectory () |
| Opens a browser for the export default directory. | |
Properties | |
| int | currentCategory |
| QVariantList | categoryRows |
| bool | canNavigateCategories |
| QVariantList | languageOptions |
| int | languageIndex |
| QVariantList | themeModeOptions |
| int | themeModeIndex |
| QString | language |
| QString | themeMode |
| bool | autosaveOnClose |
| QVariantList | autosaveIntervalOptions |
| int | autosaveIntervalIndex |
| QString | importDefaultPath |
| QString | importPoppler |
| QString | importOpenCv |
| QString | importTesseract |
| QString | importParser |
| QString | importMatcher |
| QString | exportDefaultDirectory |
| int | exportArchiveFormat |
| bool | exportIncludeFormulas |
| bool | toolbarShowBooking |
| bool | toolbarShowImport |
| bool | toolbarShowActors |
| bool | toolbarShowExport |
| bool | toolbarShowProperties |
| bool | toolbarShowAnalysis |
| bool | toolbarShowContracts |
| bool | toolbarShowAnnual |
| bool | toolbarShowSettings |
Owns Settings view navigation and delegates persisted values.
Definition at line 23 of file SettingsViewModel.h.
|
explicit |
Creates the settings view model.
| parent | Optional Qt parent object. |
Definition at line 59 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::activate | ( | ) |
Activates the settings page state.
Definition at line 179 of file SettingsViewModel.cpp.
| int ui::SettingsViewModel::autosaveIntervalIndex | ( | ) | const |
Returns the selected autosave interval index.
Definition at line 324 of file SettingsViewModel.cpp.
| QVariantList ui::SettingsViewModel::autosaveIntervalOptions | ( | ) | const |
Returns autosave interval options.
Definition at line 310 of file SettingsViewModel.cpp.
| bool ui::SettingsViewModel::autosaveOnClose | ( | ) | const |
Returns whether autosave on close is enabled.
Definition at line 300 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::browseExportDirectory | ( | ) |
Opens a browser for the export default directory.
Definition at line 544 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::browseImportPath | ( | ) |
Opens a browser for the import default path.
Definition at line 538 of file SettingsViewModel.cpp.
|
noexcept |
Returns whether category navigation is available.
Definition at line 175 of file SettingsViewModel.cpp.
| QVariantList ui::SettingsViewModel::categoryRows | ( | ) | const |
Returns settings category rows for the sidebar.
Definition at line 164 of file SettingsViewModel.cpp.
|
signal |
Emitted when settings view model state changed.


| int ui::SettingsViewModel::currentCategory | ( | ) | const |
Returns the currently selected settings category.
Definition at line 160 of file SettingsViewModel.cpp.
| int ui::SettingsViewModel::exportArchiveFormat | ( | ) | const |
Returns the configured export archive format index.
Definition at line 416 of file SettingsViewModel.cpp.
| QString ui::SettingsViewModel::exportDefaultDirectory | ( | ) | const |
Returns the default export directory.
Definition at line 406 of file SettingsViewModel.cpp.
| bool ui::SettingsViewModel::exportIncludeFormulas | ( | ) | const |
Returns whether exported spreadsheets include formulas.
Definition at line 426 of file SettingsViewModel.cpp.
| QString ui::SettingsViewModel::importDefaultPath | ( | ) | const |
Returns the default import path.
Definition at line 346 of file SettingsViewModel.cpp.
| QString ui::SettingsViewModel::importMatcher | ( | ) | const |
Returns the configured import matcher key.
Definition at line 396 of file SettingsViewModel.cpp.
| QString ui::SettingsViewModel::importOpenCv | ( | ) | const |
Returns the configured OpenCV path.
Definition at line 366 of file SettingsViewModel.cpp.
| QString ui::SettingsViewModel::importParser | ( | ) | const |
Returns the configured import parser key.
Definition at line 386 of file SettingsViewModel.cpp.
| QString ui::SettingsViewModel::importPoppler | ( | ) | const |
Returns the configured Poppler path.
Definition at line 356 of file SettingsViewModel.cpp.
| QString ui::SettingsViewModel::importTesseract | ( | ) | const |
Returns the configured Tesseract path.
Definition at line 376 of file SettingsViewModel.cpp.
| QString ui::SettingsViewModel::language | ( | ) | const |
Returns the configured language code.
Definition at line 255 of file SettingsViewModel.cpp.
| int ui::SettingsViewModel::languageIndex | ( | ) | const |
Returns the selected language option index.
Definition at line 228 of file SettingsViewModel.cpp.
| QVariantList ui::SettingsViewModel::languageOptions | ( | ) | const |
Returns available language options.
Definition at line 223 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::navigateCategory | ( | int | delta | ) |
Navigates settings categories by a relative delta.
| delta | Relative movement. |
Definition at line 189 of file SettingsViewModel.cpp.

| void ui::SettingsViewModel::resetSettings | ( | ) |
Resets settings values to defaults.
Definition at line 207 of file SettingsViewModel.cpp.

| void ui::SettingsViewModel::saveSettings | ( | ) |
Persists the current settings values.
Definition at line 526 of file SettingsViewModel.cpp.

| void ui::SettingsViewModel::selectAutosaveIntervalAt | ( | int | index | ) |
Selects an autosave interval option by index.
| index | Index into autosaveIntervalOptions(). |
Definition at line 336 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::selectCategory | ( | int | category | ) |
Selects a settings category.
| category | Category index. |
Definition at line 201 of file SettingsViewModel.cpp.

| void ui::SettingsViewModel::selectLanguageAt | ( | int | index | ) |
Selects a language option by index.
| index | Index into languageOptions(). |
Definition at line 281 of file SettingsViewModel.cpp.

| void ui::SettingsViewModel::selectThemeModeAt | ( | int | index | ) |
Selects a theme mode option by index.
| index | Index into themeModeOptions(). |
Definition at line 291 of file SettingsViewModel.cpp.

| void ui::SettingsViewModel::setActions | ( | Actions * | value | ) |
Sets shell actions used for file browsing.
| value | Actions object or nullptr. |
Definition at line 77 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setAutosaveOnClose | ( | bool | value | ) |
Updates whether autosave on close is enabled.
| value | True to enable autosave on close. |
Definition at line 304 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setExportArchiveFormat | ( | int | value | ) |
Updates the configured export archive format index.
| value | Archive format index. |
Definition at line 420 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setExportDefaultDirectory | ( | const QString & | value | ) |
Updates the default export directory.
| value | Export directory text. |
Definition at line 410 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setExportIncludeFormulas | ( | bool | value | ) |
Updates whether exported spreadsheets include formulas.
| value | True to include formulas. |
Definition at line 430 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setImportDefaultPath | ( | const QString & | value | ) |
Updates the default import path.
| value | Import path text. |
Definition at line 350 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setImportMatcher | ( | const QString & | value | ) |
Updates the configured import matcher key.
| value | Matcher key. |
Definition at line 400 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setImportOpenCv | ( | const QString & | value | ) |
Updates the configured OpenCV path.
| value | OpenCV path text. |
Definition at line 370 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setImportParser | ( | const QString & | value | ) |
Updates the configured import parser key.
| value | Parser key. |
Definition at line 390 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setImportPoppler | ( | const QString & | value | ) |
Updates the configured Poppler path.
| value | Poppler path text. |
Definition at line 360 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setImportTesseract | ( | const QString & | value | ) |
Updates the configured Tesseract path.
| value | Tesseract path text. |
Definition at line 380 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setLanguage | ( | const QString & | value | ) |
Updates the configured language code.
| value | Language code. |
Definition at line 262 of file SettingsViewModel.cpp.

| void ui::SettingsViewModel::setLanguageService | ( | LanguageService * | value | ) |
Sets the language service used to build language options.
| value | Language service or nullptr. |
Definition at line 85 of file SettingsViewModel.cpp.

| void ui::SettingsViewModel::setNavigation | ( | Navigation * | value | ) |
Sets the shell navigation object used by the settings page.
| value | Navigation object or nullptr. |
Definition at line 61 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setSettings | ( | Settings * | value | ) |
Sets the settings state object used for persisted settings values.
| value | Settings object or nullptr. |
Definition at line 69 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setThemeMode | ( | const QString & | value | ) |
Updates the configured theme mode.
| value | Theme mode key. |
Definition at line 275 of file SettingsViewModel.cpp.

| void ui::SettingsViewModel::setToolbarShowActors | ( | bool | value | ) |
Updates whether the actor toolbar entry is visible.
| value | True when visible. |
Definition at line 460 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setToolbarShowAnalysis | ( | bool | value | ) |
Updates whether the analysis toolbar entry is visible.
| value | True when visible. |
Definition at line 490 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setToolbarShowAnnual | ( | bool | value | ) |
Updates whether the annual toolbar entry is visible.
| value | True when visible. |
Definition at line 510 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setToolbarShowBooking | ( | bool | value | ) |
Updates whether the booking toolbar entry is visible.
| value | True when visible. |
Definition at line 440 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setToolbarShowContracts | ( | bool | value | ) |
Updates whether the contract toolbar entry is visible.
| value | True when visible. |
Definition at line 500 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setToolbarShowExport | ( | bool | value | ) |
Updates whether the export toolbar entry is visible.
| value | True when visible. |
Definition at line 470 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setToolbarShowImport | ( | bool | value | ) |
Updates whether the import toolbar entry is visible.
| value | True when visible. |
Definition at line 450 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setToolbarShowProperties | ( | bool | value | ) |
Updates whether the property toolbar entry is visible.
| value | True when visible. |
Definition at line 480 of file SettingsViewModel.cpp.
| void ui::SettingsViewModel::setToolbarShowSettings | ( | bool | value | ) |
Updates whether the settings toolbar entry is visible.
| value | True when visible. |
Definition at line 520 of file SettingsViewModel.cpp.
| QString ui::SettingsViewModel::themeMode | ( | ) | const |
Returns the configured theme mode.
Definition at line 271 of file SettingsViewModel.cpp.
| int ui::SettingsViewModel::themeModeIndex | ( | ) | const |
Returns the selected theme mode index.
Definition at line 244 of file SettingsViewModel.cpp.
| QVariantList ui::SettingsViewModel::themeModeOptions | ( | ) | const |
Returns available theme mode options.
Definition at line 239 of file SettingsViewModel.cpp.
| bool ui::SettingsViewModel::toolbarShowActors | ( | ) | const |
Returns whether the actor toolbar entry is visible.
Definition at line 456 of file SettingsViewModel.cpp.
| bool ui::SettingsViewModel::toolbarShowAnalysis | ( | ) | const |
Returns whether the analysis toolbar entry is visible.
Definition at line 486 of file SettingsViewModel.cpp.
| bool ui::SettingsViewModel::toolbarShowAnnual | ( | ) | const |
Returns whether the annual toolbar entry is visible.
Definition at line 506 of file SettingsViewModel.cpp.
| bool ui::SettingsViewModel::toolbarShowBooking | ( | ) | const |
Returns whether the booking toolbar entry is visible.
Definition at line 436 of file SettingsViewModel.cpp.
| bool ui::SettingsViewModel::toolbarShowContracts | ( | ) | const |
Returns whether the contract toolbar entry is visible.
Definition at line 496 of file SettingsViewModel.cpp.
| bool ui::SettingsViewModel::toolbarShowExport | ( | ) | const |
Returns whether the export toolbar entry is visible.
Definition at line 466 of file SettingsViewModel.cpp.
| bool ui::SettingsViewModel::toolbarShowImport | ( | ) | const |
Returns whether the import toolbar entry is visible.
Definition at line 446 of file SettingsViewModel.cpp.
| bool ui::SettingsViewModel::toolbarShowProperties | ( | ) | const |
Returns whether the property toolbar entry is visible.
Definition at line 476 of file SettingsViewModel.cpp.
| bool ui::SettingsViewModel::toolbarShowSettings | ( | ) | const |
Returns whether the settings toolbar entry is visible.
Definition at line 516 of file SettingsViewModel.cpp.
|
read |
Definition at line 42 of file SettingsViewModel.h.
|
read |
Definition at line 40 of file SettingsViewModel.h.
|
readwrite |
Definition at line 38 of file SettingsViewModel.h.
|
read |
Definition at line 29 of file SettingsViewModel.h.
|
read |
Definition at line 28 of file SettingsViewModel.h.
|
read |
Definition at line 27 of file SettingsViewModel.h.
|
read |
Definition at line 58 of file SettingsViewModel.h.
|
read |
Definition at line 56 of file SettingsViewModel.h.
|
read |
Definition at line 60 of file SettingsViewModel.h.
|
read |
Definition at line 44 of file SettingsViewModel.h.
|
readwrite |
Definition at line 54 of file SettingsViewModel.h.
|
readwrite |
Definition at line 48 of file SettingsViewModel.h.
|
readwrite |
Definition at line 52 of file SettingsViewModel.h.
|
readwrite |
Definition at line 46 of file SettingsViewModel.h.
|
read |
Definition at line 50 of file SettingsViewModel.h.
|
readwrite |
Definition at line 36 of file SettingsViewModel.h.
|
read |
Definition at line 32 of file SettingsViewModel.h.
|
read |
Definition at line 31 of file SettingsViewModel.h.
|
readwrite |
Definition at line 37 of file SettingsViewModel.h.
|
read |
Definition at line 34 of file SettingsViewModel.h.
|
read |
Definition at line 33 of file SettingsViewModel.h.
|
read |
Definition at line 66 of file SettingsViewModel.h.
|
read |
Definition at line 72 of file SettingsViewModel.h.
|
read |
Definition at line 76 of file SettingsViewModel.h.
|
read |
Definition at line 62 of file SettingsViewModel.h.
|
read |
Definition at line 74 of file SettingsViewModel.h.
|
read |
Definition at line 68 of file SettingsViewModel.h.
|
read |
Definition at line 64 of file SettingsViewModel.h.
|
read |
Definition at line 70 of file SettingsViewModel.h.
|
read |
Definition at line 78 of file SettingsViewModel.h.