Commit Graph
7 Commits
Author SHA1 Message Date
Dario LipicarandClaude Opus 4.8 a00e9ef944 tutorial(cpp-ui): Qt-typed dependency calls via LogosUiPluginContext (#72)
* tutorial(cpp-ui): Qt-typed dependency calls via LogosUiPluginContext

Sync Part 3 (calc_ui_cpp) to the new UI authoring model: the backend derives
LogosUiPluginContext (not the std-typed LogosModuleContext), and its
modules().calc_module wrappers are now Qt-typed (api-style qt). libVersion()
returns modules().calc_module.libVersion() directly — the QString::fromStdString
conversion is gone since the wrapper now returns QString, matching the .rep slot.

Depends on logos-co/logos-qt-sdk#3, logos-co/logos-plugin-qt#14, and
logos-co/logos-module-builder#124. Part of a 4-repo change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* tutorial(cpp-ui): don't pin logos-module-builder in calc-ui-cpp flake

The generated example flake hard-pinned logos-module-builder to a specific
commit; every other tutorial output (and the generated .md) tracks the branch
via `github:logos-co/logos-module-builder` — only release builds pin (the
spec's `{release}` placeholder). Drop the stray rev to match.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* tutorial(cpp-ui): fix the doctest spec backend for Qt-typed modules()

The doctest CI executes the spec's `file:` blocks, not the committed outputs/
tree — and the spec's backend still used the std-typed model: it derived
LogosModuleContext and wrapped `modules().calc_module.libVersion()` in
QString::fromStdString(...). That compiled only while module-builder was pinned
to a stale pre-flip commit (ui_qml api-style=std → libVersion() returned
std::string). Now that the flake tracks module-builder master (api-style=qt,
libVersion() returns QString), QString::fromStdString(QString) fails to compile.

Bring the spec in line with the generated outputs (already fixed): derive
LogosUiPluginContext, include logos_ui_plugin_context.h, and return
modules().calc_module.libVersion() directly. Prose/diagram updated to match.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 12:14:21 -03:00
Dario Lipicar 961b752ee6 tutorial(cpp-ui): rewrite Part 3 to the universal authoring model (#70)
* tutorial(cpp-ui): rewrite Part 3 to the universal authoring model

calc_ui_cpp now uses interface: universal — you write only the .rep and a
CalcUiCppBackend deriving CalcUiCppSimpleSource + LogosModuleContext, calling
modules().calc_module.* (typed SDK). The *Plugin/*Interface classes,
initLogos, and setBackend wiring are generated; the hand-written interface +
plugin steps are gone. CMake uses REP_FILE + the backend sources + INCLUDE_DIRS.

Regenerated outputs/tutorial-cpp-ui-app.md and outputs/logos-calc-ui-cpp/.
Verified end to end: the full Part 1->2->3 chain runs 69/69 against the
universal templates (logos-module-builder feat/universal-templates), including
the live UI drive (Add -> 8) and the integration-test build.

Depends on the logos-module-builder universal-templates change so that the
#ui-qml-backend scaffold is the universal form.

* tutorial(cpp-ui): derive module NAME from metadata.json in CMake

Match the templates: read the name via file(READ metadata.json) +
string(JSON ... name) and pass NAME ${MODULE_NAME} to logos_module(), so the
module name has a single source of truth. Same string(JSON) pattern the
converted templates use (build-verified there).
2026-06-13 09:18:00 -03:00
Iuri Matias 62c0f0ad3f update tutorials
update tutorials

fix test
2026-05-29 16:22:44 -04:00
Iuri Matias a32ea8bce4 support screenshots 2026-05-29 15:43:10 -04:00
Iuri Matias 3cae557ba1 fix issue with relying on old github tutorial example 2026-05-29 13:57:10 -04:00
Iuri Matias cc97dba1c6 fix issue with relying on old github tutorial example 2026-05-29 13:31:50 -04:00
Iuri Matias eca8a2f65f add test.yaml for tutorial-cpp-ui-app
fix tests

add test.yaml for tutorial-cpp-ui-app
2026-05-29 09:01:42 -04:00