Mon, 06 Jun 2022 17:15:27 +0200
Fix default divide_size field in products. Update miscs table column 6 and 7 tooltips and display of the buttons after sort. After a new misc product is selected, update the current row index because the row may be moved. Fix some display misc values in the checklist, they were not multiplied by 1000. Fix display of some bars if the value was 24.
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" |
28
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
9 | #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
|
10 | #include "InventoryWaters.h" |
30
0fec6a1abd13
Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
29
diff
changeset
|
11 | #include "InventoryEquipments.h" |
173
8514932b61aa
Added menu entry products in production
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
12 | #include "ProdInprod.h" |
228
c859e8efa470
Added archive products on name.
Michiel Broek <mbroek@mbse.eu>
parents:
213
diff
changeset
|
13 | #include "ProdOnName.h" |
231
54b5abd46958
Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
228
diff
changeset
|
14 | #include "ProdOnCode.h" |
234
51aea8b798f0
Add product archive tree by date.
Michiel Broek <mbroek@mbse.eu>
parents:
232
diff
changeset
|
15 | #include "ProdOnDate.h" |
232
6d3ba9c44f95
Added the product archives tree by styles.
Michiel Broek <mbroek@mbse.eu>
parents:
231
diff
changeset
|
16 | #include "ProdOnTree.h" |
48
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
17 | #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
|
18 | #include "ProfileMashs.h" |
56
eb6c564192f4
Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
52
diff
changeset
|
19 | #include "ProfileStyles.h" |
57
75d11cc05ce4
Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
56
diff
changeset
|
20 | #include "ProfileFerments.h" |
15
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
21 | #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
|
22 | |
3 | 23 | #include <QMainWindow> |
24 | #include <QStandardItemModel> | |
25 | #include <QMenu> | |
26 | #include <QToolButton> | |
90
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
27 | #include <QApplication> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
28 | #include <QDateTime> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
29 | #include <QDebug> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
30 | #include <QDir> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
31 | // #include <QDomDocument> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
32 | #include <QFile> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
33 | #include <QList> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
34 | #include <QMetaProperty> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
35 | #include <QObject> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
36 | #include <QSettings> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
37 | #include <QString> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
38 | #include <QTextStream> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
39 | #include <QTranslator> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
40 | #include <QtSql> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
41 | #include <QUuid> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
42 | #include <QStyle> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
43 | #include <QPlainTextEdit> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
44 | #include <QMessageBox> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
45 | #include <QLabel> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
46 | #include <QImage> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
47 | #include <QImageReader> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
48 | #include <QImageWriter> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
49 | #include <QColorSpace> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
50 | #include <QGraphicsView> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
51 | #include <QFileDialog> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
52 | #include <QXmlStreamReader> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
53 | #include <QXmlStreamWriter> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
54 | #include <QJsonArray> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
55 | #include <QJsonDocument> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
56 | #include <QJsonObject> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
57 | #include <QMap> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
58 | #include <QPrinter> |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
59 | #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
|
60 | #include <QWebSocket> |
213
a167ee979cac
Added brew_log popup window.
Michiel Broek <mbroek@mbse.eu>
parents:
173
diff
changeset
|
61 | #include <QChart> |
a167ee979cac
Added brew_log popup window.
Michiel Broek <mbroek@mbse.eu>
parents:
173
diff
changeset
|
62 | #include <QValueAxis> |
a167ee979cac
Added brew_log popup window.
Michiel Broek <mbroek@mbse.eu>
parents:
173
diff
changeset
|
63 | #include <QDateTimeAxis> |
a167ee979cac
Added brew_log popup window.
Michiel Broek <mbroek@mbse.eu>
parents:
173
diff
changeset
|
64 | #include <QLineSeries> |
a167ee979cac
Added brew_log popup window.
Michiel Broek <mbroek@mbse.eu>
parents:
173
diff
changeset
|
65 | #include <QChartView> |
90
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
66 | |
213
a167ee979cac
Added brew_log popup window.
Michiel Broek <mbroek@mbse.eu>
parents:
173
diff
changeset
|
67 | using namespace QtCharts; |
90
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
68 | |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
69 | typedef struct IniMySQL |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
70 | { |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
71 | QString host; ///< MySQL host |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
72 | QString port; ///< MySQL port |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
73 | QString name; ///< MySQL database |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
74 | QString user; ///< MySQL username |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
75 | QString pass; ///< MySQL password |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
76 | QString charset; ///< MySQL character encoding |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
77 | } IniMySQL; |
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 | static IniMySQL dbProd; |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
80 | static IniMySQL dbDev; |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
81 | |
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
|
82 | |
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
|
83 | typedef struct IniWS |
90
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
84 | { |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
85 | QString host; ///< MQTT host |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
86 | 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
|
87 | } IniWS; |
90
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
88 | |
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
|
89 | 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
|
90 | 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
|
91 | |
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
|
92 | |
3 | 93 | namespace Ui { |
94 | class MainWindow; | |
95 | } | |
96 | ||
97 | class MainWindow : public QMainWindow | |
98 | { | |
4 | 99 | Q_OBJECT |
3 | 100 | |
101 | public: | |
90
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
102 | explicit MainWindow(bool useDevelopOption, bool startConfigOption, QWidget *parent = 0); |
4 | 103 | ~MainWindow(); |
3 | 104 | |
68
abac28effb21
Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
65
diff
changeset
|
105 | // 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
|
106 | 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
|
107 | InventorySuppliers *InventorySuppliersWindow; |
68
abac28effb21
Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
65
diff
changeset
|
108 | InventoryFermentables *InventoryFermentablesWindow; |
abac28effb21
Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
65
diff
changeset
|
109 | InventoryHops *InventoryHopsWindow; |
abac28effb21
Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
65
diff
changeset
|
110 | InventoryYeasts *InventoryYeastsWindow; |
abac28effb21
Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
65
diff
changeset
|
111 | InventoryMiscs *InventoryMiscsWindow; |
abac28effb21
Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
65
diff
changeset
|
112 | InventoryWaters *InventoryWatersWindow; |
abac28effb21
Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
65
diff
changeset
|
113 | InventoryEquipments *InventoryEquipmentsWindow; |
173
8514932b61aa
Added menu entry products in production
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
114 | ProdInprod *ProdInprodWindow; |
228
c859e8efa470
Added archive products on name.
Michiel Broek <mbroek@mbse.eu>
parents:
213
diff
changeset
|
115 | ProdOnName *ProdOnNameWindow; |
231
54b5abd46958
Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
228
diff
changeset
|
116 | ProdOnCode *ProdOnCodeWindow; |
234
51aea8b798f0
Add product archive tree by date.
Michiel Broek <mbroek@mbse.eu>
parents:
232
diff
changeset
|
117 | ProdOnDate *ProdOnDateWindow; |
232
6d3ba9c44f95
Added the product archives tree by styles.
Michiel Broek <mbroek@mbse.eu>
parents:
231
diff
changeset
|
118 | ProdOnTree *ProdOnTreeWindow; |
74
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
119 | ProfileWaters *ProfileWatersWindow; |
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
120 | ProfileMashs *ProfileMashsWindow; |
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
121 | ProfileStyles *ProfileStylesWindow; |
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
122 | ProfileFerments *ProfileFermentsWindow; |
4ac38457a709
Profile Waters now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
123 | 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
|
124 | |
3 | 125 | private slots: |
4 | 126 | void on_actionExit_triggered(); |
173
8514932b61aa
Added menu entry products in production
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
127 | void on_actionProd_inprod_triggered(); |
228
c859e8efa470
Added archive products on name.
Michiel Broek <mbroek@mbse.eu>
parents:
213
diff
changeset
|
128 | void on_actionOn_Name_triggered(); |
231
54b5abd46958
Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
228
diff
changeset
|
129 | void on_actionOn_Code_triggered(); |
234
51aea8b798f0
Add product archive tree by date.
Michiel Broek <mbroek@mbse.eu>
parents:
232
diff
changeset
|
130 | void on_actionOn_Date_triggered(); |
232
6d3ba9c44f95
Added the product archives tree by styles.
Michiel Broek <mbroek@mbse.eu>
parents:
231
diff
changeset
|
131 | 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
|
132 | 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
|
133 | void on_actionSuppliers_triggered(); |
19
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
15
diff
changeset
|
134 | void on_actionFermentables_triggered(); |
24 | 135 | void on_actionHops_triggered(); |
25
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
136 | void on_actionYeasts_triggered(); |
28
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
137 | 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
|
138 | void on_actionWaters_triggered(); |
30
0fec6a1abd13
Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
29
diff
changeset
|
139 | 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
|
140 | 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
|
141 | void on_actionYeast_bank_triggered(); |
48
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
142 | 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
|
143 | void on_actionMash_profiles_triggered(); |
56
eb6c564192f4
Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
52
diff
changeset
|
144 | void on_actionStyles_profiles_triggered(); |
57
75d11cc05ce4
Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
56
diff
changeset
|
145 | void on_actionFerments_profiles_triggered(); |
15
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
146 | void on_actionSetup_triggered(); |
4 | 147 | void on_actionAbout_triggered(); |
3 | 148 | |
149 | public slots: | |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
78
diff
changeset
|
150 | 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
|
151 | void fromInventorySuppliers(); |
19
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
15
diff
changeset
|
152 | void fromInventoryFermentables(); |
24 | 153 | void fromInventoryHops(); |
25
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
154 | void fromInventoryYeasts(); |
28
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
155 | 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
|
156 | void fromInventoryWaters(); |
30
0fec6a1abd13
Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
29
diff
changeset
|
157 | void fromInventoryEquipments(); |
173
8514932b61aa
Added menu entry products in production
Michiel Broek <mbroek@mbse.eu>
parents:
133
diff
changeset
|
158 | void fromProdInprod(); |
228
c859e8efa470
Added archive products on name.
Michiel Broek <mbroek@mbse.eu>
parents:
213
diff
changeset
|
159 | void fromProdOnName(); |
231
54b5abd46958
Added archive products sorted on code.
Michiel Broek <mbroek@mbse.eu>
parents:
228
diff
changeset
|
160 | void fromProdOnCode(); |
234
51aea8b798f0
Add product archive tree by date.
Michiel Broek <mbroek@mbse.eu>
parents:
232
diff
changeset
|
161 | void fromProdOnDate(); |
232
6d3ba9c44f95
Added the product archives tree by styles.
Michiel Broek <mbroek@mbse.eu>
parents:
231
diff
changeset
|
162 | void fromProdOnTree(); |
48
ddd1171ecda5
Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
30
diff
changeset
|
163 | 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
|
164 | void fromProfileMashs(); |
56
eb6c564192f4
Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
52
diff
changeset
|
165 | void fromProfileStyles(); |
57
75d11cc05ce4
Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
56
diff
changeset
|
166 | void fromProfileFerments(); |
15
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
167 | 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
|
168 | 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
|
169 | void statusMsg(QString); |
3 | 170 | |
171 | private: | |
172 | 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
|
173 | QWebSocket *webSocket; |
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
|
174 | |
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
|
175 | /** |
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
|
176 | * @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
|
177 | */ |
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
|
178 | 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
|
179 | |
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
|
180 | /** |
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
|
181 | * @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
|
182 | * @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
|
183 | * @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
|
184 | */ |
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
|
185 | 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
|
186 | |
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
|
187 | 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
|
188 | |
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
|
189 | 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
|
190 | |
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
|
191 | void wsTextMessageReceived(QString message); |
90
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
192 | |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
193 | /** |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
194 | * @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
|
195 | * 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
|
196 | */ |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
197 | void readsettings(); |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
198 | |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
199 | /** |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
200 | * @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
|
201 | */ |
2396457a8167
Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
202 | void writesettings(); |
3 | 203 | }; |
204 | ||
205 | #endif |