System setting about
This commit is contained in:
69
cfgs/usct-product.json
Normal file
69
cfgs/usct-product.json
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
"deviceparam": {
|
||||||
|
"aeTitle": "ACME1",
|
||||||
|
"hospitalAddr": "北京",
|
||||||
|
"hospitalName": "医院",
|
||||||
|
"localHost": "192.168.1.194",
|
||||||
|
"physicians": "zys;wang;zhang;li",
|
||||||
|
"port": "12345",
|
||||||
|
"stationName": "工作站"
|
||||||
|
},
|
||||||
|
"donelist": {
|
||||||
|
"donelistDefaultDate": "1900-01-01"
|
||||||
|
},
|
||||||
|
"general": {
|
||||||
|
"dateformat": "yyyy-MM-dd hh:mm:ss",
|
||||||
|
"defaultlanguage": "zh_CN",
|
||||||
|
"language": "zh_CN;en_US",
|
||||||
|
"institutionName": "浙江大学附属第二医院",
|
||||||
|
"institutionAddr": "杭州市滨江区",
|
||||||
|
"lockscreen": "30"
|
||||||
|
},
|
||||||
|
"pacsservers": [{
|
||||||
|
"ae": "HELLO",
|
||||||
|
"ip": "127.0.0.1",
|
||||||
|
"isdefault": "1",
|
||||||
|
"name": "test",
|
||||||
|
"port": "104"
|
||||||
|
}, {
|
||||||
|
"ae": "KISS",
|
||||||
|
"ip": "127.0.0.1",
|
||||||
|
"isdefault": "0",
|
||||||
|
"name": "nihao",
|
||||||
|
"port": "106"
|
||||||
|
}],
|
||||||
|
"protocol": {
|
||||||
|
"default": "LSTAND",
|
||||||
|
"lists": "LSTAND;RSTAND;LONE;RONE"
|
||||||
|
},
|
||||||
|
"storagepolicy": {
|
||||||
|
"alarm": "false",
|
||||||
|
"dataexpired": "NoneExpired",
|
||||||
|
"threshold": "70"
|
||||||
|
},
|
||||||
|
"waitinglist": {
|
||||||
|
"waitinglistDefaultDate": "1900-01-01"
|
||||||
|
},
|
||||||
|
"lastlogin": {
|
||||||
|
"password": "",
|
||||||
|
"remember": "false",
|
||||||
|
"usercode": ""
|
||||||
|
},
|
||||||
|
"wklistservers": [{
|
||||||
|
"ae": "OFFIS",
|
||||||
|
"ip": "127.0.0.1",
|
||||||
|
"isdefault": "1",
|
||||||
|
"name": "wklist sever",
|
||||||
|
"port": "104"
|
||||||
|
}, {
|
||||||
|
"ae": "ACME1",
|
||||||
|
"ip": "127.0.0.1",
|
||||||
|
"isdefault": "0",
|
||||||
|
"name": "wklist1",
|
||||||
|
"port": "104"
|
||||||
|
}],
|
||||||
|
"worklistfilter": {
|
||||||
|
"default": "Today",
|
||||||
|
"lists": "Today;Recent3Days;ThisWeek;ThisMonth"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,6 +12,9 @@
|
|||||||
#include "ui_tabformwidget.h"
|
#include "ui_tabformwidget.h"
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include "UserOperationLogForm.h"
|
#include "UserOperationLogForm.h"
|
||||||
|
#include "generalform.h"
|
||||||
|
#include <QPushButton>
|
||||||
|
#include "systemsettingform.h"
|
||||||
|
|
||||||
AdminSettingForm::AdminSettingForm(QWidget* parent, Qt::WindowFlags f) : TabFormWidget(parent) {
|
AdminSettingForm::AdminSettingForm(QWidget* parent, Qt::WindowFlags f) : TabFormWidget(parent) {
|
||||||
|
|
||||||
@@ -20,7 +23,7 @@ AdminSettingForm::AdminSettingForm(QWidget *parent, Qt::WindowFlags f) : TabForm
|
|||||||
QListWidget* widget = new QListWidget(this);
|
QListWidget* widget = new QListWidget(this);
|
||||||
widget->setFixedWidth(250);
|
widget->setFixedWidth(250);
|
||||||
QStringList menus;
|
QStringList menus;
|
||||||
menus<<tr("Account Manage")<<tr("System Setting")<<tr("System Information")<<tr("Operation Log")<<tr("About");
|
menus << tr("General") << tr("Account Manage") << tr("System Setting") << tr("System Information") << tr("Operation Log") << tr("About");
|
||||||
widget->addItems(menus);
|
widget->addItems(menus);
|
||||||
widget->setSpacing(3);
|
widget->setSpacing(3);
|
||||||
for (int i = 0; i < menus.count(); ++i) {
|
for (int i = 0; i < menus.count(); ++i) {
|
||||||
@@ -35,14 +38,21 @@ AdminSettingForm::AdminSettingForm(QWidget *parent, Qt::WindowFlags f) : TabForm
|
|||||||
layout->addWidget(spacerLine2);
|
layout->addWidget(spacerLine2);
|
||||||
layout->addWidget(stackedWidget);
|
layout->addWidget(stackedWidget);
|
||||||
this->ui->commandWidget->hide();
|
this->ui->commandWidget->hide();
|
||||||
|
|
||||||
|
GeneralForm* generalForm = new GeneralForm(this);
|
||||||
|
stackedWidget->addWidget(generalForm);
|
||||||
|
|
||||||
QLabel* acc = new QLabel(this);
|
QLabel* acc = new QLabel(this);
|
||||||
acc->setText("Account Manage");
|
acc->setText("Account Manage");
|
||||||
stackedWidget->addWidget(acc);
|
stackedWidget->addWidget(acc);
|
||||||
|
|
||||||
QLabel* systemSetting = new QLabel(this);
|
systemSettingForm* systemSetting = new systemSettingForm(this);
|
||||||
systemSetting->setText("systemSetting");
|
|
||||||
stackedWidget->addWidget(systemSetting);
|
stackedWidget->addWidget(systemSetting);
|
||||||
|
|
||||||
|
//QLabel* systemSetting = new QLabel(this);
|
||||||
|
//systemSetting->setText("systemSetting");
|
||||||
|
//stackedWidget->addWidget(systemSetting);
|
||||||
|
|
||||||
QLabel* Info = new QLabel(this);
|
QLabel* Info = new QLabel(this);
|
||||||
Info->setText("info");
|
Info->setText("info");
|
||||||
stackedWidget->addWidget(Info);
|
stackedWidget->addWidget(Info);
|
||||||
|
|||||||
76
src/systemsettingform.cpp
Normal file
76
src/systemsettingform.cpp
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
#include "systemsettingform.h"
|
||||||
|
|
||||||
|
#include <QPushButton>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QLineEdit>
|
||||||
|
#include <QEvent>
|
||||||
|
|
||||||
|
#include "json/jsonobject.h"
|
||||||
|
#include "SelectDialog.h"
|
||||||
|
|
||||||
|
systemSettingForm::systemSettingForm(QWidget* parent) : QWidget(parent)
|
||||||
|
{
|
||||||
|
|
||||||
|
layout = new QVBoxLayout(this);
|
||||||
|
|
||||||
|
QWidget* protocalHeader = new QWidget(this);
|
||||||
|
layout->addWidget(protocalHeader);
|
||||||
|
QHBoxLayout* protocalHeaderLayout = new QHBoxLayout(protocalHeader);
|
||||||
|
protocalHeaderLayout->addWidget(new QLabel(tr("Default Protocal")));
|
||||||
|
QPushButton* btnPro = new QPushButton(protocalHeader);
|
||||||
|
protocalHeaderLayout->addWidget(btnPro);
|
||||||
|
protocalHeaderLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
|
||||||
|
|
||||||
|
QWidget* filterHeader = new QWidget(this);
|
||||||
|
layout->addWidget(filterHeader);
|
||||||
|
QHBoxLayout* filterHeaderLayout = new QHBoxLayout(filterHeader);
|
||||||
|
filterHeaderLayout->addWidget(new QLabel(tr("Default Worklist Filter")));
|
||||||
|
QPushButton* btnFlt = new QPushButton(filterHeader);
|
||||||
|
filterHeaderLayout->addWidget(btnFlt);
|
||||||
|
filterHeaderLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
|
||||||
|
|
||||||
|
|
||||||
|
layout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Fixed, QSizePolicy::Expanding));
|
||||||
|
|
||||||
|
//init
|
||||||
|
btnPro->setText(JsonObject::Instance()->defaultProtocal());
|
||||||
|
btnFlt->setText(JsonObject::Instance()->defaultFilter());
|
||||||
|
|
||||||
|
|
||||||
|
connect(btnPro, &QPushButton::clicked, [=]() {
|
||||||
|
if (!protocal) {
|
||||||
|
protocal = new SelectDialog(this);
|
||||||
|
protocal->setWindowModality(Qt::WindowModal);
|
||||||
|
}
|
||||||
|
protocal->setAvailableDates(JsonObject::Instance()->protocals());
|
||||||
|
protocal->setSelectedValue(JsonObject::Instance()->defaultProtocal());
|
||||||
|
if (protocal->exec() == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
QString pro = protocal->getSelectedValue();
|
||||||
|
//take effect
|
||||||
|
JsonObject::Instance()->setDefaultProtocal(pro);
|
||||||
|
btnPro->setText(JsonObject::Instance()->defaultProtocal());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(btnFlt, &QPushButton::clicked, [=]() {
|
||||||
|
if (!protocal) {
|
||||||
|
filter = new SelectDialog(this);
|
||||||
|
filter->setWindowModality(Qt::WindowModal);
|
||||||
|
}
|
||||||
|
filter->setAvailableDates(JsonObject::Instance()->worklistFilters());
|
||||||
|
filter->setSelectedValue(JsonObject::Instance()->defaultFilter());
|
||||||
|
if (filter->exec() == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
QString pro = filter->getSelectedValue();
|
||||||
|
//take effect
|
||||||
|
JsonObject::Instance()->setDefaultFilter(pro);
|
||||||
|
btnFlt->setText(JsonObject::Instance()->defaultFilter());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
25
src/systemsettingform.h
Normal file
25
src/systemsettingform.h
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#ifndef SYSTEMSETTINGFORM_H
|
||||||
|
#define SYSTEMSETTINGFORM_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
class QPushButton;
|
||||||
|
class QVBoxLayout;
|
||||||
|
class SelectDialog;
|
||||||
|
|
||||||
|
class systemSettingForm : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit systemSettingForm(QWidget* parent = nullptr);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
|
||||||
|
private:
|
||||||
|
QVBoxLayout* layout = nullptr;
|
||||||
|
SelectDialog* protocal = nullptr;
|
||||||
|
SelectDialog* filter = nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SYSTEMSETTINGFORM_H
|
||||||
Reference in New Issue
Block a user