Compare commits
6 Commits
3a6a755ef1
...
v0.6.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7edfe1d8f5 | ||
|
|
95804d618f | ||
|
|
a8d4614da1 | ||
|
|
619db892dd | ||
|
|
75584d9b44 | ||
|
|
ae175f2ef3 |
10
AppVersion.h.in
Normal file
10
AppVersion.h.in
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
//
|
||||||
|
// Created by Krad on 2022/3/8.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef GUI_VERSION_H
|
||||||
|
#define GUI_VERSION_H
|
||||||
|
#define GUI_VERSION_MAJOR @GUI_VERSION_MAJOR@
|
||||||
|
#define GUI_VERSION_MINOR @GUI_VERSION_MINOR@
|
||||||
|
#define GUI_VERSION_BUILD @GUI_VERSION_BUILD@
|
||||||
|
#endif //GUI_VERSION_H
|
||||||
@@ -5,15 +5,23 @@ set(CMAKE_CXX_STANDARD 14)
|
|||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2 -pthread")
|
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2 -pthread")
|
||||||
|
|
||||||
|
# GUI Version
|
||||||
|
set(GUI_VERSION_MAJOR 0)
|
||||||
|
set(GUI_VERSION_MINOR 6)
|
||||||
|
set(GUI_VERSION_BUILD 8)
|
||||||
|
|
||||||
|
configure_file(
|
||||||
|
"AppVersion.h.in"
|
||||||
|
"AppVersion.h"
|
||||||
|
)
|
||||||
|
|
||||||
file(GLOB_RECURSE project_headers ./src/*.h)
|
file(GLOB_RECURSE project_headers ./src/*.h)
|
||||||
file(GLOB_RECURSE project_cpps ./src/*.cpp)
|
file(GLOB_RECURSE project_cpps ./src/*.cpp)
|
||||||
file(GLOB_RECURSE project_cxx ./src/*.cxx)
|
file(GLOB_RECURSE project_cxx ./src/*.cxx)
|
||||||
file(GLOB_RECURSE project_cc ./src/*.cc)
|
file(GLOB_RECURSE project_cc ./src/*.cc)
|
||||||
|
|
||||||
if(UNIX)
|
if(NOT UNIX)
|
||||||
set(USE_SHIMLIB ON)
|
set(USE_SHIMLIB OFF)
|
||||||
else()
|
|
||||||
set(USE_SHIMLIB OFF)
|
|
||||||
endif()
|
endif()
|
||||||
if(UNIX AND USE_SHIMLIB)
|
if(UNIX AND USE_SHIMLIB)
|
||||||
file(GLOB_RECURSE project_c ./src/json/*.c)
|
file(GLOB_RECURSE project_c ./src/json/*.c)
|
||||||
|
|||||||
@@ -131,13 +131,16 @@ AccountFormDialog::AccountFormDialog(QWidget* parent, AccountEditMode mode, Qt::
|
|||||||
layout->addWidget(lbl_endline9);
|
layout->addWidget(lbl_endline9);
|
||||||
if (m_mode == Self) {
|
if (m_mode == Self) {
|
||||||
connect(btn_Pwd, &QPushButton::clicked, [=]() {
|
connect(btn_Pwd, &QPushButton::clicked, [=]() {
|
||||||
ChangePasswordFormDialog dia(this->parentWidget());
|
ChangePasswordFormDialog dia(this);
|
||||||
|
dia.setGeometry(this->geometry());
|
||||||
dia.setWindowModality(Qt::WindowModal);
|
dia.setWindowModality(Qt::WindowModal);
|
||||||
dia.exec();
|
dia.exec();
|
||||||
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
connect(btn_Pwd, &QAbstractButton::clicked, [=]() {
|
connect(btn_Pwd, &QAbstractButton::clicked, [=]() {
|
||||||
AlertDialog dialog(this);
|
AlertDialog dialog(this);
|
||||||
|
dialog.setGeometry(this->geometry());
|
||||||
dialog.setButtonMode(OkAndCancel);
|
dialog.setButtonMode(OkAndCancel);
|
||||||
dialog.setWindowModality(Qt::WindowModal);
|
dialog.setWindowModality(Qt::WindowModal);
|
||||||
dialog.setAlertMessage(tr("Reset password to \"123456\" ?"));
|
dialog.setAlertMessage(tr("Reset password to \"123456\" ?"));
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ AlertDialog::AlertDialog(QWidget *parent, Qt::WindowFlags f) : GUIFormBaseDialog
|
|||||||
QVBoxLayout* layout = new QVBoxLayout(formWidget);
|
QVBoxLayout* layout = new QVBoxLayout(formWidget);
|
||||||
layout->setSpacing(10);
|
layout->setSpacing(10);
|
||||||
// add title
|
// add title
|
||||||
QLabel* lbl_title = new QLabel(this);
|
lbl_title = new QLabel(this);
|
||||||
lbl_title->setAlignment(Qt::AlignCenter);
|
lbl_title->setAlignment(Qt::AlignCenter);
|
||||||
lbl_title->setText(tr("Warning"));
|
lbl_title->setText(tr("Warning"));
|
||||||
lbl_title->setObjectName("title");
|
lbl_title->setObjectName("title");
|
||||||
@@ -28,3 +28,7 @@ AlertDialog::~AlertDialog() {
|
|||||||
void AlertDialog::setAlertMessage(const QString &msg) {
|
void AlertDialog::setAlertMessage(const QString &msg) {
|
||||||
this->lbl_msg->setText(msg);
|
this->lbl_msg->setText(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AlertDialog::setTitle(const QString &msg) {
|
||||||
|
lbl_title->setText(msg);
|
||||||
|
}
|
||||||
|
|||||||
@@ -12,11 +12,13 @@ public:
|
|||||||
explicit AlertDialog(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
explicit AlertDialog(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
||||||
~AlertDialog();
|
~AlertDialog();
|
||||||
void setAlertMessage(const QString& msg);
|
void setAlertMessage(const QString& msg);
|
||||||
|
void setTitle(const QString& msg);
|
||||||
protected:
|
protected:
|
||||||
bool updateReferenceData() override{return true;}
|
bool updateReferenceData() override{return true;}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QLabel* lbl_msg;
|
QLabel* lbl_msg;
|
||||||
|
QLabel* lbl_title;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#include "log/UserOperationLog.h"
|
#include "log/UserOperationLog.h"
|
||||||
#include <QSortFilterProxyModel>
|
#include <QSortFilterProxyModel>
|
||||||
#include "src/components/VerticalTextToolButton.h"
|
#include "src/components/VerticalTextToolButton.h"
|
||||||
|
#include "AlertDialog.h"
|
||||||
|
|
||||||
#include <QScroller>
|
#include <QScroller>
|
||||||
|
|
||||||
@@ -227,6 +228,13 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
|
|||||||
|
|
||||||
connect(btnDelete, &QToolButton::clicked, [=]() {
|
connect(btnDelete, &QToolButton::clicked, [=]() {
|
||||||
if (currentRow < 0)return;
|
if (currentRow < 0)return;
|
||||||
|
AlertDialog dialog(this);
|
||||||
|
dialog.setButtonMode(OkAndCancel);
|
||||||
|
dialog.setTitle("Confirm");
|
||||||
|
dialog.setWindowModality(Qt::WindowModal);
|
||||||
|
QString pat_name = model->index(currentRow, PatientInformationEnum::Name).data().toString();
|
||||||
|
dialog.setAlertMessage(QString(tr("Delete Patient \"%1\" ?")).arg(pat_name));
|
||||||
|
if (dialog.exec()!=QDialog::Accepted) return;
|
||||||
model->setData(model->index(currentRow, PatientInformationEnum::Flag), 9);
|
model->setData(model->index(currentRow, PatientInformationEnum::Flag), 9);
|
||||||
// model->removeRow(currentRow);
|
// model->removeRow(currentRow);
|
||||||
if (model->submitAll())
|
if (model->submitAll())
|
||||||
@@ -236,6 +244,7 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
|
|||||||
{
|
{
|
||||||
table->selectRow(0);
|
table->selectRow(0);
|
||||||
model->selectRow(0);
|
model->selectRow(0);
|
||||||
|
currentRow = 0;
|
||||||
PatientInformation pat;
|
PatientInformation pat;
|
||||||
#define ADD_PATIENT_PROPERTY(val)\
|
#define ADD_PATIENT_PROPERTY(val)\
|
||||||
pat. val = model->data(model->index(0,PatientInformationEnum:: val)).toString();
|
pat. val = model->data(model->index(0,PatientInformationEnum:: val)).toString();
|
||||||
@@ -302,4 +311,5 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
|
|||||||
|
|
||||||
SelectFormWidget::~SelectFormWidget()
|
SelectFormWidget::~SelectFormWidget()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include "json/cmdhelper.h"
|
#include "json/cmdhelper.h"
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
|
#include "AppVersion.h"
|
||||||
|
|
||||||
AboutWidget::AboutWidget(QWidget* parent)
|
AboutWidget::AboutWidget(QWidget* parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
@@ -70,7 +71,7 @@ void AboutWidget::initUi()
|
|||||||
pMainLayout->addSpacing(subContentSpacing);
|
pMainLayout->addSpacing(subContentSpacing);
|
||||||
|
|
||||||
pGuiVer = new QLabel(this);
|
pGuiVer = new QLabel(this);
|
||||||
pGuiVer->setText(tr("GUI Software V1.3"));
|
pGuiVer->setText(QString(tr("GUI Software V%1")).arg(getGUIVersion()));
|
||||||
pGuiVer->setContentsMargins(subContentMargin, 0, 0, 0);
|
pGuiVer->setContentsMargins(subContentMargin, 0, 0, 0);
|
||||||
pMainLayout->addWidget(pGuiVer);
|
pMainLayout->addWidget(pGuiVer);
|
||||||
|
|
||||||
@@ -154,7 +155,7 @@ void AboutWidget::initUi()
|
|||||||
pProductVer->setText(tr("HJ-USCT-01 V1.0"));
|
pProductVer->setText(tr("HJ-USCT-01 V1.0"));
|
||||||
pBtnHelp->setText(tr("?"));
|
pBtnHelp->setText(tr("?"));
|
||||||
pCompanyCopyRight->setText(tr("Copyright © 2017-2020 Zhejiang Equilibrium Nine Medical Equipment Co., Ltd. All Rights Reversed"));
|
pCompanyCopyRight->setText(tr("Copyright © 2017-2020 Zhejiang Equilibrium Nine Medical Equipment Co., Ltd. All Rights Reversed"));
|
||||||
pGuiVer->setText(tr("GUI Software V1.3"));
|
pGuiVer->setText(QString(tr("GUI Software V%1")).arg(getGUIVersion()));
|
||||||
pEmbededSoftVer->setText(tr("Embedded Software V1.5"));
|
pEmbededSoftVer->setText(tr("Embedded Software V1.5"));
|
||||||
pReconSotfVer->setText(tr("Reconstruction Software V1.2"));
|
pReconSotfVer->setText(tr("Reconstruction Software V1.2"));
|
||||||
pFEBVer->setText(tr("FEB Information"));
|
pFEBVer->setText(tr("FEB Information"));
|
||||||
@@ -177,3 +178,7 @@ void AboutWidget::openHelpFile()
|
|||||||
// box.exec();
|
// box.exec();
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString AboutWidget::getGUIVersion() {
|
||||||
|
return QString("%1.%2.%3").arg(GUI_VERSION_MAJOR).arg(GUI_VERSION_MINOR).arg(GUI_VERSION_BUILD);
|
||||||
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public:
|
|||||||
explicit AboutWidget(QWidget* parent = nullptr);
|
explicit AboutWidget(QWidget* parent = nullptr);
|
||||||
~AboutWidget();
|
~AboutWidget();
|
||||||
|
|
||||||
|
QString getGUIVersion();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void openHelpFile();
|
void openHelpFile();
|
||||||
|
|||||||
Reference in New Issue
Block a user