-
-
Notifications
You must be signed in to change notification settings - Fork 1
Add C++ variant of x0 framework with Qt and nlohmann::json #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
Co-authored-by: clauspruefer <17313789+clauspruefer@users.noreply.github.com>
…andling Co-authored-by: clauspruefer <17313789+clauspruefer@users.noreply.github.com>
Co-authored-by: clauspruefer <17313789+clauspruefer@users.noreply.github.com>
Co-authored-by: clauspruefer <17313789+clauspruefer@users.noreply.github.com>
clauspruefer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Take all examples found in /example to verify that this PR / code works correctly.
Co-authored-by: clauspruefer <17313789+clauspruefer@users.noreply.github.com>
Added a test ( Test results (commit 8725a0a): All examples validated successfully:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: clauspruefer <17313789+clauspruefer@users.noreply.github.com>
C++ implementation of the x0 JavaScript framework using nlohmann::json for configuration management and Qt for graphical rendering.
Architecture
Maps 1:1 to JavaScript classes in
/www/:sysBaseDOMElement.jsx0BaseElementsysBaseObject.jsx0BaseObjectsysFactory.jsx0FactorysysScreen.jsx0ScreensysReactor.jsx0ReactorsysObjDiv.jsx0ObjDivsysObjButton.jsx0ObjButtonFiles Added
cpp/CMakeLists.txt- Build config with Qt5/Qt6 support, auto-fetches nlohmann::jsoncpp/include/*.h- Core headerscpp/src/*.cpp- Implementationscpp/test/test_examples.cpp- Test validating all/exampleconfigurationscpp/README.md- Usage and extension guideUsage
Same JSON config format as JavaScript version:
{ "ActionButton": { "Type": "Button", "Attributes": { "Style": "btn btn-primary", "TextID": "BTN.SUBMIT", "OnClick": "/api/submit" } } }Building
Testing
A test (
cpp/test/test_examples.cpp) validates that the C++ framework correctly parses all 15 example configurations from/example:Validated examples: add_object_table_column, basic_menu_screen, basic_tabcontainer, bootstrap_rowspan, copy_paste, enhanced_form, list_detail_switch_screen, list_dyn_radio, list_objectdata_grid, multi_tabcontainer, net_messages, object_instances, open_close_container, screen_overlay, tree_simple
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.