refactor/pure-qt-ui #3
|
|
@ -19,12 +19,6 @@ set "ROOT=%~dp0"
|
||||||
set "BUILDDIR=%ROOT%build\release"
|
set "BUILDDIR=%ROOT%build\release"
|
||||||
set "PRESET=msvc-release"
|
set "PRESET=msvc-release"
|
||||||
|
|
||||||
REM 把临时目录指向 D: 的构建目录,规避 C: 盘满导致链接器写 %TEMP% 失败(LNK1108)。
|
|
||||||
REM 仅作用于本次构建(setlocal 作用域),不污染用户 shell。注意:仍建议尽快清理 C: 盘。
|
|
||||||
set "TEMP=%BUILDDIR%\tmp"
|
|
||||||
set "TMP=%BUILDDIR%\tmp"
|
|
||||||
if not exist "%TEMP%" mkdir "%TEMP%"
|
|
||||||
|
|
||||||
REM --- locate Visual Studio (vswhere lives at a fixed path) ---
|
REM --- locate Visual Studio (vswhere lives at a fixed path) ---
|
||||||
set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
|
set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
|
||||||
if not exist "%VSWHERE%" (
|
if not exist "%VSWHERE%" (
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ target_link_libraries(geopro_desktop PRIVATE
|
||||||
Qt6::Core Qt6::Gui Qt6::Widgets Qt6::Svg
|
Qt6::Core Qt6::Gui Qt6::Widgets Qt6::Svg
|
||||||
${VTK_LIBRARIES}
|
${VTK_LIBRARIES}
|
||||||
ads::qt6advanceddocking
|
ads::qt6advanceddocking
|
||||||
|
ElaWidgetTools # Fluent UI 迁移(feat/elawidgettools):ElaWindow/ElaTheme/Ela* 控件
|
||||||
qt6keychain
|
qt6keychain
|
||||||
nlohmann_json::nlohmann_json
|
nlohmann_json::nlohmann_json
|
||||||
geopro_core # Phase 1:ColorScale 上色
|
geopro_core # Phase 1:ColorScale 上色
|
||||||
|
|
@ -51,4 +52,14 @@ if(WIN32)
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
$<TARGET_RUNTIME_DLLS:geopro_desktop> $<TARGET_FILE_DIR:geopro_desktop>
|
$<TARGET_RUNTIME_DLLS:geopro_desktop> $<TARGET_FILE_DIR:geopro_desktop>
|
||||||
COMMAND_EXPAND_LISTS)
|
COMMAND_EXPAND_LISTS)
|
||||||
|
|
||||||
|
# 运行期 Qt 插件部署:platforms 必需;imageformats/iconengines 供 ElaWidgetTools 的 SVG 图标;
|
||||||
|
# styles 备用。从链接的 Qt6::Core 推导 Qt 安装的 plugins 目录,拷到 exe 旁(windeployqt 会被
|
||||||
|
# ADS 的非 Qt DLL 依赖卡住,故改为显式 copy)。
|
||||||
|
foreach(_pl platforms styles imageformats iconengines)
|
||||||
|
add_custom_command(TARGET geopro_desktop POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||||
|
"$<TARGET_FILE_DIR:Qt6::Core>/../plugins/${_pl}"
|
||||||
|
"$<TARGET_FILE_DIR:geopro_desktop>/${_pl}")
|
||||||
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,9 @@
|
||||||
#include <DockManager.h>
|
#include <DockManager.h>
|
||||||
#include <DockWidget.h>
|
#include <DockWidget.h>
|
||||||
|
|
||||||
|
#include <ElaApplication.h>
|
||||||
|
#include <ElaWindow.h>
|
||||||
|
|
||||||
#include "model/ColorScale.hpp"
|
#include "model/ColorScale.hpp"
|
||||||
#include "model/Field.hpp"
|
#include "model/Field.hpp"
|
||||||
#include "repo/LocalSampleRepository.hpp"
|
#include "repo/LocalSampleRepository.hpp"
|
||||||
|
|
@ -1007,13 +1010,33 @@ int main(int argc, char* argv[])
|
||||||
geopro::data::ApiProjectRepository projectRepo(api);
|
geopro::data::ApiProjectRepository projectRepo(api);
|
||||||
geopro::controller::WorkbenchNavController nav(projectRepo);
|
geopro::controller::WorkbenchNavController nav(projectRepo);
|
||||||
|
|
||||||
QMainWindow window;
|
// ── 外壳选择(P1 迁移,可回退):GEOPRO_UI_SHELL=ela → Fluent ElaWindow 壳;
|
||||||
window.setWindowTitle(QStringLiteral("Geopro 3.0 — 项目分析视图 (M1)"));
|
// 未设/其它 → 经典 QMainWindow 壳。两者都复用同一 buildWorkbench(QMainWindow&)。
|
||||||
window.resize(1280, 800);
|
// Ela 壳策略:ElaWindow 用 setCentralCustomWidget 包裹一个承载工作台的内层 QMainWindow
|
||||||
window.setMinimumSize(1024, 680); // 防止停靠面板被压到不可用尺寸
|
// (buildWorkbench 依赖 QMainWindow 的 setCentralWidget/setMenuWidget/statusBar,
|
||||||
|
// ElaWindow 自身将其设为私有,故用内层 QMainWindow 承接,零改 buildWorkbench)。
|
||||||
buildWorkbench(window, repo, projectRepo, nav);
|
const QString kTitle = QStringLiteral("Geopro 3.0 — 项目分析视图 (M1)");
|
||||||
window.show();
|
QWidget* topLevel = nullptr;
|
||||||
|
if (qEnvironmentVariable("GEOPRO_UI_SHELL") == QLatin1String("ela")) {
|
||||||
|
eApp->init(); // ElaApplication:Fluent 主题/字体/动画基建
|
||||||
|
auto* inner = new QMainWindow;
|
||||||
|
buildWorkbench(*inner, repo, projectRepo, nav);
|
||||||
|
auto* ela = new ElaWindow;
|
||||||
|
ela->setWindowTitle(kTitle);
|
||||||
|
ela->resize(1280, 800);
|
||||||
|
ela->setMinimumSize(1024, 680);
|
||||||
|
ela->setIsNavigationBarEnable(false); // 纯中心内容,不显示左侧导航栏
|
||||||
|
ela->setCentralCustomWidget(inner); // 工作台作为 ElaWindow 中心内容
|
||||||
|
topLevel = ela;
|
||||||
|
} else {
|
||||||
|
auto* window = new QMainWindow;
|
||||||
|
window->setWindowTitle(kTitle);
|
||||||
|
window->resize(1280, 800);
|
||||||
|
window->setMinimumSize(1024, 680); // 防止停靠面板被压到不可用尺寸
|
||||||
|
buildWorkbench(*window, repo, projectRepo, nav);
|
||||||
|
topLevel = window;
|
||||||
|
}
|
||||||
|
topLevel->show();
|
||||||
|
|
||||||
nav.start(); // 进入工作台后拉真实 空间/项目/结构
|
nav.start(); // 进入工作台后拉真实 空间/项目/结构
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue