FOSSredder 0.5.0
Loading...
Searching...
No Matches
main_qml.cpp
Go to the documentation of this file.
1
5
6#include "MainWindow.h"
14
17#include <QApplication>
18
19#include <memory>
20#include <utility>
21
35 QApplication& app,
38 std::shared_ptr<core::ports::diagnostics::IErrorReporter> errorReporter,
39 std::shared_ptr<core::ports::analysis::IAnalysisRunner> analysisRunner,
40 std::shared_ptr<core::ports::annual::IAnnualRunner> annualRunner,
41 std::shared_ptr<core::ports::exporting::IExportRunner> exportRunner,
42 std::shared_ptr<core::ports::importing::IImportRunner> importRunner) {
43 MainWindow w(errorReporter);
44
45 ui::shell::createComposition(app, w, workspaceReader, workspaceWriter,
46 errorReporter, std::move(analysisRunner),
47 std::move(annualRunner), std::move(exportRunner),
48 std::move(importRunner));
49
50 ui::shell::wireWorkspaceCallbacks(w, workspaceWriter, errorReporter);
51 ui::bootstrap::wireQmlWarnings(w.qmlEngine(), &w, errorReporter);
52
53 w.loadQml();
54
55 w.show();
56 return app.exec();
57}
Wires QML shell workflows and view models.
Analysis use-case port consumed by UI workflows.
Annual use-case port consumed by application boundaries.
Declares the structured diagnostics reporting port.
Export use-case port consumed by UI workflows.
Import runner port consumed by UI workflows.
Read-side workspace boundary that exposes immutable snapshots.
Write-side workspace boundary that accepts typed command models.
Main window declaration for the UI application.
QML runtime diagnostics reporting helpers.
void loadQml(const QUrl &source=QUrl())
QQmlEngine * qmlEngine() const noexcept
Write-side workspace boundary for persistence, CRUD, drafts, and logs.
int startQmlApp(QApplication &app, core::ports::workspace::IWorkspaceReader &workspaceReader, core::ports::workspace::IWorkspaceWriter &workspaceWriter, std::shared_ptr< core::ports::diagnostics::IErrorReporter > errorReporter, std::shared_ptr< core::ports::analysis::IAnalysisRunner > analysisRunner, std::shared_ptr< core::ports::annual::IAnnualRunner > annualRunner, std::shared_ptr< core::ports::exporting::IExportRunner > exportRunner, std::shared_ptr< core::ports::importing::IImportRunner > importRunner)
Initialize and run the QML-based UI.
Definition main_qml.cpp:34
void wireQmlWarnings(QQmlEngine *engine, QObject *context, std::shared_ptr< core::ports::diagnostics::IErrorReporter > reporter)
Wires QQmlEngine runtime warnings into structured error reporting.
void wireWorkspaceCallbacks(MainWindow &w, core::ports::workspace::IWorkspaceWriter &workspaceWriter, const std::shared_ptr< core::ports::diagnostics::IErrorReporter > &errorReporter)
Wires workspace writer callbacks back into the UI workspace store.
void createComposition(QApplication &app, MainWindow &w, core::ports::workspace::IWorkspaceReader &workspaceReader, core::ports::workspace::IWorkspaceWriter &workspaceWriter, const std::shared_ptr< core::ports::diagnostics::IErrorReporter > &errorReporter, std::shared_ptr< core::ports::analysis::IAnalysisRunner > analysisRunner, std::shared_ptr< core::ports::annual::IAnnualRunner > annualRunner, std::shared_ptr< core::ports::exporting::IExportRunner > exportRunner, std::shared_ptr< core::ports::importing::IImportRunner > importRunner)
Creates and wires QML-facing workflows and view models.