Refactor DialogManager.2

This commit is contained in:
Krad
2022-07-20 16:53:46 +08:00
parent acc53c463c
commit 0291c7d995
6 changed files with 4 additions and 3 deletions

View File

@@ -0,0 +1,55 @@
//
// Created by Krad on 2022/3/21.
//
#ifndef GUI_EDITPATIENTDIALOG_H
#define GUI_EDITPATIENTDIALOG_H
#include "dialogs/GUIFormBaseDialog.h"
#include "forms/select/PatientDetailForm.h"
class ULineEdit;
class UTextEdit;
class QLabel;
class QToolButton;
class QSqlTableModel;
class EditPatientDialog :public GUIFormBaseDialog {
Q_OBJECT
public:
explicit EditPatientDialog(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
~EditPatientDialog();
void setModel(QSqlTableModel* m)
{
model = m;
}
PatientInformation* getPatientInformation()
{
return &store;
}
void setPatientInformation(PatientInformation* information);
void clearPatientInformation();
void storePatientInformation();
protected:
bool updateReferenceData() override;
private:
ULineEdit* le_id = nullptr;
ULineEdit* le_name = nullptr;
ULineEdit* le_sex = nullptr;
ULineEdit* le_date = nullptr;
UTextEdit* te_comment = nullptr;
QLabel* lbl_error = nullptr;
PatientInformation store;
QString currentPatientUID;
QString AddDate;
QToolButton* btnSex = nullptr;
QToolButton* btnDate = nullptr;
QSqlTableModel* model = nullptr;
};
#endif //GUI_EDITPATIENTDIALOG_H