Add the "HA Dashboard" tab with HA's web UI (DSH-1)
A second dashboard surface shows a WebEngineView at homeassistant.url, or a hint when none is set. HaWebUi (QML singleton owned by Dashboard) holds the URL and a persistent WebEngine profile under ~/.local/share/frameassistant/webengine so the HA login survives restarts. QtWebEngineQuick::initialize() runs in main() before the app object (D39). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+8
-2
@@ -58,14 +58,20 @@ target_link_libraries(frameassistant_lib PUBLIC Qt6::Core)
|
||||
target_compile_options(frameassistant_lib PRIVATE -Wall -Wextra)
|
||||
|
||||
# The app: its UI is the QML module "FrameAssistant" (src/qml/).
|
||||
# Qt WebEngine shows HA's web UI (DSH-1); on the Frame it comes with the system Qt.
|
||||
find_package(Qt6 REQUIRED COMPONENTS WebEngineQuick)
|
||||
vrdash_add_dashboard(frameassistant
|
||||
OUTPUT_NAME ${VRDASH_EXECUTABLE_NAME}
|
||||
QML_URI FrameAssistant
|
||||
SOURCES main.cpp Dashboard.h Dashboard.cpp
|
||||
QML_SOURCES ha/HaWebUi.h ha/HaWebUi.cpp
|
||||
QML_FILES
|
||||
qml/Main.qml
|
||||
qml/Card.qml)
|
||||
target_link_libraries(frameassistant PRIVATE frameassistant_lib)
|
||||
qml/Card.qml
|
||||
qml/HaDashboard.qml)
|
||||
target_link_libraries(frameassistant PRIVATE frameassistant_lib Qt6::WebEngineQuick)
|
||||
# The generated QML type registration includes QML_SOURCES headers by file name.
|
||||
target_include_directories(frameassistant PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/ha)
|
||||
|
||||
install(FILES ${OPENVR_LIBRARY} DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user