Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aae9d8da2f |
@@ -1,10 +0,0 @@
|
|||||||
//
|
|
||||||
// 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,23 +5,15 @@ 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(NOT UNIX)
|
if(UNIX)
|
||||||
set(USE_SHIMLIB OFF)
|
set(USE_SHIMLIB ON)
|
||||||
|
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)
|
||||||
|
|||||||
@@ -1,74 +0,0 @@
|
|||||||
{
|
|
||||||
"login": {
|
|
||||||
"defaultUser": "usct"
|
|
||||||
},
|
|
||||||
"general": {
|
|
||||||
"defaultlanguage": "en_US",
|
|
||||||
"language": "zh_CN;en_US",
|
|
||||||
"institutionName": "",
|
|
||||||
"institutionAddr": "",
|
|
||||||
"lockscreen": "30"
|
|
||||||
},
|
|
||||||
"protocol": {
|
|
||||||
"default": "RSTAND",
|
|
||||||
"lists": "LSTAND;RSTAND;LONE;RONE"
|
|
||||||
},
|
|
||||||
"storagepolicy": {
|
|
||||||
"mininum": "85"
|
|
||||||
},
|
|
||||||
"lastlogin": {
|
|
||||||
"password": "",
|
|
||||||
"remember": "false",
|
|
||||||
"usercode": ""
|
|
||||||
},
|
|
||||||
"worklist": {
|
|
||||||
"ae": "",
|
|
||||||
"ip": "",
|
|
||||||
"name": "",
|
|
||||||
"port": ""
|
|
||||||
},
|
|
||||||
"pacs": {
|
|
||||||
"ae": "",
|
|
||||||
"ip": "",
|
|
||||||
"name": "",
|
|
||||||
"port": ""
|
|
||||||
},
|
|
||||||
"recon": {
|
|
||||||
"ae": "",
|
|
||||||
"ip": "",
|
|
||||||
"name": "",
|
|
||||||
"port": ""
|
|
||||||
},
|
|
||||||
"address": {
|
|
||||||
"device": "eth0",
|
|
||||||
"dhcp": "true",
|
|
||||||
"ip": "",
|
|
||||||
"mask": "",
|
|
||||||
"ae": "",
|
|
||||||
"name": "",
|
|
||||||
"port": "",
|
|
||||||
"additional": [{
|
|
||||||
"ip": "",
|
|
||||||
"netmask": ""
|
|
||||||
}, {
|
|
||||||
"ip": "",
|
|
||||||
"netmask": ""
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
"routing": {
|
|
||||||
"defaultgateway": "",
|
|
||||||
"routingtable": [{
|
|
||||||
"destination": "",
|
|
||||||
"gateway": "",
|
|
||||||
"netmask": ""
|
|
||||||
}, {
|
|
||||||
"destination": "",
|
|
||||||
"gateway": "",
|
|
||||||
"netmask": ""
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
"worklistfilter": {
|
|
||||||
"default": "Today",
|
|
||||||
"lists": "Today;Recent3Days;ThisWeek;ThisMonth"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -131,16 +131,13 @@ 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);
|
ChangePasswordFormDialog dia(this->parentWidget());
|
||||||
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\" ?"));
|
||||||
|
|||||||
@@ -50,9 +50,8 @@ AccountTableForm::AccountTableForm(QWidget* parent) {
|
|||||||
table->setColumnWidth(4, 150);
|
table->setColumnWidth(4, 150);
|
||||||
|
|
||||||
QWidget* cmdPanel = new QWidget(this);
|
QWidget* cmdPanel = new QWidget(this);
|
||||||
cmdPanel->setObjectName("commandWidgetnoBBorder");
|
cmdPanel->setObjectName("commandWidget");
|
||||||
QHBoxLayout* cmdLayout = new QHBoxLayout(cmdPanel);
|
QHBoxLayout* cmdLayout = new QHBoxLayout(cmdPanel);
|
||||||
|
|
||||||
cmdLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
|
cmdLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
|
||||||
QWidget* spacerLine = new QWidget(this);
|
QWidget* spacerLine = new QWidget(this);
|
||||||
spacerLine->setFixedWidth(2);
|
spacerLine->setFixedWidth(2);
|
||||||
|
|||||||
@@ -23,9 +23,8 @@ AdminSettingForm::AdminSettingForm(QWidget* parent, Qt::WindowFlags f) : TabForm
|
|||||||
|
|
||||||
QHBoxLayout* layout = new QHBoxLayout(this);
|
QHBoxLayout* layout = new QHBoxLayout(this);
|
||||||
layout->setMargin(0);
|
layout->setMargin(0);
|
||||||
layout->setContentsMargins(0, 8, 0, 1);
|
layout->setContentsMargins(0, 8, 0, 8);
|
||||||
this->ui->contentWidget->setLayout(layout);
|
this->ui->contentWidget->setLayout(layout);
|
||||||
this->ui->contentWidget->setObjectName("contentWidgetWithBBorder");
|
|
||||||
QListWidget* widget = new QListWidget(this);
|
QListWidget* widget = new QListWidget(this);
|
||||||
widget->setFixedWidth(250);
|
widget->setFixedWidth(250);
|
||||||
QStringList menus;
|
QStringList menus;
|
||||||
@@ -42,7 +41,6 @@ AdminSettingForm::AdminSettingForm(QWidget* parent, Qt::WindowFlags f) : TabForm
|
|||||||
QWidget* spacerLine2 = new QWidget(this);
|
QWidget* spacerLine2 = new QWidget(this);
|
||||||
spacerLine2->setFixedWidth(2);
|
spacerLine2->setFixedWidth(2);
|
||||||
spacerLine2->setObjectName("verSpaceLine");
|
spacerLine2->setObjectName("verSpaceLine");
|
||||||
spacerLine2->setStyleSheet("margin-bottom:8px");
|
|
||||||
layout->addWidget(spacerLine2);
|
layout->addWidget(spacerLine2);
|
||||||
layout->addWidget(stackedWidget);
|
layout->addWidget(stackedWidget);
|
||||||
this->ui->commandWidget->hide();
|
this->ui->commandWidget->hide();
|
||||||
|
|||||||
@@ -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
|
||||||
lbl_title = new QLabel(this);
|
QLabel* 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,7 +28,3 @@ 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,13 +12,11 @@ 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,9 +19,6 @@
|
|||||||
#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>
|
|
||||||
|
|
||||||
#define ADD_CENTER_ITEM(row,col,text)\
|
#define ADD_CENTER_ITEM(row,col,text)\
|
||||||
item = new QTableWidgetItem(text);\
|
item = new QTableWidgetItem(text);\
|
||||||
@@ -64,7 +61,7 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
|
|||||||
|
|
||||||
//Init content widget
|
//Init content widget
|
||||||
QHBoxLayout* contentLayout = new QHBoxLayout();
|
QHBoxLayout* contentLayout = new QHBoxLayout();
|
||||||
contentLayout->setContentsMargins(5, 5, 0, 5);
|
contentLayout->setContentsMargins(5,5,0,5);
|
||||||
this->ui->contentWidget->setLayout(contentLayout);
|
this->ui->contentWidget->setLayout(contentLayout);
|
||||||
// TableView for patient
|
// TableView for patient
|
||||||
QTableView* table = new SlideableTableView(this);
|
QTableView* table = new SlideableTableView(this);
|
||||||
@@ -75,9 +72,7 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
|
|||||||
table->verticalHeader()->setDefaultSectionSize(38);
|
table->verticalHeader()->setDefaultSectionSize(38);
|
||||||
table->horizontalHeader()->setStretchLastSection(true);
|
table->horizontalHeader()->setStretchLastSection(true);
|
||||||
//data from SQLITE
|
//data from SQLITE
|
||||||
//
|
|
||||||
//avoid pan comsumed by tableview!
|
|
||||||
table->viewport()->ungrabGesture(Qt::PanGesture);
|
|
||||||
|
|
||||||
auto model = SQLHelper::getTable("Patient");
|
auto model = SQLHelper::getTable("Patient");
|
||||||
model->setFilter("Flag=0");
|
model->setFilter("Flag=0");
|
||||||
@@ -116,29 +111,29 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
|
|||||||
//edit panel
|
//edit panel
|
||||||
EditPatientForm* edit_patient = new EditPatientForm(this);
|
EditPatientForm* edit_patient = new EditPatientForm(this);
|
||||||
edit_patient->setObjectName("edit_patient");
|
edit_patient->setObjectName("edit_patient");
|
||||||
edit_patient->hide();
|
edit_patient->hide();
|
||||||
contentLayout->addWidget(edit_patient);
|
contentLayout->addWidget(edit_patient);
|
||||||
|
|
||||||
auto* btnShowEdit = new VerticalTextToolButton(this);
|
auto *btnShowEdit = new VerticalTextToolButton(this);
|
||||||
btnShowEdit->setObjectName("showeditBtn");
|
btnShowEdit->setObjectName("showeditBtn");
|
||||||
btnShowEdit->setIcon(QIcon(":/icons/edit.png"));
|
btnShowEdit->setIcon(QIcon(":/icons/edit.png"));
|
||||||
btnShowEdit->setIconSize(QSize(30, 30));
|
btnShowEdit->setIconSize(QSize(30, 30));
|
||||||
btnShowEdit->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
|
btnShowEdit->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
|
||||||
btnShowEdit->setFixedHeight(225);
|
btnShowEdit->setFixedHeight(225);
|
||||||
// btnShowEdit->setVerticalText("E\nd\ni\nt\nP\na\nn\ne\nl");
|
// btnShowEdit->setVerticalText("E\nd\ni\nt\nP\na\nn\ne\nl");
|
||||||
btnShowEdit->setVerticalText("Patient Detail");
|
btnShowEdit->setVerticalText("Patient Detail");
|
||||||
contentLayout->addWidget(btnShowEdit);
|
contentLayout->addWidget(btnShowEdit);
|
||||||
contentLayout->setAlignment(btnShowEdit, Qt::AlignmentFlag::AlignTop);
|
contentLayout->setAlignment(btnShowEdit, Qt::AlignmentFlag::AlignTop);
|
||||||
connect(btnShowEdit, &QToolButton::clicked, [=]() {
|
connect(btnShowEdit,&QToolButton::clicked,[=](){
|
||||||
edit_patient->show();
|
edit_patient->show();
|
||||||
btnShowEdit->hide();
|
btnShowEdit->hide();
|
||||||
});
|
});
|
||||||
connect(edit_patient, &EditPatientForm::hideBtnClicked, [=]() {
|
connect(edit_patient, &EditPatientForm::hideBtnClicked, [=](){
|
||||||
edit_patient->hide();
|
edit_patient->hide();
|
||||||
btnShowEdit->show();
|
btnShowEdit->show();
|
||||||
});
|
});
|
||||||
|
|
||||||
//select default row 0
|
//select default row 0
|
||||||
if (model->rowCount() > 0)
|
if (model->rowCount() > 0)
|
||||||
{
|
{
|
||||||
table->selectRow(0);
|
table->selectRow(0);
|
||||||
@@ -148,7 +143,7 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
|
|||||||
pat. val = model->data(model->index(currentRow,PatientInformationEnum:: val)).toString();
|
pat. val = model->data(model->index(currentRow,PatientInformationEnum:: val)).toString();
|
||||||
EDIT_PATIENT()
|
EDIT_PATIENT()
|
||||||
#undef ADD_PATIENT_PROPERTY
|
#undef ADD_PATIENT_PROPERTY
|
||||||
edit_patient->setPatientInformation(&pat);
|
edit_patient->setPatientInformation(&pat);
|
||||||
}
|
}
|
||||||
//events----------------------------------------------------------------------
|
//events----------------------------------------------------------------------
|
||||||
//table current row selection changing event
|
//table current row selection changing event
|
||||||
@@ -166,15 +161,15 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
|
|||||||
});
|
});
|
||||||
|
|
||||||
connect(btnAdd, &QToolButton::clicked, [=]() {
|
connect(btnAdd, &QToolButton::clicked, [=]() {
|
||||||
edit_patient->show();
|
edit_patient->show();
|
||||||
btnShowEdit->hide();
|
btnShowEdit->hide();
|
||||||
edit_patient->clearPatientInformation();
|
edit_patient->clearPatientInformation();
|
||||||
edit_patient->setEditEnable(true);
|
edit_patient->setEditEnable(true);
|
||||||
btnSelect->setEnabled(false);
|
btnSelect->setEnabled(false);
|
||||||
});
|
});
|
||||||
connect(btnEdit, &QToolButton::clicked, [=]() {
|
connect(btnEdit, &QToolButton::clicked, [=]() {
|
||||||
edit_patient->show();
|
edit_patient->show();
|
||||||
btnShowEdit->hide();
|
btnShowEdit->hide();
|
||||||
table->clicked(table->currentIndex());
|
table->clicked(table->currentIndex());
|
||||||
edit_patient->setEditEnable(true);
|
edit_patient->setEditEnable(true);
|
||||||
btnSelect->setEnabled(false);
|
btnSelect->setEnabled(false);
|
||||||
@@ -228,13 +223,6 @@ 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())
|
||||||
@@ -244,7 +232,6 @@ 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();
|
||||||
@@ -255,8 +242,8 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
currentRow = -1;
|
currentRow = -1;
|
||||||
edit_patient->editCancel();
|
edit_patient->editCancel();
|
||||||
edit_patient->clearPatientInformation();
|
edit_patient->clearPatientInformation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -311,5 +298,4 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
|
|||||||
|
|
||||||
SelectFormWidget::~SelectFormWidget()
|
SelectFormWidget::~SelectFormWidget()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
#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)
|
||||||
@@ -71,7 +70,7 @@ void AboutWidget::initUi()
|
|||||||
pMainLayout->addSpacing(subContentSpacing);
|
pMainLayout->addSpacing(subContentSpacing);
|
||||||
|
|
||||||
pGuiVer = new QLabel(this);
|
pGuiVer = new QLabel(this);
|
||||||
pGuiVer->setText(QString(tr("GUI Software V%1")).arg(getGUIVersion()));
|
pGuiVer->setText(tr("GUI Software V1.3"));
|
||||||
pGuiVer->setContentsMargins(subContentMargin, 0, 0, 0);
|
pGuiVer->setContentsMargins(subContentMargin, 0, 0, 0);
|
||||||
pMainLayout->addWidget(pGuiVer);
|
pMainLayout->addWidget(pGuiVer);
|
||||||
|
|
||||||
@@ -155,7 +154,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(QString(tr("GUI Software V%1")).arg(getGUIVersion()));
|
pGuiVer->setText(tr("GUI Software V1.3"));
|
||||||
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"));
|
||||||
@@ -178,7 +177,3 @@ 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();
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ GUIErrorBase *GUIErrorFactory::getError(const QString &errorMsg) {
|
|||||||
|
|
||||||
if (errorMsg.isEmpty()) return new GUIErrorBase;
|
if (errorMsg.isEmpty()) return new GUIErrorBase;
|
||||||
//新模式,分级
|
//新模式,分级
|
||||||
if (errorMsg.length()>1 && errorMsg[1] == ' ') {
|
if (errorMsg[1] == ' ') {
|
||||||
char c = errorMsg[0].toLower().toLatin1();
|
char c = errorMsg[0].toLower().toLatin1();
|
||||||
switch (c) {
|
switch (c) {
|
||||||
//WARN 级别
|
//WARN 级别
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ int main(int argc, char* argv[])
|
|||||||
//QObject::connect(obj, SIGNAL(touchScreen()), Locker::Instance(), SLOT(refreshTimer()));
|
//QObject::connect(obj, SIGNAL(touchScreen()), Locker::Instance(), SLOT(refreshTimer()));
|
||||||
QList<Qt::GestureType> gestures;
|
QList<Qt::GestureType> gestures;
|
||||||
gestures << Qt::SwipeGesture;
|
gestures << Qt::SwipeGesture;
|
||||||
gestures << Qt::PanGesture;
|
|
||||||
w.grabGestures(gestures);
|
w.grabGestures(gestures);
|
||||||
|
|
||||||
QStringList app_args = a.arguments();
|
QStringList app_args = a.arguments();
|
||||||
|
|||||||
@@ -303,55 +303,30 @@ bool MainWindow::gestureEvent(QGestureEvent* event)
|
|||||||
//qCDebug(lcExample) << "gestureEvent():" << event;
|
//qCDebug(lcExample) << "gestureEvent():" << event;
|
||||||
if (QGesture* swipe = event->gesture(Qt::SwipeGesture))
|
if (QGesture* swipe = event->gesture(Qt::SwipeGesture))
|
||||||
swipeTriggered(static_cast<QSwipeGesture*>(swipe));
|
swipeTriggered(static_cast<QSwipeGesture*>(swipe));
|
||||||
if (QGesture* pan = event->gesture(Qt::PanGesture))
|
//else if (QGesture* pan = event->gesture(Qt::PanGesture))
|
||||||
panTriggered(static_cast<QPanGesture*>(pan));
|
//panTriggered(static_cast<QPanGesture*>(pan));
|
||||||
//if (QGesture* pinch = event->gesture(Qt::PinchGesture))
|
//if (QGesture* pinch = event->gesture(Qt::PinchGesture))
|
||||||
//pinchTriggered(static_cast<QPinchGesture*>(pinch));
|
//pinchTriggered(static_cast<QPinchGesture*>(pinch));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
void MainWindow::swipeTriggered(QSwipeGesture* gesture)
|
||||||
void MainWindow::panTriggered(QPanGesture* gesture)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
if (gesture->state() == Qt::GestureFinished) {
|
if (gesture->state() == Qt::GestureFinished) {
|
||||||
QPointF delta = gesture->offset();
|
if (gesture->horizontalDirection() == QSwipeGesture::Right) {
|
||||||
int index = tab->currentIndex();
|
int index = tab->currentIndex();
|
||||||
if (delta.x() > 50) {
|
|
||||||
|
|
||||||
index--;
|
index--;
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
tab->setCurrentIndex(index);
|
tab->setCurrentIndex(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (delta.x() < -50)
|
if (gesture->horizontalDirection() == QSwipeGesture::Left) {
|
||||||
{
|
int index = tab->currentIndex();
|
||||||
index++;
|
index++;
|
||||||
if (index < tab->count()) {
|
if (index < tab->count()) {
|
||||||
tab->setCurrentIndex(index);
|
tab->setCurrentIndex(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
qDebug() << "panTriggered" << index;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void MainWindow::swipeTriggered(QSwipeGesture* gesture)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (gesture->state() == Qt::GestureFinished) {
|
|
||||||
//if (gesture->horizontalDirection() == QSwipeGesture::Right) {
|
|
||||||
// int index = tab->currentIndex();
|
|
||||||
// index--;
|
|
||||||
// if (index >= 0) {
|
|
||||||
// tab->setCurrentIndex(index);
|
|
||||||
// }
|
|
||||||
|
|
||||||
//}
|
|
||||||
//if (gesture->horizontalDirection() == QSwipeGesture::Left) {
|
|
||||||
// int index = tab->currentIndex();
|
|
||||||
// index++;
|
|
||||||
// if (index < tab->count()) {
|
|
||||||
// tab->setCurrentIndex(index);
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
if (gesture->verticalDirection() == QSwipeGesture::Down) {
|
if (gesture->verticalDirection() == QSwipeGesture::Down) {
|
||||||
if (debugMode)
|
if (debugMode)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ class GUIMessageDialog;
|
|||||||
class QTabWidget;
|
class QTabWidget;
|
||||||
class QGestureEvent;
|
class QGestureEvent;
|
||||||
class QSwipeGesture;
|
class QSwipeGesture;
|
||||||
class QPanGesture;
|
|
||||||
class QDockWidget;
|
class QDockWidget;
|
||||||
|
|
||||||
class MainWindow : public QMainWindow
|
class MainWindow : public QMainWindow
|
||||||
@@ -42,7 +41,6 @@ protected:
|
|||||||
private:
|
private:
|
||||||
bool gestureEvent(QGestureEvent* event);
|
bool gestureEvent(QGestureEvent* event);
|
||||||
void swipeTriggered(QSwipeGesture*);
|
void swipeTriggered(QSwipeGesture*);
|
||||||
void panTriggered(QPanGesture*);
|
|
||||||
void loadStyleSheet(const QString& sheetName);
|
void loadStyleSheet(const QString& sheetName);
|
||||||
cJSON* json_root = nullptr;
|
cJSON* json_root = nullptr;
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user