src/EditYeast.cpp

Mon, 21 Feb 2022 21:17:33 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Mon, 21 Feb 2022 21:17:33 +0100
changeset 25
a9da2744609e
child 26
dfc4df8f9632
permissions
-rw-r--r--

Added inventory yeasts editor. Fixed resource icons location.

25
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 /**
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 * EditYeast.cpp is part of bmsapp.
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3 *
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 * bmsapp is free software: you can redistribute it and/or modify
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5 * it under the terms of the GNU General Public License as published by
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6 * the Free Software Foundation, either version 3 of the License, or
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 * (at your option) any later version.
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8 *
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9 * bmsapp is distributed in the hope that it will be useful,
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 * GNU General Public License for more details.
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13 *
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
16 */
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17 #include "EditYeast.h"
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
18 #include "../ui/ui_EditYeast.h"
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
19 #include "bmsapp.h"
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22 EditYeast::EditYeast(int id, QWidget *parent) : QDialog(parent), ui(new Ui::EditYeast)
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
23 {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
24 QSqlQuery query;
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
25
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
26 qDebug() << "EditYeast record:" << id;
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
27 ui->setupUi(this);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
28 this->recno = id;
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
29
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
30 WindowTitle();
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
31
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
32 ui->typeEdit->addItem(tr("Lager"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
33 ui->typeEdit->addItem(tr("Ale"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
34 ui->typeEdit->addItem(tr("Wheat"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
35 ui->typeEdit->addItem(tr("Wine"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
36 ui->typeEdit->addItem(tr("Champagne"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
37 ui->typeEdit->addItem(tr("Brett"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
38 ui->typeEdit->addItem(tr("Kveik"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
39 ui->typeEdit->addItem(tr("Hybrid"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
40
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
41 ui->formEdit->addItem(tr("Liquid"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
42 ui->formEdit->addItem(tr("Dry"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
43 ui->formEdit->addItem(tr("Slant"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
44 ui->formEdit->addItem(tr("Culture"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
45 ui->formEdit->addItem(tr("Frozen"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
46 ui->formEdit->addItem(tr("Bottle"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
47 ui->formEdit->addItem(tr("Dried"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
48
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
49 ui->flocEdit->addItem(tr("Low"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
50 ui->flocEdit->addItem(tr("Medium"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
51 ui->flocEdit->addItem(tr("High"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
52 ui->flocEdit->addItem(tr("Very high"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
53
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
54 if (id >= 0) {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
55 query.prepare("SELECT * FROM inventory_yeasts WHERE record = :recno");
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
56 query.bindValue(":recno", id);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
57 query.exec();
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
58 query.next();
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
59
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
60 ui->nameEdit->setText(query.value(1).toString());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
61 ui->typeEdit->setCurrentIndex(query.value(2).toInt());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
62 ui->formEdit->setCurrentIndex(query.value(3).toInt());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
63 ui->laboratoryEdit->setText(query.value(4).toString());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
64 ui->productidEdit->setText(query.value(5).toString());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
65 ui->temploEdit->setValue(query.value(6).toDouble());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
66 ui->temphiEdit->setValue(query.value(7).toDouble());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
67 ui->flocEdit->setCurrentIndex(query.value(8).toInt());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
68 ui->attEdit->setValue(query.value(9).toDouble());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
69 ui->toleranceEdit->setValue(query.value(10).toDouble());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
70 ui->notesEdit->setPlainText(query.value(11).toString());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
71 ui->bestforEdit->setPlainText(query.value(12).toString());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
72 ui->reuseEdit->setValue(query.value(13).toInt());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
73 if (query.value(3).toInt() == 0)
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
74 ui->inventoryEdit->setValue(query.value(14).toDouble()); /* Liquid */
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
75 else
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
76 ui->inventoryEdit->setValue(query.value(14).toDouble() * 1000);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
77 ui->costEdit->setValue(query.value(15).toDouble());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
78 SetForm(query.value(3).toInt());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
79 if (query.value(16).toString().length() == 10) {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
80 ui->prodEdit->setDate(query.value(16).toDate());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
81 } else {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
82 ui->prodEdit->clear();
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
83 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
84 if (query.value(17).toString().length() == 10) {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
85 ui->thtEdit->setDate(query.value(17).toDate());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
86 } else {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
87 ui->thtEdit->clear();
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
88 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
89 ui->cellsEdit->setValue(query.value(18).toDouble() / 1000000000);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
90 ui->sta1Edit->setChecked(query.value(19).toInt() ? true:false);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
91 ui->bacteriaEdit->setChecked(query.value(20).toInt() ? true:false);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
92 ui->harvesttopEdit->setChecked(query.value(21).toInt() ? true:false);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
93 ui->harvesttimeEdit->setValue(query.value(22).toInt());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
94 ui->pitchtempEdit->setValue(query.value(23).toDouble());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
95 ui->pofEdit->setChecked(query.value(24).toInt() ? true:false);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
96 ui->yeastbankEdit->setText(query.value(26).toString());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
97 ui->grhlloEdit->setValue(query.value(27).toInt());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
98 ui->sgloEdit->setValue(query.value(28).toDouble());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
99 ui->grhlhiEdit->setValue(query.value(29).toInt());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
100 ui->sghiEdit->setValue(query.value(30).toDouble());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
101 } else {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
102 /* Set some defaults */
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
103 ui->typeEdit->setCurrentIndex(1);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
104 ui->formEdit->setCurrentIndex(1);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
105 SetForm(1);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
106 ui->temploEdit->setValue(18.0);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
107 ui->temphiEdit->setValue(22.0);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
108 ui->attEdit->setValue(77.0);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
109 ui->reuseEdit->setValue(10);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
110 ui->grhlloEdit->setValue(50);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
111 ui->sgloEdit->setValue(1.050);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
112 ui->grhlhiEdit->setValue(80);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
113 ui->sghiEdit->setValue(1.080);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
114 ui->prodEdit->clear();
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
115 ui->thtEdit->clear();
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
116 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
117 connect(ui->nameEdit, &QLineEdit::textChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
118 connect(ui->typeEdit, &QComboBox::currentTextChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
119 connect(ui->formEdit, &QComboBox::currentTextChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
120 connect(ui->laboratoryEdit, &QLineEdit::textChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
121 connect(ui->productidEdit, &QLineEdit::textChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
122 connect(ui->temploEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::temp_lo_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
123 connect(ui->temphiEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::temp_hi_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
124 connect(ui->flocEdit, &QComboBox::currentTextChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
125 connect(ui->attEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
126 connect(ui->toleranceEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
127 connect(ui->notesEdit, SIGNAL(textChanged()), this, SLOT(is_changed()));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
128 connect(ui->bestforEdit, SIGNAL(textChanged()), this, SLOT(is_changed()));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
129 connect(ui->reuseEdit, &QSpinBox::textChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
130 connect(ui->inventoryEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
131 connect(ui->costEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
132 connect(ui->prodEdit, &QDateEdit::dateChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
133 connect(ui->thtEdit, &QDateEdit::dateChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
134 connect(ui->cellsEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
135 connect(ui->sta1Edit, &QCheckBox::stateChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
136 connect(ui->bacteriaEdit, &QCheckBox::stateChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
137 connect(ui->harvesttopEdit, &QCheckBox::stateChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
138 connect(ui->harvesttimeEdit, &QSpinBox::textChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
139 connect(ui->pitchtempEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
140 connect(ui->pofEdit, &QCheckBox::stateChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
141 connect(ui->yeastbankEdit, &QLineEdit::textChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
142 connect(ui->grhlloEdit, &QSpinBox::textChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
143 connect(ui->sgloEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
144 connect(ui->grhlhiEdit, &QSpinBox::textChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
145 connect(ui->sghiEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::is_changed);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
146
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
147 ui->saveButton->setEnabled(false);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
148 ui->deleteButton->setEnabled((ui->inventoryEdit->value() == 0 && id >= 0) ? true:false);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
149 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
150
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
151
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
152 EditYeast::~EditYeast()
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
153 {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
154 qDebug() << "EditYeast done";
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
155 delete ui;
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
156 emit entry_changed();
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
157 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
158
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
159
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
160 void EditYeast::SetForm(int form)
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
161 {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
162 if (form == 0) {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
163 /*
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
164 * Liquid yeast
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
165 */
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
166 ui->costLabel->setText(tr("Price per pack:"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
167 ui->inventoryLabel->setText(tr("Inventory Packs:"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
168 ui->cellsLabel->setText(tr("Billion cells/pack:"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
169 ui->inventoryEdit->setDecimals(0);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
170 ui->inventoryEdit->setSingleStep(1.0);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
171 ui->valueEdit->setValue(ui->inventoryEdit->value() * ui->costEdit->value());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
172 } else if (form == 1 || form == 6) {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
173 /*
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
174 * Dry or dried yeast
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
175 */
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
176 ui->costLabel->setText(tr("Price per Kg:"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
177 ui->inventoryLabel->setText(tr("Inventory gram:"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
178 ui->cellsLabel->setText(tr("Billion cells/gram:"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
179 ui->inventoryEdit->setDecimals(1);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
180 ui->inventoryEdit->setSingleStep(0.5);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
181 ui->valueEdit->setValue((ui->inventoryEdit->value() / 1000) * ui->costEdit->value());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
182 } else {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
183 /*
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
184 * All others
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
185 */
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
186 ui->costLabel->setText(tr("Price per litre:"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
187 ui->inventoryLabel->setText(tr("Inventory ml:"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
188 ui->cellsLabel->setText(tr("Billion cells/ml:"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
189 ui->inventoryEdit->setDecimals(1);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
190 ui->inventoryEdit->setSingleStep(0.5);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
191 ui->valueEdit->setValue((ui->inventoryEdit->value() / 1000) * ui->costEdit->value());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
192 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
193 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
194
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
195
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
196
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
197 /*
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
198 * Window header, mark any change with '**'
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
199 */
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
200 void EditYeast::WindowTitle()
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
201 {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
202 QString txt;
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
203
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
204 if (this->recno < 0) {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
205 txt = QString(tr("BMSapp - Add new hop"));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
206 } else {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
207 txt = QString(tr("BMSapp - Edit hop %1").arg(this->recno));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
208 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
209
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
210 if (this->textIsChanged) {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
211 txt.append((QString(" **")));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
212 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
213 setWindowTitle(txt);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
214 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
215
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
216
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
217 void EditYeast::on_saveButton_clicked()
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
218 {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
219 QSqlQuery query;
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
220
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
221 /* If there are errors in the form, show a message and do "return;" */
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
222 if (ui->nameEdit->text().length() < 2) {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
223 QMessageBox::warning(this, tr("Edit Yeast"), tr("Name empty or too short."));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
224 return;
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
225 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
226 if (ui->laboratoryEdit->text().length() < 2) {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
227 QMessageBox::warning(this, tr("Edit Yeast"), tr("Laboratory empty or too short."));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
228 return;
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
229 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
230
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
231 if (this->textIsChanged) {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
232 if (this->recno == -1) {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
233 query.prepare("INSERT INTO inventory_yeasts SET name=:name, type=:type, form=:form, "
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
234 "laboratory=:laboratory, product_id=:productid, min_temperature=:templo, max_temperature=:temphi, "
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
235 "flocculation=:floc, attenuation=:att, tolerance=:tolerance, notes=:notes, best_for=:bestfor, "
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
236 "max_reuse=:reuse, inventory=:inventory, cost=:cost, production_date=:prod, tht_date=:tht, "
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
237 "cells=:cells, sta1=:sta1, bacteria=:bacteria, harvest_top=:harvesttop, harvest_time=:harvesttime, "
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
238 "pitch_temperature=:pitchtemp, pofpos=:pof, short_desc=:yeastbank, gr_hl_lo=:grhllo, sg_lo=:sglo, "
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
239 "gr_hl_hi=:grhlhi, sg_hi=:sghi, uuid = :uuid");
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
240 } else {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
241 query.prepare("UPDATE inventory_yeasts SET name=:name, type=:type, form=:form, "
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
242 "laboratory=:laboratory, product_id=:productid, min_temperature=:templo, max_temperature=:temphi, "
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
243 "flocculation=:floc, attenuation=:att, tolerance=:tolerance, notes=:notes, best_for=:bestfor, "
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
244 "max_reuse=:reuse, inventory=:inventory, cost=:cost, production_date=:prod, tht_date=:tht, "
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
245 "cells=:cells, sta1=:sta1, bacteria=:bacteria, harvest_top=:harvesttop, harvest_time=:harvesttime, "
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
246 "pitch_temperature=:pitchtemp, pofpos=:pof, short_desc=:yeastbank, gr_hl_lo=:grhllo, sg_lo=:sglo, "
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
247 "gr_hl_hi=:grhlhi, sg_hi=:sghi WHERE record = :recno");
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
248 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
249 query.bindValue(":name", ui->nameEdit->text());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
250 query.bindValue(":type", ui->typeEdit->currentIndex());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
251 query.bindValue(":form", ui->formEdit->currentIndex());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
252 query.bindValue(":laboratory", ui->laboratoryEdit->text());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
253 query.bindValue(":productid", ui->productidEdit->text());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
254 query.bindValue(":templo", QString("%1").arg(ui->temploEdit->value(), 2, 'f', 1, '0'));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
255 query.bindValue(":temphi", QString("%1").arg(ui->temphiEdit->value(), 2, 'f', 1, '0'));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
256 query.bindValue(":floc", ui->flocEdit->currentIndex());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
257 query.bindValue(":att", QString("%1").arg(ui->attEdit->value(), 2, 'f', 1, '0'));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
258 query.bindValue(":tolerance", QString("%1").arg(ui->toleranceEdit->value(), 2, 'f', 1, '0'));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
259 query.bindValue(":notes", ui->notesEdit->toPlainText());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
260 query.bindValue(":bestfor", ui->bestforEdit->toPlainText());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
261 query.bindValue(":reuse", ui->reuseEdit->value());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
262 if (ui->formEdit->currentIndex() == 0)
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
263 query.bindValue(":inventory", QString("%1").arg(ui->inventoryEdit->value(), 5, 'f', 4, '0'));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
264 else
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
265 query.bindValue(":inventory", QString("%1").arg(ui->inventoryEdit->value() / 1000, 5, 'f', 4, '0'));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
266 query.bindValue(":cost", QString("%1").arg(ui->costEdit->value(), 3, 'f', 2, '0'));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
267 /* Uses https://www.qtcentre.org/threads/17295-How-to-put-empty-value-in-QDateEdit */
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
268 query.bindValue(":prod", ui->prodEdit->nullDate());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
269 query.bindValue(":tht", ui->thtEdit->nullDate());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
270 query.bindValue(":cells", QString("%1").arg(ui->cellsEdit->value() * 1000000000, 1, 'f', 0, '0'));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
271 query.bindValue(":sta1", ui->sta1Edit->isChecked() ? 1:0);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
272 query.bindValue(":bacteria", ui->bacteriaEdit->isChecked() ? 1:0);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
273 query.bindValue(":harvesttop", ui->harvesttopEdit->isChecked() ? 1:0);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
274 query.bindValue(":harvesttime", ui->harvesttimeEdit->value());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
275 query.bindValue(":pitchtemp", QString("%1").arg(ui->pitchtempEdit->value(), 2, 'f', 1, '0'));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
276 query.bindValue(":pof", ui->pofEdit->isChecked() ? 1:0);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
277 query.bindValue(":yeastbank", ui->yeastbankEdit->text());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
278 query.bindValue(":grhllo", QString("%1").arg(ui->grhlloEdit->value(), 2, 'f', 1, '0'));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
279 query.bindValue(":sglo", ui->sgloEdit->value());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
280 query.bindValue(":grhlhi", QString("%1").arg(ui->grhlhiEdit->value(), 2, 'f', 1, '0'));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
281 query.bindValue(":sghi", ui->sghiEdit->value());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
282 if (this->recno == -1) {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
283 query.bindValue(":uuid", QUuid::createUuid().toString().mid(1, 36));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
284 } else {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
285 query.bindValue(":recno", this->recno);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
286 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
287 query.exec();
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
288 if (query.lastError().isValid()) {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
289 qDebug() << "EditYeast" << query.lastError();
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
290 QMessageBox::warning(this, tr("Database error"),
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
291 tr("MySQL error: %1\n%2\n%3")
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
292 .arg(query.lastError().nativeErrorCode())
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
293 .arg(query.lastError().driverText())
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
294 .arg(query.lastError().databaseText()));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
295 } else {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
296 qDebug() << "EditYeast Saved";
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
297 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
298 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
299
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
300 ui->saveButton->setEnabled(false);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
301 this->textIsChanged = false;
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
302 WindowTitle();
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
303 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
304
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
305
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
306 void EditYeast::on_deleteButton_clicked()
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
307 {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
308 QSqlQuery query;
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
309
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
310 query.prepare("DELETE FROM inventory_yeasts WHERE record = :recno");
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
311 query.bindValue(":recno", this->recno);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
312 query.exec();
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
313 if (query.lastError().isValid()) {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
314 qDebug() << "EditYeast" << query.lastError();
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
315 QMessageBox::warning(this, tr("Database error"),
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
316 tr("MySQL error: %1\n%2\n%3")
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
317 .arg(query.lastError().nativeErrorCode())
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
318 .arg(query.lastError().driverText())
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
319 .arg(query.lastError().databaseText()));
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
320 } else {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
321 qDebug() << "EditYeast Deleted" << this->recno;
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
322 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
323
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
324 this->close();
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
325 this->setResult(1);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
326 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
327
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
328
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
329 void EditYeast::is_changed()
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
330 {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
331 SetForm(ui->formEdit->currentIndex());
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
332 ui->saveButton->setEnabled(true);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
333 ui->deleteButton->setEnabled((ui->inventoryEdit->value() == 0 && this->recno >= 0) ? true:false);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
334 this->textIsChanged = true;
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
335 WindowTitle();
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
336 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
337
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
338
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
339 void EditYeast::temp_lo_changed()
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
340 {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
341 if (ui->temploEdit->value() > (ui->temphiEdit->value() - 1))
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
342 ui->temphiEdit->setValue(ui->temploEdit->value() + 1);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
343 is_changed();
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
344 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
345
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
346
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
347 void EditYeast::temp_hi_changed()
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
348 {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
349 if (ui->temphiEdit->value() < (ui->temploEdit->value() + 1))
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
350 ui->temploEdit->setValue(ui->temphiEdit->value() - 1);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
351 is_changed();
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
352 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
353
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
354
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
355 void EditYeast::on_quitButton_clicked()
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
356 {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
357 if (this->textIsChanged) {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
358 int rc = QMessageBox::warning(this, tr("Yeast changed"), tr("The yeast has been modified\n Save changes?"),
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
359 QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Save);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
360 switch (rc) {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
361 case QMessageBox::Save:
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
362 on_saveButton_clicked();
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
363 break; /* Saved and then Quit */
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
364 case QMessageBox::Discard:
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
365 break; /* Quit without Save */
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
366 case QMessageBox::Cancel:
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
367 return; /* Return to the editor page */
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
368 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
369 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
370
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
371 this->close();
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
372 this->setResult(1);
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
373 }

mercurial