feat(gui): drive everything from settings, add tray and in-app download
The GUI no longer needs command line arguments: on first run it opens a settings dialog that lists the registry, downloads models in-app (mirror base, HTTP proxy, resume), and picks the active model. The caption window gains a tray icon (show/hide, settings, quit); its close button hides to the tray so the window can always be brought back, and the language pill opens the settings. Appearance (font, opacity, line counts, position) is persisted. CLI flags remain for automated testing and override settings. GUI 不再依赖命令行参数:首次启动打开设置对话框,可在应用内下载模型 (下载源/代理/断点续传)、选择当前模型与识别语言;字幕窗增加托盘(显示 隐藏/设置/退出),关闭按钮改为隐藏到托盘以免关掉后无法再打开,语言标签 点击进设置;字号/透明度/行数/位置都会持久化。命令行参数保留作自动化测试。
This commit is contained in:
1 parent
b37b9eb779
commit
a7a6f3e6b6
15 files changed
+1175
-90
No files matched your search
+6
-3
@@ -28,7 +28,7 @@ foreach(_p
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Widgets)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Widgets Network)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
@@ -112,9 +112,10 @@ target_link_libraries(livecaption_core PUBLIC
|
||||
# ---------------------------------------------------------------------------
|
||||
add_library(livecaption_models STATIC
|
||||
src/models/modelstore.cpp
|
||||
src/models/modeldownloader.cpp
|
||||
)
|
||||
target_include_directories(livecaption_models PUBLIC src/models)
|
||||
target_link_libraries(livecaption_models PUBLIC Qt6::Core)
|
||||
target_link_libraries(livecaption_models PUBLIC Qt6::Core Qt6::Network)
|
||||
qt_add_resources(livecaption_models "registry"
|
||||
PREFIX "/"
|
||||
BASE "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
@@ -127,9 +128,11 @@ qt_add_resources(livecaption_models "registry"
|
||||
add_library(livecaption_ui STATIC
|
||||
src/ui/captionwindow.cpp
|
||||
src/ui/livetranscriber.cpp
|
||||
src/ui/appsettings.cpp
|
||||
src/ui/settingsdialog.cpp
|
||||
)
|
||||
target_include_directories(livecaption_ui PUBLIC src/ui)
|
||||
target_link_libraries(livecaption_ui PUBLIC livecaption_core Qt6::Widgets)
|
||||
target_link_libraries(livecaption_ui PUBLIC livecaption_core livecaption_models Qt6::Widgets)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# 可执行程序
|
||||
|
||||
Reference in new issue
Block a user