31 Commits

Author SHA1 Message Date
Krad
23065c6cc5 v0.6.10 beta1 2022-04-02 09:39:17 +08:00
Krad
9bffca90ae Change SelectFormWidget, use EditPatientDialog instead of EditPatientForm to fulfill patient edit and adding. 2022-04-01 15:33:50 +08:00
Krad
3fecd89689 Add new components, ListBox and EditPatientDialog. 2022-04-01 15:32:23 +08:00
Krad
3835339758 Add new components, DateSlidePickerBox and DateSelectDialog. 2022-04-01 15:31:38 +08:00
Krad
01bcd510e6 Add disable and enable item method, resizeLabelWidth method;, valueChanged signal to SlidePickerBox. 2022-04-01 15:30:39 +08:00
Krad
da284a2d0b Change setAvailableDates to setValues of SelectDialog 2022-04-01 15:28:18 +08:00
Krad
27832c6d76 Fake version for shimlib. 2022-04-01 15:24:57 +08:00
Krad
96e848750c Style Change, new style for editvalBtn. 2022-04-01 15:24:27 +08:00
Krad
e2301c3139 Shrink long word wrap text in data model. 2022-04-01 15:23:42 +08:00
Krad
04b7191702 Read and show embed ware version 2022-03-16 17:00:03 +08:00
Krad
f4fdb4d223 Embed ware version interface in shimlib 2022-03-16 16:59:44 +08:00
Krad
fb525d3cdd Change Version number to v0.6.9 2022-03-16 13:03:22 +08:00
Krad
866cdd3c41 V0.6.9 2022-03-15 16:29:34 +08:00
Krad
ff9020033a Comments for cmake 2022-03-15 16:23:14 +08:00
Krad
5fb24642e3 Fix patient tableView selection bugs. 2022-03-15 16:22:58 +08:00
Krad
52bf2527fa Add currentRowChanged signal to SlideableTableView 2022-03-15 16:22:07 +08:00
xueyan hu
e3253047af Merge branch 'release' of http://192.168.1.178:3000/kradchen/GUI into release 2022-03-15 13:07:59 +08:00
xueyan hu
fc1be95066 Fixing VKB QDateEdit <Enter> does not work! 2022-03-15 13:06:50 +08:00
Krad
7d963899a2 Add column sort arrow to tableview 2022-03-14 18:07:28 +08:00
Krad
9366ac9bd4 V0.6.8 release check in. 2022-03-14 16:41:13 +08:00
Krad
8011ac9df8 Add Version build function to CMakeLists.txt 2022-03-08 10:45:38 +08:00
Krad
e5e4bee129 Fix Account Dialog stuck, when change pwd dialog show and click the Account Dialog. 2022-03-08 10:45:38 +08:00
Krad
3eff53a74b Fix unselect bug of Patient grid after delete. 2022-03-08 10:45:38 +08:00
Krad
9c1b53832f Add confirm to delete Patient. 2022-03-08 10:45:38 +08:00
Krad
39dc22a1cd New method to set USE_SHIMLIB(use cmake parameter -DUSE_SHIMLIB=ON) 2022-03-08 10:45:38 +08:00
Krad
13fcad6d08 Add setTitle to AlertDialog 2022-03-08 10:45:38 +08:00
Krad
3fe25ce14e Style fix 2022-03-08 10:45:38 +08:00
xueyan hu
89d237c7d5 bug fixes 2022-03-08 10:45:38 +08:00
xueyan hu
1f24841ba8 complete two finger swipe 2022-03-08 10:45:38 +08:00
Krad
d44671fb93 Fix a GUIErrorFactory out of bound bug. 2022-03-08 10:45:38 +08:00
krad
aae9d8da2f double check state for stop 2022-02-25 15:59:22 +08:00
48 changed files with 1179 additions and 335 deletions

11
AppVersion.h.in Normal file
View File

@@ -0,0 +1,11 @@
//
// 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@
#define GUI_VERSION_BETA @GUI_VERSION_BETA@
#endif //GUI_VERSION_H

View File

@@ -5,15 +5,24 @@ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
#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 9)
set(GUI_VERSION_BETA 1)
# use AppVersion.h as a configure file
configure_file(
"AppVersion.h.in"
"AppVersion.h"
)
file(GLOB_RECURSE project_headers ./src/*.h)
file(GLOB_RECURSE project_cpps ./src/*.cpp)
file(GLOB_RECURSE project_cxx ./src/*.cxx)
file(GLOB_RECURSE project_cc ./src/*.cc)
if(UNIX)
set(USE_SHIMLIB ON)
else()
set(USE_SHIMLIB OFF)
if(NOT UNIX)
set(USE_SHIMLIB OFF)
endif()
if(UNIX AND USE_SHIMLIB)
file(GLOB_RECURSE project_c ./src/json/*.c)

74
cfgs/usct-product Normal file
View File

@@ -0,0 +1,74 @@
{
"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"
}
}

3
docs/v0.6.8.txt Normal file
View File

@@ -0,0 +1,3 @@
第一个release版本。
基本流程已完备,提交系统测试。
2022年3月8日

8
docs/v0.6.9.txt Normal file
View File

@@ -0,0 +1,8 @@
v0.6.9
通过新的当前行判定逻辑修复了Select Tab页中Patient 表格排序、选择导致的一系列问题。
包括:
1. Edit Panel 没有跟随选中更新。
2. Patient 全部删除之后存在当前选中错误。
3. 编辑、删除等按钮可用状态不对的错误。
4. 修复了日期输入框在虚拟键盘下,回车无法退出输入模式的错误。
2022年3月15日

View File

@@ -131,13 +131,16 @@ AccountFormDialog::AccountFormDialog(QWidget* parent, AccountEditMode mode, Qt::
layout->addWidget(lbl_endline9);
if (m_mode == Self) {
connect(btn_Pwd, &QPushButton::clicked, [=]() {
ChangePasswordFormDialog dia(this->parentWidget());
ChangePasswordFormDialog dia(this);
dia.setGeometry(this->geometry());
dia.setWindowModality(Qt::WindowModal);
dia.exec();
});
} else {
connect(btn_Pwd, &QAbstractButton::clicked, [=]() {
AlertDialog dialog(this);
dialog.setGeometry(this->geometry());
dialog.setButtonMode(OkAndCancel);
dialog.setWindowModality(Qt::WindowModal);
dialog.setAlertMessage(tr("Reset password to \"123456\" ?"));

View File

@@ -50,8 +50,9 @@ AccountTableForm::AccountTableForm(QWidget* parent) {
table->setColumnWidth(4, 150);
QWidget* cmdPanel = new QWidget(this);
cmdPanel->setObjectName("commandWidget");
cmdPanel->setObjectName("commandWidgetnoBBorder");
QHBoxLayout* cmdLayout = new QHBoxLayout(cmdPanel);
cmdLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
QWidget* spacerLine = new QWidget(this);
spacerLine->setFixedWidth(2);

View File

@@ -23,8 +23,9 @@ AdminSettingForm::AdminSettingForm(QWidget* parent, Qt::WindowFlags f) : TabForm
QHBoxLayout* layout = new QHBoxLayout(this);
layout->setMargin(0);
layout->setContentsMargins(0, 8, 0, 8);
layout->setContentsMargins(0, 8, 0, 1);
this->ui->contentWidget->setLayout(layout);
this->ui->contentWidget->setObjectName("contentWidgetWithBBorder");
QListWidget* widget = new QListWidget(this);
widget->setFixedWidth(250);
QStringList menus;
@@ -41,6 +42,7 @@ AdminSettingForm::AdminSettingForm(QWidget* parent, Qt::WindowFlags f) : TabForm
QWidget* spacerLine2 = new QWidget(this);
spacerLine2->setFixedWidth(2);
spacerLine2->setObjectName("verSpaceLine");
spacerLine2->setStyleSheet("margin-bottom:8px");
layout->addWidget(spacerLine2);
layout->addWidget(stackedWidget);
this->ui->commandWidget->hide();

View File

@@ -12,7 +12,7 @@ AlertDialog::AlertDialog(QWidget *parent, Qt::WindowFlags f) : GUIFormBaseDialog
QVBoxLayout* layout = new QVBoxLayout(formWidget);
layout->setSpacing(10);
// add title
QLabel* lbl_title = new QLabel(this);
lbl_title = new QLabel(this);
lbl_title->setAlignment(Qt::AlignCenter);
lbl_title->setText(tr("Warning"));
lbl_title->setObjectName("title");
@@ -28,3 +28,7 @@ AlertDialog::~AlertDialog() {
void AlertDialog::setAlertMessage(const QString &msg) {
this->lbl_msg->setText(msg);
}
void AlertDialog::setTitle(const QString &msg) {
lbl_title->setText(msg);
}

View File

@@ -12,11 +12,13 @@ public:
explicit AlertDialog(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
~AlertDialog();
void setAlertMessage(const QString& msg);
void setTitle(const QString& msg);
protected:
bool updateReferenceData() override{return true;}
private:
QLabel* lbl_msg;
QLabel* lbl_title;
};

37
src/DateSelectDialog.cpp Normal file
View File

@@ -0,0 +1,37 @@
//
// Created by Krad on 2022/3/24.
//
#include "DateSelectDialog.h"
#include <QVBoxLayout>
#include "components/DateSlidePickerBox.h"
#include <QDate>
DateSelectDialog::DateSelectDialog(QWidget *parent, Qt::WindowFlags f) : GUIFormBaseDialog(parent, f) {
this->setFixedSize(460, 380);
QVBoxLayout* layout = new QVBoxLayout(formWidget);
box = new DateSlidePickerBox(formWidget);
box->setObjectName("slider_one");
box->setSelectedValue("1990-01-01");
layout->addWidget(box);
}
DateSelectDialog::~DateSelectDialog() {
}
QString DateSelectDialog::getSelectedValue() {
return box->getSelectedValue();
}
void DateSelectDialog::setSelectedValue(const QString &val) {
box->setSelectedValue(val);
box->resizeLabel();
}
bool DateSelectDialog::updateReferenceData() {
return true;
}
void DateSelectDialog::showEvent(QShowEvent * event) {
QDialog::showEvent(event);
}

24
src/DateSelectDialog.h Normal file
View File

@@ -0,0 +1,24 @@
//
// Created by Krad on 2022/3/24.
//
#ifndef GUI_DATESELECTDIALOG_H
#define GUI_DATESELECTDIALOG_H
#include "GUIFormBaseDialog.h"
class DateSlidePickerBox;
class DateSelectDialog:public GUIFormBaseDialog{
Q_OBJECT
public:
explicit DateSelectDialog(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
~DateSelectDialog() override;
QString getSelectedValue();
void setSelectedValue(const QString& val);
void showEvent(QShowEvent *) override;
protected:
bool updateReferenceData() override;
DateSlidePickerBox* box;
};
#endif //GUI_DATESELECTDIALOG_H

212
src/EditPatientDialog.cpp Normal file
View File

@@ -0,0 +1,212 @@
//
// Created by Krad on 2022/3/21.
//
#include <QVBoxLayout>
#include <QLabel>
#include <QDateTime>
#include <QLineEdit>
#include <QTextEdit>
#include <QToolButton>
#include <QSqlTableModel>
#include <QUuid>
#include "EditPatientDialog.h"
#include "SelectDialog.h"
#include "DateSelectDialog.h"
#include "components/Listbox.h"
int queryValue(QSqlTableModel* model, int colID, QVariant var)
{
for (int i = 0; i < model->rowCount(); ++i) {
if (model->data(model->index(i, colID)) == var) return i;
}
return -1;
}
EditPatientDialog::EditPatientDialog(QWidget *parent, Qt::WindowFlags f) : GUIFormBaseDialog(parent, f) {
QVBoxLayout* layout = new QVBoxLayout(formWidget);
layout->setSpacing(10);
// add title
QLabel* lbl_title = new QLabel(this);
lbl_title->setAlignment(Qt::AlignCenter);
lbl_title->setText(tr("Edit Patient"));
lbl_title->setObjectName("title");
layout->addWidget(lbl_title);
//add old password
QLabel* lbl_id = new QLabel(this);
lbl_id->setText(tr("ID"));
le_id = new QLineEdit(this);
layout->addWidget(lbl_id);
layout->addWidget(le_id);
QLabel* lbl_endline1 = new QLabel(this);
lbl_endline1->setObjectName("endline");
layout->addWidget(lbl_endline1);
QLabel* lbl_name= new QLabel(this);
lbl_name->setText(tr("Name"));
le_name = new QLineEdit(this);
layout->addWidget(lbl_name);
layout->addWidget(le_name);
QLabel* lbl_endline2 = new QLabel(this);
lbl_endline2->setObjectName("endline");
layout->addWidget(lbl_endline2);
QLabel* lbl_sex= new QLabel(this);
lbl_sex->setText(tr("Gender"));
layout->addWidget(lbl_sex);
btnSex = new Listbox(this);
btnSex->setText(tr("Female"));
btnSex->setProperty("idx",0);
btnSex->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
btnSex->setLayoutDirection(Qt::RightToLeft);
btnSex->setObjectName("editvalBtn");
btnSex->setIcon(QIcon(":/icons/arrow-down.png"));
btnSex->setIconSize({30, 30});
btnSex->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
connect(btnSex, &QToolButton::clicked,[=](){
SelectDialog dialog(this);
QStringList items;
items<<tr("Female")<<tr("Male")<<tr("Other");
dialog.setValues(items);
dialog.setSelectedValue(items[btnSex->property("idx").toInt()]);
dialog.setWindowModality(Qt::WindowModal);
if (dialog.exec() == QDialog::Accepted){
btnSex->setText(dialog.getSelectedValue());
btnSex->setProperty("idx",items.indexOf(dialog.getSelectedValue()));
}
});
layout->addWidget(btnSex);
QLabel *lbl_endline9 = new QLabel(this);
lbl_endline9->setFixedHeight(2);
lbl_endline9->setObjectName("endline");
layout->addWidget(lbl_endline9);
QLabel* lbl_date = new QLabel(this);
lbl_date->setText(tr("Birth Date"));
layout->addWidget(lbl_date);
btnDate = new Listbox(this);
btnDate->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
btnDate->setLayoutDirection(Qt::RightToLeft);
btnDate->setObjectName("editvalBtn");
btnDate->setIcon(QIcon(":/icons/arrow-down.png"));
btnDate->setIconSize({30, 30});
btnDate->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
btnDate->setText("1990-06-15");
connect(btnDate, &QToolButton::clicked,[=](){
DateSelectDialog dialog(this);
dialog.setSelectedValue(btnDate->text());
dialog.setWindowModality(Qt::WindowModal);
if (dialog.exec() == QDialog::Accepted){
btnDate->setText(dialog.getSelectedValue());
}
});
layout->addWidget(btnDate);
QLabel* lbl_endline5 = new QLabel(this);
lbl_endline5->setObjectName("endline");
layout->addWidget(lbl_endline5);
QLabel* lbl_comment = new QLabel(this);
lbl_comment->setText(tr("Comment"));
te_comment = new QTextEdit(this);
layout->addWidget(lbl_comment);
layout->addWidget(te_comment);
QLabel* lbl_endline6 = new QLabel(this);
lbl_endline6->setObjectName("endline");
layout->addWidget(lbl_endline6);
lbl_error = new QLabel(this);
lbl_error->setObjectName("warn");
layout->addWidget(lbl_error);
}
EditPatientDialog::~EditPatientDialog() {
}
void EditPatientDialog::setPatientInformation(PatientInformation* information) {
if (information)
{
le_id->setText(information->ID);
btnSex->setText(information->Sex == tr("F")?tr("Female"):(information->Sex == tr("M")?tr("Male"):tr("Other")));
le_name->setText(information->Name);
te_comment->setText(information->Comment);
btnDate->setText(information->BirthDate);
currentPatientUID = information->PatientUID;
AddDate = information->AddDate;
le_id->setEnabled(false);
}
}
void EditPatientDialog::clearPatientInformation() {
le_id->setText("");
// le_date->setText("");
le_name->setText("");
te_comment->setText("");
}
void EditPatientDialog::storePatientInformation() {
store.PatientUID = currentPatientUID;
// store.AddDate = AddDate;
store.ID = le_id->text();
store.BirthDate = le_date->text();
store.Name = le_name->text();
store.Sex = le_sex->text();
store.Comment = te_comment->toPlainText();
}
bool EditPatientDialog::updateReferenceData() {
PatientInformation* inf = getPatientInformation();
if (le_id->text().isEmpty()){
lbl_error->setText("ID can't be empty!");
lbl_error->setVisible(true);
return false;
}
inf->ID = le_id->text().trimmed();
if (le_name->text().isEmpty()){
lbl_error->setText("Patient Name can't be empty!");
lbl_error->setVisible(true);
return false;
}
inf->Name = le_name->text().trimmed();
int selectedRow = 0;
bool isAdd = currentPatientUID.isEmpty();
if (isAdd) {
int ref_rowid = queryValue(model, 1, inf->ID);
if (ref_rowid >= 0)
{
lbl_error->setText("The ID is already existed!");
lbl_error->setVisible(true);
return false;
}
inf->PatientUID = QUuid::createUuid().toString();
inf->AddDate = QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss");
model->insertRow(0);
}
else{
inf->PatientUID = currentPatientUID;
selectedRow = queryValue(model, 1, inf->ID);
inf->AddDate = AddDate;
}
inf->Sex = btnSex->text()==tr("Female")?"F":(tr("Male")==btnSex->text()?"M":"O");
inf->BirthDate = btnDate->text();
inf->Comment = te_comment->toPlainText();
#define ADD_PATIENT_PROPERTY(val)\
model->setData(model->index(selectedRow,PatientInformationEnum:: val),inf-> val);
EDIT_PATIENT()
#undef ADD_PATIENT_PROPERTY
if (model->submitAll())
{
return true;
}
else {
lbl_error->setText("Submit to database error!");
lbl_error->setVisible(true);
return false;
}
}

53
src/EditPatientDialog.h Normal file
View File

@@ -0,0 +1,53 @@
//
// Created by Krad on 2022/3/21.
//
#ifndef GUI_EDITPATIENTDIALOG_H
#define GUI_EDITPATIENTDIALOG_H
#include "GUIFormBaseDialog.h"
#include "editpatientform.h"
class QLineEdit;
class QTextEdit;
class QLabel;
class QToolButton;
class QSqlTableModel;
class EditPatientDialog :public GUIFormBaseDialog{
Q_OBJECT
public:
explicit EditPatientDialog(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
~EditPatientDialog();
void setModel(QSqlTableModel * m){
model=m;
}
PatientInformation * getPatientInformation(){
return &store;
}
void setPatientInformation(PatientInformation * information);
void clearPatientInformation();
void storePatientInformation();
protected:
bool updateReferenceData() override;
private:
QLineEdit* le_id= nullptr;
QLineEdit* le_name = nullptr;
QLineEdit* le_sex = nullptr;
QLineEdit* le_date = nullptr;
QTextEdit* te_comment = nullptr;
QLabel* lbl_error = nullptr;
PatientInformation store;
QString currentPatientUID;
QString AddDate;
QToolButton* btnSex = nullptr;
QToolButton* btnDate = nullptr;
QSqlTableModel* model = nullptr;
};
#endif //GUI_EDITPATIENTDIALOG_H

View File

@@ -7,7 +7,7 @@
#include <QComboBox>
#include <QDateEdit>
#include <QtVirtualKeyboard>
#include <QKeyEvent>
#include <QLineEdit>
#include <QAbstractSpinBox>
@@ -91,6 +91,14 @@ bool InputObject::eventFilter(QObject* obj, QEvent* event)
//qDebug() << "touchScreen()";
}
if (event->type() == QEvent::KeyPress) {
QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
if (keyEvent->key() == Qt::Key_Return && curDateEdit)
{
this->HidePanel();
this->hide();
}
}
//mouse button release means setfocus is useless
if (event->type() == QEvent::MouseButtonRelease)
{

View File

@@ -24,7 +24,7 @@ bool SelectDialog::updateReferenceData() {
return true;
}
void SelectDialog::setAvailableDates(QStringList dates) {
void SelectDialog::setValues(QStringList dates) {
box->setItems(dates);
}

View File

@@ -12,7 +12,7 @@ class SelectDialog :public GUIFormBaseDialog{
public:
explicit SelectDialog(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
~SelectDialog() override;
void setAvailableDates(QStringList dates);
void setValues(QStringList values);
QString getSelectedValue();
void setSelectedValue(const QString& val);
protected:

View File

@@ -19,20 +19,11 @@
#include "log/UserOperationLog.h"
#include <QSortFilterProxyModel>
#include "src/components/VerticalTextToolButton.h"
#include "AlertDialog.h"
#define ADD_CENTER_ITEM(row,col,text)\
item = new QTableWidgetItem(text);\
item->setTextAlignment(Qt::AlignmentFlag::AlignCenter);\
table->setItem(row,col,item);
#include <QScroller>
int queryValue(QSqlTableModel* model, int colID, QVariant var)
{
for (int i = 0; i < model->rowCount(); ++i) {
if (model->data(model->index(i, colID)) == var) return i;
}
return -1;
}
SelectFormWidget::SelectFormWidget(QWidget* parent) :
TabFormWidget(parent)
@@ -61,10 +52,10 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
//Init content widget
QHBoxLayout* contentLayout = new QHBoxLayout();
contentLayout->setContentsMargins(5,5,0,5);
contentLayout->setContentsMargins(5, 5, 0, 5);
this->ui->contentWidget->setLayout(contentLayout);
// TableView for patient
QTableView* table = new SlideableTableView(this);
SlideableTableView* table = new SlideableTableView(this);
table->setAlternatingRowColors(true);
table->setSelectionMode(QAbstractItemView::SingleSelection);
table->setEditTriggers(QAbstractItemView::NoEditTriggers);
@@ -72,7 +63,9 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
table->verticalHeader()->setDefaultSectionSize(38);
table->horizontalHeader()->setStretchLastSection(true);
//data from SQLITE
//
//avoid pan comsumed by tableview!
table->viewport()->ungrabGesture(Qt::PanGesture);
auto model = SQLHelper::getTable("Patient");
model->setFilter("Flag=0");
@@ -84,10 +77,6 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
model->setHeaderData(4, Qt::Horizontal, tr("Gender"));
model->setHeaderData(5, Qt::Horizontal, tr("Add Date"));
model->setHeaderData(6, Qt::Horizontal, tr("Comment"));
QSortFilterProxyModel* proxyModel = new QSortFilterProxyModel(model); // create proxy
proxyModel->setSourceModel(model);
table->setSortingEnabled(true); // enable sortingEnabled
table->setModel((QAbstractItemModel*)model);
@@ -95,103 +84,119 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
table->hideColumn(7);
table->show();
// table->setSortingEnabled(true);
table->setColumnWidth(1, 250);
table->setColumnWidth(2, 250);
table->setColumnWidth(3, 120);
table->setColumnWidth(4, 80);
table->setColumnWidth(3, 160);
table->setColumnWidth(4, 120);
table->setColumnWidth(5, 250);
// table->sortByColumn(5);
// table->setSortingEnabled(true);
contentLayout->addWidget(table);
QWidget* spacerLine2 = new QWidget(this);
spacerLine2->setFixedWidth(2);
spacerLine2->setObjectName("verSpaceLine");
contentLayout->addWidget(spacerLine2);
//edit panel
EditPatientForm* edit_patient = new EditPatientForm(this);
// prepare edit panel
EditPatientForm* edit_patient = new EditPatientForm(this);
edit_patient->setObjectName("edit_patient");
edit_patient->hide();
edit_patient->hide();
contentLayout->addWidget(edit_patient);
auto* btnShowEdit = new VerticalTextToolButton(this);
btnShowEdit->setObjectName("showeditBtn");
btnShowEdit->setIcon(QIcon(":/icons/edit.png"));
btnShowEdit->setIconSize(QSize(30, 30));
btnShowEdit->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
btnShowEdit->setFixedHeight(225);
btnShowEdit->setVerticalText("Patient Detail");
contentLayout->addWidget(btnShowEdit);
contentLayout->setAlignment(btnShowEdit, Qt::AlignmentFlag::AlignTop);
auto *btnShowEdit = new VerticalTextToolButton(this);
btnShowEdit->setObjectName("showeditBtn");
btnShowEdit->setIcon(QIcon(":/icons/edit.png"));
btnShowEdit->setIconSize(QSize(30, 30));
btnShowEdit->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
btnShowEdit->setFixedHeight(225);
// btnShowEdit->setVerticalText("E\nd\ni\nt\nP\na\nn\ne\nl");
btnShowEdit->setVerticalText("Patient Detail");
contentLayout->addWidget(btnShowEdit);
contentLayout->setAlignment(btnShowEdit, Qt::AlignmentFlag::AlignTop);
connect(btnShowEdit,&QToolButton::clicked,[=](){
edit_patient->show();
btnShowEdit->hide();
});
connect(edit_patient, &EditPatientForm::hideBtnClicked, [=](){
edit_patient->hide();
btnShowEdit->show();
});
// btn show slot
connect(btnShowEdit, &QToolButton::clicked, [=]() {
edit_patient->show();
btnShowEdit->hide();
});
//btn hide slot
connect(edit_patient, &EditPatientForm::hideBtnClicked, [=]() {
edit_patient->hide();
btnShowEdit->show();
});
//select default row 0
//select default row 0
if (model->rowCount() > 0)
{
table->selectRow(0);
currentRow = 0;
PatientInformation pat;
#define ADD_PATIENT_PROPERTY(val)\
pat. val = model->data(model->index(currentRow,PatientInformationEnum:: val)).toString();
pat. val = model->data(model->index(table->currentIndex().row(),PatientInformationEnum:: val)).toString();
EDIT_PATIENT()
#undef ADD_PATIENT_PROPERTY
edit_patient->setPatientInformation(&pat);
edit_patient->setPatientInformation(&pat);
}
//events----------------------------------------------------------------------
//prepare button state
auto prepareButtons = [=](bool disableALL){
bool state_flag = (table->currentIndex().row()>=0);
btnSelect->setEnabled(state_flag && !disableALL);
btnDelete->setEnabled(state_flag && !disableALL);
btnEdit->setEnabled(state_flag && !disableALL);
btnAdd->setEnabled(!disableALL);
};
//table current row selection changing event
connect(table, &QTableView::clicked, [=](const QModelIndex& modelIndex) {
if (currentRow != modelIndex.row())
{
currentRow = modelIndex.row();
connect(table, &SlideableTableView::currentRowChanged, [=](int row) {
PatientInformation pat;
#define ADD_PATIENT_PROPERTY(val)\
pat. val = model->data(model->index(modelIndex.row(),PatientInformationEnum:: val)).toString();
pat. val = model->data(model->index(row,PatientInformationEnum:: val)).toString();
EDIT_PATIENT()
#undef ADD_PATIENT_PROPERTY
edit_patient->setPatientInformation(&pat);
}
prepareButtons(false);
});
// after sort by column
connect(table->horizontalHeader(),&QHeaderView::sectionClicked,[=](int index){
edit_patient->clearPatientInformation();
prepareButtons(false);
});
// btn add slot
connect(btnAdd, &QToolButton::clicked, [=]() {
EditPatientDialog dialog(this);
dialog.clearPatientInformation();
dialog.setWindowModality(Qt::WindowModal);
dialog.setModel(model);
// accept change
if (dialog.exec() == QDialog::Accepted) {
table->selectRow(0);
model->selectRow(0);
}
LOG_USER_OPERATION(AddPatient);
btnSelect->setEnabled(true);
});
// btn edit slot
connect(btnEdit, &QToolButton::clicked, [=]() {
EditPatientDialog dialog(this);
dialog.setPatientInformation(edit_patient->getPatientInformation());
dialog.setWindowModality(Qt::WindowModal);
dialog.setModel(model);
// accept change
if (dialog.exec() == QDialog::Accepted) {
table->clicked(table->currentIndex());
LOG_USER_OPERATION(AddPatient);
btnSelect->setEnabled(true);
}
});
connect(btnAdd, &QToolButton::clicked, [=]() {
edit_patient->show();
btnShowEdit->hide();
edit_patient->clearPatientInformation();
edit_patient->setEditEnable(true);
btnSelect->setEnabled(false);
});
connect(btnEdit, &QToolButton::clicked, [=]() {
edit_patient->show();
btnShowEdit->hide();
table->clicked(table->currentIndex());
edit_patient->setEditEnable(true);
btnSelect->setEnabled(false);
});
// btn add slot
connect(edit_patient, &EditPatientForm::editCancel, [=]() {
if (table->currentIndex().row()<0) return;
btnSelect->setEnabled(true);
});
});
// btn add slot
connect(edit_patient, &EditPatientForm::editAccept, [=](PatientInformation* inf, bool& result) {
int selectedRow = currentRow;
int selectedRow = table->currentIndex().row();
bool isAdd = inf->PatientUID.isEmpty();
if (isAdd) {
int ref_rowid = queryValue(model, 1, inf->ID);
if (ref_rowid >= 0)
{
//非触屏时,如果被选中的行在选中区域外,以下代码可能会出错
//但是触屏时一般没问题
qDebug() << ref_rowid;
table->scrollTo(model->index(ref_rowid, 3));
table->selectRow(ref_rowid);
result = false;
return;
}
selectedRow = model->rowCount();
inf->PatientUID = QUuid::createUuid().toString();
inf->AddDate = QDateTime::currentDateTime().toString("yyyy-MM-dd HH:mm:ss");
@@ -221,61 +226,77 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
btnSelect->setEnabled(true);
});
// btn delete slot
connect(btnDelete, &QToolButton::clicked, [=]() {
if (currentRow < 0)return;
model->setData(model->index(currentRow, PatientInformationEnum::Flag), 9);
// model->removeRow(currentRow);
if (model->submitAll())
{
model->select();
if (model->rowCount() > 0)
{
table->selectRow(0);
model->selectRow(0);
PatientInformation pat;
if (table->currentIndex().row()<0) return;
AlertDialog dialog(this);
dialog.setWindowModality(Qt::WindowModal);
QString pUid = model->index(table->currentIndex().row(), PatientInformationEnum::PatientUID).data().toString();
// patient has been selected as the scan patient!
if (selectedPatientUID == pUid){
dialog.setButtonMode(OkOnly);
dialog.setTitle(tr("Alert"));
dialog.setAlertMessage(QString(tr("Can't delete selected Patient !")));
dialog.exec();
return;
}
// not the selected one, confirm!
dialog.setButtonMode(OkAndCancel);
dialog.setTitle("Confirm");
QString pat_name = model->index(table->currentIndex().row(), PatientInformationEnum::Name).data().toString();
dialog.setAlertMessage(QString(tr("Delete Patient \"%1\" ?")).arg(pat_name));
if (dialog.exec() != QDialog::Accepted) return;
// need delete clear edit panel detail
edit_patient->setEditEnable(false);
edit_patient->clearPatientInformation();
model->setData(model->index(table->currentIndex().row(), PatientInformationEnum::Flag), 9);
if (model->submitAll()) {
model->select();
if (model->rowCount() > 0) {
table->selectRow(0);
model->selectRow(0);
PatientInformation pat;
#define ADD_PATIENT_PROPERTY(val)\
pat. val = model->data(model->index(0,PatientInformationEnum:: val)).toString();
EDIT_PATIENT()
EDIT_PATIENT()
#undef ADD_PATIENT_PROPERTY
edit_patient->setPatientInformation(&pat);
LOG_USER_OPERATION(DeletePatient);
}
else {
currentRow = -1;
edit_patient->editCancel();
edit_patient->clearPatientInformation();
}
}
else {
//TODO:error handle
}
edit_patient->setPatientInformation(&pat);
LOG_USER_OPERATION(DeletePatient);
}
} else {
//TODO:error handle
}
prepareButtons(false);
});
});
// btn select slot
connect(btnSelect, &QToolButton::clicked, [=]() {
if (currentRow < 0)return;
EventCenter::Default()->triggerEvent(GUIEvents::PatientSelected, nullptr, edit_patient->getPatientInformation()->Copy());
selectedPatientUID = edit_patient->getPatientInformation()->PatientUID;
LOG_USER_OPERATION(SelectPatient);
});
// btn account slot
connect(btnAccount, &QToolButton::clicked, [=]() {
AccountFormDialog dia(this);
dia.setWindowModality(Qt::WindowModal);
dia.exec();
});
// event ResponsePreview slot
connect(EventCenter::Default(), &EventCenter::ResponsePreview, [=](QObject* sender, QObject* data) {
btnSelect->setEnabled(false);
btnDelete->setEnabled(false);
btnEdit->setEnabled(false);
btnAdd->setEnabled(false);
prepareButtons(true);
});
// event ResponseStop slot
connect(EventCenter::Default(), &EventCenter::ResponseStop, [=](QObject* sender, QObject* data) {
btnSelect->setEnabled(true);
btnDelete->setEnabled(true);
btnEdit->setEnabled(true);
btnAdd->setEnabled(true);
});
prepareButtons(false);
});
// event ReloadLanguage slot;
connect(EventCenter::Default(), &EventCenter::ReloadLanguage, [=]() {
model->setHeaderData(1, Qt::Horizontal, "ID");
@@ -293,9 +314,14 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
btnSelect->setText(tr("Select"));
});
//first prepare buttons!
prepareButtons(false);
}
SelectFormWidget::~SelectFormWidget()
{
}

View File

@@ -6,6 +6,8 @@
#define GUI_SELECTFORMWIDGET_H
#include "tabformwidget.h"
#include "EditPatientDialog.h"
class EditPatientForm;
class SelectFormWidget: public TabFormWidget {
Q_OBJECT
public:
@@ -13,7 +15,7 @@ public:
~SelectFormWidget();
private:
int currentRow = -1;
QString selectedPatientUID;
};

View File

@@ -111,6 +111,8 @@ const char* GetDeviceInfo(DeviceInfo infoType) {
switch (infoType) {
case MEAN_TEMPERATURE:
return "28";
case VERSION:
return "6.6.06";
}
return "";
}

View File

@@ -29,7 +29,8 @@ typedef enum {
//kinds of device information
typedef enum {
MEAN_TEMPERATURE
MEAN_TEMPERATURE,
VERSION
} DeviceInfo;
extern int InitLib(void(*)(const char *msg));

View File

@@ -51,7 +51,7 @@ UserOperationLogForm::UserOperationLogForm(QWidget* parent) {
dialog = new SelectDialog(this);
dialog->setWindowModality(Qt::WindowModal);
}
dialog->setAvailableDates(dates);
dialog->setValues(dates);
if (!selectedDateStr.isEmpty()) dialog->setSelectedValue(selectedDateStr);
if (dialog->exec() == QDialog::Accepted)
{

View File

@@ -7,6 +7,8 @@
#include <QStringList>
#include "json/cmdhelper.h"
#include <QThread>
#include "AppVersion.h"
#include "device/DeviceManager.h"
AboutWidget::AboutWidget(QWidget* parent)
: QWidget(parent)
@@ -70,12 +72,12 @@ void AboutWidget::initUi()
pMainLayout->addSpacing(subContentSpacing);
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);
pMainLayout->addWidget(pGuiVer);
pEmbededSoftVer = new QLabel(this);
pEmbededSoftVer->setText(tr("Embedded Software V1.5"));
pEmbededSoftVer->setText(tr("Embedded Software V%1").arg(getEmbVersion()));
pEmbededSoftVer->setContentsMargins(subContentMargin, 0, 0, 0);
pMainLayout->addWidget(pEmbededSoftVer);
@@ -154,8 +156,8 @@ void AboutWidget::initUi()
pProductVer->setText(tr("HJ-USCT-01 V1.0"));
pBtnHelp->setText(tr("?"));
pCompanyCopyRight->setText(tr("Copyright © 2017-2020 Zhejiang Equilibrium Nine Medical Equipment Co., Ltd. All Rights Reversed"));
pGuiVer->setText(tr("GUI Software V1.3"));
pEmbededSoftVer->setText(tr("Embedded Software V1.5"));
pGuiVer->setText(QString(tr("GUI Software V%1")).arg(getGUIVersion()));
pEmbededSoftVer->setText(tr("Embedded Software V%1").arg(getEmbVersion()));
pReconSotfVer->setText(tr("Reconstruction Software V1.2"));
pFEBVer->setText(tr("FEB Information"));
});
@@ -177,3 +179,15 @@ void AboutWidget::openHelpFile()
// box.exec();
//}
}
QString AboutWidget::getGUIVersion() {
if (GUI_VERSION_BETA){
return QString("%1.%2.%3 beta").arg(GUI_VERSION_MAJOR).arg(GUI_VERSION_MINOR).arg(GUI_VERSION_BUILD);
}
return QString("%1.%2.%3").arg(GUI_VERSION_MAJOR).arg(GUI_VERSION_MINOR).arg(GUI_VERSION_BUILD);
}
QString AboutWidget::getEmbVersion() {
return DeviceManager::Default()->getSoftwareVersion();
}

View File

@@ -20,7 +20,8 @@ public:
explicit AboutWidget(QWidget* parent = nullptr);
~AboutWidget();
QString getGUIVersion();
QString getEmbVersion();
private slots:
void openHelpFile();

View File

@@ -0,0 +1,152 @@
//
// Created by Krad on 2022/3/24.
//
#include "DateSlidePickerBox.h"
#include <QHBoxLayout>
#include <QLabel>
#include <QDate>
DateSlidePickerBox::DateSlidePickerBox(QWidget *parent) {
layout = new QHBoxLayout(this);
myear = new SlidePickerBox(this);
QStringList centry;
centry<<"19"<<"20";
myear->setFixedWidth(56);
myear->setItems(centry);
layout->addWidget(myear);
tyear = new SlidePickerBox(this);
QStringList m_centry;
m_centry << "0" << "1" << "2" << "3" << "4" << "5" << "6" << "7" << "8" << "9";
tyear->setItems(m_centry);
tyear->setFixedWidth(50);
layout->addWidget(tyear);
year = new SlidePickerBox(this);
year->setItems(m_centry);
year->setFixedWidth(50);
layout->addWidget(year);
QLabel* label = new QLabel(this);
label->setText("/");
// label->setFixedHeight(110);
label->setAlignment(Qt::AlignCenter);
label->setFixedWidth(50);
label->setObjectName("sliderSpliterLabel");
layout->addWidget(label);
month = new SlidePickerBox(this);
QStringList m_mouth;
m_mouth << "01" << "02" << "03" << "04" << "05" << "06" << "07" << "08" << "09"<<"10"<<"11"<<"12";
month->setItems(m_mouth);
month->setFixedWidth(56);
layout->addWidget(month);
QLabel* label2 = new QLabel(this);
label2->setText("/");
// label2->setFixedHeight(110);
label2->setAlignment(Qt::AlignCenter);
// label2->setFixedHeight(80);
label2->setFixedWidth(50);
label2->setObjectName("sliderSpliterLabel");
layout->addWidget(label2);
day = new SlidePickerBox(this);
QStringList days;
days << "01" << "02" << "03" << "04" << "05" << "06" << "07" << "08" << "09";
for (int i=10;i<=31;i++){
days<<QString("%1").arg(i);
}
day->setFixedWidth(56);
day->setItems(days);
layout->addWidget(day);
bigMonth << "01" << "03" << "05" << "07" << "08" << "10" << "12";
connect(myear,&SlidePickerBox::valueChanged,this,&DateSlidePickerBox::leapYearAndFebruaryAdjust);
connect(tyear,&SlidePickerBox::valueChanged,this,&DateSlidePickerBox::leapYearAndFebruaryAdjust);
connect(year,&SlidePickerBox::valueChanged,this,&DateSlidePickerBox::leapYearAndFebruaryAdjust);
connect(month,&SlidePickerBox::valueChanged,this,&DateSlidePickerBox::leapYearAndFebruaryAdjust);
}
void DateSlidePickerBox::resizeLabel() {
myear->resizeLabelWidth();
tyear->resizeLabelWidth();
year->resizeLabelWidth();
month->resizeLabelWidth();
day->resizeLabelWidth();
}
QString DateSlidePickerBox::getSelectedValue() {
return QString("%1%2%3-%4-%5").arg(myear->getSelectedValue()).
arg(tyear->getSelectedValue()).arg(year->getSelectedValue())
.arg(month->getSelectedValue()).arg(day->getSelectedValue());
}
void DateSlidePickerBox::setSelectedValue(const QString &val) {
myear->setSelectedValue(val.left(2));
tyear->setSelectedValue(val.left(3).right(1));
year->setSelectedValue(val.left(4).right(1));
QStringList sary = val.split('-');
month->setSelectedValue(sary[1]);
day->setSelectedValue(sary[2]);
}
int DateSlidePickerBox::getYear() {
return QString("%1%2%3").arg(myear->getSelectedValue()).
arg(tyear->getSelectedValue()).arg(year->getSelectedValue()).toInt();
}
void DateSlidePickerBox::leapYearAndFebruaryAdjust() {
QString d = day->getSelectedValue();
//闰年且二月
if (QDate::isLeapYear(getYear()) && month->getSelectedValue() == "02") {
//seq is important, must enable item firstly
day->enableItem("29");
if (d.toInt() > 29) {
day->setSelectedValue("29");
}
day->disableItem("30");
day->disableItem("31");
}
//普通年份2月或其他月份
else{
//普通年份2月
if (month->getSelectedValue() == "02") {
//seq is important, must set selected value firstly
if (d.toInt() > 28) {
day->setSelectedValue("28");
}
day->disableItem("29");
day->disableItem("30");
day->disableItem("31");
}
//其他月份
else{
day->enableItem("29");
day->enableItem("30");
if (isBigMonth()){
day->enableItem("31");
}
else{
//seq is important, must set selected value firstly
if (d == "31") {
day->setSelectedValue("30");
}
day->disableItem("31");
}
}
}
// day->setSelectedValue(d);
}
bool DateSlidePickerBox::isBigMonth() {
return bigMonth.contains(month->getSelectedValue());
}

View File

@@ -0,0 +1,34 @@
//
// Created by Krad on 2022/3/24.
//
#ifndef GUI_DATESLIDEPICKERBOX_H
#define GUI_DATESLIDEPICKERBOX_H
#include <QWidget>
#include "SlidePickerBox.h"
#include <QDate>
class QHBoxLayout;
class DateSlidePickerBox:public QWidget {
Q_OBJECT
public:
explicit DateSlidePickerBox(QWidget *parent = nullptr);
QString getSelectedValue();
void setSelectedValue(const QString& val);
void resizeLabel();
SlidePickerBox* myear;
SlidePickerBox* tyear;
SlidePickerBox* year;
SlidePickerBox* month;
SlidePickerBox* day;
public Q_SLOTS:
void leapYearAndFebruaryAdjust();
private:
int getYear();
QStringList bigMonth;
bool isBigMonth();
QHBoxLayout* layout;
};
#endif //GUI_DATESLIDEPICKERBOX_H

View File

@@ -0,0 +1,20 @@
//
// Created by Krad on 2022/3/21.
//
#include <QtWidgets/qstyleoption.h>
#include <QPaintEvent>
#include <QStylePainter>
#include "Listbox.h"
void Listbox::paintEvent(QPaintEvent *e) {
QString temp = this->text();
this->setText("");
QToolButton::paintEvent(e);
this->setText(temp);
QStylePainter p(this);
QStyleOptionToolButton opt;
initStyleOption(&opt);
p.drawText((size().width()-this->iconSize().width())/2-(this->text().length()*opt.font.pixelSize())/4,this->iconSize().height()+2,this->text());
}

21
src/components/Listbox.h Normal file
View File

@@ -0,0 +1,21 @@
//
// Created by Krad on 2022/3/21.
//
#ifndef GUI_LISTBOX_H
#define GUI_LISTBOX_H
#include <QToolButton>
class Listbox: public QToolButton {
public:
explicit Listbox(QWidget* parent = nullptr){};
virtual ~Listbox(){};
protected:
virtual void paintEvent(QPaintEvent* e) override;
private:
};
#endif //GUI_LISTBOX_H

View File

@@ -19,7 +19,7 @@ SlidePickerBox::SlidePickerBox(QWidget *parent):QWidget(parent) {
label->setObjectName("sliderPickerLabel");
label->setFixedHeight(fontSize);
label->setFixedWidth(320);
QPoint p = this->mapToGlobal({this->contentsMargins().left(),50-fontSize/2});
QPoint p = {0,50-fontSize/2};
label->move(p);
lbls.push_back(label);
QLabel* label1 = new QLabel(this);
@@ -29,7 +29,7 @@ SlidePickerBox::SlidePickerBox(QWidget *parent):QWidget(parent) {
label1->setObjectName("sliderPickerLabel");
label1->setFixedHeight(fontSize);
label1->setFixedWidth(320);
QPoint p1 = this->mapToGlobal({this->contentsMargins().left(),150-fontSize/2});
QPoint p1 = {0,150-fontSize/2};
label1->move(p1);
lbls.push_back(label1);
QLabel* label2 = new QLabel(this);
@@ -39,7 +39,7 @@ SlidePickerBox::SlidePickerBox(QWidget *parent):QWidget(parent) {
label2->setObjectName("sliderPickerLabel");
label2->setFixedHeight(fontSize);
label2->setFixedWidth(320);
QPoint p2 = this->mapToGlobal({this->contentsMargins().left(),250-fontSize/2});
QPoint p2 = {0,250-fontSize/2};
label2->move(p2);
lbls.push_back(label2);
@@ -51,7 +51,7 @@ SlidePickerBox::SlidePickerBox(QWidget *parent):QWidget(parent) {
line1->setFixedSize(320,100);
line1->setObjectName("topBottomLine");
line1->raise();
QPoint lp = this->mapToGlobal({this->contentsMargins().left(),100});
QPoint lp = {0,100};
line1->move(lp);
selectedIndex = 1;
@@ -76,11 +76,13 @@ void SlidePickerBox::mouseMoveEvent(QMouseEvent *ev) {
}
//防止拉过头
int selectItemCenter = selectedLbl->geometry().center().y();
if (selectedLbl == lbls.last() && selectItemCenter<=150 && offset<0) return;
if (selectedLbl == lbls.first() && selectItemCenter>=150 && offset>0) return;
if (selectedLbl == getEnabledLastLabel() && selectItemCenter<=150 && offset<0) return;
if (selectedLbl == getEnabledFirstLabel() && selectItemCenter>=150 && offset>0) return;
int i = 0;
for (auto item : lbls)
{
if (disableItems.contains(item->text()))continue;
//不需要横向
//int nx = item->geometry().left()+(ev->pos().x()-o_x);
int ny = item->geometry().top() + offset;
@@ -109,6 +111,8 @@ void SlidePickerBox::mouseReleaseEvent(QMouseEvent *ev) {
isDragging = false;
adjustPositon();
QWidget::mouseReleaseEvent(ev);
QString v = getSelectedValue();
emit valueChanged(v);
}
void SlidePickerBox::adjustPositon() const {
@@ -163,7 +167,7 @@ void SlidePickerBox::setItems(QStringList itemsList) {
lbl->setFixedHeight(fontSize);
lbl->setFixedWidth(320);
lbls.push_back(lbl);
QPoint p = this->mapToGlobal({this->contentsMargins().left(),-150});
QPoint p = {0,-150};
lbl->move(p);
}
selectedIndex = lbls.count()-1;
@@ -178,36 +182,32 @@ QString SlidePickerBox::getSelectedValue() {
void SlidePickerBox::setCurrentLabel(QLabel *label) {
if (selectedLbl)hideLabel(selectedLbl);
if (label) {
QPoint lp = this->mapToGlobal({this->contentsMargins().left(), 100});
QPoint lp = {0, 100};
label->move(lp);
label->show();
selectedLbl = label;
}
}
void SlidePickerBox::setNextLabel(QLabel *label) {
if (nextLbl)hideLabel(nextLbl);
if (label){
QPoint lp = this->mapToGlobal({this->contentsMargins().left(),200});
label->move(lp);
label->show();
nextLbl = label;
QLabel * SlidePickerBox::getEnabledFirstLabel() {
if (disableItems.empty()) return lbls.first();
for(int idx = 0; idx<disableItems.size(); idx++){
if(disableItems.contains(lbls[idx]->text()))continue;
return lbls[idx];
}
}
void SlidePickerBox::setPrevLabel(QLabel *label) {
if (prevLbl)hideLabel(prevLbl);
if (label) {
QPoint lp = this->mapToGlobal({this->contentsMargins().left(), 0});
label->move(lp);
label->show();
prevLbl = label;
QLabel * SlidePickerBox::getEnabledLastLabel() {
if (disableItems.empty()) return lbls.last();
for(int idx = lbls.size()-1; idx>=0; idx--){
if(disableItems.contains(lbls[idx]->text()))continue;
return lbls[idx];
}
}
void SlidePickerBox::hideLabel(QLabel *label) {
if (!label) return;
QPoint lp = this->mapToGlobal({this->contentsMargins().left(), -150});
QPoint lp = {0, -150};
label->move(lp);
}
@@ -221,11 +221,53 @@ void SlidePickerBox::setSelectedValue(const QString& val) {
}
int first_y = -100 * (selectedIndex-1);
for (int i = 0; i < lbls.count() ; ++i) {
QPoint lp = {this->contentsMargins().left(), first_y+i*100};
QPoint lp = this->mapTo(this,{0, first_y+i*100});
lbls[i]->move(lp);
lbls[i]->show();
lbls[i]->setStyleSheet("background:transparent");
lbls[i]->lower();
}
selectedLbl = lbls[selectedIndex];
lbls[selectedIndex]->setStyleSheet("color:white");
adjustPositon();
}
void SlidePickerBox::resizeLabelWidth() {
for (int i = 0; i < lbls.count() ; ++i) {
lbls[i]->setAlignment(defaultAlign);
lbls[i]->setFixedWidth(this->width()+this->contentsMargins().left()+this->contentsMargins().right());
}
}
void SlidePickerBox::disableItem(const QString& val) {
if (!disableItems.contains(val)){
disableItems.append(val);
rearrangeLabels();
}
}
void SlidePickerBox::enableItem(const QString &val) {
if (disableItems.contains(val)){
disableItems.removeOne(val);
rearrangeLabels();
}
}
void SlidePickerBox::rearrangeLabels() {
int first_y = -100 * (selectedIndex-1);
int r_index = 0;
for (int i = 0; i < lbls.count() ; ++i) {
if (disableItems.contains(lbls[i]->text())){
lbls[i]->hide();
continue;
}
QPoint lp = this->mapTo(this,{0, first_y+r_index*100});
r_index++;
lbls[i]->move(lp);
lbls[i]->show();
lbls[i]->setStyleSheet("background:transparent");
}
selectedLbl = lbls[selectedIndex];
lbls[selectedIndex]->setStyleSheet("color:white");

View File

@@ -13,11 +13,21 @@ public:
explicit SlidePickerBox(QWidget *parent = nullptr);
QString getSelectedValue();
void setItems(QStringList itemsList);
void addItem(QString& item)
{
void addItem(QString& item) {
this->items.append(item);
}
void disableItem(const QString& val);
void enableItem(const QString& val);
int getItemsCount(){
return items.size();
}
void setSelectedValue(const QString& val);
void resizeLabelWidth();
void setDefaultAlignment(QFlags<Qt::AlignmentFlag> align){
this->defaultAlign = align;
}
signals:
void valueChanged(QString & value);
protected:
bool isDragging;
@@ -33,9 +43,10 @@ protected:
}
void setCurrentLabel(QLabel* label);
void setPrevLabel(QLabel* label);
void setNextLabel(QLabel* label);
QLabel * getEnabledLastLabel();
QLabel * getEnabledFirstLabel();
void hideLabel(QLabel* label);
void rearrangeLabels();
private:
int o_x=0,o_y=10;
int selectedIndex = -1;
@@ -44,7 +55,8 @@ private:
QLabel* nextLbl = nullptr;
QList<QLabel*> lbls;
QStringList items;
QStringList disableItems;
QFlags<Qt::AlignmentFlag> defaultAlign= Qt::AlignCenter;
void adjustPositon() const;
};

View File

@@ -68,3 +68,8 @@ void SlideableTableView::mouseReleaseEvent(QMouseEvent *ev) {
// }
QTableView::mouseReleaseEvent(ev);
}
void SlideableTableView::currentChanged(const QModelIndex &current, const QModelIndex &previous) {
QTableView::currentChanged(current, previous);
emit currentRowChanged(current.row());
}

View File

@@ -12,11 +12,15 @@ public:
explicit SlideableTableView(QWidget *parent = nullptr);
~SlideableTableView();
Q_SIGNALS:
void currentRowChanged(int row);
protected:
void mousePressEvent(QMouseEvent *ev) override ;
void mouseMoveEvent(QMouseEvent *ev) override ;
void mouseReleaseEvent(QMouseEvent *ev) override ;
void currentChanged(const QModelIndex &current,
const QModelIndex &previous) override;
private:
bool isDragging = false;
int ox,oy,ov;

View File

@@ -15,7 +15,15 @@ protected:
QVariant data(const QModelIndex& index, int role) const override {
if (index.column() >0 && role == Qt::TextAlignmentRole) {
return Qt::AlignCenter;
} else {
}
if (index.column() >0 && role == Qt::DisplayRole){
auto val = QSqlTableModel::data(index,role).toString();
QStringList list = val.split("\n");
if (list.size()>1)
return QString("%1...").arg(list[0].left(list[0].length()<20?list[0].length():20));
return val;
}
else {
return QSqlTableModel::data(index,role);
}
}

View File

@@ -85,8 +85,13 @@ void DeviceManager::initDevice() {
// check device status=========================================
//device is ready return
if (inf.status != SCANNING) {
TRIGGER_EVENT(GUIEvents::ResponseStop, nullptr, nullptr);
return;
//double check
QThread::msleep(100);
inf = GetStatus();
if (inf.status != SCANNING){
TRIGGER_EVENT(GUIEvents::ResponseStop, nullptr, nullptr);
return;
}
}
// if (inf.status == BUSY) {
// QString msg("Device is busy, Stop operation fail!");
@@ -293,7 +298,7 @@ void DeviceManager::processScan(const char* json, bool empty) {
lastStatus = SCANNING;
previewing = false;
qDebug() << "Start progress timer";
timerID = startTimer(300);
timerID = startTimer(500);
return;
}
QString errmsg("ScanControl start fail!");
@@ -305,3 +310,7 @@ void DeviceManager::close() {
previewDataCaller->terminate();
delete previewDataCaller;
}
QString DeviceManager::getSoftwareVersion() {
return GetDeviceInfo(VERSION);
}

View File

@@ -20,6 +20,7 @@ public:
void setErrorOccurred(bool v){
errorOccurred = v;
}
QString getSoftwareVersion();
bool getErrorOccurred(){
return errorOccurred;
}

View File

@@ -10,7 +10,7 @@ GUIErrorBase *GUIErrorFactory::getError(const QString &errorMsg) {
if (errorMsg.isEmpty()) return new GUIErrorBase;
//新模式,分级
if (errorMsg[1] == ' ') {
if (errorMsg.length()>1 && errorMsg[1] == ' ') {
char c = errorMsg[0].toLower().toLatin1();
switch (c) {
//WARN 级别

Binary file not shown.

View File

@@ -93,7 +93,7 @@ GeneralForm::GeneralForm(QWidget* parent) : QWidget(parent)
dialog = new SelectDialog(this);
dialog->setWindowModality(Qt::WindowModal);
}
dialog->setAvailableDates(JsonObject::Instance()->language());
dialog->setValues(JsonObject::Instance()->language());
dialog->setSelectedValue(JsonObject::Instance()->defaultLanguage());
if (dialog->exec() == QDialog::Accepted)
{

BIN
src/icons/arrow-down.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

BIN
src/icons/arrow-up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

View File

@@ -72,6 +72,7 @@ int main(int argc, char* argv[])
//QObject::connect(obj, SIGNAL(touchScreen()), Locker::Instance(), SLOT(refreshTimer()));
QList<Qt::GestureType> gestures;
gestures << Qt::SwipeGesture;
gestures << Qt::PanGesture;
w.grabGestures(gestures);
QStringList app_args = a.arguments();

View File

@@ -303,30 +303,55 @@ bool MainWindow::gestureEvent(QGestureEvent* event)
//qCDebug(lcExample) << "gestureEvent():" << event;
if (QGesture* swipe = event->gesture(Qt::SwipeGesture))
swipeTriggered(static_cast<QSwipeGesture*>(swipe));
//else if (QGesture* pan = event->gesture(Qt::PanGesture))
//panTriggered(static_cast<QPanGesture*>(pan));
//if (QGesture* pinch = event->gesture(Qt::PinchGesture))
//pinchTriggered(static_cast<QPinchGesture*>(pinch));
if (QGesture* pan = event->gesture(Qt::PanGesture))
panTriggered(static_cast<QPanGesture*>(pan));
//if (QGesture* pinch = event->gesture(Qt::PinchGesture))
//pinchTriggered(static_cast<QPinchGesture*>(pinch));
return true;
}
void MainWindow::swipeTriggered(QSwipeGesture* gesture)
void MainWindow::panTriggered(QPanGesture* gesture)
{
if (gesture->state() == Qt::GestureFinished) {
if (gesture->horizontalDirection() == QSwipeGesture::Right) {
int index = tab->currentIndex();
QPointF delta = gesture->offset();
int index = tab->currentIndex();
if (delta.x() > 50) {
index--;
if (index >= 0) {
tab->setCurrentIndex(index);
}
}
if (gesture->horizontalDirection() == QSwipeGesture::Left) {
int index = tab->currentIndex();
if (delta.x() < -50)
{
index++;
if (index < tab->count()) {
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 (debugMode)
{

View File

@@ -15,6 +15,7 @@ class GUIMessageDialog;
class QTabWidget;
class QGestureEvent;
class QSwipeGesture;
class QPanGesture;
class QDockWidget;
class MainWindow : public QMainWindow
@@ -41,6 +42,7 @@ protected:
private:
bool gestureEvent(QGestureEvent* event);
void swipeTriggered(QSwipeGesture*);
void panTriggered(QPanGesture*);
void loadStyleSheet(const QString& sheetName);
cJSON* json_root = nullptr;

View File

@@ -48,5 +48,7 @@
<file>icons/edit.png</file>
<file>icons/hidearrow.png</file>
<file>icons/logout.png</file>
<file>icons/arrow-down.png</file>
<file>icons/arrow-up.png</file>
</qresource>
</RCC>

File diff suppressed because one or more lines are too long

View File

@@ -116,7 +116,7 @@ systemSettingForm::systemSettingForm(QWidget* parent) :
sd_protocal = new SelectDialog(this);
sd_protocal->setWindowModality(Qt::WindowModal);
}
sd_protocal->setAvailableDates(JsonObject::Instance()->protocals());
sd_protocal->setValues(JsonObject::Instance()->protocals());
sd_protocal->setSelectedValue(JsonObject::Instance()->defaultProtocal());
if (sd_protocal->exec() == QDialog::Accepted)
{
@@ -132,7 +132,7 @@ systemSettingForm::systemSettingForm(QWidget* parent) :
sd_filter = new SelectDialog(this);
sd_filter->setWindowModality(Qt::WindowModal);
}
sd_filter->setAvailableDates(JsonObject::Instance()->worklistFilters());
sd_filter->setValues(JsonObject::Instance()->worklistFilters());
sd_filter->setSelectedValue(JsonObject::Instance()->defaultFilter());
if (sd_filter->exec() == QDialog::Accepted)
{

View File

@@ -15,10 +15,6 @@
<source>Copyright © 2017-2020 Zhejiang Equilibrium Nine Medical Equipment Co., Ltd. All Rights Reversed</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>GUI Software V1.3</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Embedded Software V1.5</source>
<translation type="unfinished"></translation>
@@ -55,6 +51,10 @@
<source>Loading...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>GUI Software V%1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AccountFormDialog</name>
@@ -587,6 +587,10 @@ parameters
<source>Comment</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Delete Patient &quot;%1&quot; ?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>TabFormWidget</name>

View File

@@ -4,74 +4,74 @@
<context>
<name>AboutWidget</name>
<message>
<location filename="../aboutwidget.cpp" line="56"/>
<location filename="../aboutwidget.cpp" line="154"/>
<location filename="../aboutwidget.cpp" line="57"/>
<location filename="../aboutwidget.cpp" line="155"/>
<source>HJ-USCT-01 V1.0</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutwidget.cpp" line="60"/>
<location filename="../aboutwidget.cpp" line="155"/>
<location filename="../aboutwidget.cpp" line="61"/>
<location filename="../aboutwidget.cpp" line="156"/>
<source>?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutwidget.cpp" line="132"/>
<location filename="../aboutwidget.cpp" line="133"/>
<source>cJSON</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutwidget.cpp" line="156"/>
<location filename="../aboutwidget.cpp" line="157"/>
<source>Copyright © 2017-2020 Zhejiang Equilibrium Nine Medical Equipment Co., Ltd. All Rights Reversed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutwidget.cpp" line="73"/>
<location filename="../aboutwidget.cpp" line="157"/>
<source>GUI Software V1.3</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutwidget.cpp" line="66"/>
<location filename="../aboutwidget.cpp" line="67"/>
<source>Copyright © 2017-2022 Zhejiang Equilibrium Nine Medical Equipment Co., Ltd. All Rights Reversed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutwidget.cpp" line="78"/>
<location filename="../aboutwidget.cpp" line="74"/>
<location filename="../aboutwidget.cpp" line="158"/>
<source>GUI Software V%1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutwidget.cpp" line="79"/>
<location filename="../aboutwidget.cpp" line="159"/>
<source>Embedded Software V1.5</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutwidget.cpp" line="83"/>
<location filename="../aboutwidget.cpp" line="159"/>
<location filename="../aboutwidget.cpp" line="84"/>
<location filename="../aboutwidget.cpp" line="160"/>
<source>Reconstruction Software V1.2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutwidget.cpp" line="89"/>
<location filename="../aboutwidget.cpp" line="160"/>
<location filename="../aboutwidget.cpp" line="90"/>
<location filename="../aboutwidget.cpp" line="161"/>
<source>FEB Information</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutwidget.cpp" line="95"/>
<location filename="../aboutwidget.cpp" line="96"/>
<source>Qt 5.12.0</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutwidget.cpp" line="116"/>
<location filename="../aboutwidget.cpp" line="121"/>
<location filename="../aboutwidget.cpp" line="117"/>
<location filename="../aboutwidget.cpp" line="122"/>
<source>Loading...</source>
<translation></translation>
</message>
<message>
<location filename="../aboutwidget.cpp" line="125"/>
<location filename="../aboutwidget.cpp" line="126"/>
<source>Copyright (c) 1994-2021, OFFIS e.V.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../aboutwidget.cpp" line="136"/>
<location filename="../aboutwidget.cpp" line="137"/>
<source>Copyright (c) 2009-2017 Dave Gamble</source>
<translation type="unfinished"></translation>
</message>
@@ -145,18 +145,18 @@
<translation type="vanished"></translation>
</message>
<message>
<location filename="../AccountFormDialog.cpp" line="143"/>
<location filename="../AccountFormDialog.cpp" line="146"/>
<source>Reset password to &quot;123456&quot; ?</source>
<translation>&quot;123456&quot;?</translation>
</message>
<message>
<location filename="../AccountFormDialog.cpp" line="148"/>
<location filename="../AccountFormDialog.cpp" line="151"/>
<source>Inner error, can&apos;t find reference user!</source>
<translation></translation>
</message>
<message>
<location filename="../AccountFormDialog.cpp" line="153"/>
<location filename="../AccountFormDialog.cpp" line="191"/>
<location filename="../AccountFormDialog.cpp" line="156"/>
<location filename="../AccountFormDialog.cpp" line="194"/>
<source>Submit change to database fail!</source>
<translation></translation>
</message>
@@ -166,34 +166,34 @@
<translation></translation>
</message>
<message>
<location filename="../AccountFormDialog.cpp" line="179"/>
<location filename="../AccountFormDialog.cpp" line="201"/>
<location filename="../AccountFormDialog.cpp" line="222"/>
<location filename="../AccountFormDialog.cpp" line="182"/>
<location filename="../AccountFormDialog.cpp" line="204"/>
<location filename="../AccountFormDialog.cpp" line="225"/>
<source>User Name can&apos;t be empty!</source>
<translation></translation>
</message>
<message>
<location filename="../AccountFormDialog.cpp" line="218"/>
<location filename="../AccountFormDialog.cpp" line="221"/>
<source>User ID can&apos;t be empty!</source>
<translation>ID不能为空</translation>
</message>
<message>
<location filename="../AccountFormDialog.cpp" line="226"/>
<location filename="../AccountFormDialog.cpp" line="229"/>
<source>Password can&apos;t be empty!</source>
<translation></translation>
</message>
<message>
<location filename="../AccountFormDialog.cpp" line="230"/>
<location filename="../AccountFormDialog.cpp" line="233"/>
<source>Inner error ,unset data model!</source>
<translation></translation>
</message>
<message>
<location filename="../AccountFormDialog.cpp" line="234"/>
<location filename="../AccountFormDialog.cpp" line="237"/>
<source>User Id exists!</source>
<translation>ID已存在</translation>
</message>
<message>
<location filename="../AccountFormDialog.cpp" line="270"/>
<location filename="../AccountFormDialog.cpp" line="273"/>
<source>Submit to data base fail!</source>
<translation></translation>
</message>
@@ -207,47 +207,47 @@
</message>
<message>
<location filename="../AccountTableForm.cpp" line="37"/>
<location filename="../AccountTableForm.cpp" line="128"/>
<location filename="../AccountTableForm.cpp" line="129"/>
<source>Name</source>
<translation></translation>
</message>
<message>
<location filename="../AccountTableForm.cpp" line="38"/>
<location filename="../AccountTableForm.cpp" line="129"/>
<location filename="../AccountTableForm.cpp" line="130"/>
<source>Role</source>
<translation></translation>
</message>
<message>
<location filename="../AccountTableForm.cpp" line="39"/>
<location filename="../AccountTableForm.cpp" line="130"/>
<location filename="../AccountTableForm.cpp" line="131"/>
<source>Comment</source>
<translation></translation>
</message>
<message>
<location filename="../AccountTableForm.cpp" line="63"/>
<location filename="../AccountTableForm.cpp" line="132"/>
<location filename="../AccountTableForm.cpp" line="64"/>
<location filename="../AccountTableForm.cpp" line="133"/>
<source>Add</source>
<translation></translation>
</message>
<message>
<location filename="../AccountTableForm.cpp" line="64"/>
<location filename="../AccountTableForm.cpp" line="133"/>
<location filename="../AccountTableForm.cpp" line="65"/>
<location filename="../AccountTableForm.cpp" line="134"/>
<source>Edit</source>
<translation></translation>
</message>
<message>
<location filename="../AccountTableForm.cpp" line="65"/>
<location filename="../AccountTableForm.cpp" line="134"/>
<location filename="../AccountTableForm.cpp" line="66"/>
<location filename="../AccountTableForm.cpp" line="135"/>
<source>Delete</source>
<translation></translation>
</message>
<message>
<location filename="../AccountTableForm.cpp" line="111"/>
<location filename="../AccountTableForm.cpp" line="112"/>
<source>Can&apos;t delete current log in account!</source>
<translation></translation>
</message>
<message>
<location filename="../AccountTableForm.cpp" line="118"/>
<location filename="../AccountTableForm.cpp" line="119"/>
<source>Delete account with ID:&quot;%1&quot;!</source>
<translation>ID:&quot;%1&quot;!</translation>
</message>
@@ -255,20 +255,20 @@
<context>
<name>AdminSettingForm</name>
<message>
<location filename="../AdminSettingForm.cpp" line="32"/>
<location filename="../AdminSettingForm.cpp" line="82"/>
<location filename="../AdminSettingForm.cpp" line="33"/>
<location filename="../AdminSettingForm.cpp" line="84"/>
<source>General</source>
<translation></translation>
</message>
<message>
<location filename="../AdminSettingForm.cpp" line="32"/>
<location filename="../AdminSettingForm.cpp" line="82"/>
<location filename="../AdminSettingForm.cpp" line="33"/>
<location filename="../AdminSettingForm.cpp" line="84"/>
<source>Account</source>
<translation></translation>
</message>
<message>
<location filename="../AdminSettingForm.cpp" line="32"/>
<location filename="../AdminSettingForm.cpp" line="82"/>
<location filename="../AdminSettingForm.cpp" line="33"/>
<location filename="../AdminSettingForm.cpp" line="84"/>
<source>System</source>
<translation></translation>
</message>
@@ -297,8 +297,8 @@
<translation type="vanished"></translation>
</message>
<message>
<location filename="../AdminSettingForm.cpp" line="32"/>
<location filename="../AdminSettingForm.cpp" line="82"/>
<location filename="../AdminSettingForm.cpp" line="33"/>
<location filename="../AdminSettingForm.cpp" line="84"/>
<source>About</source>
<translation></translation>
</message>
@@ -362,37 +362,37 @@
<context>
<name>EditPatientForm</name>
<message>
<location filename="../../out/build/x64-Debug/ui_editpatientform.h" line="142"/>
<location filename="../../cmake-build-debug/ui_editpatientform.h" line="142"/>
<source>Form</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_editpatientform.h" line="143"/>
<location filename="../../cmake-build-debug/ui_editpatientform.h" line="143"/>
<source>...</source>
<translation type="unfinished">DICOM</translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_editpatientform.h" line="144"/>
<location filename="../../cmake-build-debug/ui_editpatientform.h" line="144"/>
<source>ID</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_editpatientform.h" line="145"/>
<location filename="../../cmake-build-debug/ui_editpatientform.h" line="145"/>
<source>Name</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_editpatientform.h" line="147"/>
<location filename="../../cmake-build-debug/ui_editpatientform.h" line="147"/>
<source>Date Of Birth</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_editpatientform.h" line="148"/>
<location filename="../../cmake-build-debug/ui_editpatientform.h" line="148"/>
<source>Comment</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_editpatientform.h" line="146"/>
<location filename="../../cmake-build-debug/ui_editpatientform.h" line="146"/>
<source>Gender</source>
<translation></translation>
</message>
@@ -442,12 +442,12 @@
<context>
<name>GUIMessageDialog</name>
<message>
<location filename="../../out/build/x64-Debug/ui_guimessagedialog.h" line="106"/>
<location filename="../../cmake-build-debug/ui_guimessagedialog.h" line="106"/>
<source>Dialog</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_guimessagedialog.h" line="109"/>
<location filename="../../cmake-build-debug/ui_guimessagedialog.h" line="109"/>
<source>...</source>
<translation></translation>
</message>
@@ -555,7 +555,7 @@
<context>
<name>InputObject</name>
<message>
<location filename="../../out/build/x64-Debug/ui_inputobject.h" line="113"/>
<location filename="../../cmake-build-debug/ui_inputobject.h" line="113"/>
<source>Form</source>
<translation></translation>
</message>
@@ -590,7 +590,7 @@
<context>
<name>MainWindow</name>
<message>
<location filename="../../out/build/x64-Debug/ui_mainwindow.h" line="40"/>
<location filename="../../cmake-build-debug/ui_mainwindow.h" line="40"/>
<source>MainWindow</source>
<translation></translation>
</message>
@@ -626,47 +626,47 @@
<context>
<name>PatientInformationForm</name>
<message>
<location filename="../../out/build/x64-Debug/ui_patientinformationform.h" line="118"/>
<location filename="../../cmake-build-debug/ui_patientinformationform.h" line="118"/>
<source>Form</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_patientinformationform.h" line="119"/>
<location filename="../../cmake-build-debug/ui_patientinformationform.h" line="119"/>
<source>Patient Information</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_patientinformationform.h" line="120"/>
<location filename="../../cmake-build-debug/ui_patientinformationform.h" line="120"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;PatientID:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;ID:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_patientinformationform.h" line="121"/>
<location filename="../../cmake-build-debug/ui_patientinformationform.h" line="121"/>
<source>Someone Somebody</source>
<translation>XXX</translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_patientinformationform.h" line="122"/>
<location filename="../../cmake-build-debug/ui_patientinformationform.h" line="122"/>
<source>2021/11/11</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_patientinformationform.h" line="123"/>
<location filename="../../cmake-build-debug/ui_patientinformationform.h" line="123"/>
<source>Female</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_patientinformationform.h" line="124"/>
<location filename="../../cmake-build-debug/ui_patientinformationform.h" line="124"/>
<source>Acc# 27812398</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_patientinformationform.h" line="127"/>
<location filename="../../cmake-build-debug/ui_patientinformationform.h" line="127"/>
<source>Current Protocol</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_patientinformationform.h" line="128"/>
<location filename="../../cmake-build-debug/ui_patientinformationform.h" line="128"/>
<location filename="../patientinformationform.cpp" line="42"/>
<source>LEFT ONLY</source>
<translation></translation>
@@ -769,75 +769,80 @@ parameters
<context>
<name>SelectFormWidget</name>
<message>
<location filename="../SelectFormWidget.cpp" line="45"/>
<location filename="../SelectFormWidget.cpp" line="288"/>
<location filename="../SelectFormWidget.cpp" line="48"/>
<location filename="../SelectFormWidget.cpp" line="301"/>
<source>Account</source>
<translation></translation>
</message>
<message>
<location filename="../SelectFormWidget.cpp" line="46"/>
<location filename="../SelectFormWidget.cpp" line="49"/>
<source>Worklist</source>
<translation></translation>
</message>
<message>
<location filename="../SelectFormWidget.cpp" line="57"/>
<location filename="../SelectFormWidget.cpp" line="290"/>
<location filename="../SelectFormWidget.cpp" line="60"/>
<location filename="../SelectFormWidget.cpp" line="303"/>
<source>Add</source>
<translation></translation>
</message>
<message>
<location filename="../SelectFormWidget.cpp" line="58"/>
<location filename="../SelectFormWidget.cpp" line="291"/>
<location filename="../SelectFormWidget.cpp" line="61"/>
<location filename="../SelectFormWidget.cpp" line="304"/>
<source>Edit</source>
<translation></translation>
</message>
<message>
<location filename="../SelectFormWidget.cpp" line="59"/>
<location filename="../SelectFormWidget.cpp" line="292"/>
<location filename="../SelectFormWidget.cpp" line="62"/>
<location filename="../SelectFormWidget.cpp" line="305"/>
<source>Delete</source>
<translation></translation>
</message>
<message>
<location filename="../SelectFormWidget.cpp" line="60"/>
<location filename="../SelectFormWidget.cpp" line="293"/>
<location filename="../SelectFormWidget.cpp" line="63"/>
<location filename="../SelectFormWidget.cpp" line="306"/>
<source>Select</source>
<translation></translation>
</message>
<message>
<location filename="../SelectFormWidget.cpp" line="82"/>
<location filename="../SelectFormWidget.cpp" line="282"/>
<location filename="../SelectFormWidget.cpp" line="87"/>
<location filename="../SelectFormWidget.cpp" line="295"/>
<source>Name</source>
<translation></translation>
</message>
<message>
<location filename="../SelectFormWidget.cpp" line="83"/>
<location filename="../SelectFormWidget.cpp" line="283"/>
<location filename="../SelectFormWidget.cpp" line="88"/>
<location filename="../SelectFormWidget.cpp" line="296"/>
<source>Birth Date</source>
<translation></translation>
</message>
<message>
<location filename="../SelectFormWidget.cpp" line="84"/>
<location filename="../SelectFormWidget.cpp" line="284"/>
<location filename="../SelectFormWidget.cpp" line="89"/>
<location filename="../SelectFormWidget.cpp" line="297"/>
<source>Gender</source>
<translation></translation>
</message>
<message>
<location filename="../SelectFormWidget.cpp" line="85"/>
<location filename="../SelectFormWidget.cpp" line="285"/>
<location filename="../SelectFormWidget.cpp" line="90"/>
<location filename="../SelectFormWidget.cpp" line="298"/>
<source>Add Date</source>
<translation></translation>
</message>
<message>
<location filename="../SelectFormWidget.cpp" line="86"/>
<location filename="../SelectFormWidget.cpp" line="286"/>
<location filename="../SelectFormWidget.cpp" line="91"/>
<location filename="../SelectFormWidget.cpp" line="299"/>
<source>Comment</source>
<translation></translation>
</message>
<message>
<location filename="../SelectFormWidget.cpp" line="236"/>
<source>Delete Patient &quot;%1&quot; ?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>TabFormWidget</name>
<message>
<location filename="../../out/build/x64-Debug/ui_tabformwidget.h" line="54"/>
<location filename="../../cmake-build-debug/ui_tabformwidget.h" line="54"/>
<source>Form</source>
<translation></translation>
</message>
@@ -894,7 +899,7 @@ parameters
<context>
<name>dicomCfgDialog</name>
<message>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="321"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="321"/>
<source>Dialog</source>
<translation></translation>
</message>
@@ -903,57 +908,57 @@ parameters
<translation type="vanished">DICOM </translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="322"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="322"/>
<source>DICOM Settings</source>
<translation>DICOM </translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="326"/>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="329"/>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="337"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="326"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="329"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="337"/>
<source>Name</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="323"/>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="330"/>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="336"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="323"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="330"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="336"/>
<source>IP</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="325"/>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="332"/>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="335"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="325"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="332"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="335"/>
<source>Port</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="324"/>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="331"/>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="338"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="324"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="331"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="338"/>
<source>AE</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="328"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="328"/>
<source>Worklist</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="327"/>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="333"/>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="339"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="327"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="333"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="339"/>
<source>...</source>
<translation>DICOM</translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="334"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="334"/>
<source>PACS</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_dicomcfgdialog.h" line="340"/>
<location filename="../../cmake-build-debug/ui_dicomcfgdialog.h" line="340"/>
<source>3D Recon</source>
<translation></translation>
</message>
@@ -971,18 +976,18 @@ parameters
<context>
<name>networkCfgDialog</name>
<message>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="453"/>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="454"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="453"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="454"/>
<source>Network Settings</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="464"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="464"/>
<source>Address</source>
<translation>IP配置</translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="455"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="455"/>
<location filename="../network/networkcfgdialog.cpp" line="33"/>
<source>IP Address</source>
<translation>IP地址</translation>
@@ -996,85 +1001,85 @@ parameters
<translation type="vanished"></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="457"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="457"/>
<source>Dev</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="459"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="459"/>
<source>Subnet Mask</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="460"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="460"/>
<source>Additional Address</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="461"/>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="468"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="461"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="468"/>
<source>Add</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="462"/>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="469"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="462"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="469"/>
<source>Edit</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="463"/>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="470"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="463"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="470"/>
<source>Delete</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="471"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="471"/>
<source>Routing</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="466"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="466"/>
<source>Default IPv4 Gateway</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="456"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="456"/>
<source>DHCP</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="467"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="467"/>
<source>Routing Table</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="472"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="472"/>
<source>Name</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="473"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="473"/>
<source>Port</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="474"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="474"/>
<source>AE</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="475"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="475"/>
<source>IP</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="476"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="476"/>
<source>DICOM</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="477"/>
<location filename="../../cmake-build-debug/ui_networkcfgdialog.h" line="477"/>
<source>Result</source>
<translation></translation>
</message>
@@ -1108,7 +1113,7 @@ parameters
<context>
<name>systemSettingForm</name>
<message>
<location filename="../../out/build/x64-Debug/ui_systemsettingform.h" line="281"/>
<location filename="../../cmake-build-debug/ui_systemsettingform.h" line="281"/>
<source>Form</source>
<translation></translation>
</message>
@@ -1117,17 +1122,17 @@ parameters
<translation type="vanished"></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_systemsettingform.h" line="282"/>
<location filename="../../cmake-build-debug/ui_systemsettingform.h" line="282"/>
<source>Protocal</source>
<translation></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_systemsettingform.h" line="286"/>
<location filename="../../cmake-build-debug/ui_systemsettingform.h" line="286"/>
<source>Worklist Filter</source>
<translation>Worklist过滤器</translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_systemsettingform.h" line="289"/>
<location filename="../../cmake-build-debug/ui_systemsettingform.h" line="289"/>
<source>Disk Storage</source>
<translation></translation>
</message>
@@ -1136,7 +1141,7 @@ parameters
<translation type="vanished">DICOM</translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_systemsettingform.h" line="284"/>
<location filename="../../cmake-build-debug/ui_systemsettingform.h" line="284"/>
<source>Auto Verify</source>
<translation></translation>
</message>
@@ -1145,7 +1150,7 @@ parameters
<translation type="vanished"></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_systemsettingform.h" line="285"/>
<location filename="../../cmake-build-debug/ui_systemsettingform.h" line="285"/>
<source>IP</source>
<translation></translation>
</message>
@@ -1162,7 +1167,7 @@ parameters
<translation type="vanished"></translation>
</message>
<message>
<location filename="../../out/build/x64-Debug/ui_systemsettingform.h" line="288"/>
<location filename="../../cmake-build-debug/ui_systemsettingform.h" line="288"/>
<source>DICOM</source>
<translation></translation>
</message>