|
FOSSredder 0.5.0
|
Owns Export view state and delegates export execution to ExportWorkflow. More...
#include <ExportViewModel.h>


Signals | |
| void | changed () |
| Emitted when export view model state changed. | |
Public Member Functions | |
| ExportViewModel (QObject *parent=nullptr) | |
| Creates the export view model. | |
| void | setWorkspaceRoles (WorkspaceStore *store, WorkspaceCommands *commands, WorkspaceSelectors *selectors) |
| Binds workspace roles used for catalog rows and export logs. | |
| void | setExportWorkflow (ExportWorkflow *value) |
| Binds the workflow used to execute exports. | |
| void | setActions (Actions *value) |
| Binds shell actions such as the export directory picker. | |
| void | setFileSystemBrowser (FileSystemBrowser *value) |
| Binds filesystem defaults used by the export form. | |
| void | setSettings (Settings *value) |
| Binds export settings used by defaults and package options. | |
| QString | targetDirectory () const |
| Returns the selected export target directory. | |
| void | setTargetDirectory (const QString &value) |
| Updates the selected export target directory. | |
| int | packageFormatIndex () const noexcept |
| Returns the selected package format index. | |
| void | setPackageFormatIndex (int value) |
| Updates the selected package format index. | |
| QString | addMode () const |
| Returns whether the add combobox currently shows annuals or analyses. | |
| void | setAddMode (const QString &value) |
| Switches the add combobox between annual and analysis mode. | |
| QVariantList | annualRows () const |
| Returns annual rows available for export selection. | |
| QVariantList | analysisRows () const |
| Returns analysis rows available for export selection. | |
| QVariantList | addRows () const |
| Returns the rows shown by the current add combobox mode. | |
| QString | addTextRole () const |
| Returns the display role used by the current add combobox mode. | |
| int | selectedAddIndex () const |
| Returns the selected index in the current add combobox mode. | |
| bool | canAddEntry () const |
| Returns whether the selected row can be added to the export package. | |
| QVariantList | exportEntries () const |
| Returns the currently configured export package entries. | |
| bool | canStart () const |
| Returns whether the export can be started. | |
| bool | showClear () const |
| Returns whether the clear button should be visible. | |
| bool | showCancel () const |
| Returns whether the cancel button should be visible. | |
| bool | showPause () const |
| Returns whether the pause/resume button should be visible. | |
| bool | isPaused () const |
| Returns whether the active export is paused. | |
| QString | pauseText () const |
| Returns the current pause/resume button text. | |
| double | progress () const |
| Returns the active export progress. | |
| QString | statusText () const |
| Returns the current export status text. | |
| bool | hasError () const |
| Returns whether the workflow currently reports an error. | |
| QVariantList | exportLogs () const |
| Returns export log rows for the sidebar. | |
| Q_INVOKABLE void | refreshFromWorkspace () |
| Refreshes export form rows from the current workspace state. | |
| Q_INVOKABLE void | browseDirectory () |
| Opens the export directory picker through shell actions. | |
| Q_INVOKABLE void | clearForm () |
| Clears the export form back to defaults. | |
| Q_INVOKABLE void | startExport () |
| Starts the export workflow with the current package configuration. | |
| Q_INVOKABLE void | cancelExport () |
| Cancels the active export workflow. | |
| Q_INVOKABLE void | pauseExport () |
| Pauses the active export workflow. | |
| Q_INVOKABLE void | resumeExport () |
| Resumes the active export workflow. | |
| Q_INVOKABLE void | openExportLogLocation (const QString &logId) |
| Opens the target folder for an export log. | |
| Q_INVOKABLE void | deleteExportLog (const QString &logId) |
| Deletes an export log from the workspace. | |
| Q_INVOKABLE void | selectAddRow (int index) |
| Selects a row in the current add combobox. | |
| Q_INVOKABLE void | addSelectedEntry () |
| Adds the selected annual or analysis to the export package. | |
| Q_INVOKABLE void | removeEntry (int index) |
| Removes an export package entry. | |
| Q_INVOKABLE void | updateAnnualEntryAtIndex (int entryIndex, int annualIndex) |
| Replaces an annual package entry with another annual row. | |
| Q_INVOKABLE void | updateAnnualCollapsed (int entryIndex, bool collapsed) |
| Updates collapsed state for an annual package entry. | |
| Q_INVOKABLE void | updateStandaloneAnalysisAtIndex (int entryIndex, int analysisIndex) |
| Replaces a standalone analysis package entry. | |
| Q_INVOKABLE void | updateStandaloneAnalysisExportType (int entryIndex, const QString &exportType) |
| Updates export type for a standalone analysis entry. | |
| Q_INVOKABLE void | updateAnnualAnalysisExportType (int entryIndex, int analysisIndex, const QString &exportType) |
| Updates export type for an analysis inside an annual entry. | |
Properties | |
| QString | targetDirectory |
| int | packageFormatIndex |
| QString | addMode |
| QVariantList | annualRows |
| QVariantList | analysisRows |
| QVariantList | addRows |
| QString | addTextRole |
| int | selectedAddIndex |
| bool | canAddEntry |
| QVariantList | exportEntries |
| bool | canStart |
| bool | showClear |
| bool | showCancel |
| bool | showPause |
| bool | isPaused |
| QString | pauseText |
| double | progress |
| QString | statusText |
| bool | hasError |
| QVariantList | exportLogs |
Owns Export view state and delegates export execution to ExportWorkflow.
Definition at line 28 of file ExportViewModel.h.
|
explicit |
Creates the export view model.
| parent | Optional QObject parent. |
Definition at line 67 of file ExportViewModel.cpp.
|
inline |
Returns whether the add combobox currently shows annuals or analyses.
Definition at line 117 of file ExportViewModel.h.
| QVariantList ui::ExportViewModel::addRows | ( | ) | const |
Returns the rows shown by the current add combobox mode.
Definition at line 274 of file ExportViewModel.cpp.
| void ui::ExportViewModel::addSelectedEntry | ( | ) |
Adds the selected annual or analysis to the export package.
Definition at line 461 of file ExportViewModel.cpp.
| QString ui::ExportViewModel::addTextRole | ( | ) | const |
Returns the display role used by the current add combobox mode.
Definition at line 278 of file ExportViewModel.cpp.
| QVariantList ui::ExportViewModel::analysisRows | ( | ) | const |
Returns analysis rows available for export selection.
Definition at line 207 of file ExportViewModel.cpp.
| QVariantList ui::ExportViewModel::annualRows | ( | ) | const |
Returns annual rows available for export selection.
Definition at line 203 of file ExportViewModel.cpp.
| void ui::ExportViewModel::browseDirectory | ( | ) |
Opens the export directory picker through shell actions.
Definition at line 669 of file ExportViewModel.cpp.
| bool ui::ExportViewModel::canAddEntry | ( | ) | const |
Returns whether the selected row can be added to the export package.
Definition at line 286 of file ExportViewModel.cpp.
| void ui::ExportViewModel::cancelExport | ( | ) |
Cancels the active export workflow.
Definition at line 692 of file ExportViewModel.cpp.

| bool ui::ExportViewModel::canStart | ( | ) | const |
Returns whether the export can be started.
Definition at line 617 of file ExportViewModel.cpp.
|
signal |
Emitted when export view model state changed.
| void ui::ExportViewModel::clearForm | ( | ) |
Clears the export form back to defaults.
Definition at line 303 of file ExportViewModel.cpp.
| void ui::ExportViewModel::deleteExportLog | ( | const QString & | logId | ) |
Deletes an export log from the workspace.
| logId | Stable export log id. |
Definition at line 721 of file ExportViewModel.cpp.

|
inline |
Returns the currently configured export package entries.
Definition at line 160 of file ExportViewModel.h.
| QVariantList ui::ExportViewModel::exportLogs | ( | ) | const |
Returns export log rows for the sidebar.
Definition at line 665 of file ExportViewModel.cpp.
| bool ui::ExportViewModel::hasError | ( | ) | const |
Returns whether the workflow currently reports an error.
Definition at line 661 of file ExportViewModel.cpp.
| bool ui::ExportViewModel::isPaused | ( | ) | const |
Returns whether the active export is paused.
Definition at line 634 of file ExportViewModel.cpp.
| void ui::ExportViewModel::openExportLogLocation | ( | const QString & | logId | ) |
Opens the target folder for an export log.
| logId | Stable export log id. |
Definition at line 712 of file ExportViewModel.cpp.
|
inlinenoexcept |
Returns the selected package format index.
Definition at line 104 of file ExportViewModel.h.
| void ui::ExportViewModel::pauseExport | ( | ) |
Pauses the active export workflow.
Definition at line 700 of file ExportViewModel.cpp.
| QString ui::ExportViewModel::pauseText | ( | ) | const |
Returns the current pause/resume button text.
Definition at line 638 of file ExportViewModel.cpp.
| double ui::ExportViewModel::progress | ( | ) | const |
Returns the active export progress.
Definition at line 642 of file ExportViewModel.cpp.
| void ui::ExportViewModel::refreshFromWorkspace | ( | ) |
Refreshes export form rows from the current workspace state.
Definition at line 290 of file ExportViewModel.cpp.

| void ui::ExportViewModel::removeEntry | ( | int | index | ) |
Removes an export package entry.
| index | Entry index. |
Definition at line 482 of file ExportViewModel.cpp.
| void ui::ExportViewModel::resumeExport | ( | ) |
Resumes the active export workflow.
Definition at line 706 of file ExportViewModel.cpp.
| void ui::ExportViewModel::selectAddRow | ( | int | index | ) |
Selects a row in the current add combobox.
| index | Index into addRows(). |
Definition at line 447 of file ExportViewModel.cpp.
| int ui::ExportViewModel::selectedAddIndex | ( | ) | const |
Returns the selected index in the current add combobox mode.
Definition at line 282 of file ExportViewModel.cpp.
| void ui::ExportViewModel::setActions | ( | Actions * | value | ) |
Binds shell actions such as the export directory picker.
| value | Actions object or nullptr. |
Definition at line 89 of file ExportViewModel.cpp.
| void ui::ExportViewModel::setAddMode | ( | const QString & | value | ) |
Switches the add combobox between annual and analysis mode.
| value | Add mode key. |
Definition at line 262 of file ExportViewModel.cpp.
| void ui::ExportViewModel::setExportWorkflow | ( | ExportWorkflow * | value | ) |
Binds the workflow used to execute exports.
| value | Export workflow or nullptr. |
Definition at line 80 of file ExportViewModel.cpp.
| void ui::ExportViewModel::setFileSystemBrowser | ( | FileSystemBrowser * | value | ) |
Binds filesystem defaults used by the export form.
| value | File system browser or nullptr. |
Definition at line 97 of file ExportViewModel.cpp.
| void ui::ExportViewModel::setPackageFormatIndex | ( | int | value | ) |
Updates the selected package format index.
| value | Package format index. |
Definition at line 253 of file ExportViewModel.cpp.
| void ui::ExportViewModel::setSettings | ( | Settings * | value | ) |
Binds export settings used by defaults and package options.
| value | Settings object or nullptr. |
Definition at line 109 of file ExportViewModel.cpp.
| void ui::ExportViewModel::setTargetDirectory | ( | const QString & | value | ) |
Updates the selected export target directory.
| value | Target directory path. |
Definition at line 245 of file ExportViewModel.cpp.
| void ui::ExportViewModel::setWorkspaceRoles | ( | WorkspaceStore * | store, |
| WorkspaceCommands * | commands, | ||
| WorkspaceSelectors * | selectors ) |
Binds workspace roles used for catalog rows and export logs.
Definition at line 69 of file ExportViewModel.cpp.

| bool ui::ExportViewModel::showCancel | ( | ) | const |
Returns whether the cancel button should be visible.
Definition at line 626 of file ExportViewModel.cpp.
| bool ui::ExportViewModel::showClear | ( | ) | const |
Returns whether the clear button should be visible.
Definition at line 622 of file ExportViewModel.cpp.
| bool ui::ExportViewModel::showPause | ( | ) | const |
Returns whether the pause/resume button should be visible.
Definition at line 630 of file ExportViewModel.cpp.
| void ui::ExportViewModel::startExport | ( | ) |
Starts the export workflow with the current package configuration.
Definition at line 675 of file ExportViewModel.cpp.

| QString ui::ExportViewModel::statusText | ( | ) | const |
Returns the current export status text.
Definition at line 648 of file ExportViewModel.cpp.
|
inline |
Returns the selected export target directory.
Definition at line 92 of file ExportViewModel.h.
| void ui::ExportViewModel::updateAnnualAnalysisExportType | ( | int | entryIndex, |
| int | analysisIndex, | ||
| const QString & | exportType ) |
Updates export type for an analysis inside an annual entry.
| entryIndex | Export entry index. |
| analysisIndex | Analysis index inside the annual entry. |
| exportType | Export type key. |
Definition at line 555 of file ExportViewModel.cpp.
| void ui::ExportViewModel::updateAnnualCollapsed | ( | int | entryIndex, |
| bool | collapsed ) |
Updates collapsed state for an annual package entry.
| entryIndex | Export entry index. |
| collapsed | True when collapsed. |
Definition at line 514 of file ExportViewModel.cpp.
| void ui::ExportViewModel::updateAnnualEntryAtIndex | ( | int | entryIndex, |
| int | annualIndex ) |
Replaces an annual package entry with another annual row.
| entryIndex | Export entry index. |
| annualIndex | Index into annualRows(). |
Definition at line 490 of file ExportViewModel.cpp.
| void ui::ExportViewModel::updateStandaloneAnalysisAtIndex | ( | int | entryIndex, |
| int | analysisIndex ) |
Replaces a standalone analysis package entry.
| entryIndex | Export entry index. |
| analysisIndex | Index into analysisRows(). |
Definition at line 524 of file ExportViewModel.cpp.
| void ui::ExportViewModel::updateStandaloneAnalysisExportType | ( | int | entryIndex, |
| const QString & | exportType ) |
Updates export type for a standalone analysis entry.
| entryIndex | Export entry index. |
| exportType | Export type key. |
Definition at line 542 of file ExportViewModel.cpp.
|
readwrite |
Definition at line 36 of file ExportViewModel.h.
|
read |
Definition at line 39 of file ExportViewModel.h.
|
read |
Definition at line 40 of file ExportViewModel.h.
|
read |
Definition at line 38 of file ExportViewModel.h.
|
read |
Definition at line 37 of file ExportViewModel.h.
|
read |
Definition at line 42 of file ExportViewModel.h.
|
read |
Definition at line 44 of file ExportViewModel.h.
|
read |
Definition at line 43 of file ExportViewModel.h.
|
read |
Definition at line 53 of file ExportViewModel.h.
|
read |
Definition at line 52 of file ExportViewModel.h.
|
read |
Definition at line 48 of file ExportViewModel.h.
|
read |
Definition at line 34 of file ExportViewModel.h.
|
read |
Definition at line 49 of file ExportViewModel.h.
|
read |
Definition at line 50 of file ExportViewModel.h.
|
read |
Definition at line 41 of file ExportViewModel.h.
|
read |
Definition at line 46 of file ExportViewModel.h.
|
read |
Definition at line 45 of file ExportViewModel.h.
|
read |
Definition at line 47 of file ExportViewModel.h.
|
read |
Definition at line 51 of file ExportViewModel.h.
|
read |
Definition at line 32 of file ExportViewModel.h.