feat: checkpoint QML view migration

This commit is contained in:
dela
2026-07-15 11:57:34 +08:00
parent 3002adb7bf
commit b117bbf99e
133 changed files with 23964 additions and 17074 deletions
+82 -1
View File
@@ -10,15 +10,92 @@ set(APP_QRC_FILES resources/resources.qrc)
file(GLOB_RECURSE APP_HEADERS CONFIGURE_DEPENDS "*.h")
file(GLOB_RECURSE APP_SOURCES CONFIGURE_DEPENDS "*.cpp")
list(FILTER APP_HEADERS EXCLUDE REGEX "/tests/")
list(FILTER APP_SOURCES EXCLUDE REGEX "/tests/")
qt_add_executable(qEmbyApp
MANUAL_FINALIZATION
${APP_HEADERS}
${APP_HEADERS}
${APP_SOURCES}
${TS_FILES}
${APP_QRC_FILES}
)
# ==========================================
# QML 模块:Widgets 混合迁移的 Quick 页面
# QML 页面通过 QuickPageHost (QQuickWidget) 嵌入现有页面栈;
# C++ 类型 (Theme 单例等) 通过 QML_ELEMENT 自动注册到 qEmby 模块。
# ==========================================
if(COMMAND qt_policy)
qt_policy(SET QTP0004 NEW)
endif()
qt_add_qml_module(qEmbyApp
URI qEmby
VERSION 1.0
RESOURCE_PREFIX /qt/qml
QML_FILES
qml/Router.qml
qml/ManageDashboardPage.qml
qml/LoginPage.qml
qml/SearchPage.qml
qml/CategoryPage.qml
qml/FavoritesPage.qml
qml/DashboardPage.qml
qml/LibraryPage.qml
qml/DetailPage.qml
qml/SeasonPage.qml
qml/AdminUsersPage.qml
qml/AdminTasksPage.qml
qml/AdminLibrariesPage.qml
qml/AdminLogsPage.qml
qml/AdminCollectionsPage.qml
qml/AdminTranscodingPage.qml
qml/EmptyState.qml
qml/SettingsAboutPage.qml
qml/SettingsGeneralPage.qml
qml/SettingsAppearancePage.qml
qml/SettingsLibraryPage.qml
qml/SettingsPlayerPage.qml
qml/components/SettingsCard.qml
qml/components/CollapsibleSection.qml
qml/components/ThemedButton.qml
qml/components/ThemedSwitch.qml
qml/components/ThemedComboBox.qml
qml/components/ThemedTextField.qml
qml/components/ThemedSpinBox.qml
qml/components/ThemedSlider.qml
qml/components/ThemedScrollBar.qml
qml/components/ThemedDialog.qml
qml/components/ToastHost.qml
qml/components/LoadingState.qml
qml/components/ErrorState.qml
qml/components/MediaCard.qml
qml/components/MediaGrid.qml
qml/components/MediaList.qml
qml/components/MediaSection.qml
SOURCES
quick/quicktheme.h quick/quicktheme.cpp
quick/qmltask.h quick/qmltask.cpp
quick/settingsviewmodel.h quick/settingsviewmodel.cpp
quick/loginviewmodel.h quick/loginviewmodel.cpp
)
# qmltyperegistrar 生成的注册代码以 <quicktheme.h> 形式包含头文件
target_include_directories(qEmbyApp PRIVATE quick)
option(QEMBY_BUILD_NAVIGATION_TESTS
"Build the lightweight NavigationController contract test" ON)
if(QEMBY_BUILD_NAVIGATION_TESTS)
add_executable(qEmbyNavigationTest EXCLUDE_FROM_ALL
tests/navigationcontroller_test.cpp
quick/navigationcontroller.h quick/navigationcontroller.cpp
quick/navigationroute.h quick/navigationroute.cpp
)
target_include_directories(qEmbyNavigationTest PRIVATE quick)
target_link_libraries(qEmbyNavigationTest PRIVATE Qt${QT_VERSION_MAJOR}::Core)
endif()
# ==========================================
# 集成 libmpv 播放器核心
# Linux / macOS 优先使用系统安装的 libmpv
@@ -65,6 +142,10 @@ target_link_libraries(qEmbyApp PRIVATE
Qt${QT_VERSION_MAJOR}::OpenGLWidgets
Qt${QT_VERSION_MAJOR}::Svg
Qt${QT_VERSION_MAJOR}::Concurrent
Qt${QT_VERSION_MAJOR}::Quick
Qt${QT_VERSION_MAJOR}::Qml
Qt${QT_VERSION_MAJOR}::QuickWidgets
Qt${QT_VERSION_MAJOR}::QuickControls2
qEmbyCore
QWKWidgets
WidgetFrame