diff --git a/.gitignore b/.gitignore index f337488..e52b4a6 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /CMakeSettings.json /src/translations/*.ts *.ts +/src/translations/copy.bat diff --git a/src/AccountFormDialog.cpp b/src/AccountFormDialog.cpp index be459c4..cc8b04e 100644 --- a/src/AccountFormDialog.cpp +++ b/src/AccountFormDialog.cpp @@ -67,7 +67,7 @@ AccountFormDialog::AccountFormDialog(QWidget* parent, AccountEditMode mode, Qt:: } else {//edit mode btn_Pwd = new QPushButton(this); - btn_Pwd->setText(tr(m_mode == Self ? "Change Password" : "Reset Password")); + btn_Pwd->setText(m_mode == Self ? tr("Change Password") : tr("Reset Password")); layout->addWidget(btn_Pwd); } QLabel* lbl_endline3 = new QLabel(this); diff --git a/src/GUIFormBaseDialog.cpp b/src/GUIFormBaseDialog.cpp index f2b5e01..96644b0 100644 --- a/src/GUIFormBaseDialog.cpp +++ b/src/GUIFormBaseDialog.cpp @@ -27,7 +27,7 @@ GUIFormBaseDialog::GUIFormBaseDialog(QWidget* parent, Qt::WindowFlags f) : QDial btnCancel->setText(tr("Cancel")); hLayout->addWidget(btnOk); hLayout->addWidget(btnCancel); - btnOk->setObjectName(tr("btnOK")); + btnOk->setObjectName("btnOK"); connect(btnOk, &QPushButton::clicked, [t = this]() { if (t->updateReferenceData()) t->accept(); diff --git a/src/ScanFormWidget.cpp b/src/ScanFormWidget.cpp index fad62c3..4d75c68 100644 --- a/src/ScanFormWidget.cpp +++ b/src/ScanFormWidget.cpp @@ -22,223 +22,223 @@ #include #endif -ScanFormWidget::ScanFormWidget(QWidget *parent) : TabFormWidget(parent) { - const char* style="QWidget#PatientInformationForm{min-width:300px;max-width:300px; margin-right:10}" - "QWidget#patientinformation_panel{ border-right:1px solid #0078d8}" - "QWidget#patientinformation_panel QLabel{font-size:20px; }" - "QWidget#param_widget{min-width:300px;max-width:300px;border-left:1px solid #0078d8}" - "QWidget#broadcast_widget{border:2px solid #515151; border-radius: 20px; background-color:black}" - "QWidget#broadcast_widget QLabel{background-color:black}" - "QLabel#lbl_protocol{font-size:32px; margin:0; color:silver}" -// "QLabel#viewer{border:1px solid yellow}" - "QLabel#lbl_title,QLabel#lbl_ptitle{font-size:20px;margin:0; border-bottom:1px solid silver}" - "QLabel#lbl_end{font-size:20px;margin:0; border-top:1px solid #0078d8}" - "QLabel#lbl_e{font-size:20px;}" - ""; - this->setStyleSheet(this->styleSheet().append(style)); - QHBoxLayout* layout =new QHBoxLayout(); - ui->commandWidget->setLayout(layout); +ScanFormWidget::ScanFormWidget(QWidget* parent) : TabFormWidget(parent) { + const char* style = "QWidget#PatientInformationForm{min-width:300px;max-width:300px; margin-right:10}" + "QWidget#patientinformation_panel{ border-right:1px solid #0078d8}" + "QWidget#patientinformation_panel QLabel{font-size:20px; }" + "QWidget#param_widget{min-width:300px;max-width:300px;border-left:1px solid #0078d8}" + "QWidget#broadcast_widget{border:2px solid #515151; border-radius: 20px; background-color:black}" + "QWidget#broadcast_widget QLabel{background-color:black}" + "QLabel#lbl_protocol{font-size:32px; margin:0; color:silver}" + // "QLabel#viewer{border:1px solid yellow}" + "QLabel#lbl_title,QLabel#lbl_ptitle{font-size:20px;margin:0; border-bottom:1px solid silver}" + "QLabel#lbl_end{font-size:20px;margin:0; border-top:1px solid #0078d8}" + "QLabel#lbl_e{font-size:20px;}" + ""; + this->setStyleSheet(this->styleSheet().append(style)); + QHBoxLayout* layout = new QHBoxLayout(); + ui->commandWidget->setLayout(layout); - QLabel* lbl_Protocol = new QLabel(this); - lbl_Protocol->setText("Protocol"); - lbl_Protocol->setAlignment(Qt::AlignTop); - lbl_Protocol->setObjectName("lbl_protocol"); - layout->addWidget(lbl_Protocol); - QWidget* spacerLine= new QWidget(this); - spacerLine->setFixedWidth(2); - spacerLine->setObjectName("verSpaceLine"); - layout->addWidget(spacerLine); - ADD_TOOL_BTN(Left,":/icons/left.png"); - ADD_TOOL_BTN(Right,":/icons/right.png"); - QButtonGroup* group = new QButtonGroup(this); - btnLeft->setCheckable(true); - btnLeft->setChecked(true); - btnRight->setCheckable(true); - group->addButton(btnRight,1); - group->addButton(btnLeft,0); - layout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding)); - QWidget* spacerLine2= new QWidget(this); - spacerLine2->setFixedWidth(2); - spacerLine2->setObjectName("verSpaceLine"); - layout->addWidget(spacerLine2); - ADD_TOOL_BTN(Refresh,":/icons/scan_e.png"); - ADD_TOOL_BTN(Preview,":/icons/rec.png"); + QLabel* lbl_Protocol = new QLabel(this); + lbl_Protocol->setText(tr("Protocol")); + lbl_Protocol->setAlignment(Qt::AlignTop); + lbl_Protocol->setObjectName("lbl_protocol"); + layout->addWidget(lbl_Protocol); + QWidget* spacerLine = new QWidget(this); + spacerLine->setFixedWidth(2); + spacerLine->setObjectName("verSpaceLine"); + layout->addWidget(spacerLine); + ADD_TOOL_BTN(Left, ":/icons/left.png"); + ADD_TOOL_BTN(Right, ":/icons/right.png"); + QButtonGroup* group = new QButtonGroup(this); + btnLeft->setCheckable(true); + btnLeft->setChecked(true); + btnRight->setCheckable(true); + group->addButton(btnRight, 1); + group->addButton(btnLeft, 0); + layout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding)); + QWidget* spacerLine2 = new QWidget(this); + spacerLine2->setFixedWidth(2); + spacerLine2->setObjectName("verSpaceLine"); + layout->addWidget(spacerLine2); + ADD_TOOL_BTN(Refresh, ":/icons/scan_e.png"); + ADD_TOOL_BTN(Preview, ":/icons/rec.png"); - ADD_TOOL_BTN(Stop,":/icons/stop.png"); - ADD_TOOL_BTN(Scan,":/icons/scan.png"); + ADD_TOOL_BTN(Stop, ":/icons/stop.png"); + ADD_TOOL_BTN(Scan, ":/icons/scan.png"); - QHBoxLayout* contentLayout =new QHBoxLayout(); - this->ui->contentWidget->setLayout(contentLayout); - PatientInformationForm* patient_information= new PatientInformationForm(this); - contentLayout->addWidget(patient_information); - QWidget* param_widget= new QWidget(this); - QWidget* broadcast_widget = new QWidget(this); - broadcast_widget->setObjectName("broadcast_widget"); - QLabel * viewer = new QLabel(broadcast_widget); - viewer->setObjectName("viewer"); - viewer->setFixedSize(800,800); - viewer->setText(""); - QHBoxLayout* viewerLayout =new QHBoxLayout(viewer); - broadcast_widget->setLayout(viewerLayout); - viewerLayout->addWidget(viewer); - contentLayout->addWidget(broadcast_widget); - param_widget->setObjectName("param_widget"); - QVBoxLayout* paramLayout =new QVBoxLayout(param_widget); - QLabel* lblPreview = new QLabel(this); - lblPreview->setText("Preview Parameters"); - lblPreview->setObjectName("lbl_title"); - paramLayout->addWidget(lblPreview); - QLabel* lbl_e = new QLabel(this); - lbl_e->setWordWrap(true); - lbl_e->setObjectName("lbl_e"); - lbl_e->setText("some settings\n\nparameters\n"); - paramLayout->addWidget(lbl_e); - QLabel* lbl_end = new QLabel(this); - lbl_end->setObjectName("lbl_end"); - paramLayout->addWidget(lbl_end); - QLabel* lblParams = new QLabel(this); - lblParams->setText("Scan Parameters"); - lblParams->setObjectName("lbl_title"); - paramLayout->addWidget(lblParams); - QLabel* lbl_e2 = new QLabel(this); - lbl_e2->setWordWrap(true); - lbl_e2->setObjectName("lbl_e"); - lbl_e2->setText("some settings\n\nparameters\n"); - paramLayout->addWidget(lbl_e2); - QLabel* lbl_end2 = new QLabel(this); - lbl_end2->setObjectName("lbl_end"); - paramLayout->addWidget(lbl_end2); - paramLayout->addSpacerItem(new QSpacerItem(20,20,QSizePolicy::Minimum,QSizePolicy::Expanding)); - contentLayout->addWidget(param_widget); - pat_inf = patient_information; + QHBoxLayout* contentLayout = new QHBoxLayout(); + this->ui->contentWidget->setLayout(contentLayout); + PatientInformationForm* patient_information = new PatientInformationForm(this); + contentLayout->addWidget(patient_information); + QWidget* param_widget = new QWidget(this); + QWidget* broadcast_widget = new QWidget(this); + broadcast_widget->setObjectName("broadcast_widget"); + QLabel* viewer = new QLabel(broadcast_widget); + viewer->setObjectName("viewer"); + viewer->setFixedSize(800, 800); + viewer->setText(""); + QHBoxLayout* viewerLayout = new QHBoxLayout(viewer); + broadcast_widget->setLayout(viewerLayout); + viewerLayout->addWidget(viewer); + contentLayout->addWidget(broadcast_widget); + param_widget->setObjectName("param_widget"); + QVBoxLayout* paramLayout = new QVBoxLayout(param_widget); + QLabel* lblPreview = new QLabel(this); + lblPreview->setText(tr("Preview Parameters")); + lblPreview->setObjectName("lbl_title"); + paramLayout->addWidget(lblPreview); + QLabel* lbl_e = new QLabel(this); + lbl_e->setWordWrap(true); + lbl_e->setObjectName("lbl_e"); + lbl_e->setText(tr("some settings\n\nparameters\n")); + paramLayout->addWidget(lbl_e); + QLabel* lbl_end = new QLabel(this); + lbl_end->setObjectName("lbl_end"); + paramLayout->addWidget(lbl_end); + QLabel* lblParams = new QLabel(this); + lblParams->setText(tr("Scan Parameters")); + lblParams->setObjectName("lbl_title"); + paramLayout->addWidget(lblParams); + QLabel* lbl_e2 = new QLabel(this); + lbl_e2->setWordWrap(true); + lbl_e2->setObjectName("lbl_e"); + lbl_e2->setText(tr("some settings\n\nparameters\n")); + paramLayout->addWidget(lbl_e2); + QLabel* lbl_end2 = new QLabel(this); + lbl_end2->setObjectName("lbl_end"); + paramLayout->addWidget(lbl_end2); + paramLayout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding)); + contentLayout->addWidget(param_widget); + pat_inf = patient_information; - btnScan->setEnabled(false); - btnRefresh->setEnabled(false); - btnPreview->setEnabled(false); - btnStop->setEnabled(false); + btnScan->setEnabled(false); + btnRefresh->setEnabled(false); + btnPreview->setEnabled(false); + btnStop->setEnabled(false); - //Events--------------------------------------------------------------- - connect(EventCenter::Default(),&EventCenter::PatientSelected,[=](QObject* sender,QObject* data){ - if(unset) - { - btnScan->setEnabled(true); - btnRefresh->setEnabled(true); - btnPreview->setEnabled(true); - btnStop->setEnabled(true); - unset = false; - } - patient_information->setPatientInformation((PatientInformation*)data); - }); - connect(EventCenter::Default(),&EventCenter::ResponseStop,[=](QObject* sender,QObject* data){ - setPreviewing(false); - }); - connect(EventCenter::Default(),&EventCenter::ResponsePreview,[=](QObject* sender,QObject* data){ - setPreviewing(true); - static const size_t Row = 140; - static const size_t Col = 140; - static const float pixelSpacing = 1.5f; - static const float halfROIWidth = 100.0f; - uchar c_data[Row][Col]; - uchar* data_ptr = c_data[0]; - for(int i=0;isetFixedSize(800,800); - QPixmap pic = QPixmap::fromImage(img).scaledToHeight(800,Qt::SmoothTransformation); - QPainter painter(&pic); - QPen pen; - pen.setStyle(Qt::DashLine); - pen.setWidth(3); - QFont font("Futura"); - font.setPixelSize(26); - font.setBold(true); - painter.setFont(font); - pen.setColor(QColor(255,255,0)); - painter.setPen(pen); - painter.drawText(400-13*5,400+13,"Loading..."); - viewer->setPixmap(pic); - }); + //Events--------------------------------------------------------------- + connect(EventCenter::Default(), &EventCenter::PatientSelected, [=](QObject* sender, QObject* data) { + if (unset) + { + btnScan->setEnabled(true); + btnRefresh->setEnabled(true); + btnPreview->setEnabled(true); + btnStop->setEnabled(true); + unset = false; + } + patient_information->setPatientInformation((PatientInformation*)data); + }); + connect(EventCenter::Default(), &EventCenter::ResponseStop, [=](QObject* sender, QObject* data) { + setPreviewing(false); + }); + connect(EventCenter::Default(), &EventCenter::ResponsePreview, [=](QObject* sender, QObject* data) { + setPreviewing(true); + static const size_t Row = 140; + static const size_t Col = 140; + static const float pixelSpacing = 1.5f; + static const float halfROIWidth = 100.0f; + uchar c_data[Row][Col]; + uchar* data_ptr = c_data[0]; + for (int i = 0; i < Row; i++) { + data_ptr = c_data[i]; + memset(data_ptr, 0, Col); + } + QImage img(c_data[0], Col, Row, QImage::Format_Grayscale8); + viewer->setFixedSize(800, 800); + QPixmap pic = QPixmap::fromImage(img).scaledToHeight(800, Qt::SmoothTransformation); + QPainter painter(&pic); + QPen pen; + pen.setStyle(Qt::DashLine); + pen.setWidth(3); + QFont font("Futura"); + font.setPixelSize(26); + font.setBold(true); + painter.setFont(font); + pen.setColor(QColor(255, 255, 0)); + painter.setPen(pen); + painter.drawText(400 - 13 * 5, 400 + 13, "Loading..."); + viewer->setPixmap(pic); + }); - connect(EventCenter::Default(),&EventCenter::ResponsePreviewData,[=](QObject* sender,QObject* data){ - if (!data)return; - static const size_t Row = 140; - static const size_t Col = 140; - static const float pixelSpacing = 1.5f; - static const float halfROIWidth = 100.0f; - QByteArray* array = (QByteArray*)data; - uchar* raw_dataptr = (uchar*)array->data(); - uchar c_data[Row][Col]; - uchar* data_ptr = c_data[0]; - for(int i=0;idata(); + uchar c_data[Row][Col]; + uchar* data_ptr = c_data[0]; + for (int i = 0; i < Row; i++) { + data_ptr = c_data[i]; + memcpy(data_ptr, raw_dataptr, Col); + raw_dataptr += Col; - } - raw_dataptr = (uchar*)array->data(); - QImage img(c_data[0] , Col, Row, QImage::Format_Grayscale8); - viewer->setFixedSize(800,800); - QPixmap pic = QPixmap::fromImage(img).scaledToHeight(800,Qt::SmoothTransformation); - QPainter painter(&pic); - QPen pen; - pen.setColor(QColor(255,255,0,100)); - pen.setStyle(Qt::DashLine); - pen.setWidth(3); - QFont font("Futura"); - font.setPixelSize(26); - font.setBold(true); - painter.setFont(font); - painter.setPen(pen); - static int borderSpacing = round(((pixelSpacing*(Row*0.5f)-halfROIWidth)*(800.0f/(1.5f*140.0f)))); - painter.drawLine(borderSpacing,borderSpacing,borderSpacing,800-borderSpacing); - painter.drawLine(borderSpacing+1,borderSpacing,800-borderSpacing,borderSpacing); - painter.drawLine(borderSpacing+1,800-borderSpacing,800-borderSpacing,800-borderSpacing); - painter.drawLine(800-borderSpacing,borderSpacing+1,800-borderSpacing,800-borderSpacing-1); - pen.setColor(QColor(255,255,0)); - painter.setPen(pen); -// painter.drawText(335,40,"Previewing"); - painter.drawText(borderSpacing+13,400+13,"L"); - painter.drawText(800-borderSpacing-30,400+13,"R"); - painter.drawText(400-13,borderSpacing+30,"H"); - painter.drawText(400-13,800-borderSpacing-13,"F"); - painter.drawText(borderSpacing+6,borderSpacing+30,"ROI"); - viewer->setPixmap(pic); - }); - connect(EventCenter::Default(),&EventCenter::PatientSelected,[=](QObject* sender,QObject* data){ - patient_information->setPatientInformation((PatientInformation*)data); - }); - connect(btnRefresh,&QToolButton::clicked,[=](){ - QString patientInf(patient_information->getCurrentPatientJsonString(false)); - LOG_USER_OPERATION(StartRefresh); - EventCenter::Default()->triggerEvent(GUIEvents::RequestEmptyScan, nullptr, (QObject*)(&patientInf)); - }); - connect(btnPreview,&QToolButton::clicked,[=](){ - LOG_USER_OPERATION(StartPreview); - EventCenter::Default()->triggerEvent(GUIEvents::RequestPreviewScan, nullptr, nullptr); - }); - connect(btnScan,&QToolButton::clicked,[=](){ - QString patientInf(patient_information->getCurrentPatientJsonString(false)); - LOG_USER_OPERATION(StartScan); - EventCenter::Default()->triggerEvent(GUIEvents::RequestPatientScan, nullptr, (QObject*)(&patientInf)); - }); - connect(btnStop,&QToolButton::clicked,[=](){ - LOG_USER_OPERATION(Stop); - EventCenter::Default()->triggerEvent(GUIEvents::RequestStop, nullptr, nullptr); - }); + } + raw_dataptr = (uchar*)array->data(); + QImage img(c_data[0], Col, Row, QImage::Format_Grayscale8); + viewer->setFixedSize(800, 800); + QPixmap pic = QPixmap::fromImage(img).scaledToHeight(800, Qt::SmoothTransformation); + QPainter painter(&pic); + QPen pen; + pen.setColor(QColor(255, 255, 0, 100)); + pen.setStyle(Qt::DashLine); + pen.setWidth(3); + QFont font("Futura"); + font.setPixelSize(26); + font.setBold(true); + painter.setFont(font); + painter.setPen(pen); + static int borderSpacing = round(((pixelSpacing * (Row * 0.5f) - halfROIWidth) * (800.0f / (1.5f * 140.0f)))); + painter.drawLine(borderSpacing, borderSpacing, borderSpacing, 800 - borderSpacing); + painter.drawLine(borderSpacing + 1, borderSpacing, 800 - borderSpacing, borderSpacing); + painter.drawLine(borderSpacing + 1, 800 - borderSpacing, 800 - borderSpacing, 800 - borderSpacing); + painter.drawLine(800 - borderSpacing, borderSpacing + 1, 800 - borderSpacing, 800 - borderSpacing - 1); + pen.setColor(QColor(255, 255, 0)); + painter.setPen(pen); + // painter.drawText(335,40,"Previewing"); + painter.drawText(borderSpacing + 13, 400 + 13, "L"); + painter.drawText(800 - borderSpacing - 30, 400 + 13, "R"); + painter.drawText(400 - 13, borderSpacing + 30, "H"); + painter.drawText(400 - 13, 800 - borderSpacing - 13, "F"); + painter.drawText(borderSpacing + 6, borderSpacing + 30, "ROI"); + viewer->setPixmap(pic); + }); + connect(EventCenter::Default(), &EventCenter::PatientSelected, [=](QObject* sender, QObject* data) { + patient_information->setPatientInformation((PatientInformation*)data); + }); + connect(btnRefresh, &QToolButton::clicked, [=]() { + QString patientInf(patient_information->getCurrentPatientJsonString(false)); + LOG_USER_OPERATION(StartRefresh); + EventCenter::Default()->triggerEvent(GUIEvents::RequestEmptyScan, nullptr, (QObject*)(&patientInf)); + }); + connect(btnPreview, &QToolButton::clicked, [=]() { + LOG_USER_OPERATION(StartPreview); + EventCenter::Default()->triggerEvent(GUIEvents::RequestPreviewScan, nullptr, nullptr); + }); + connect(btnScan, &QToolButton::clicked, [=]() { + QString patientInf(patient_information->getCurrentPatientJsonString(false)); + LOG_USER_OPERATION(StartScan); + EventCenter::Default()->triggerEvent(GUIEvents::RequestPatientScan, nullptr, (QObject*)(&patientInf)); + }); + connect(btnStop, &QToolButton::clicked, [=]() { + LOG_USER_OPERATION(Stop); + EventCenter::Default()->triggerEvent(GUIEvents::RequestStop, nullptr, nullptr); + }); - connect(group, SIGNAL(buttonClicked(int)),this,SLOT(protocolChanged(int))); + connect(group, SIGNAL(buttonClicked(int)), this, SLOT(protocolChanged(int))); - previewfunc = [=](bool val)->void{ - viewer->setVisible(val); - btnPreview->setCheckable(val); - btnPreview->setChecked(val); - btnPreview->setEnabled(!val); - btnRefresh->setEnabled(!val); - btnScan->setEnabled(!val); - }; + previewfunc = [=](bool val)->void { + viewer->setVisible(val); + btnPreview->setCheckable(val); + btnPreview->setChecked(val); + btnPreview->setEnabled(!val); + btnRefresh->setEnabled(!val); + btnScan->setEnabled(!val); + }; } ScanFormWidget::~ScanFormWidget() { @@ -246,12 +246,12 @@ ScanFormWidget::~ScanFormWidget() { } void ScanFormWidget::protocolChanged(int type) { - printf("%d\r\n",type); - pat_inf->setProtocol(type); + printf("%d\r\n", type); + pat_inf->setProtocol(type); } void ScanFormWidget::setPreviewing(bool val) { - if(previewfunc) previewfunc(val); + if (previewfunc) previewfunc(val); } diff --git a/src/editpatientform.ui b/src/editpatientform.ui index 5f91cc4..f769d60 100644 --- a/src/editpatientform.ui +++ b/src/editpatientform.ui @@ -62,7 +62,7 @@ - Sex + Gender diff --git a/src/network/getadminpsw.cpp b/src/network/getadminpsw.cpp index 27da659..4796ede 100644 --- a/src/network/getadminpsw.cpp +++ b/src/network/getadminpsw.cpp @@ -12,7 +12,7 @@ GetAdminPsw::GetAdminPsw(QWidget* parent, Qt::WindowFlags f) : GUIFormBaseDialog setWindowModality(Qt::WindowModal); QFormLayout* form = new QFormLayout(formWidget); - QString value1 = QString("Admin Password"); + QString value1 = QString(tr("Admin Password")); _psw = new QLineEdit(this); _psw->setEchoMode(QLineEdit::Password); form->addRow(value1, _psw); diff --git a/src/patientinformationform.cpp b/src/patientinformationform.cpp index 3efea0a..5282762 100644 --- a/src/patientinformationform.cpp +++ b/src/patientinformationform.cpp @@ -6,11 +6,11 @@ PatientInformationForm::PatientInformationForm(QWidget *parent) : ui(new Ui::PatientInformationForm) { ui->setupUi(this); - ui->lbl_ID->setText(""); - ui->lbl_Date->setText(""); - ui->lbl_Name->setText(""); - ui->lbl_Sex->setText(""); - ui->lbl_Acc->setText(""); + //ui->lbl_ID->setText(""); + //ui->lbl_Date->setText(""); + //ui->lbl_Name->setText(""); + //ui->lbl_Sex->setText(""); + //ui->lbl_Acc->setText(""); } PatientInformationForm::~PatientInformationForm() @@ -33,11 +33,11 @@ void PatientInformationForm::setProtocol(int type) { switch(type) { case 0: - ui->lbl_Protocol->setText("LEFT ONLY"); + ui->lbl_Protocol->setText(tr("LEFT ONLY")); break; case 1: default: - ui->lbl_Protocol->setText("RIGHT ONLY"); + ui->lbl_Protocol->setText(tr("RIGHT ONLY")); break; } } @@ -48,7 +48,7 @@ const char *PatientInformationForm::getCurrentPatientJsonString(bool empty) { cJSON_AddItemToObject(root, "PatientID",cJSON_CreateString(ui->lbl_ID->text().replace(' ','_').toStdString().data())); cJSON_AddItemToObject(root, "PatientSex",cJSON_CreateString(ui->lbl_Sex->text().toStdString().data())); cJSON_AddItemToObject(root, "PatientBirthDate", - cJSON_CreateString(ui->lbl_Date->text().replace("/","").replace("-","").replace(' ','.').toStdString().data())); + cJSON_CreateString(ui->lbl_Date->text().replace("/","").replace("-","").replace(' ','.').toStdString().data())); cJSON_AddItemToObject(root, "Laterality",cJSON_CreateString(currentProtocol?"R":"L")); cJSON_AddItemToObject(root, "IsEmptyData",cJSON_CreateNumber(empty?1:0)); cJSON_AddItemToObject(root, "OperatorName",cJSON_CreateString("Bob")); diff --git a/src/systemsettingform.cpp b/src/systemsettingform.cpp index 12ca75c..ddf8884 100644 --- a/src/systemsettingform.cpp +++ b/src/systemsettingform.cpp @@ -190,12 +190,4 @@ void systemSettingForm::saveServersInfo() //qIfConfig(lhost); -} - -void systemSettingForm::changeEvent(QEvent* event) -{ - if (event->type() == QEvent::LanguageChange) - { - ui->retranslateUi(this); - } } \ No newline at end of file diff --git a/src/systemsettingform.h b/src/systemsettingform.h index 157fc08..368f426 100644 --- a/src/systemsettingform.h +++ b/src/systemsettingform.h @@ -9,22 +9,19 @@ class QLineEdit; class ImageSwitch; namespace Ui { -class systemSettingForm; + class systemSettingForm; } class systemSettingForm : public QWidget { - Q_OBJECT + Q_OBJECT public: - explicit systemSettingForm(QWidget *parent = nullptr); - ~systemSettingForm(); - -protected: - void changeEvent(QEvent* event); + explicit systemSettingForm(QWidget* parent = nullptr); + ~systemSettingForm(); private: - Ui::systemSettingForm *ui; + Ui::systemSettingForm* ui; SelectDialog* sd_protocal = nullptr; SelectDialog* sd_filter = nullptr; diff --git a/src/translations/en_US.ts.bak b/src/translations/en_US.ts.bak index 3eedbed..ee5c34d 100644 --- a/src/translations/en_US.ts.bak +++ b/src/translations/en_US.ts.bak @@ -83,6 +83,14 @@ Submit to data base fail! + + Change Password + + + + Reset Password + + AccountTableForm @@ -182,10 +190,6 @@ Name - - Sex - - Date Of Birth @@ -209,10 +213,6 @@ Cancel - - btnOK - - GUIMessageDialog @@ -244,6 +244,13 @@ + + GetAdminPsw + + Admin Password + + + GetIPDialog @@ -377,6 +384,10 @@ LEFT ONLY + + RIGHT ONLY + + RollingMessageWidget @@ -389,6 +400,28 @@ + + ScanFormWidget + + Preview Parameters + + + + some settings + +parameters + + + + + Scan Parameters + + + + Protocol + + + TabFormWidget diff --git a/src/translations/zh_CN.qm b/src/translations/zh_CN.qm index 384cdae..b3a0be3 100644 Binary files a/src/translations/zh_CN.qm and b/src/translations/zh_CN.qm differ diff --git a/src/translations/zh_CN.ts.bak b/src/translations/zh_CN.ts.bak index 5966c34..b5371e1 100644 --- a/src/translations/zh_CN.ts.bak +++ b/src/translations/zh_CN.ts.bak @@ -16,7 +16,7 @@ Input User ID - + 输入用户ID @@ -26,7 +26,7 @@ Input User name - + 输入用户名 @@ -34,13 +34,27 @@ 密码 + Change Password - 修改密码 + 修改密码 Input password - + 输入密码 + + + Change Password2 + 修改密码 + + + Reset Password2 + 重置密码 + + + + Reset Password + 密码重置 @@ -51,65 +65,65 @@ Change Role - + 类型 doctor - + 医生 Reset password to "123456" ? - + 密码重置为"123456"? Inner error, can't find reference user! - + 内部错误! Submit change to database fail! - + 修改提交至数据库失败! Comment - + 评论 User Name can't be empty! - + 用户名不能为空! User ID can't be empty! - + 用户ID不能为空! Password can't be empty! - + 密码不能为空! Inner error ,unset data model! - + 内部错误! User Id exists! - + 用户ID已存在! Submit to data base fail! - + 提交至数据库失败! @@ -117,12 +131,12 @@ Can't delete current log in account! - + 当前用户无法删除日志! Delete account with ID:"%1"! - + 删除账户ID:"%1"! @@ -171,7 +185,7 @@ Warning - + @@ -179,47 +193,47 @@ Change Password - 修改密码 + 修改密码 Current Password - + 当前密码 New Password - + 新密码 Confirm Password - + 确认密码 Please enter your old password! - + 请输入旧密码! New password should at least 6 characters! - + 新密码至少6位字符! Wrong password! - + 密码错误! Your new password does not match! - + 新密码不匹配! Database update error! - + 数据库更新错误! @@ -227,37 +241,33 @@ Form - + ID - + Name - 姓名 - - - - Sex - + 姓名 Date Of Birth - + 出生日期 Comment - + 评论 + Gender - + 性别 @@ -265,17 +275,12 @@ OK - + 确认 Cancel - 取消 - - - - btnOK - + 取消 @@ -283,12 +288,12 @@ Dialog - + ... - + @@ -318,6 +323,14 @@ 锁屏时间 + + GetAdminPsw + + + Admin Password + 管理员密码 + + GetIPDialog @@ -346,32 +359,32 @@ Destination - + 目标地址 Netmask - 子网掩码 + 子网掩码 Gateway - + 网关 Wrong Destination! - + 目标地址错误! Wrong Netmask! - 子网掩码错误! + 子网掩码错误! Wrong Gateway! - + 网关错误! @@ -379,7 +392,7 @@ Form - + @@ -387,7 +400,7 @@ usct - + @@ -414,31 +427,31 @@ MainWindow - + Select - + 选择 Scan - + 扫描 Verify - + 确认 Admin - + 管理 @@ -446,47 +459,53 @@ Form - + Patient Information - + 病人信息 <html><head/><body><p>PatientID:</p></body></html> - + <html><head/><body><p>病人ID:</p></body></html> Someone Somebody - + XXX 2021/11/11 - + Female - + 女性 Acc# 27812398 - + Current Protocol - + 当前协议 + LEFT ONLY - + 左侧 + + + + RIGHT ONLY + 右侧 @@ -494,12 +513,39 @@ Message of warn! - + Message2 of warn! - + + + + + ScanFormWidget + + + Protocol + 协议 + + + + Preview Parameters + 预览参数 + + + + + some settings + +parameters + + XXX + + + + Scan Parameters + 扫描参数 @@ -507,7 +553,7 @@ Form - + @@ -515,12 +561,12 @@ 浙江衡玖医疗科技 - + °C - + @@ -611,17 +657,17 @@ Netmask - 子网掩码 + 子网掩码 Destination - + 目标地址 Gateway - + 网关 @@ -639,7 +685,7 @@ Form - + @@ -650,7 +696,7 @@ PushButton - + @@ -675,42 +721,42 @@ IP - + Name - 姓名 + 姓名 AE - + PACS - + 3D Recon - + Worklist - + DAQ - + Port - +