2021-10-09 16:38:34 +08:00
|
|
|
//
|
|
|
|
|
// Created by Krad on 2021/10/8.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#ifndef GUI_SELECTFORMWIDGET_H
|
|
|
|
|
#define GUI_SELECTFORMWIDGET_H
|
|
|
|
|
|
2022-04-02 14:52:21 +08:00
|
|
|
|
2022-04-06 09:29:17 +08:00
|
|
|
#include "forms/tabformwidget.h"
|
2022-04-01 15:33:50 +08:00
|
|
|
#include "EditPatientDialog.h"
|
2022-03-15 16:22:58 +08:00
|
|
|
class EditPatientForm;
|
2022-06-07 15:19:14 +08:00
|
|
|
class SlideTableView;
|
2022-06-14 11:29:56 +08:00
|
|
|
class QToolButton;
|
2021-10-09 16:38:34 +08:00
|
|
|
class SelectFormWidget: public TabFormWidget {
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
explicit SelectFormWidget(QWidget *parent = nullptr);
|
2022-06-14 11:29:56 +08:00
|
|
|
~SelectFormWidget() override = default;;
|
2021-10-09 16:38:34 +08:00
|
|
|
|
2021-10-12 10:28:30 +08:00
|
|
|
private:
|
2022-03-15 16:22:58 +08:00
|
|
|
QString selectedPatientUID;
|
2022-06-14 11:29:56 +08:00
|
|
|
void setPatientDetail(const SlideTableView *table, const QSqlTableModel *model, EditPatientForm *edit_patient) const;
|
|
|
|
|
QToolButton* mBtnAccount;
|
|
|
|
|
QToolButton* mBtnWorklist;
|
|
|
|
|
QToolButton* mBtnAdd;
|
|
|
|
|
QToolButton* mBtnEdit;
|
|
|
|
|
QToolButton* mBtnDelete;
|
|
|
|
|
QToolButton* mBtnSelect;
|
2022-06-14 13:52:42 +08:00
|
|
|
SlideTableView* mPatTable;
|
|
|
|
|
QSqlTableModel* mModel;
|
|
|
|
|
EditPatientForm* mEditPatForm;
|
|
|
|
|
|
|
|
|
|
void prepareButtons(bool disableALL);
|
|
|
|
|
void initGeneralButtons(QHBoxLayout *layout);
|
|
|
|
|
void initPatEditButtons(QHBoxLayout *layout);
|
|
|
|
|
void editPatient();
|
|
|
|
|
void delPatient();
|
|
|
|
|
void selectPatient();
|
|
|
|
|
void initDataModel();
|
|
|
|
|
void initDetailPanel(QHBoxLayout *contentLayout);
|
|
|
|
|
void initTableView(QHBoxLayout *contentLayout);
|
|
|
|
|
void reloadLanguage();
|
2021-10-09 16:38:34 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif //GUI_SELECTFORMWIDGET_H
|