Change dialog style, add Scan Patient confirm

This commit is contained in:
kradchen
2023-09-08 17:09:49 +08:00
parent 0634b1b68e
commit 89c86c3bfd
12 changed files with 149 additions and 35 deletions

View File

@@ -12,8 +12,8 @@ AlertDialog::AlertDialog(QWidget *parent, Qt::WindowFlags f)
, mLblMsg(new QLabel(this))
, mLblTitle (new QLabel(this))
{
this->setFixedHeight(180);
this->setFixedWidth(400);
this->setMinimumHeight(180);
this->setMinimumWidth(400);
auto layout = new QVBoxLayout(mFormWidget);
layout->setSpacing(10);
// add title
@@ -21,7 +21,8 @@ AlertDialog::AlertDialog(QWidget *parent, Qt::WindowFlags f)
mLblTitle->setText(tr("Warning"));
mLblTitle->setObjectName("AlertDialogTitle");
layout->addWidget(mLblTitle);
layout->addWidget(mLblMsg);}
layout->addWidget(mLblMsg);
}
void AlertDialog::setAlertMessage(const QString &msg) {
mLblMsg->setText(msg);

View File

@@ -18,6 +18,7 @@
#include "dialogs/TimeSelectDialog.h"
#include "dialogs/SelectDialog.h"
#include "dialogs/GetWorkListDialog.h"
#include "dialogs/PatientConfirmDialog.h"
#include "network/DicomCfgDialog.h"
#include "network/GetAdminPsw.h"
@@ -319,6 +320,17 @@ DialogResult DialogManager::requestEditRouteInfo(const QStringList& aEditData)
return DialogResult(ret,dialog.getList());
}
int DialogManager::requestPatientConfirm(PatientInformation* patientInf, int type)
{
PatientConfirmDialog dialog(mTopWidget);
setTopWidget(&dialog);
dialog.setPatientInformation(patientInf, type);
dialog.setWindowModality(Qt::WindowModal);
int ret = dialog.exec();
releaseTopWidget(&dialog);
return ret;
}
int DialogManager::requestGetWorkList(QSqlTableModel* aModel, QTableView* aTableView)
{
GetWorkListDialog dialog(aModel, aTableView, mTopWidget);

View File

@@ -62,6 +62,7 @@ public:
int requestInputAdminPasswd();
int requestEditNetworkConfig();
int requestGetWorkList(QSqlTableModel* aModel, QTableView* aTableView);
int requestPatientConfirm(PatientInformation* patientInf, int type);
DialogResult requestEditIpAndNetMask();
DialogResult requestEditIpAndNetMask(const QStringList& aEditData);
DialogResult requestEditRouteInfo();

View File

@@ -0,0 +1,30 @@
#include "PatientConfirmDialog.h"
#include <QVBoxLayout>
#include "forms/select/PatientDetailForm.h"
PatientConfirmDialog::PatientConfirmDialog(QWidget* parent, Qt::WindowFlags f)
: GUIFormBaseDialog(parent, f)
, mPatientDetail(new PatientDetailForm(this))
{
auto layout = new QVBoxLayout(mFormWidget);
layout->addWidget(mPatientDetail);
layout->setMargin(0);
}
PatientConfirmDialog::~PatientConfirmDialog()
{
}
void PatientConfirmDialog::setPatientInformation(PatientInformation* information, int type)
{
mPatientDetail->setPatientInformation(information);
mPatientDetail->confirmModeOn(type);
}
bool PatientConfirmDialog::updateReferenceData()
{
return true;
}

View File

@@ -0,0 +1,20 @@
#ifndef GUI_PATIENTDIALOG_H
#define GUI_PATIENTDIALOG_H
#include "GUIFormBaseDialog.h"
class PatientDetailForm;
class PatientInformation;
class PatientConfirmDialog : public GUIFormBaseDialog
{
Q_OBJECT
private:
PatientDetailForm* mPatientDetail;
public:
PatientConfirmDialog(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
~PatientConfirmDialog();
void setPatientInformation(PatientInformation* information, int type);
protected:
bool updateReferenceData() override;
};
#endif /* GUI_PATIENTDIALOG_H */