10#include <QVariantList>
12#include <qqmlintegration.h>
93 return targetDirectory_;
105 return packageFormatIndex_;
161 return exportEntries_;
285 const QString& exportType);
295 bool isAnnualMode()
const;
301 QVariantMap annualRowById(
const QString&
id)
const;
307 QVariantMap analysisRowById(
const QString&
id)
const;
312 QString selectedAddObjectId()
const;
316 void ensureAddSelection();
320 void refreshEntriesFromWorkspace();
325 QVariantList exportItems()
const;
333 QVariantMap createAnnualEntry(
const QString&
id,
const QString& name,
334 const QVariantList& analyses)
const;
343 QVariantMap createAnalysisEntry(
const QString&
id,
const QString& name,
345 const QString& exportType)
const;
352 QVariantList analysesForAnnual(
const QString& annualId,
353 const QVariantList& currentAnalyses)
const;
359 QVariantList exportOptionsForAnalysisType(
const QString& type)
const;
366 QString normalizedExportType(
const QString& exportType,
367 const QString& type)
const;
373 QString defaultExportType(
const QString& type)
const;
379 QString analysisTypeById(
const QString&
id)
const;
384 QString defaultTargetDirectory()
const;
389 QVariantMap payload()
const;
394 QString defaultLocale()
const;
399 int workflowMode()
const;
410 void bindActions(
Actions* value);
424 void configureExportLogSink();
437 QString targetDirectory_;
438 QString appliedDefaultTargetDirectory_;
439 int packageFormatIndex_ = 0;
440 QString addMode_ = QStringLiteral(
"annual");
441 QString selectedAddAnnualId_;
442 QString selectedAddAnalysisId_;
443 QVariantList exportEntries_;
Owns the main window actions and exposes them to QML.
Q_INVOKABLE void clearForm()
Clears the export form back to defaults.
QVariantList analysisRows
QString addMode() const
Returns whether the add combobox currently shows annuals or analyses.
Q_INVOKABLE void browseDirectory()
Opens the export directory picker through shell actions.
Q_INVOKABLE void cancelExport()
Cancels the active export workflow.
void changed()
Emitted when export view model state changed.
QVariantList exportEntries
void setActions(Actions *value)
Binds shell actions such as the export directory picker.
Q_INVOKABLE void updateStandaloneAnalysisAtIndex(int entryIndex, int analysisIndex)
Replaces a standalone analysis package entry.
Q_INVOKABLE void refreshFromWorkspace()
Refreshes export form rows from the current workspace state.
Q_INVOKABLE void deleteExportLog(const QString &logId)
Deletes an export log from the workspace.
void setPackageFormatIndex(int value)
Updates the selected package format index.
Q_INVOKABLE void updateAnnualAnalysisExportType(int entryIndex, int analysisIndex, const QString &exportType)
Updates export type for an analysis inside an annual entry.
int packageFormatIndex() const noexcept
Returns the selected package format index.
Q_INVOKABLE void openExportLogLocation(const QString &logId)
Opens the target folder for an export log.
Q_INVOKABLE void pauseExport()
Pauses the active export workflow.
Q_INVOKABLE void updateStandaloneAnalysisExportType(int entryIndex, const QString &exportType)
Updates export type for a standalone analysis entry.
QVariantList exportEntries() const
Returns the currently configured export package entries.
void setWorkspaceRoles(WorkspaceStore *store, WorkspaceCommands *commands, WorkspaceSelectors *selectors)
Binds workspace roles used for catalog rows and export logs.
void setTargetDirectory(const QString &value)
Updates the selected export target directory.
Q_INVOKABLE void removeEntry(int index)
Removes an export package entry.
Q_INVOKABLE void addSelectedEntry()
Adds the selected annual or analysis to the export package.
void setSettings(Settings *value)
Binds export settings used by defaults and package options.
Q_INVOKABLE void updateAnnualCollapsed(int entryIndex, bool collapsed)
Updates collapsed state for an annual package entry.
void setFileSystemBrowser(FileSystemBrowser *value)
Binds filesystem defaults used by the export form.
void setExportWorkflow(ExportWorkflow *value)
Binds the workflow used to execute exports.
Q_INVOKABLE void updateAnnualEntryAtIndex(int entryIndex, int annualIndex)
Replaces an annual package entry with another annual row.
Q_INVOKABLE void resumeExport()
Resumes the active export workflow.
ExportViewModel(QObject *parent=nullptr)
Creates the export view model.
Q_INVOKABLE void startExport()
Starts the export workflow with the current package configuration.
Q_INVOKABLE void selectAddRow(int index)
Selects a row in the current add combobox.
void setAddMode(const QString &value)
Switches the add combobox between annual and analysis mode.
Coordinates asynchronous exports from a read-only state snapshot.
Exposes directory listing and application-directory lookup to QML.
Stores and exposes globally persisted UI settings for settings-related views.
Maps UI intent to core workspace writer commands.
Projects workspace store data into QML-facing read models.
Owns the current UI-side workspace snapshot and revision lifecycle.