2021-10-09 16:38:34 +08:00
|
|
|
#ifndef GUI_SELECTFORMWIDGET_H
|
|
|
|
|
#define GUI_SELECTFORMWIDGET_H
|
|
|
|
|
|
2022-04-02 14:52:21 +08:00
|
|
|
|
2022-07-13 10:13:07 +08:00
|
|
|
#include "forms/TabFormWidget.h"
|
2022-07-20 16:53:46 +08:00
|
|
|
#include "dialogs/EditPatientDialog.h"
|
2022-07-12 16:13:09 +08:00
|
|
|
|
2022-06-14 14:43:41 +08:00
|
|
|
class PatientDetailForm;
|
2022-07-12 16:13:09 +08:00
|
|
|
|
2022-06-07 15:19:14 +08:00
|
|
|
class SlideTableView;
|
2022-07-12 16:13:09 +08:00
|
|
|
|
2022-06-14 11:29:56 +08:00
|
|
|
class QToolButton;
|
2022-07-12 16:13:09 +08:00
|
|
|
|
|
|
|
|
class SelectFormWidget : public TabFormWidget {
|
|
|
|
|
Q_OBJECT
|
2021-10-09 16:38:34 +08:00
|
|
|
public:
|
|
|
|
|
explicit SelectFormWidget(QWidget *parent = nullptr);
|
2022-07-12 16:13:09 +08:00
|
|
|
|
2023-09-15 11:42:40 +08:00
|
|
|
~SelectFormWidget() override = default;
|
2021-10-09 16:38:34 +08:00
|
|
|
|
2023-09-15 11:42:40 +08:00
|
|
|
public slots:
|
|
|
|
|
void updateDataByAnonymousMode();
|
2021-10-12 10:28:30 +08:00
|
|
|
private:
|
2022-03-15 16:22:58 +08:00
|
|
|
QString selectedPatientUID;
|
2022-07-12 16:13:09 +08:00
|
|
|
|
2023-09-15 11:42:40 +08:00
|
|
|
void setPatientDetail(const SlideTableView *table, const QSqlTableModel *model, PatientDetailForm *edit_patient) const;
|
2022-07-12 16:13:09 +08:00
|
|
|
|
2024-04-23 15:33:36 +08:00
|
|
|
QToolButton *mBtnEdit;
|
|
|
|
|
QToolButton *mBtnDelete;
|
2022-07-12 16:13:09 +08:00
|
|
|
QToolButton *mBtnAdd;
|
|
|
|
|
QToolButton *mBtnSelect;
|
|
|
|
|
SlideTableView *mPatTable;
|
|
|
|
|
QSqlTableModel *mModel;
|
2022-07-15 17:32:21 +08:00
|
|
|
PatientDetailForm *patientDetailForm;
|
2022-06-14 13:52:42 +08:00
|
|
|
|
|
|
|
|
void prepareButtons(bool disableALL);
|
2022-07-12 16:13:09 +08:00
|
|
|
|
2022-06-14 13:52:42 +08:00
|
|
|
void initPatEditButtons(QHBoxLayout *layout);
|
2022-07-12 16:13:09 +08:00
|
|
|
|
2022-06-14 13:52:42 +08:00
|
|
|
void editPatient();
|
2022-07-12 16:13:09 +08:00
|
|
|
|
2022-06-14 13:52:42 +08:00
|
|
|
void delPatient();
|
2022-07-12 16:13:09 +08:00
|
|
|
|
2022-06-14 13:52:42 +08:00
|
|
|
void selectPatient();
|
2022-07-12 16:13:09 +08:00
|
|
|
|
2024-05-06 13:26:57 +08:00
|
|
|
void setSelectedPatient(PatientInformation* aPatient);
|
|
|
|
|
|
2022-06-14 13:52:42 +08:00
|
|
|
void initDataModel();
|
2022-07-12 16:13:09 +08:00
|
|
|
|
2022-06-14 13:52:42 +08:00
|
|
|
void initDetailPanel(QHBoxLayout *contentLayout);
|
2022-07-12 16:13:09 +08:00
|
|
|
|
2024-04-23 15:33:36 +08:00
|
|
|
void initTableView(QLayout *contentLayout);
|
2022-07-12 16:13:09 +08:00
|
|
|
|
2022-06-14 13:52:42 +08:00
|
|
|
void reloadLanguage();
|
2021-10-09 16:38:34 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif //GUI_SELECTFORMWIDGET_H
|