Sat, 14 Oct 2023 11:23:24 +0200
Load and show current calibration data.
3 | 1 | #ifndef _MAINWINDOW_H |
2 | #define _MAINWINDOW_H | |
3 | ||
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
78
diff
changeset
|
4 | #include "RecipesTree.h" |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
5 | #include "InventorySuppliers.h" |
19
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
15
diff
changeset
|
6 | #include "InventoryFermentables.h" |
24 | 7 | #include "InventoryHops.h" |
25
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
8 | #include "InventoryYeasts.h" |
480
94b3def5d778
Added yeastpack editor. Expanded the database upgrade. On startup, recount the yeastpack used fields.
Michiel Broek <mbroek@mbse.eu>
parents:
479
diff
changeset
|
9 | #include "InventoryYeastPacks.h" |
28
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
10 | #include "InventoryMiscs.h" |
29
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
11 | #include "InventoryWaters.h" |
30
0fec6a1abd13
Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
29
diff
changeset
|
12 | #include "InventoryEquipments.h" |
173
8514932b61aa
Added menu entry products in production
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
13 | #include "ProdInprod.h" |
228
c859e8efa470
Added archive products on name.
Michiel Broek <mbroek@mbse.eu>
parents:
213
diff
changeset
|
14 | #include "ProdOnName.h" |
231
54b5abd46958
Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
228
diff
changeset
|
15 | #include "ProdOnCode.h" |
234
51aea8b798f0
Add product archive tree by date.
Michiel Broek <mbroek@mbse.eu>
parents:
232
diff
changeset
|
16 | #include "ProdOnDate.h" |
232
6d3ba9c44f95
Added the product archives tree by styles.
Michiel Broek <mbroek@mbse.eu>
parents:
231
diff
changeset
|
17 | #include "ProdOnTree.h" |
48
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
18 | #include "ProfileWaters.h" |
49
29cf6e350063
Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
19 | #include "ProfileMashs.h" |
56
eb6c564192f4
Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
52
diff
changeset
|
20 | #include "ProfileStyles.h" |
57
75d11cc05ce4
Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
56
diff
changeset
|
21 | #include "ProfileFerments.h" |
310
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
22 | #include "MonNodes.h" |
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
23 | #include "MonFermenters.h" |
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
24 | #include "MonCO2meters.h" |
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
25 | #include "MoniSpindels.h" |
275
f472f9773782
Added import from xml, equipments and beerstyles.
Michiel Broek <mbroek@mbse.eu>
parents:
234
diff
changeset
|
26 | #include "ImportXML.h" |
387 | 27 | #include "ImportBrew.h" |
15
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
28 | #include "Setup.h" |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
29 | |
3 | 30 | #include <QMainWindow> |
31 | #include <QStandardItemModel> | |
32 | #include <QMenu> | |
33 | #include <QToolButton> | |
90
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
34 | #include <QApplication> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
35 | #include <QDateTime> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
36 | #include <QDebug> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
37 | #include <QDir> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
38 | // #include <QDomDocument> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
39 | #include <QFile> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
40 | #include <QList> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
41 | #include <QMetaProperty> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
42 | #include <QObject> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
43 | #include <QSettings> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
44 | #include <QString> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
45 | #include <QTextStream> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
46 | #include <QTranslator> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
47 | #include <QtSql> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
48 | #include <QUuid> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
49 | #include <QStyle> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
50 | #include <QPlainTextEdit> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
51 | #include <QMessageBox> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
52 | #include <QLabel> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
53 | #include <QImage> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
54 | #include <QImageReader> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
55 | #include <QImageWriter> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
56 | #include <QColorSpace> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
57 | #include <QGraphicsView> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
58 | #include <QFileDialog> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
59 | #include <QXmlStreamReader> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
60 | #include <QXmlStreamWriter> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
61 | #include <QJsonArray> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
62 | #include <QJsonDocument> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
63 | #include <QJsonObject> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
64 | #include <QMap> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
65 | #include <QPrinter> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
66 | #include <QWidget> |
91
409d9c7214be
Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
67 | #include <QWebSocket> |
213
a167ee979cac
Added brew_log popup window.
Michiel Broek <mbroek@mbse.eu>
parents:
173
diff
changeset
|
68 | #include <QChart> |
a167ee979cac
Added brew_log popup window.
Michiel Broek <mbroek@mbse.eu>
parents:
173
diff
changeset
|
69 | #include <QValueAxis> |
a167ee979cac
Added brew_log popup window.
Michiel Broek <mbroek@mbse.eu>
parents:
173
diff
changeset
|
70 | #include <QDateTimeAxis> |
a167ee979cac
Added brew_log popup window.
Michiel Broek <mbroek@mbse.eu>
parents:
173
diff
changeset
|
71 | #include <QLineSeries> |
296
2f4e250cfed9
Added fermenter and iSpindel graphs.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
72 | #include <QSplineSeries> |
213
a167ee979cac
Added brew_log popup window.
Michiel Broek <mbroek@mbse.eu>
parents:
173
diff
changeset
|
73 | #include <QChartView> |
296
2f4e250cfed9
Added fermenter and iSpindel graphs.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
74 | #include <QAreaSeries> |
2f4e250cfed9
Added fermenter and iSpindel graphs.
Michiel Broek <mbroek@mbse.eu>
parents:
275
diff
changeset
|
75 | |
90
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
76 | |
213
a167ee979cac
Added brew_log popup window.
Michiel Broek <mbroek@mbse.eu>
parents:
173
diff
changeset
|
77 | using namespace QtCharts; |
90
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
78 | |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
79 | typedef struct IniMySQL |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
80 | { |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
81 | QString host; ///< MySQL host |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
82 | QString port; ///< MySQL port |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
83 | QString name; ///< MySQL database |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
84 | QString user; ///< MySQL username |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
85 | QString pass; ///< MySQL password |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
86 | QString charset; ///< MySQL character encoding |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
87 | } IniMySQL; |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
88 | |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
89 | static IniMySQL dbProd; |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
90 | static IniMySQL dbDev; |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
91 | |
91
409d9c7214be
Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
92 | |
409d9c7214be
Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
93 | typedef struct IniWS |
90
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
94 | { |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
95 | QString host; ///< MQTT host |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
96 | QString port; ///< MQTT port |
91
409d9c7214be
Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
97 | } IniWS; |
90
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
98 | |
91
409d9c7214be
Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
99 | static IniWS wsProd; |
409d9c7214be
Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
100 | static IniWS wsDev; |
125
2e79e0975e58
Start hops table display. The calculated preboil_sg value is stored global in memory. Added calculations for IBU, hop flavour and aroma.
Michiel Broek <mbroek@mbse.eu>
parents:
102
diff
changeset
|
101 | |
2e79e0975e58
Start hops table display. The calculated preboil_sg value is stored global in memory. Added calculations for IBU, hop flavour and aroma.
Michiel Broek <mbroek@mbse.eu>
parents:
102
diff
changeset
|
102 | |
3 | 103 | namespace Ui { |
104 | class MainWindow; | |
105 | } | |
106 | ||
107 | class MainWindow : public QMainWindow | |
108 | { | |
4 | 109 | Q_OBJECT |
3 | 110 | |
111 | public: | |
90
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
112 | explicit MainWindow(bool useDevelopOption, bool startConfigOption, QWidget *parent = 0); |
4 | 113 | ~MainWindow(); |
3 | 114 | |
68
abac28effb21
Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
65
diff
changeset
|
115 | // Keep pointers to new windows. |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
78
diff
changeset
|
116 | RecipesTree *RecipesTreeWindow; |
65
2ef981980daa
Finally found out how to make these databases work on a single main window. And it's dynamic too.
Michiel Broek <mbroek@mbse.eu>
parents:
57
diff
changeset
|
117 | InventorySuppliers *InventorySuppliersWindow; |
68
abac28effb21
Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
65
diff
changeset
|
118 | InventoryFermentables *InventoryFermentablesWindow; |
abac28effb21
Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
65
diff
changeset
|
119 | InventoryHops *InventoryHopsWindow; |
abac28effb21
Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
65
diff
changeset
|
120 | InventoryYeasts *InventoryYeastsWindow; |
480
94b3def5d778
Added yeastpack editor. Expanded the database upgrade. On startup, recount the yeastpack used fields.
Michiel Broek <mbroek@mbse.eu>
parents:
479
diff
changeset
|
121 | InventoryYeastPacks *InventoryYeastPacksWindow; |
68
abac28effb21
Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
65
diff
changeset
|
122 | InventoryMiscs *InventoryMiscsWindow; |
abac28effb21
Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
65
diff
changeset
|
123 | InventoryWaters *InventoryWatersWindow; |
abac28effb21
Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
65
diff
changeset
|
124 | InventoryEquipments *InventoryEquipmentsWindow; |
173
8514932b61aa
Added menu entry products in production
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
125 | ProdInprod *ProdInprodWindow; |
228
c859e8efa470
Added archive products on name.
Michiel Broek <mbroek@mbse.eu>
parents:
213
diff
changeset
|
126 | ProdOnName *ProdOnNameWindow; |
231
54b5abd46958
Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
228
diff
changeset
|
127 | ProdOnCode *ProdOnCodeWindow; |
234
51aea8b798f0
Add product archive tree by date.
Michiel Broek <mbroek@mbse.eu>
parents:
232
diff
changeset
|
128 | ProdOnDate *ProdOnDateWindow; |
232
6d3ba9c44f95
Added the product archives tree by styles.
Michiel Broek <mbroek@mbse.eu>
parents:
231
diff
changeset
|
129 | ProdOnTree *ProdOnTreeWindow; |
74
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
130 | ProfileWaters *ProfileWatersWindow; |
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
131 | ProfileMashs *ProfileMashsWindow; |
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
132 | ProfileStyles *ProfileStylesWindow; |
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
133 | ProfileFerments *ProfileFermentsWindow; |
310
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
134 | MonNodes *MonNodesWindow; |
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
135 | MonFermenters *MonFermentersWindow; |
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
136 | MonCO2meters *MonCO2metersWindow; |
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
137 | MoniSpindels *MoniSpindelsWindow; |
275
f472f9773782
Added import from xml, equipments and beerstyles.
Michiel Broek <mbroek@mbse.eu>
parents:
234
diff
changeset
|
138 | ImportXML *ImportXMLWindow; |
387 | 139 | ImportBrew *ImportBrewWindow; |
74
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
140 | Setup *SetupWindow; |
65
2ef981980daa
Finally found out how to make these databases work on a single main window. And it's dynamic too.
Michiel Broek <mbroek@mbse.eu>
parents:
57
diff
changeset
|
141 | |
310
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
142 | signals: |
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
143 | void updateNodes(QString); |
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
144 | void updateFermenters(QString); |
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
145 | void updateCO2meters(QString); |
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
146 | void updateiSpindels(QString); |
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
147 | |
3 | 148 | private slots: |
275
f472f9773782
Added import from xml, equipments and beerstyles.
Michiel Broek <mbroek@mbse.eu>
parents:
234
diff
changeset
|
149 | void on_actionImport_XML_triggered(); |
387 | 150 | void on_actionImport_Brew_triggered(); |
4 | 151 | void on_actionExit_triggered(); |
310
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
152 | void on_actionMon_Nodes_triggered(); |
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
153 | void on_actionMon_Fermenters_triggered(); |
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
154 | void on_actionMon_CO2meters_triggered(); |
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
155 | void on_actionMon_iSpindels_triggered(); |
173
8514932b61aa
Added menu entry products in production
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
156 | void on_actionProd_inprod_triggered(); |
386
2e30c9c20d22
Added reports, total production, fermentations and efficiency.
Michiel Broek <mbroek@mbse.eu>
parents:
323
diff
changeset
|
157 | void on_actionRep_Production_triggered(); |
2e30c9c20d22
Added reports, total production, fermentations and efficiency.
Michiel Broek <mbroek@mbse.eu>
parents:
323
diff
changeset
|
158 | void on_actionRep_Efficiency_triggered(); |
2e30c9c20d22
Added reports, total production, fermentations and efficiency.
Michiel Broek <mbroek@mbse.eu>
parents:
323
diff
changeset
|
159 | void on_actionRep_Fermentation_triggered(); |
228
c859e8efa470
Added archive products on name.
Michiel Broek <mbroek@mbse.eu>
parents:
213
diff
changeset
|
160 | void on_actionOn_Name_triggered(); |
231
54b5abd46958
Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
228
diff
changeset
|
161 | void on_actionOn_Code_triggered(); |
234
51aea8b798f0
Add product archive tree by date.
Michiel Broek <mbroek@mbse.eu>
parents:
232
diff
changeset
|
162 | void on_actionOn_Date_triggered(); |
232
6d3ba9c44f95
Added the product archives tree by styles.
Michiel Broek <mbroek@mbse.eu>
parents:
231
diff
changeset
|
163 | void on_actionOn_Tree_triggered(); |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
78
diff
changeset
|
164 | void on_actionRecipes_triggered(); |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
165 | void on_actionSuppliers_triggered(); |
19
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
15
diff
changeset
|
166 | void on_actionFermentables_triggered(); |
24 | 167 | void on_actionHops_triggered(); |
25
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
168 | void on_actionYeasts_triggered(); |
480
94b3def5d778
Added yeastpack editor. Expanded the database upgrade. On startup, recount the yeastpack used fields.
Michiel Broek <mbroek@mbse.eu>
parents:
479
diff
changeset
|
169 | void on_actionYeastPacks_triggered(); |
28
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
170 | void on_actionMiscs_triggered(); |
29
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
171 | void on_actionWaters_triggered(); |
30
0fec6a1abd13
Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
29
diff
changeset
|
172 | void on_actionEquipments_triggered(); |
52
ff7b3a41c9b5
After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents:
49
diff
changeset
|
173 | void on_actionSupplies_list_triggered(); |
ff7b3a41c9b5
After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents:
49
diff
changeset
|
174 | void on_actionYeast_bank_triggered(); |
48
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
175 | void on_actionWater_profiles_triggered(); |
49
29cf6e350063
Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
176 | void on_actionMash_profiles_triggered(); |
56
eb6c564192f4
Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
52
diff
changeset
|
177 | void on_actionStyles_profiles_triggered(); |
57
75d11cc05ce4
Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
56
diff
changeset
|
178 | void on_actionFerments_profiles_triggered(); |
15
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
179 | void on_actionSetup_triggered(); |
4 | 180 | void on_actionAbout_triggered(); |
3 | 181 | |
182 | public slots: | |
275
f472f9773782
Added import from xml, equipments and beerstyles.
Michiel Broek <mbroek@mbse.eu>
parents:
234
diff
changeset
|
183 | void fromImportXML(); |
387 | 184 | void fromImportBrew(); |
310
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
185 | void fromMonNodes(); |
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
186 | void fromMonFermenters(); |
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
187 | void fromMonCO2meters(); |
bdaac24b86ed
Added monitor nodes overview
Michiel Broek <mbroek@mbse.eu>
parents:
308
diff
changeset
|
188 | void fromMoniSpindels(); |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
78
diff
changeset
|
189 | void fromRecipesTree(); |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
190 | void fromInventorySuppliers(); |
19
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
15
diff
changeset
|
191 | void fromInventoryFermentables(); |
24 | 192 | void fromInventoryHops(); |
25
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
193 | void fromInventoryYeasts(); |
480
94b3def5d778
Added yeastpack editor. Expanded the database upgrade. On startup, recount the yeastpack used fields.
Michiel Broek <mbroek@mbse.eu>
parents:
479
diff
changeset
|
194 | void fromInventoryYeastPacks(); |
28
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
195 | void fromInventoryMiscs(); |
29
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
196 | void fromInventoryWaters(); |
30
0fec6a1abd13
Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
29
diff
changeset
|
197 | void fromInventoryEquipments(); |
173
8514932b61aa
Added menu entry products in production
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
198 | void fromProdInprod(); |
228
c859e8efa470
Added archive products on name.
Michiel Broek <mbroek@mbse.eu>
parents:
213
diff
changeset
|
199 | void fromProdOnName(); |
231
54b5abd46958
Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
228
diff
changeset
|
200 | void fromProdOnCode(); |
234
51aea8b798f0
Add product archive tree by date.
Michiel Broek <mbroek@mbse.eu>
parents:
232
diff
changeset
|
201 | void fromProdOnDate(); |
232
6d3ba9c44f95
Added the product archives tree by styles.
Michiel Broek <mbroek@mbse.eu>
parents:
231
diff
changeset
|
202 | void fromProdOnTree(); |
48
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
203 | void fromProfileWaters(); |
49
29cf6e350063
Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
204 | void fromProfileMashs(); |
56
eb6c564192f4
Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
52
diff
changeset
|
205 | void fromProfileStyles(); |
57
75d11cc05ce4
Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
56
diff
changeset
|
206 | void fromProfileFerments(); |
15
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
207 | void fromSetup(); |
78
3a6cba2dd05d
Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents:
74
diff
changeset
|
208 | void windowTitle(QString); |
3a6cba2dd05d
Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents:
74
diff
changeset
|
209 | void statusMsg(QString); |
3 | 210 | |
211 | private: | |
212 | Ui::MainWindow *ui; | |
91
409d9c7214be
Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
213 | |
409d9c7214be
Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
214 | /** |
133
08635b028dcf
Load waters during recipe startup. Started calcWater() function. Load profile_setup record global. The print function uses the globals now too instead of loading from the database.
Michiel Broek <mbroek@mbse.eu>
parents:
131
diff
changeset
|
215 | * @brief Load profile_setup record and set global variables. |
08635b028dcf
Load waters during recipe startup. Started calcWater() function. Load profile_setup record global. The print function uses the globals now too instead of loading from the database.
Michiel Broek <mbroek@mbse.eu>
parents:
131
diff
changeset
|
216 | */ |
08635b028dcf
Load waters during recipe startup. Started calcWater() function. Load profile_setup record global. The print function uses the globals now too instead of loading from the database.
Michiel Broek <mbroek@mbse.eu>
parents:
131
diff
changeset
|
217 | void loadSetup(); |
08635b028dcf
Load waters during recipe startup. Started calcWater() function. Load profile_setup record global. The print function uses the globals now too instead of loading from the database.
Michiel Broek <mbroek@mbse.eu>
parents:
131
diff
changeset
|
218 | |
08635b028dcf
Load waters during recipe startup. Started calcWater() function. Load profile_setup record global. The print function uses the globals now too instead of loading from the database.
Michiel Broek <mbroek@mbse.eu>
parents:
131
diff
changeset
|
219 | /** |
479
28f0e43e9f08
Version 0.4.0. Added database upgrade procedure on startup. Make sure inventory_yeastpack database is created and has default entries. This will become a table with data for different yeast packs.
Michiel Broek <mbroek@mbse.eu>
parents:
387
diff
changeset
|
220 | * @brief Do database updates. |
28f0e43e9f08
Version 0.4.0. Added database upgrade procedure on startup. Make sure inventory_yeastpack database is created and has default entries. This will become a table with data for different yeast packs.
Michiel Broek <mbroek@mbse.eu>
parents:
387
diff
changeset
|
221 | */ |
28f0e43e9f08
Version 0.4.0. Added database upgrade procedure on startup. Make sure inventory_yeastpack database is created and has default entries. This will become a table with data for different yeast packs.
Michiel Broek <mbroek@mbse.eu>
parents:
387
diff
changeset
|
222 | void updateDataBase(); |
28f0e43e9f08
Version 0.4.0. Added database upgrade procedure on startup. Make sure inventory_yeastpack database is created and has default entries. This will become a table with data for different yeast packs.
Michiel Broek <mbroek@mbse.eu>
parents:
387
diff
changeset
|
223 | |
28f0e43e9f08
Version 0.4.0. Added database upgrade procedure on startup. Make sure inventory_yeastpack database is created and has default entries. This will become a table with data for different yeast packs.
Michiel Broek <mbroek@mbse.eu>
parents:
387
diff
changeset
|
224 | /** |
308
79f100a84f65
Add database maintenance to the startup code. Start some work ok parsing websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
225 | * @brief Do database maintenance. |
79f100a84f65
Add database maintenance to the startup code. Start some work ok parsing websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
226 | */ |
79f100a84f65
Add database maintenance to the startup code. Start some work ok parsing websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
227 | void maintDataBase(); |
79f100a84f65
Add database maintenance to the startup code. Start some work ok parsing websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
228 | |
79f100a84f65
Add database maintenance to the startup code. Start some work ok parsing websocket messages.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
229 | /** |
91
409d9c7214be
Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
230 | * @brief Open Websocket connection. |
409d9c7214be
Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
231 | * @param develop Is true if connect to develop server, else production. |
409d9c7214be
Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
232 | * @return Returns true if succes. |
409d9c7214be
Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
233 | */ |
409d9c7214be
Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
234 | bool openWS(bool develop); |
409d9c7214be
Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
235 | |
409d9c7214be
Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
236 | void wsConnected(); |
409d9c7214be
Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
237 | |
409d9c7214be
Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
238 | void wsClosed(); |
409d9c7214be
Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
239 | |
409d9c7214be
Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
240 | void wsTextMessageReceived(QString message); |
90
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
241 | |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
242 | /** |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
243 | * @brief Read user settings for the MySQL connection. |
133
08635b028dcf
Load waters during recipe startup. Started calcWater() function. Load profile_setup record global. The print function uses the globals now too instead of loading from the database.
Michiel Broek <mbroek@mbse.eu>
parents:
131
diff
changeset
|
244 | * Settings in $HOME/.config/mbse/bmsapp.ini |
90
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
245 | */ |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
246 | void readsettings(); |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
247 | |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
248 | /** |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
249 | * @brief Write or update the user settings for the MySQL connection. |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
250 | */ |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
251 | void writesettings(); |
3 | 252 | }; |
253 | ||
254 | #endif |