|
FOSSredder 0.5.0
|
Coordinates analysis preview and computation use cases for UI state. More...
#include <AnalysisWorkflow.h>


Public Types | |
| using | StateSnapshotProvider |
Public Member Functions | |
| AnalysisWorkflow (StateSnapshotProvider stateSnapshotProvider, std::shared_ptr< ui::adapters::AnalysisAdapter > analysisAdapter, std::shared_ptr< core::ports::diagnostics::IErrorReporter > errorReporter, QObject *parent=nullptr) | |
| Creates an analysis workflow. | |
| QString | analysisFilterSpec (const QString &dateField, const QString &dateMode, const QString &year, const QString &dateFrom, const QString &dateTo, const QStringList &propertyIds, const QStringList &contractTypes, const QString &allocatableMode) const |
| Builds a serialized filter specification from UI fields. | |
| QVariantMap | analysisAdjustmentAmountsFromPercentText (const QVariantList &transactions, const QStringList &selectedTransactionIds, const QString &percentText) const |
| Builds adjustment amounts from selected transactions and percent text. | |
| QVariantMap | computeAnalysisPreview (const QString &analysisId, const QString &filterSpec, bool includeAdjustments, const QVariantMap &adjustmentAmounts) const |
| Computes the current analysis preview. | |
| QVariantMap | previewTransactions (const QString &filterSpec) const |
| Builds a transaction preview for the current filter. | |
| QStringList | contractTypes () const |
| Returns contract types available in the current workspace snapshot. | |
Coordinates analysis preview and computation use cases for UI state.
Definition at line 29 of file AnalysisWorkflow.h.
Definition at line 32 of file AnalysisWorkflow.h.
|
explicit |
Creates an analysis workflow.
| stateSnapshotProvider | Provider for the current workspace snapshot. |
| analysisAdapter | Adapter used to invoke the core analysis runner. |
| errorReporter | Error reporter used for workflow diagnostics. |
| parent | Optional Qt parent. |
Definition at line 22 of file AnalysisWorkflow.cpp.
| QVariantMap ui::AnalysisWorkflow::analysisAdjustmentAmountsFromPercentText | ( | const QVariantList & | transactions, |
| const QStringList & | selectedTransactionIds, | ||
| const QString & | percentText ) const |
Builds adjustment amounts from selected transactions and percent text.
| transactions | Preview transaction rows containing id and amount. |
| selectedTransactionIds | Transaction ids selected for adjustment. |
| percentText | User-entered percent text. |
Definition at line 47 of file AnalysisWorkflow.cpp.
| QString ui::AnalysisWorkflow::analysisFilterSpec | ( | const QString & | dateField, |
| const QString & | dateMode, | ||
| const QString & | year, | ||
| const QString & | dateFrom, | ||
| const QString & | dateTo, | ||
| const QStringList & | propertyIds, | ||
| const QStringList & | contractTypes, | ||
| const QString & | allocatableMode ) const |
Builds a serialized filter specification from UI fields.
| dateField | Selected date field. |
| dateMode | Selected date mode. |
| year | Selected year text. |
| dateFrom | Start date text. |
| dateTo | End date text. |
| propertyIds | Selected property ids. |
| contractTypes | Selected contract types. |
| allocatableMode | Selected allocatable mode. |
Definition at line 35 of file AnalysisWorkflow.cpp.

| QVariantMap ui::AnalysisWorkflow::computeAnalysisPreview | ( | const QString & | analysisId, |
| const QString & | filterSpec, | ||
| bool | includeAdjustments, | ||
| const QVariantMap & | adjustmentAmounts ) const |
Computes the current analysis preview.
| analysisId | Analysis id. |
| filterSpec | Serialized filter specification. |
| includeAdjustments | Whether calculation adjustments are included. |
| adjustmentAmounts | Adjustment amount map keyed by transaction id. |
Definition at line 62 of file AnalysisWorkflow.cpp.

| QStringList ui::AnalysisWorkflow::contractTypes | ( | ) | const |
Returns contract types available in the current workspace snapshot.
Definition at line 132 of file AnalysisWorkflow.cpp.

| QVariantMap ui::AnalysisWorkflow::previewTransactions | ( | const QString & | filterSpec | ) | const |
Builds a transaction preview for the current filter.
| filterSpec | Serialized filter specification. |
Definition at line 120 of file AnalysisWorkflow.cpp.
