src/EditWater.h

Thu, 18 Aug 2022 20:34:15 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Thu, 18 Aug 2022 20:34:15 +0200
changeset 401
583148eb6e01
parent 385
09af9f46518f
permissions
-rw-r--r--

Init est_carb field for new products.

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:
diff changeset
1 #ifndef _EDITWATER_H
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:
diff changeset
2 #define _EDITWATER_H
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:
diff changeset
3
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:
diff changeset
4 #include <QDialog>
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:
diff changeset
5
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:
diff changeset
6
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:
diff changeset
7 namespace Ui {
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:
diff changeset
8 class EditWater;
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:
diff changeset
9 }
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:
diff changeset
10
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:
diff changeset
11 class EditWater : public QDialog
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:
diff changeset
12 {
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:
diff changeset
13 Q_OBJECT
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:
diff changeset
14
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:
diff changeset
15 signals:
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:
diff changeset
16 void entry_changed();
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:
diff changeset
17
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:
diff changeset
18 public:
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:
diff changeset
19 explicit EditWater(int id, QWidget *parent = 0);
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:
diff changeset
20 ~EditWater();
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:
diff changeset
21
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:
diff changeset
22 private slots:
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:
diff changeset
23 void on_saveButton_clicked();
385
09af9f46518f All profile and inventory editors now log warnings if something went wrong. Also added a Clone button. Delete now asks for confirmation.
Michiel Broek <mbroek@mbse.eu>
parents: 353
diff changeset
24 void on_cloneButton_clicked();
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:
diff changeset
25 void on_quitButton_clicked();
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:
diff changeset
26 void on_deleteButton_clicked();
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:
diff changeset
27 void is_changed();
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:
diff changeset
28 void water_changed();
353
324a7268796b Updated watersources editors to include water hardness and residual alkalinity. Layout changes. Only total_alkalinity edit, bicarbonate is now only calculated.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
29 void calcium_changed(double val);
324a7268796b Updated watersources editors to include water hardness and residual alkalinity. Layout changes. Only total_alkalinity edit, bicarbonate is now only calculated.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
30 void total_alkalinity_changed(double val);
324a7268796b Updated watersources editors to include water hardness and residual alkalinity. Layout changes. Only total_alkalinity edit, bicarbonate is now only calculated.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
31 void sulfate_changed(double val);
324a7268796b Updated watersources editors to include water hardness and residual alkalinity. Layout changes. Only total_alkalinity edit, bicarbonate is now only calculated.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
32 void chloride_changed(double val);
324a7268796b Updated watersources editors to include water hardness and residual alkalinity. Layout changes. Only total_alkalinity edit, bicarbonate is now only calculated.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
33 void sodium_changed(double val);
324a7268796b Updated watersources editors to include water hardness and residual alkalinity. Layout changes. Only total_alkalinity edit, bicarbonate is now only calculated.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
34 void magnesium_changed(double val);
324a7268796b Updated watersources editors to include water hardness and residual alkalinity. Layout changes. Only total_alkalinity edit, bicarbonate is now only calculated.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
35 void ph_changed(double val);
324a7268796b Updated watersources editors to include water hardness and residual alkalinity. Layout changes. Only total_alkalinity edit, bicarbonate is now only calculated.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
36 void nitrate_changed(double val);
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:
diff changeset
37
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:
diff changeset
38 private:
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:
diff changeset
39 Ui::EditWater *ui;
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:
diff changeset
40 int recno;
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:
diff changeset
41 bool textIsChanged = false;
353
324a7268796b Updated watersources editors to include water hardness and residual alkalinity. Layout changes. Only total_alkalinity edit, bicarbonate is now only calculated.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
42 double calcium, bicarbonate, sulfate, chloride, sodium, magnesium, ph, total_alkalinity, nitrate;
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:
diff changeset
43
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:
diff changeset
44 void WindowTitle();
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:
diff changeset
45 void WaterSet();
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:
diff changeset
46 };
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:
diff changeset
47
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:
diff changeset
48 #endif

mercurial