|
FOSSredder 0.5.0
|
Coordinates asynchronous exports from a read-only state snapshot. More...
#include <ExportWorkflow.h>


Classes | |
| struct | ExportControlState |
Public Types | |
| enum | Mode { CreateMode = 0 , ProgressMode = 1 } |
| using | StateSnapshotProvider |
| using | ExportLogSink |
Signals | |
| void | stateChanged () |
| Emitted when export workflow state changed. | |
| void | exportFinished (bool success) |
| Emitted when an export finished or stopped. | |
| void | exportFailed (const QString &error) |
| Emitted when an export failed. | |
Public Member Functions | |
| ExportWorkflow (StateSnapshotProvider stateSnapshotProvider, std::shared_ptr< ui::adapters::ExportAdapter > exportAdapter, std::shared_ptr< core::ports::diagnostics::IErrorReporter > errorReporter, QObject *parent=nullptr) | |
| Creates an export workflow backed by a snapshot provider and runner. | |
| void | setExportLogSink (ExportLogSink sink) |
| Sets the sink used to save export logs through workspace commands. | |
| bool | isRunning () const noexcept |
| Reports whether an export is running. | |
| bool | isPaused () const noexcept |
| Reports whether the export is paused. | |
| double | progress () const noexcept |
| Returns export progress. | |
| QString | phase () const |
| Returns current export phase text. | |
| QString | error () const |
| Returns current export error text. | |
| int | currentMode () const noexcept |
| Returns the current export workflow mode. | |
| void | exportDataWithPayload (int format, const QString &path, bool includeFormulas, const QString &locale, const QVariantMap &payload, int totalSteps=1) |
| Starts an export using a QML selection payload. | |
| void | clearActiveExportLog () |
| Clears the active export log selection. | |
| void | cancelExport () |
| Requests cancellation of the running export. | |
| void | pauseExport () |
| Pauses the running export. | |
| void | resumeExport () |
| Resumes the paused export. | |
Coordinates asynchronous exports from a read-only state snapshot.
Definition at line 29 of file ExportWorkflow.h.
Definition at line 39 of file ExportWorkflow.h.
Definition at line 37 of file ExportWorkflow.h.
| Enumerator | |
|---|---|
| CreateMode | |
| ProgressMode | |
Definition at line 32 of file ExportWorkflow.h.
|
explicit |
Creates an export workflow backed by a snapshot provider and runner.
| stateSnapshotProvider | Provider for the current workspace snapshot. |
| exportAdapter | Adapter used to invoke the core export runner. |
| errorReporter | Error reporter used for workflow diagnostics. |
| parent | Optional Qt parent. |
Definition at line 85 of file ExportWorkflow.cpp.
| void ui::ExportWorkflow::cancelExport | ( | ) |
Requests cancellation of the running export.
Definition at line 374 of file ExportWorkflow.cpp.


| void ui::ExportWorkflow::clearActiveExportLog | ( | ) |
Clears the active export log selection.
Definition at line 170 of file ExportWorkflow.cpp.

|
noexcept |
Returns the current export workflow mode.
Definition at line 108 of file ExportWorkflow.cpp.
|
inline |
Returns current export error text.
Definition at line 79 of file ExportWorkflow.h.

| void ui::ExportWorkflow::exportDataWithPayload | ( | int | format, |
| const QString & | path, | ||
| bool | includeFormulas, | ||
| const QString & | locale, | ||
| const QVariantMap & | payload, | ||
| int | totalSteps = 1 ) |
Starts an export using a QML selection payload.
| format | QML export format index. |
| path | Output path. |
| includeFormulas | Whether formulas should be included. |
| locale | Export locale. |
| payload | Selected export objects. |
| totalSteps | Total UI progress steps. |
Definition at line 219 of file ExportWorkflow.cpp.

|
signal |
Emitted when an export failed.
| error | Error message. |


|
signal |
Emitted when an export finished or stopped.
| success | True when the export completed successfully. |


|
inlinenoexcept |
Reports whether the export is paused.
Definition at line 67 of file ExportWorkflow.h.
|
inlinenoexcept |
Reports whether an export is running.
Definition at line 63 of file ExportWorkflow.h.
| void ui::ExportWorkflow::pauseExport | ( | ) |
Pauses the running export.
Definition at line 385 of file ExportWorkflow.cpp.


|
inline |
Returns current export phase text.
Definition at line 75 of file ExportWorkflow.h.
|
inlinenoexcept |
Returns export progress.
Definition at line 71 of file ExportWorkflow.h.
| void ui::ExportWorkflow::resumeExport | ( | ) |
Resumes the paused export.
Definition at line 396 of file ExportWorkflow.cpp.


| void ui::ExportWorkflow::setExportLogSink | ( | ExportLogSink | sink | ) |
Sets the sink used to save export logs through workspace commands.
| sink | Export log sink callback. |
Definition at line 104 of file ExportWorkflow.cpp.
|
signal |
Emitted when export workflow state changed.

