Change dialog style, add Scan Patient confirm
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
30
src/dialogs/PatientConfirmDialog.cpp
Normal file
30
src/dialogs/PatientConfirmDialog.cpp
Normal 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;
|
||||
}
|
||||
|
||||
20
src/dialogs/PatientConfirmDialog.h
Normal file
20
src/dialogs/PatientConfirmDialog.h
Normal 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 */
|
||||
Reference in New Issue
Block a user