Thu, 31 Mar 2022 23:10:57 +0200
Stripped down the RangedSlider. It is more compact and still does everything. Base colors (red and green) are fixed inside, also automatisc setting of outer limits. The tooltip shows the current ranges. Still some finetuning to be done.
48
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | #ifndef _PROFILEWATERS_H |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2 | #define _PROFILEWATERS_H |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | #include <QDialog> |
74
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
5 | #include <QtWidgets/QGridLayout> |
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
6 | #include <QtWidgets/QGroupBox> |
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
7 | #include <QtWidgets/QHBoxLayout> |
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
8 | #include <QtWidgets/QHeaderView> |
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
9 | #include <QtWidgets/QPushButton> |
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
10 | #include <QtWidgets/QTableWidget> |
48
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
11 | |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | namespace Ui { |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
13 | class ProfileWaters; |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
14 | } |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
15 | |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
16 | class ProfileWaters : public QDialog |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | { |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
18 | Q_OBJECT |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
19 | |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
20 | public: |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
21 | explicit ProfileWaters(QWidget *parent = nullptr); |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
22 | ~ProfileWaters(); |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
23 | |
79
e726db72da3c
All inventory and profiles now show the items sizes in the statusbar.
Michiel Broek <mbroek@mbse.eu>
parents:
74
diff
changeset
|
24 | signals: |
e726db72da3c
All inventory and profiles now show the items sizes in the statusbar.
Michiel Broek <mbroek@mbse.eu>
parents:
74
diff
changeset
|
25 | void setStatus(QString); |
e726db72da3c
All inventory and profiles now show the items sizes in the statusbar.
Michiel Broek <mbroek@mbse.eu>
parents:
74
diff
changeset
|
26 | |
48
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
27 | private slots: |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
28 | void on_insertButton_clicked(); |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
29 | void on_editButton_clicked(); |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
30 | void refreshTable(void); |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
31 | |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
32 | private: |
74
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
33 | QGridLayout *gridLayout; |
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
34 | QTableWidget *tableWaters; |
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
35 | QGroupBox *groupBox; |
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
36 | QHBoxLayout *horizontalLayout; |
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
37 | QPushButton *quitButton; |
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
38 | QPushButton *insertButton; |
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
39 | |
48
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
40 | void edit(int recno); |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
41 | }; |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
42 | |
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
43 | #endif |