diff --git a/src/dialogs/DialogManager.cpp b/src/dialogs/DialogManager.cpp index bc2e02c..02ffdad 100644 --- a/src/dialogs/DialogManager.cpp +++ b/src/dialogs/DialogManager.cpp @@ -21,6 +21,7 @@ #include "dialogs/ReconSettingsDialog.h" #include "dialogs/IpSettingsDialog.h" #include "dialogs/MppsSettingsDialog.h" +#include "dialogs/StartScanProcessDialog.h" #include "network/DicomCfgDialog.h" #include "network/GetAdminPsw.h" @@ -394,6 +395,17 @@ DialogResult DialogManager::requestEditRouteInfo(const QStringList& aEditData) return DialogResult(ret,dialog.getList()); } +DialogResult DialogManager::reuqestConfirmStartScan(PatientInformation* aPatient) +{ + StartScanProcessDialog dialog(mTopWidget); + dialog.setPatientDetailForm(aPatient); + setTopWidget(&dialog); + dialog.setWindowModality(Qt::WindowModal);; + int ret = dialog.exec(); + releaseTopWidget(&dialog); + return DialogResult(ret,QVariant("")); +} + int DialogManager::requestPatientConfirm(PatientInformation* patientInf, int type) { PatientConfirmDialog dialog(mTopWidget); diff --git a/src/dialogs/DialogManager.h b/src/dialogs/DialogManager.h index fe74ddd..4a1666f 100644 --- a/src/dialogs/DialogManager.h +++ b/src/dialogs/DialogManager.h @@ -11,10 +11,10 @@ class GUIMessageDialog; class QSqlTableModel; class QTableView; -class PatientInformation; class LoginDialog; class ScreenSaverWindow; class GetWorkListDialog; +class PatientInformation; enum MessageLevel:unsigned int; @@ -71,6 +71,7 @@ public: DialogResult requestEditIpAndNetMask(const QStringList& aEditData); DialogResult requestEditRouteInfo(); DialogResult requestEditRouteInfo(const QStringList& aEditData); + DialogResult reuqestConfirmStartScan(PatientInformation* aPatient); void requestChangePassword(); void raiseDeviceError(QObject* parent, QObject* msg); void raiseDeviceInfo(QObject* parent, QObject* aInfoData); diff --git a/src/dialogs/StartScanProcessDialog.cpp b/src/dialogs/StartScanProcessDialog.cpp new file mode 100644 index 0000000..f522efa --- /dev/null +++ b/src/dialogs/StartScanProcessDialog.cpp @@ -0,0 +1,67 @@ +#include "StartScanProcessDialog.h" +#include "ui_StartScanProcessDialog.h" + +#include "forms/select/PatientInformation.h" +#include "json/jsonobject.h" + +#include + +StartScanProcessDialog::StartScanProcessDialog(QWidget *aParent) : + QDialog(aParent), + mUI(new Ui::StartScanProcessDialog) +{ + mUI->setupUi(this); + setObjectName("formDialog"); + setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog); + initButtons(); +} + +StartScanProcessDialog::~StartScanProcessDialog() +{ + delete mUI; +} + +void StartScanProcessDialog::initButtons() +{ + connect(mUI->mExecuteButton, &QPushButton::clicked, this, &StartScanProcessDialog::accept); + connect(mUI->mCancelButton, &QPushButton::clicked, this, &QDialog::reject); + + QButtonGroup* buttonGroup = new QButtonGroup(this); + buttonGroup->setExclusive(true); + buttonGroup->addButton(mUI->mLeftToRightButton); + buttonGroup->addButton(mUI->mRightToLeftButton); + buttonGroup->addButton(mUI->mOnlyLeftButton); + buttonGroup->addButton(mUI->mOnlyRightButton); + + QString protocol = JsonObject::Instance()->defaultProtocal(); + if(protocol == "LSTAND") + { + mUI->mLeftToRightButton->setChecked(true); + } + else if(protocol == "RSTAND") + { + mUI->mRightToLeftButton->setChecked(true); + } + else if(protocol == "LONE") + { + mUI->mOnlyLeftButton->setChecked(true); + } + else + { + mUI->mOnlyRightButton->setChecked(true); + } +} + +void StartScanProcessDialog::setPatientDetailForm(PatientInformation* aPatient) +{ + mUI->mPatientID->setText(aPatient->ID); + mUI->mPatienName->setText(aPatient->Name); + mUI->mPatientGender->setText(aPatient->Sex); + mUI->mPatientBirth->setText(aPatient->BirthDate); + mUI->mAccessionNumber->setText(aPatient->AccessionNumber); +} + +void StartScanProcessDialog::accept() +{ + QDialog::accept(); +} diff --git a/src/dialogs/StartScanProcessDialog.h b/src/dialogs/StartScanProcessDialog.h new file mode 100644 index 0000000..0b222b7 --- /dev/null +++ b/src/dialogs/StartScanProcessDialog.h @@ -0,0 +1,31 @@ +#ifndef STARTSCANPROCESSDIALOG_H +#define STARTSCANPROCESSDIALOG_H + +#include + +class PatientInformation; + +namespace Ui { +class StartScanProcessDialog; +} + +class StartScanProcessDialog : public QDialog +{ + Q_OBJECT + +public: + explicit StartScanProcessDialog(QWidget *aParent = nullptr); + ~StartScanProcessDialog() override; + void setPatientDetailForm(PatientInformation* aPatient); + +public slots: + void accept() override; + +private: + void initButtons(); + +private: + Ui::StartScanProcessDialog *mUI; +}; + +#endif // STARTSCANPROCESSDIALOG_H diff --git a/src/dialogs/StartScanProcessDialog.ui b/src/dialogs/StartScanProcessDialog.ui new file mode 100644 index 0000000..607cae7 --- /dev/null +++ b/src/dialogs/StartScanProcessDialog.ui @@ -0,0 +1,470 @@ + + + StartScanProcessDialog + + + + 0 + 0 + 638 + 468 + + + + + 0 + 0 + + + + Dialog + + + + + + + 0 + 0 + + + + + -1 + + + + font-size:30px; +border-bottom: 1px solid gray; + + + Patien Information + + + Qt::AlignCenter + + + + + + + + + + + -1 + + + + font-size:28px + + + PatientBirth: + + + + + + + + -1 + + + + font-size:28px + + + + + + + + + + + -1 + + + + font-size:28px + + + PatientGender: + + + + + + + + -1 + + + + font-size:28px + + + + + + + + + + + -1 + + + + font-size:28px + + + + + + + + + + + -1 + + + + font-size:28px + + + AccessionNumber: + + + + + + + + -1 + + + + font-size:28px + + + PatientName: + + + + + + + + -1 + + + + font-size:28px + + + + + + + + + + + -1 + + + + font-size:28px + + + PatientID: + + + + + + + + -1 + + + + font-size:28px + + + + + + + + + + + + + + 0 + 0 + + + + + -1 + + + + border-top: 1px solid #0078d8; +border-bottom: 1px solid gray; +font-size:28px; + + + Protocol Settings + + + Qt::AlignCenter + + + + + + + true + + + + 0 + 0 + + + + + 0 + 80 + + + + + 16777215 + 16777215 + + + + QPushButton +{ +font-size: 28px; +} + + + + + + + + 0 + 0 + + + + <html><head/><body><p><br/></p></body></html> + + + QPushButton:checked +{ + border: 5px solid darkorange; +} + + + left->right + + + true + + + true + + + + + + + + 0 + 0 + + + + QPushButton:checked +{ + border: 5px solid darkorange; + padding: 0px; +} + + + right->left + + + true + + + + + + + + 0 + 0 + + + + QPushButton:checked +{ + border: 5px solid darkorange; + padding: 0px; +} + + + only left + + + true + + + + + + + + 0 + 0 + + + + QPushButton:checked +{ + border: 5px solid darkorange; + padding: 0px; +} + + + only right + + + true + + + + + + + + + + + 16777215 + 3 + + + + + + + + + + + + 0 + 0 + + + + + 0 + 80 + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + font-size: 28px; + + + start Scan + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + font-size: 28px; + + + Cancel + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + +