1.设置软件名。

This commit is contained in:
luocai 2024-06-21 18:08:23 +08:00
parent 809bca3e91
commit a92e6948c3
4 changed files with 6 additions and 3 deletions

View File

@ -19,6 +19,7 @@
constexpr uint32_t ImageSliceSize = 2048;
Application::Application(int &argc, char **argv) : m_app(std::make_shared<QApplication>(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);

View File

@ -1,4 +1,5 @@
project(Analyser VERSION 0.2 LANGUAGES C CXX)
set(APPLICATION_NAME "掌静脉测试工具")
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

View File

@ -1,2 +1,3 @@
#define APPLICATION_NAME "@APPLICATION_NAME@"
#define GIT_COMMIT_ID "@GIT_COMMIT_ID@"
#define APP_VERSION "@PROJECT_VERSION@"

View File

@ -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)