translation improvement
This commit is contained in:
@@ -9,12 +9,14 @@
|
||||
#include <QLineEdit>
|
||||
#include <QEvent>
|
||||
#include <QToolButton>
|
||||
#include "json/jsonobject.h"
|
||||
|
||||
#include "SelectDialog.h"
|
||||
#include "components/imageswitch.h"
|
||||
#include "network/networkcfgdialog.h"
|
||||
#include "network/dicomcfgdialog.h"
|
||||
#include "network/getadminpsw.h"
|
||||
|
||||
#include "json/jsonobject.h"
|
||||
#include "event/EventCenter.h"
|
||||
systemSettingForm::systemSettingForm(QWidget* parent) :
|
||||
QWidget(parent),
|
||||
@@ -24,29 +26,27 @@ systemSettingForm::systemSettingForm(QWidget* parent) :
|
||||
|
||||
|
||||
//style init
|
||||
ui->btnCancel->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||
ui->btnCancel->setIcon(QIcon(":/icons/close_circle.png"));
|
||||
ui->btnCancel->setIconSize(QSize(50, 50));
|
||||
ui->btnAccept->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||
ui->btnAccept->setIcon(QIcon(":/icons/selected.png"));
|
||||
ui->btnAccept->setIconSize(QSize(50, 50));
|
||||
//ui->btn_dicom->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
ui->btn_dicom->setIcon(QIcon(":/icons/dicomsettings.png"));
|
||||
//ui->btn_dicom->setText(tr("DICOM"));
|
||||
ui->btn_dicom->setIconSize(QSize(80, 80));
|
||||
|
||||
//ui->btn_network->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
ui->btn_network->setIcon(QIcon(":/icons/networksettings.png"));
|
||||
//ui->btn_network->setText(tr("IP"));
|
||||
ui->btn_network->setIconSize(QSize(80, 80));
|
||||
|
||||
ui->swt_verify->setChecked(true);
|
||||
//ui->swt_verify->setButtonStyle(ImageSwitch::ButtonStyle_1);
|
||||
|
||||
|
||||
|
||||
ui->btnFlt->setFixedWidth(200);
|
||||
ui->btnPro->setFixedWidth(200);
|
||||
ui->lbl_protocal->setFixedWidth(100);
|
||||
//lbl_filter
|
||||
ui->lbl_list->setFixedWidth(100);
|
||||
//ui->btnFlt->setFixedWidth(200);
|
||||
//ui->btnPro->setFixedWidth(200);
|
||||
//ui->lbl_protocal->setFixedWidth(100);
|
||||
ui->lbl_verify->setFixedWidth(100);
|
||||
|
||||
|
||||
//data init
|
||||
ui->btnPro->setText(JsonObject::Instance()->defaultProtocal());
|
||||
ui->btnFlt->setText(JsonObject::Instance()->defaultFilter());
|
||||
loadServersInfo();
|
||||
|
||||
|
||||
//connection
|
||||
connect(ui->swt_verify, &ImageSwitch::clicked, [=]() {
|
||||
@@ -65,12 +65,15 @@ systemSettingForm::systemSettingForm(QWidget* parent) :
|
||||
dia.exec();
|
||||
}
|
||||
});
|
||||
connect(ui->btnCancel, &QToolButton::clicked, [=]() {
|
||||
loadServersInfo();
|
||||
});
|
||||
connect(ui->btnAccept, &QToolButton::clicked, [=]() {
|
||||
saveServersInfo();
|
||||
|
||||
connect(ui->btn_dicom, &QToolButton::clicked, [=]() {
|
||||
dicomCfgDialog dia(this);
|
||||
dia.setWindowModality(Qt::WindowModal);
|
||||
dia.exec();
|
||||
});
|
||||
|
||||
|
||||
|
||||
connect(ui->btnPro, &QPushButton::clicked, [=]() {
|
||||
if (!sd_protocal) {
|
||||
sd_protocal = new SelectDialog(this);
|
||||
@@ -105,6 +108,9 @@ systemSettingForm::systemSettingForm(QWidget* parent) :
|
||||
|
||||
connect(EventCenter::Default(), &EventCenter::ReloadLanguage, [=]() {
|
||||
ui->retranslateUi(this);
|
||||
|
||||
ui->btnPro->setText(JsonObject::Instance()->defaultProtocal());
|
||||
ui->btnFlt->setText(JsonObject::Instance()->defaultFilter());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -113,84 +119,7 @@ systemSettingForm::~systemSettingForm()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void systemSettingForm::loadServersInfo()
|
||||
{
|
||||
host h;
|
||||
h = JsonObject::Instance()->getServer(JsonObject::RECON);
|
||||
ui->recon_AE->setText(h.ae);
|
||||
ui->recon_IP->setText(h.ip);
|
||||
ui->recon_Name->setText(h.name);
|
||||
ui->recon_Port->setText(h.port);
|
||||
|
||||
h = JsonObject::Instance()->getServer(JsonObject::PACS);
|
||||
ui->pacs_AE->setText(h.ae);
|
||||
ui->pacs_IP->setText(h.ip);
|
||||
ui->pacs_Name->setText(h.name);
|
||||
ui->pacs_Port->setText(h.port);
|
||||
|
||||
|
||||
h = JsonObject::Instance()->getServer(JsonObject::DAQ);
|
||||
ui->daq_AE->setText(h.ae);
|
||||
ui->daq_IP->setText(h.ip);
|
||||
ui->daq_Name->setText(h.name);
|
||||
ui->daq_Port->setText(h.port);
|
||||
|
||||
h = JsonObject::Instance()->getServer(JsonObject::WORKLIST);
|
||||
ui->wl_AE->setText(h.ae);
|
||||
ui->wl_IP->setText(h.ip);
|
||||
ui->wl_Name->setText(h.name);
|
||||
ui->wl_Port->setText(h.port);
|
||||
|
||||
//localhost lhost = JsonObject::Instance()->getLocalHost();
|
||||
//local_IP->setIP(lhost.ip);
|
||||
//local_Mask->setIP(lhost.mask);
|
||||
//local_Gate->setIP(lhost.gateway);
|
||||
|
||||
//qIfConfig(lhost);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void systemSettingForm::saveServersInfo()
|
||||
{
|
||||
|
||||
host h;
|
||||
h.ae = ui->recon_AE->text();
|
||||
h.ip = ui->recon_IP->text();
|
||||
h.name = ui->recon_Name->text();
|
||||
h.port = ui->recon_Port->text();
|
||||
JsonObject::Instance()->setServer(JsonObject::RECON, h);
|
||||
|
||||
h.ae = ui->pacs_AE->text();
|
||||
h.ip = ui->pacs_IP->text();
|
||||
h.name = ui->pacs_Name->text();
|
||||
h.port = ui->pacs_Port->text();
|
||||
JsonObject::Instance()->setServer(JsonObject::PACS, h);
|
||||
|
||||
h.ip = ui->wl_IP->text();
|
||||
h.ae = ui->wl_AE->text();
|
||||
h.name = ui->wl_Name->text();
|
||||
h.port = ui->wl_Port->text();
|
||||
JsonObject::Instance()->setServer(JsonObject::WORKLIST, h);
|
||||
|
||||
|
||||
h.ip = ui->daq_IP->text();
|
||||
h.ae = ui->daq_AE->text();
|
||||
h.name = ui->daq_Name->text();
|
||||
h.port = ui->daq_Port->text();
|
||||
JsonObject::Instance()->setServer(JsonObject::DAQ, h);
|
||||
|
||||
|
||||
//localhost lhost;
|
||||
//lhost.ip = local_IP->getIP();
|
||||
//lhost.mask = local_Mask->getIP();
|
||||
//lhost.gateway = local_Gate->getIP();
|
||||
//JsonObject::Instance()->setLocalHost(lhost);
|
||||
|
||||
//qIfConfig(lhost);
|
||||
|
||||
}
|
||||
|
||||
//void systemSettingForm::changeEvent(QEvent* event)
|
||||
//{
|
||||
|
||||
Reference in New Issue
Block a user