Files
GUI/src/EditPatientDialog.h
2022-04-06 09:29:17 +08:00

54 lines
1.2 KiB
C++

//
// Created by Krad on 2022/3/21.
//
#ifndef GUI_EDITPATIENTDIALOG_H
#define GUI_EDITPATIENTDIALOG_H
#include "dialogs/GUIFormBaseDialog.h"
#include "forms/select/editpatientform.h"
class QLineEdit;
class QTextEdit;
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:
QLineEdit* le_id= nullptr;
QLineEdit* le_name = nullptr;
QLineEdit* le_sex = nullptr;
QLineEdit* le_date = nullptr;
QTextEdit* 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