From a92e6948c3cc297dafca2ec24c7c2e3055d15204 Mon Sep 17 00:00:00 2001 From: luocai Date: Fri, 21 Jun 2024 18:08:23 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=AE=BE=E7=BD=AE=E8=BD=AF=E4=BB=B6=E5=90=8D?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Analyser/Application.cpp | 1 + Analyser/CMakeLists.txt | 1 + Analyser/Configuration.h.in | 1 + Analyser/qml/main.qml | 6 +++--- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Analyser/Application.cpp b/Analyser/Application.cpp index 6f6305d..760091e 100644 --- a/Analyser/Application.cpp +++ b/Analyser/Application.cpp @@ -19,6 +19,7 @@ constexpr uint32_t ImageSliceSize = 2048; Application::Application(int &argc, char **argv) : m_app(std::make_shared(argc, argv)) { + m_app->setApplicationName(APPLICATION_NAME); m_app->setApplicationVersion(QString("v%1_%2 build: %3 %4").arg(APP_VERSION, GIT_COMMIT_ID, __DATE__, __TIME__)); QFont font; font.setPointSize(16); diff --git a/Analyser/CMakeLists.txt b/Analyser/CMakeLists.txt index 66179dc..6bc9541 100644 --- a/Analyser/CMakeLists.txt +++ b/Analyser/CMakeLists.txt @@ -1,4 +1,5 @@ project(Analyser VERSION 0.2 LANGUAGES C CXX) +set(APPLICATION_NAME "掌静脉测试工具") set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) diff --git a/Analyser/Configuration.h.in b/Analyser/Configuration.h.in index 88bb89d..733e4b6 100644 --- a/Analyser/Configuration.h.in +++ b/Analyser/Configuration.h.in @@ -1,2 +1,3 @@ +#define APPLICATION_NAME "@APPLICATION_NAME@" #define GIT_COMMIT_ID "@GIT_COMMIT_ID@" #define APP_VERSION "@PROJECT_VERSION@" diff --git a/Analyser/qml/main.qml b/Analyser/qml/main.qml index 9316873..d01d655 100644 --- a/Analyser/qml/main.qml +++ b/Analyser/qml/main.qml @@ -7,7 +7,7 @@ Window { width: 1120 height: 640 visible: true - title: qsTr("L015上位机工具 "+Qt.application.version) + title: qsTr(Qt.application.name + " " + Qt.application.version) OperationItem { id: operationItem @@ -106,11 +106,11 @@ Window { function onNewStatusTip(level, tip) { if (level === 0) { statusTip.icon = "../resources/successfull.svg" - statusTip.color="#EBF8ED" + statusTip.color = "#EBF8ED" statusTip.show(tip, 2000) } else if (level === 1) { statusTip.icon = "../resources/warning.svg" - statusTip.color="#FAFAD2" + statusTip.color = "#FAFAD2" statusTip.show(tip, 2000) } else if (level === 2) { resultBrowser.append(tip)