-
Notifications
You must be signed in to change notification settings - Fork 0
/
stdTreatmentForm.h
89 lines (73 loc) · 1.71 KB
/
stdTreatmentForm.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#ifndef STDTREATMENTFORM_H
#define STDTREATMENTFORM_H
#include <QDialog>
#include <QtSql>
#include <QSqlDatabase>
#include <QSqlRelationalTableModel>
#include <QVector>
#include "definitions.h"
#include "patientModel.h"
#include "datatypes.h"
#include <vector>
class QDataWidgetMapper;
class QLabel;
class QLineEdit;
class QPushButton;
class QComboBox;
class QDateEdit;
class QRadioButton;
class QButtonGroup;
class QCheckBox;
class QSpinBox;
class QGridLayout;
class QVBoxLayout;
class QWidget;
class QTextEdit;
class stdTreatmentForm : public QDialog
{
Q_OBJECT
public:
stdTreatmentForm(
int id,
QWidget* parent);
private slots:
void saveStdTreatment();
void expandHideDetails(int state);
void noDetailsChanged(int number);
void updateDetails(const QString& newCost);
private:
QLabel* diagnoseLabel;
QComboBox* diagnoseComboBox;
QLabel* dateLabel;
QDateEdit* dateEdit;
QLabel* durationLabel;
QLineEdit* durationField;
QLabel* nameLabel;
QLineEdit* nameField;
QLabel* patientLabel;
QLineEdit* patientBox;
QLabel* descLabel;
QTextEdit* descEdit;
QCheckBox* details;
QLabel* numLabel;
QSpinBox* noOfDetails;
QLabel* detailsLabel;
QLabel* costDetailLabel;
QVBoxLayout* detailLayout;
QSqlRelationalTableModel* m_model;
QDataWidgetMapper* m_mapper;
QPushButton* saveButton;
QPushButton* closeButton;
QVBoxLayout* detailFields;
QVBoxLayout* costDetailFields;
QGridLayout* mainLayout;
QWidget* extension;
std::vector<DetailTuple*> detailVector;
std::vector<LayoutTuple*> detailFieldsDesc;
void createLayout();
void dumpDetails(QString& result);
void reconstructDetailVector(QString& data);
void initialUpdate();
bool checkForDetails();
};
#endif