From 37991304876b07b3dcc8dc0d23813624eb7d0e8f Mon Sep 17 00:00:00 2001 From: kradchen Date: Fri, 15 Sep 2023 11:42:40 +0800 Subject: [PATCH] Add Anonymous mode --- src/event/EventCenter.h | 1 + src/forms/recon/ReconFormWidget.cpp | 12 +- src/forms/recon/ScanSearchCriteriaForm.cpp | 30 ++ src/forms/scan/PatientInformationForm.cpp | 22 +- src/forms/scan/ScanFormWidget.cpp | 12 +- src/forms/select/PatientDetailForm.cpp | 9 + src/forms/select/PatientDetailForm.h | 1 + src/forms/select/SelectFormWidget.cpp | 66 ++++- src/forms/select/SelectFormWidget.h | 7 +- src/forms/settings/SettingFormWidget.cpp | 6 + src/forms/settings/SystemSettingForm.cpp | 14 +- src/forms/settings/SystemSettingForm.ui | 16 +- src/json/jsonobject.cpp | 10 + src/json/jsonobject.h | 3 + src/stylesheet/Dark2.css | 3 + src/translations/en_US.ts | 327 +++++++++++++++++---- src/translations/zh_CN.ts | 32 +- src/windows/LoginDialog.cpp | 4 + src/windows/MainWindow.cpp | 6 +- src/windows/MainWindow.h | 2 +- 20 files changed, 467 insertions(+), 116 deletions(-) diff --git a/src/event/EventCenter.h b/src/event/EventCenter.h index e6d67bf..f54a797 100644 --- a/src/event/EventCenter.h +++ b/src/event/EventCenter.h @@ -32,6 +32,7 @@ ADD_EVENT_VALUE(InvokeOperationEnd)\ ADD_EVENT_VALUE(PromptDialogOpen)\ ADD_EVENT_VALUE(GlobalBannerMessage)\ ADD_EVENT_VALUE(ReloadLanguage)\ +ADD_EVENT_VALUE(AnonymousModeChanged)\ ADD_EVENT_VALUE(WarnStateFlagChange)\ ADD_EVENT_VALUE(GUIErrorRaise)\ ADD_EVENT_VALUE(DeviceInfoRaise)\ diff --git a/src/forms/recon/ReconFormWidget.cpp b/src/forms/recon/ReconFormWidget.cpp index 8bfbfe1..2761d3a 100644 --- a/src/forms/recon/ReconFormWidget.cpp +++ b/src/forms/recon/ReconFormWidget.cpp @@ -10,7 +10,11 @@ #include "components/SlideTableView.h" #include "db/SQLHelper.h" +#include "json/jsonobject.h" + #include "device/DeviceManager.h" +#include "event/EventCenter.h" + #include "ScanSearchCriteriaForm.h" #include "ReconStateDelegate.h" #include "ReconScanTimeDelegate.h" @@ -62,7 +66,7 @@ ReconFormWidget::ReconFormWidget(QWidget *parent) connect(mSearchWidget, &ScanSearchCriteriaForm::searchFilterUpdated, this, &ReconFormWidget::updateSearchFilter); connect(mBtnDelete, &QToolButton::clicked, this, &ReconFormWidget::deleteReconRecord); connect(mRefreshTimer, &QTimer::timeout, this, &ReconFormWidget::refreshTransferprogress); - + connect(EventCenter::Default(), &EventCenter::AnonymousModeChanged, this, &ReconFormWidget::updateSearchFilter); } void ReconFormWidget::initTableView(QHBoxLayout *contentLayout) @@ -119,7 +123,10 @@ void ReconFormWidget::initDataModel() void ReconFormWidget::updateSearchFilter() { - mModel->setFilter(mSearchWidget->getSearchFilter()); + bool anonymousMode = JsonObject::Instance()->getAnonymousMode(); + QString filterString = mSearchWidget->getSearchFilter(); + filterString += filterString.isEmpty()?(anonymousMode?"PatientID='000000001'":""):(anonymousMode?" and PatientID='000000001'":""); + mModel->setFilter(filterString); mModel->select(); } @@ -185,3 +192,4 @@ void ReconFormWidget::refreshTransferprogress() mScanTable->viewport()->update(); } } + diff --git a/src/forms/recon/ScanSearchCriteriaForm.cpp b/src/forms/recon/ScanSearchCriteriaForm.cpp index e7b715e..f696aed 100644 --- a/src/forms/recon/ScanSearchCriteriaForm.cpp +++ b/src/forms/recon/ScanSearchCriteriaForm.cpp @@ -4,6 +4,9 @@ #include #include "components/ListBox.h" #include "dialogs/DialogManager.h" +#include "event/EventCenter.h" +#include "json/jsonobject.h" + ScanSearchCriteriaForm::ScanSearchCriteriaForm(QWidget *parent) : QWidget(parent) @@ -36,6 +39,12 @@ ScanSearchCriteriaForm::ScanSearchCriteriaForm(QWidget *parent) ui->holder1->setObjectName("endSpaceLine"); + ui->mPatientIDEdit->setEnabled(!JsonObject::Instance()->getAnonymousMode()); + ui->mPatientNameEdit->setEnabled(!JsonObject::Instance()->getAnonymousMode()); + ui->mAccessionNumberEdit->setEnabled(!JsonObject::Instance()->getAnonymousMode()); + ui->mClearButton->setEnabled(!JsonObject::Instance()->getAnonymousMode()); + ui->mRetrieveButton->setEnabled(!JsonObject::Instance()->getAnonymousMode()); + connect(ui->mLBEndDate, &QToolButton::clicked, [=]() { DialogResult result = DialogManager::Default()->requestSelectDate(ui->mLBEndDate->text()); @@ -88,6 +97,27 @@ ScanSearchCriteriaForm::ScanSearchCriteriaForm(QWidget *parent) connect(ui->mBtnDates, &QPushButton::clicked, this, &ScanSearchCriteriaForm::updateSearchFilter); connect(ui->mRetrieveButton, &QPushButton::clicked, this, &ScanSearchCriteriaForm::updateSearchFilter); connect(ui->mClearButton, &QPushButton::clicked, this, &ScanSearchCriteriaForm::clearCriteria); + + connect(EventCenter::Default(),&EventCenter::AnonymousModeChanged,[=](){ + bool AnonymousMode = JsonObject::Instance()->getAnonymousMode(); + if (AnonymousMode){ + ui->mPatientIDEdit->clear(); + ui->mPatientIDEdit->setEnabled(false); + ui->mPatientNameEdit->clear(); + ui->mPatientNameEdit->setEnabled(false); + ui->mAccessionNumberEdit->clear(); + ui->mAccessionNumberEdit->setEnabled(false); + ui->mClearButton->setEnabled(false); + ui->mRetrieveButton->setEnabled(false); + } + else{ + ui->mPatientIDEdit->setEnabled(true); + ui->mPatientNameEdit->setEnabled(true); + ui->mAccessionNumberEdit->setEnabled(true); + ui->mClearButton->setEnabled(true); + ui->mRetrieveButton->setEnabled(true); + } + }); } ScanSearchCriteriaForm::~ScanSearchCriteriaForm() diff --git a/src/forms/scan/PatientInformationForm.cpp b/src/forms/scan/PatientInformationForm.cpp index c50ead4..e1635b7 100644 --- a/src/forms/scan/PatientInformationForm.cpp +++ b/src/forms/scan/PatientInformationForm.cpp @@ -24,11 +24,23 @@ PatientInformationForm::~PatientInformationForm() } void PatientInformationForm::setPatientInformation(PatientInformation* information) { - mUI->lbl_ID->setText(information->ID); - mUI->lbl_Date->setText(information->BirthDate); - mUI->lbl_Name->setText(information->Name); - mUI->lbl_Sex->setText(information->Sex); - mUI->lbl_Acc->setText(information->AccessionNumber); + if(information){ + mUI->lbl_ID->setText(information->ID); + mUI->lbl_Date->setText(information->BirthDate); + mUI->lbl_Name->setText(information->Name); + mUI->lbl_Sex->setText(information->Sex); + mUI->lbl_Acc->setText(information->AccessionNumber); + } + else{ + mUI->lbl_ID->clear(); + mUI->lbl_Date->clear(); + mUI->lbl_Name->clear(); + mUI->lbl_Sex->clear(); + mUI->lbl_Acc->clear(); + } + if (mInfo){ + mInfo->deleteLater(); + } mInfo = information; } diff --git a/src/forms/scan/ScanFormWidget.cpp b/src/forms/scan/ScanFormWidget.cpp index 2b201bb..f393f69 100644 --- a/src/forms/scan/ScanFormWidget.cpp +++ b/src/forms/scan/ScanFormWidget.cpp @@ -295,13 +295,18 @@ void ScanFormWidget::renderPreviewData(const QObject* /*sender*/,const QObject * void ScanFormWidget::initEvents() {//Events--------------------------------------------------------------- connect(EventCenter::Default(), &EventCenter::PatientSelected, [=](QObject* sender, QObject* data) { - if (mUnInited) + if (data) { mBtnScan->setEnabled(true); mBtnRefresh->setEnabled(true); mBtnPreview->setEnabled(true); mBtnStop->setEnabled(true); - mUnInited = false; + } + else{ + mBtnScan->setEnabled(false); + mBtnRefresh->setEnabled(false); + mBtnPreview->setEnabled(false); + mBtnStop->setEnabled(false); } mPatInf->setPatientInformation((PatientInformation*)data); }); @@ -310,9 +315,6 @@ void ScanFormWidget::initEvents() {//Events------------------------------------- }); connect(EventCenter::Default(), &EventCenter::ResponsePreview, this,&ScanFormWidget::renderLoading); connect(EventCenter::Default(), &EventCenter::ResponsePreviewData, this,&ScanFormWidget::renderPreviewData); - connect(EventCenter::Default(), &EventCenter::PatientSelected, [=](QObject* sender, QObject* data) { - mPatInf->setPatientInformation((PatientInformation*)data); - }); connect(EventCenter::Default(), &EventCenter::ReloadLanguage, this, &ScanFormWidget::reloadLanguage); connect(EventCenter::Default(), &EventCenter::DeviceErrorRaise, [=](QObject* parent, QObject* msg){ printf("signal:%d\r\n",senderSignalIndex()); diff --git a/src/forms/select/PatientDetailForm.cpp b/src/forms/select/PatientDetailForm.cpp index 278b238..d22cf4f 100644 --- a/src/forms/select/PatientDetailForm.cpp +++ b/src/forms/select/PatientDetailForm.cpp @@ -48,6 +48,7 @@ mUI(new Ui::PatientDetailForm) connect(mBtnDelete, &QToolButton::clicked, [=](){ emit deleteClicked(); }); + setBtnEnable(false); } void PatientDetailForm::reloadLanguage() { @@ -72,6 +73,8 @@ void PatientDetailForm::setPatientInformation(PatientInformation* information) { mUI->lblAccno->setText(tr("AccNo: ")+information->AccessionNumber); mStore = *information; + setBtnEnable(true); + } } @@ -94,6 +97,12 @@ void PatientDetailForm::confirmModeOn(int protocol) } +void PatientDetailForm::setBtnEnable(bool enable) +{ + mBtnDelete->setEnabled(enable); + mBtnEdit->setEnabled(enable); +} + void PatientDetailForm::storePatientInformation() { } diff --git a/src/forms/select/PatientDetailForm.h b/src/forms/select/PatientDetailForm.h index 1663536..0a6b344 100644 --- a/src/forms/select/PatientDetailForm.h +++ b/src/forms/select/PatientDetailForm.h @@ -20,6 +20,7 @@ public: } void clearPatientInformation(); void confirmModeOn(int protocol); + void setBtnEnable(bool enable); signals: void hideBtnClicked(); void editClicked(); diff --git a/src/forms/select/SelectFormWidget.cpp b/src/forms/select/SelectFormWidget.cpp index 54f74aa..c657488 100644 --- a/src/forms/select/SelectFormWidget.cpp +++ b/src/forms/select/SelectFormWidget.cpp @@ -14,6 +14,7 @@ #include #include "components/SlideTableView.h" +#include "json/jsonobject.h" #include "db/SQLHelper.h" #include "event/EventCenter.h" #include "dialogs/DialogManager.h" @@ -62,16 +63,23 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) }); // event ReloadLanguage slot; connect(EventCenter::Default(), &EventCenter::ReloadLanguage, this, &SelectFormWidget::reloadLanguage); + + connect(EventCenter::Default(), &EventCenter::AnonymousModeChanged, this, &SelectFormWidget::updateDataByAnonymousMode); + //first prepare buttons! prepareButtons(false); } void SelectFormWidget::prepareButtons(bool disableALL) { + bool anonymousMode = JsonObject::Instance()->getAnonymousMode(); bool stateFlag = (mPatTable->currentIndex().row() >= 0); + + mBtnAdd->setEnabled(!anonymousMode && !disableALL); + mBtnWorklist->setEnabled(!anonymousMode && !disableALL); + patientDetailForm->setBtnEnable(!anonymousMode && stateFlag && !disableALL); + // if (mBtnAdd)mBtnEdit->setEnabled(!anonymousMode && stateFlag && !disableALL); + // if (mBtnAdd)mBtnDelete->setEnabled(!anonymousMode&& stateFlag && !disableALL); mBtnSelect->setEnabled(stateFlag && !disableALL); - // mBtnDelete->setEnabled(stateFlag && !disableALL); - // mBtnEdit->setEnabled(stateFlag && !disableALL); - mBtnAdd->setEnabled(!disableALL); } void SelectFormWidget::initGeneralButtons(QHBoxLayout *layout) { @@ -231,7 +239,26 @@ void SelectFormWidget::initTableView(QHBoxLayout *contentLayout) {// TableView f void SelectFormWidget::initDataModel() {//TODO:单独初始化预防SQL错误 mModel = SQLHelper::getTable("Patient"); mModel->sort(mModel->record().indexOf("AddDate"), Qt::DescendingOrder); + mModel->setEditStrategy(QSqlTableModel::OnManualSubmit); + bool anonymousMode = JsonObject::Instance()->getAnonymousMode(); + if (anonymousMode) + { + mModel->setFilter("1=2"); + } mModel->select(); + if (anonymousMode) + { + mModel->insertRow(0); + mModel->setData(mModel->index(0,0),"000000001"); + mModel->setData(mModel->index(0,1),"AnonymousPatient"); + mModel->setData(mModel->index(0,2),""); + mModel->setData(mModel->index(0,3),"AnonymousPatient"); + mModel->setData(mModel->index(0,4),"2000-01-01"); + mModel->setData(mModel->index(0,5),"M"); + mModel->setData(mModel->index(0,6),"2000-01-01"); + mModel->setData(mModel->index(0,7),""); + } + mModel->setHeaderData(1, Qt::Horizontal, "ID"); mModel->setHeaderData(2, Qt::Horizontal, tr("AccessionNumber")); mModel->setHeaderData(3, Qt::Horizontal, tr("Name")); @@ -264,8 +291,37 @@ void SelectFormWidget::reloadLanguage(){ //mBtnWorklist->setText(tr("Worklist")); mBtnAdd->setText(tr("Add")); mBtnEdit->setText(tr("Edit")); - mBtnDelete->setText(tr("Delete")); - mBtnSelect->setText(tr("Select")); +} + +void SelectFormWidget::updateDataByAnonymousMode(){ + bool anonymousMode = JsonObject::Instance()->getAnonymousMode(); + EventCenter::Default()->triggerEvent(GUIEvents::PatientSelected,this,nullptr); + if (anonymousMode) + { + mModel->setFilter("1=2"); + mModel->select(); + mModel->insertRow(0); + mModel->setData(mModel->index(0,0),"000000001"); + mModel->setData(mModel->index(0,1),"AnonymousPatient"); + mModel->setData(mModel->index(0,2),""); + mModel->setData(mModel->index(0,3),"AnonymousPatient"); + mModel->setData(mModel->index(0,4),"2000-01-01"); + mModel->setData(mModel->index(0,5),"M"); + mModel->setData(mModel->index(0,6),"2000-01-01"); + mModel->setData(mModel->index(0,7),""); + mPatTable->selectRow(0); + mModel->selectRow(0); + } + else{ + mModel->revertAll(); + mModel->setFilter(""); + mModel->select(); + if (mModel->rowCount()>0){ + mPatTable->selectRow(0); + mModel->selectRow(0); + } + } + prepareButtons(false); } diff --git a/src/forms/select/SelectFormWidget.h b/src/forms/select/SelectFormWidget.h index 4aa755c..5e48565 100644 --- a/src/forms/select/SelectFormWidget.h +++ b/src/forms/select/SelectFormWidget.h @@ -20,13 +20,14 @@ Q_OBJECT public: explicit SelectFormWidget(QWidget *parent = nullptr); - ~SelectFormWidget() override = default;; + ~SelectFormWidget() override = default; +public slots: + void updateDataByAnonymousMode(); private: QString selectedPatientUID; - void - setPatientDetail(const SlideTableView *table, const QSqlTableModel *model, PatientDetailForm *edit_patient) const; + void setPatientDetail(const SlideTableView *table, const QSqlTableModel *model, PatientDetailForm *edit_patient) const; QToolButton *mBtnAccount; QToolButton *mBtnWorklist; diff --git a/src/forms/settings/SettingFormWidget.cpp b/src/forms/settings/SettingFormWidget.cpp index 649e992..e936bd5 100644 --- a/src/forms/settings/SettingFormWidget.cpp +++ b/src/forms/settings/SettingFormWidget.cpp @@ -15,6 +15,7 @@ #include "SystemSettingForm.h" #include "AccountTableForm.h" #include "event/EventCenter.h" +#include "json/jsonobject.h" #include "AboutForm.h" #include "UserOperationLogForm.h" @@ -37,6 +38,8 @@ SettingFormWidget::SettingFormWidget(QWidget* aParent, Qt::WindowFlags f) widget->item(i)->setTextAlignment(Qt::AlignCenter); } layout->addWidget(widget); + //reset visible for AnonymousMode + widget->item(4)->setHidden(JsonObject::Instance()->getAnonymousMode()); QStackedWidget* stackedWidget = new QStackedWidget(ui->contentWidget); QWidget* spacerLine = new QWidget(this); @@ -64,6 +67,9 @@ SettingFormWidget::SettingFormWidget(QWidget* aParent, Qt::WindowFlags f) connect(widget, &QListWidget::currentRowChanged, [=](int rowindex) { stackedWidget->setCurrentIndex(rowindex); }); + connect(EventCenter::Default(), &EventCenter::AnonymousModeChanged, [=]() { + widget->item(4)->setHidden(JsonObject::Instance()->getAnonymousMode()); + }); connect(EventCenter::Default(), &EventCenter::ReloadLanguage, [=]() { QStringList menus; menus << tr("General") << tr("Account") << tr("System") << tr("About") << tr("Operation Log"); diff --git a/src/forms/settings/SystemSettingForm.cpp b/src/forms/settings/SystemSettingForm.cpp index 76acf55..f414bb4 100644 --- a/src/forms/settings/SystemSettingForm.cpp +++ b/src/forms/settings/SystemSettingForm.cpp @@ -31,8 +31,8 @@ SystemSettingForm::SystemSettingForm(QWidget* parent) //style init mUI->btnDICOM->setObjectName("btnDICOM"); mUI->btnNetwork->setObjectName("btnNetwork"); - mUI->swt_verify->setChecked(true); - mUI->lbl_verify->setFixedWidth(100); + mUI->AnonyButton->setChecked(JsonObject::Instance()->getAnonymousMode()); + // mUI->lbl_verify->setFixedWidth(100); //data init mUI->btnPro->setText(JsonObject::Instance()->defaultProtocal()); @@ -82,11 +82,9 @@ SystemSettingForm::SystemSettingForm(QWidget* parent) mDiskInfoCaller->start(); //connection - connect(mUI->swt_verify, &ImageSwitch::clicked, [=]() { - if (mUI->swt_verify->getChecked()) - { - //// - } + connect(mUI->AnonyButton, &ImageSwitch::clicked, [=]() { + JsonObject::Instance()->setAnonymousMode(mUI->AnonyButton->getChecked()); + EventCenter::Default()->triggerEvent(AnonymousModeChanged,this,nullptr); }); connect(scanConfirmButton, &ImageSwitch::clicked, [=]() { JsonObject::Instance()->setScanConfirm(scanConfirmButton->getChecked()); @@ -141,7 +139,7 @@ SystemSettingForm::SystemSettingForm(QWidget* parent) mUI->retranslateUi(this); mUI->btnPro->setText(JsonObject::Instance()->defaultProtocal()); mUI->btnFlt->setText(JsonObject::Instance()->defaultFilter()); - mUI->swt_verify->setChecked(true); + mUI->AnonyButton->setChecked(JsonObject::Instance()->getAnonymousMode()); updateStorageSize(); updateStorageUsed(); }); diff --git a/src/forms/settings/SystemSettingForm.ui b/src/forms/settings/SystemSettingForm.ui index db7d90c..3027cb3 100644 --- a/src/forms/settings/SystemSettingForm.ui +++ b/src/forms/settings/SystemSettingForm.ui @@ -58,25 +58,13 @@ - - - 100 - 0 - - - Auto Verify + Anonymous Mode - - - - 25 - 25 - - + diff --git a/src/json/jsonobject.cpp b/src/json/jsonobject.cpp index 67bbe2e..ce80fb5 100644 --- a/src/json/jsonobject.cpp +++ b/src/json/jsonobject.cpp @@ -539,6 +539,16 @@ void JsonObject::setCompleteNotify(bool val) { setBool("general","CompleteNotify", val, true); } +bool JsonObject::getAnonymousMode() +{ + return getBool("general","AnonymousMode"); +} + +void JsonObject::setAnonymousMode(bool val) +{ + setBool("general","AnonymousMode", val, true); +} + QStringList JsonObject::getScreenSaverInfomation() { return QString(getJsonString("screensaver", "content")).split(";"); diff --git a/src/json/jsonobject.h b/src/json/jsonobject.h index 90168a0..d8a1e6e 100644 --- a/src/json/jsonobject.h +++ b/src/json/jsonobject.h @@ -94,6 +94,9 @@ public: bool getCompleteNotify(); void setCompleteNotify(bool val); + bool getAnonymousMode(); + void setAnonymousMode(bool val); + const char* getEmptyScanID(); void setEmptyScanID(const char* id); diff --git a/src/stylesheet/Dark2.css b/src/stylesheet/Dark2.css index 2048aba..4b98377 100644 --- a/src/stylesheet/Dark2.css +++ b/src/stylesheet/Dark2.css @@ -700,6 +700,9 @@ QWidget#SearchCriteriaForm QPushButton { min-height: 56px; max-height: 56px; } +QWidget#SearchCriteriaForm QPushButton:disabled { + color:#505050; +} diff --git a/src/translations/en_US.ts b/src/translations/en_US.ts index 753dd33..baf1f76 100644 --- a/src/translations/en_US.ts +++ b/src/translations/en_US.ts @@ -35,10 +35,6 @@ Qt 5.12.0 - - Loading... - - Copyright (c) 1994-2021, OFFIS e.V. @@ -55,6 +51,22 @@ Copyright © 2017-2020 Zhejiang Equilibrium Nine Medical Equipment Co., Ltd. All Rights Reversed + + USCT Software V0.1.0 + + + + Reconstruction Software Loading... + + + + Operation System Information Loading... + + + + DICOM Library Information Loading... + + AccountFormDialog @@ -178,6 +190,17 @@ + + AdminSPwdDialog + + Please give this code to producer for getting the SP Code to reset admininistrator's password! + + + + Input the SP Code here + + + AlertDialog @@ -231,6 +254,30 @@ + + DeviceManager + + Patient can leave. + + + + + Data is currently being transmitted, please shut down later. + + + + Shut down failed, please push emergency button to shutdown. + + + + Recon disconnected. + + + + Open pump failed. + + + DicomCfgDialog @@ -328,6 +375,10 @@ M + + Accession Number + + GUIFormBaseDialog @@ -350,6 +401,19 @@ OK + + Stop + + + + Cancle + + + + Confirm stop the scan. + + + GeneralForm @@ -437,22 +501,10 @@ Search Query Error - - DB Unknow Error - - WorkList Search Failed - - Same Patient Existed - - - - DB Error,Patient Write Failed - - GetWorkListDialog @@ -472,6 +524,14 @@ Unknow Error. code:001001001 + + Accession Number + + + + DB Error,Patient Write Failed + + InputModeMenu @@ -657,6 +717,30 @@ Login + + New password:%1 + + + + Reset success + + + + Shut down now ? + + + + Shut Down + + + + System mode Notice + + + + Anonymous Mode active! + + MainWindow @@ -673,11 +757,15 @@ - Verify + Settings - Settings + Recon + + + + Shut down failed, please push emergency button to shutdown. @@ -786,10 +874,6 @@ Form - - ID - - Name @@ -798,10 +882,6 @@ Date Of Birth - - Comment - - Gender @@ -814,18 +894,58 @@ Male - - ... - - - - Hide Panel - - Other + + Patient Information + + + + 111 + + + + <html><head/><body><p><br/></p></body></html> + + + + Edit + + + + Delete + + + + PatientID: + + + + Add Date: + + + + AccNo: + + + + Scan with this Patient? + + + + Protocol: + + + + Left + + + + Right + + PatientInformationForm @@ -899,10 +1019,6 @@ Refresh - - PatientName - - Scan Time @@ -912,22 +1028,102 @@ - OperatorName + State - State + Patient ID + + + + Accession Number + + + + Patient Name + + + + Operator Name + + + + No data selected. + + + + Alert + + + + Can not delete this record before pacs succeed. + + + + Delete recon record with patient "%1" ? + + + + Confirm + + + + Can't delete selected record , db error! - RollingMessageWidget + ReconStateDelegate - Message of warn! + Wait to transfer - Message2 of warn! + Transfering + + + + Transfer failed + + + + Transfer completed + + + + Recon create failed + + + + Wait to recon + + + + No empty scan data + + + + Recon ing + + + + Recon failed + + + + Recon succeed + + + + PACS failed + + + + PACS succeed + + + + Unknow @@ -1043,10 +1239,6 @@ parameters Patient ID - - Scan State - - Patient Name @@ -1056,7 +1248,7 @@ parameters - Query + Retrieve @@ -1078,10 +1270,6 @@ parameters Edit - - Delete - - Select @@ -1126,6 +1314,22 @@ parameters Can't delete selected Patient , db submit error! + + ShutDown + + + + Shut down now ? + + + + Shut Down + + + + AccessionNumber + + SettingFormWidget @@ -1145,6 +1349,17 @@ parameters About + + Operation Log + + + + + ShutdownWidget + + shut down + + SystemSettingForm @@ -1156,10 +1371,6 @@ parameters Protocal - - Auto Verify - - IP @@ -1196,6 +1407,10 @@ parameters Get disk total size fail! + + Anonymous Mode + + TabFormWidget diff --git a/src/translations/zh_CN.ts b/src/translations/zh_CN.ts index c6e8774..eec3235 100644 --- a/src/translations/zh_CN.ts +++ b/src/translations/zh_CN.ts @@ -1083,7 +1083,7 @@ - + Settings 设置 @@ -1386,7 +1386,7 @@ - + LEFT ONLY 左侧 @@ -1399,7 +1399,7 @@ 性别 - + RIGHT ONLY 右侧 @@ -1581,25 +1581,25 @@ ScanFormWidget - + Protocol 扫描协议 - + LEFT 左侧 - + RIGHT 右侧 - + Empty Scan 空扫 @@ -1607,7 +1607,7 @@ - + Drainage 排水 @@ -1619,7 +1619,7 @@ - + Drainaging 排水中 @@ -1629,33 +1629,33 @@ - + Preview 预扫 - + Stop 停止 - + Scan 扫描 - + Preview Parameters 预览参数 - - + + some settings parameters @@ -1664,7 +1664,7 @@ parameters - + Scan Parameters 扫描参数 diff --git a/src/windows/LoginDialog.cpp b/src/windows/LoginDialog.cpp index 8cd24f1..018df13 100644 --- a/src/windows/LoginDialog.cpp +++ b/src/windows/LoginDialog.cpp @@ -172,6 +172,10 @@ void LoginDialog::doLogin() void LoginDialog::accept() { + if (JsonObject::Instance()->getAnonymousMode()){ + DialogManager::Default()->requestAlertMessage(tr("Anonymous Mode active!"), + DialogButtonMode::OkOnly,tr("System mode Notice")); + } QDialog::accept(); clearInputData(); mIsRunning = false; diff --git a/src/windows/MainWindow.cpp b/src/windows/MainWindow.cpp index 3d8fb38..f98674e 100644 --- a/src/windows/MainWindow.cpp +++ b/src/windows/MainWindow.cpp @@ -24,6 +24,8 @@ #include "models/User.h" #include "appvals/AppGlobalValues.h" #include "components/UTextEdit.h" +#include "json/jsonobject.h" + MainWindow::MainWindow(QWidget* aParent) : QMainWindow(aParent) @@ -131,7 +133,9 @@ void MainWindow::processShutdownDmsFailed() triggerError(tr("Shut down failed, please push emergency button to shutdown.")); } -void MainWindow::switchToScanTab() { mTabWidget->setCurrentIndex(1); } +void MainWindow::switchToScanTab(QObject* sender, QObject* data) { + if (data)mTabWidget->setCurrentIndex(1); +} void MainWindow::centerWidgetHide() { diff --git a/src/windows/MainWindow.h b/src/windows/MainWindow.h index d03cf99..8a24987 100644 --- a/src/windows/MainWindow.h +++ b/src/windows/MainWindow.h @@ -69,7 +69,7 @@ private: QThread* mThread; bool mIsDebugMode; - void switchToScanTab(); + void switchToScanTab(QObject* sender, QObject* data); void reloadLanguage() ;