Refactor DialogManager.2
This commit is contained in:
55
src/dialogs/EditPatientDialog.h
Normal file
55
src/dialogs/EditPatientDialog.h
Normal 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
|
||||
Reference in New Issue
Block a user