64 lines
1.2 KiB
C++
64 lines
1.2 KiB
C++
//
|
|
// Created by Krad on 2021/10/8.
|
|
//
|
|
|
|
#ifndef GUI_SELECTFORMWIDGET_H
|
|
#define GUI_SELECTFORMWIDGET_H
|
|
|
|
|
|
#include "forms/TabFormWidget.h"
|
|
#include "EditPatientDialog.h"
|
|
|
|
class PatientDetailForm;
|
|
|
|
class SlideTableView;
|
|
|
|
class QToolButton;
|
|
|
|
class SelectFormWidget : public TabFormWidget {
|
|
Q_OBJECT
|
|
public:
|
|
explicit SelectFormWidget(QWidget *parent = nullptr);
|
|
|
|
~SelectFormWidget() override = default;;
|
|
|
|
private:
|
|
QString selectedPatientUID;
|
|
|
|
void
|
|
setPatientDetail(const SlideTableView *table, const QSqlTableModel *model, PatientDetailForm *edit_patient) const;
|
|
|
|
QToolButton *mBtnAccount;
|
|
QToolButton *mBtnWorklist;
|
|
QToolButton *mBtnAdd;
|
|
QToolButton *mBtnEdit;
|
|
QToolButton *mBtnDelete;
|
|
QToolButton *mBtnSelect;
|
|
SlideTableView *mPatTable;
|
|
QSqlTableModel *mModel;
|
|
PatientDetailForm *patientDetailForm;
|
|
|
|
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();
|
|
};
|
|
|
|
|
|
#endif //GUI_SELECTFORMWIDGET_H
|