#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(const QString& aTitle, 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 showErrorMessage(const QString& aMessage); protected: bool updateReferenceData() override; private: ULineEdit* le_id = nullptr; ULineEdit* le_name = nullptr; ULineEdit* le_sex = nullptr; ULineEdit* le_date = nullptr; QLabel* lbl_error = nullptr; PatientInformation store; QString currentPatientUID; QString AddDate; QToolButton* btnSex = nullptr; QToolButton* btnDate = nullptr; QSqlTableModel* model = nullptr; }; #endif //GUI_EDITPATIENTDIALOG_H