From df7676b8f0c9c6d06d52ef040d57133ff98da8e6 Mon Sep 17 00:00:00 2001 From: Krad Date: Tue, 14 Jun 2022 14:43:41 +0800 Subject: [PATCH] Rename editpatientform to PatientDetailForm --- src/EditPatientDialog.h | 2 +- src/forms/scan/patientinformationform.h | 2 +- ...tpatientform.cpp => PatientDetailForm.cpp} | 21 +++++++++--------- ...{editpatientform.h => PatientDetailForm.h} | 10 ++++----- ...ditpatientform.ui => PatientDetailForm.ui} | 4 ++-- src/forms/select/SelectFormWidget.cpp | 9 ++++---- src/forms/select/SelectFormWidget.h | 6 ++--- src/translations/en_US.ts | 2 +- src/translations/en_US.ts.bak | 2 +- src/translations/zh_CN.qm | Bin 10591 -> 10613 bytes src/translations/zh_CN.ts | 2 +- src/translations/zh_CN.ts.bak | 2 +- 12 files changed, 32 insertions(+), 30 deletions(-) rename src/forms/select/{editpatientform.cpp => PatientDetailForm.cpp} (83%) rename src/forms/select/{editpatientform.h => PatientDetailForm.h} (75%) rename src/forms/select/{editpatientform.ui => PatientDetailForm.ui} (97%) diff --git a/src/EditPatientDialog.h b/src/EditPatientDialog.h index 248e0b6..b55bc4c 100644 --- a/src/EditPatientDialog.h +++ b/src/EditPatientDialog.h @@ -6,7 +6,7 @@ #define GUI_EDITPATIENTDIALOG_H #include "dialogs/GUIFormBaseDialog.h" -#include "forms/select/editpatientform.h" +#include "forms/select/PatientDetailForm.h" class ULineEdit; class UTextEdit; diff --git a/src/forms/scan/patientinformationform.h b/src/forms/scan/patientinformationform.h index 1f1df85..49544f6 100644 --- a/src/forms/scan/patientinformationform.h +++ b/src/forms/scan/patientinformationform.h @@ -2,7 +2,7 @@ #define PATIENTINFORMATIONFORM_H #include -#include "src/forms/select/editpatientform.h" +#include "src/forms/select/PatientDetailForm.h" namespace Ui { class PatientInformationForm; } diff --git a/src/forms/select/editpatientform.cpp b/src/forms/select/PatientDetailForm.cpp similarity index 83% rename from src/forms/select/editpatientform.cpp rename to src/forms/select/PatientDetailForm.cpp index c7a9309..7776ea6 100644 --- a/src/forms/select/editpatientform.cpp +++ b/src/forms/select/PatientDetailForm.cpp @@ -1,5 +1,6 @@ -#include "editpatientform.h" -#include "ui_editpatientform.h" +#include "PatientDetailForm.h" +#include "ui_PatientDetailForm.h" + #include #include #include @@ -8,9 +9,9 @@ #include #include "event/EventCenter.h" -EditPatientForm::EditPatientForm(QWidget* parent) : +PatientDetailForm::PatientDetailForm(QWidget* parent) : QWidget(parent), - mUI(new Ui::EditPatientForm) + mUI(new Ui::PatientDetailForm) { mUI->setupUi(this); mUI->hideBtn->setSizePolicy(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Preferred); @@ -35,21 +36,21 @@ EditPatientForm::EditPatientForm(QWidget* parent) : mUI->rtbxComment->setEnabled(false); mUI->rtbxComment->setObjectName("display_tbx"); - connect(EventCenter::Default(), &EventCenter::ReloadLanguage, this,&EditPatientForm::reloadLanguage); + connect(EventCenter::Default(), &EventCenter::ReloadLanguage, this,&PatientDetailForm::reloadLanguage); } -void EditPatientForm::reloadLanguage() { +void PatientDetailForm::reloadLanguage() { mUI->retranslateUi(this); mUI->tbxSex->setText(mStore.Sex == "F" ? tr("Female") : (mStore.Sex == "M" ? tr("Male") : tr("Other"))); } -EditPatientForm::~EditPatientForm() +PatientDetailForm::~PatientDetailForm() { delete mUI; } -void EditPatientForm::setPatientInformation(PatientInformation* information) { +void PatientDetailForm::setPatientInformation(PatientInformation* information) { if (information) { mUI->tbxID->setText(information->ID); @@ -64,7 +65,7 @@ void EditPatientForm::setPatientInformation(PatientInformation* information) { } } -void EditPatientForm::clearPatientInformation() { +void PatientDetailForm::clearPatientInformation() { mUI->tbxID->clear(); mUI->tbxDob->setDate(QDate::currentDate()); mUI->tbxName->clear(); @@ -74,7 +75,7 @@ void EditPatientForm::clearPatientInformation() { mAddDate.clear(); } -void EditPatientForm::storePatientInformation() { +void PatientDetailForm::storePatientInformation() { mStore.PatientUID = mCurrentPatientUID; mStore.AddDate = mAddDate; mStore.ID = mUI->tbxID->text(); diff --git a/src/forms/select/editpatientform.h b/src/forms/select/PatientDetailForm.h similarity index 75% rename from src/forms/select/editpatientform.h rename to src/forms/select/PatientDetailForm.h index 7605933..3233d66 100644 --- a/src/forms/select/editpatientform.h +++ b/src/forms/select/PatientDetailForm.h @@ -1,17 +1,17 @@ #ifndef EDITPATIENTFORM_H #define EDITPATIENTFORM_H namespace Ui { -class EditPatientForm; +class PatientDetailForm; } #include #include "PatientInformation.h" class QToolButton; -class EditPatientForm : public QWidget +class PatientDetailForm : public QWidget { Q_OBJECT public: - explicit EditPatientForm(QWidget *parent = nullptr); - ~EditPatientForm(); + explicit PatientDetailForm(QWidget *parent = nullptr); + ~PatientDetailForm(); void setPatientInformation(PatientInformation * information); PatientInformation * getPatientInformation(){ return &mStore; @@ -23,7 +23,7 @@ signals: private: void storePatientInformation(); void reloadLanguage(); - Ui::EditPatientForm *mUI; + Ui::PatientDetailForm *mUI; QString mCurrentPatientUID; QString mAddDate; PatientInformation mStore; diff --git a/src/forms/select/editpatientform.ui b/src/forms/select/PatientDetailForm.ui similarity index 97% rename from src/forms/select/editpatientform.ui rename to src/forms/select/PatientDetailForm.ui index cd5f80a..e6c5262 100644 --- a/src/forms/select/editpatientform.ui +++ b/src/forms/select/PatientDetailForm.ui @@ -1,7 +1,7 @@ - EditPatientForm - + PatientDetailForm + 0 diff --git a/src/forms/select/SelectFormWidget.cpp b/src/forms/select/SelectFormWidget.cpp index 6e12043..a84f9e3 100644 --- a/src/forms/select/SelectFormWidget.cpp +++ b/src/forms/select/SelectFormWidget.cpp @@ -32,12 +32,13 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) , mBtnSelect(new QToolButton(this)) , mPatTable(new SlideTableView(this)) , mModel(nullptr) -, mEditPatForm(new EditPatientForm(this)) +, mEditPatForm(new PatientDetailForm(this)) { //init command bar auto layout = new QHBoxLayout(); ui->commandWidget->setLayout(layout); initGeneralButtons(layout); + layout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding)); addVerticalLine(layout); initPatEditButtons(layout); @@ -47,7 +48,7 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) contentLayout->setContentsMargins(5, 5, 0, 5); this->ui->contentWidget->setLayout(contentLayout); initTableView(contentLayout); - addVerticalLine(layout); + addVerticalLine(contentLayout); initDetailPanel(contentLayout); //select default row 0 if (mModel->rowCount() > 0) @@ -205,7 +206,7 @@ void SelectFormWidget::initDetailPanel(QHBoxLayout *contentLayout) {// prepare e btnShowEdit->hide(); }); //btn hide slot - connect(mEditPatForm, &EditPatientForm::hideBtnClicked, [=]() { + connect(mEditPatForm, &PatientDetailForm::hideBtnClicked, [=]() { mEditPatForm->hide(); btnShowEdit->show(); }); @@ -266,7 +267,7 @@ void SelectFormWidget::initDataModel() {//TODO:单独初始化预防SQL错误 } void SelectFormWidget::setPatientDetail(const SlideTableView *table, const QSqlTableModel *model, - EditPatientForm *edit_patient) const { + PatientDetailForm *edit_patient) const { PatientInformation pat; #define ADD_PATIENT_PROPERTY(val)\ pat. val = model->data(model->index(table->currentIndex().row(),PatientInformationEnum:: val),Qt::EditRole).toString(); diff --git a/src/forms/select/SelectFormWidget.h b/src/forms/select/SelectFormWidget.h index 3fe2909..806e95d 100644 --- a/src/forms/select/SelectFormWidget.h +++ b/src/forms/select/SelectFormWidget.h @@ -8,7 +8,7 @@ #include "forms/tabformwidget.h" #include "EditPatientDialog.h" -class EditPatientForm; +class PatientDetailForm; class SlideTableView; class QToolButton; class SelectFormWidget: public TabFormWidget { @@ -19,7 +19,7 @@ public: private: QString selectedPatientUID; - void setPatientDetail(const SlideTableView *table, const QSqlTableModel *model, EditPatientForm *edit_patient) const; + void setPatientDetail(const SlideTableView *table, const QSqlTableModel *model, PatientDetailForm *edit_patient) const; QToolButton* mBtnAccount; QToolButton* mBtnWorklist; QToolButton* mBtnAdd; @@ -28,7 +28,7 @@ private: QToolButton* mBtnSelect; SlideTableView* mPatTable; QSqlTableModel* mModel; - EditPatientForm* mEditPatForm; + PatientDetailForm* mEditPatForm; void prepareButtons(bool disableALL); void initGeneralButtons(QHBoxLayout *layout); diff --git a/src/translations/en_US.ts b/src/translations/en_US.ts index 7a9caf5..4d2f7dd 100644 --- a/src/translations/en_US.ts +++ b/src/translations/en_US.ts @@ -244,7 +244,7 @@ - EditPatientForm + PatientDetailForm Form diff --git a/src/translations/en_US.ts.bak b/src/translations/en_US.ts.bak index 7a9caf5..4d2f7dd 100644 --- a/src/translations/en_US.ts.bak +++ b/src/translations/en_US.ts.bak @@ -244,7 +244,7 @@ - EditPatientForm + PatientDetailForm Form diff --git a/src/translations/zh_CN.qm b/src/translations/zh_CN.qm index f30b4c49bbaa50f5e0f2f59949eb46b92133aae8..c7046c04fa8948fa2dba89048503cb0b5a00ecff 100644 GIT binary patch delta 1514 zcmZXTX-r&I6vxk-d3R>syxE1>nSo(x)CyvRfD0H0%97R;lxk|R&;XUPSPH4ZXr~C( zP^ng@U`w&3224u9E|h9S61#+g1zH-lrD)VZsIp_Y* z|NU6FSh&{}(6tbWMMTa8PWNH(8zR*WPKyuxiO3aNgWgq~zN19!aUwaDDA@pR;xrxP zbbd&b(}O)*IBmDfhM+fJgWb0iLnXk>uXzR2mh zMdEjRh>YkXMDrMDL+)uPObb zLBta%r{e<7y-2yQrbAI17>}2za>~8_BzT)MrkZkRJIb zj%^kC-~W>6zA<4euZhU;mZG;yf}oL#^RIsnJvJ(?y>T981;wv7@m+jd`Ps*4ho+UY z^_!7(O8MI_xQ?z@`Io|k!N-X!>hRstBc_g)5h-UR_mmc zKZAeKSu9m;(BYs_sw!TIc&$`@!UhF8q;WqI7`vs3r*KotjI`{{Ad2YKuCIViBIC4W zPlOum=46YU=0r|=hqkQ$TO#`d+U_*C*S=8}&cNjuo^YlZFTQD6{Y3$0{G2RhLK^0h zv+K05_d9ZVeJcvp$gf?vh{mqSO{>v}FeJA>?Z@x4Ab)x)3I58}Wj4)XWC~qZRtx-D zs2djQF^Zhvq-eW;uRh8DGhC3Aw*Wy|lyMFg12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cW>R8(1yLV428k#8~4ajAAK8qpk)njTHT?=vlZ)e{4MWyndjQ)u*t+?u)@ z{>+gFG?i%dA$3BqFWqU1N%;w`Gnt;<_64#{n(EhKEQ7!fe*4@k)#rkj&1Vfz-R3s`se{U)dy3KET<=z9lvEb( zk - EditPatientForm + PatientDetailForm Form diff --git a/src/translations/zh_CN.ts.bak b/src/translations/zh_CN.ts.bak index 2651393..0f17527 100644 --- a/src/translations/zh_CN.ts.bak +++ b/src/translations/zh_CN.ts.bak @@ -360,7 +360,7 @@ - EditPatientForm + PatientDetailForm Form