src/ProfileFerments.cpp

Sat, 19 Mar 2022 19:22:58 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 19 Mar 2022 19:22:58 +0100
changeset 64
b0d30697af67
parent 57
75d11cc05ce4
child 77
86a3277a7317
permissions
-rw-r--r--

First step in loading the Inventory Suppliers database on the mainscreen. But, it is loaded at program start en not removed when done. Weird programming to get this working.

57
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 /**
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 * ProfileFerments.cpp is part of bmsapp.
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3 *
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 * bmsapp is free software: you can redistribute it and/or modify
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5 * it under the terms of the GNU General Public License as published by
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6 * the Free Software Foundation, either version 3 of the License, or
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 * (at your option) any later version.
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8 *
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9 * bmsapp is distributed in the hope that it will be useful,
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 * GNU General Public License for more details.
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13 *
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
16 */
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17 #include "ProfileFerments.h"
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
18 #include "EditProfileFerment.h"
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
19 #include "../ui/ui_ProfileFerments.h"
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20 #include "config.h"
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21 #include "bmsapp.h"
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
23
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
24 ProfileFerments::ProfileFerments(QWidget *parent) : QDialog(parent), ui(new Ui::ProfileFerments)
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
25 {
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
26 qDebug() << "ProfileFerments start";
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
27
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
28 ui->setupUi(this);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
29 emit refreshTable();
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
30
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
31 setWindowTitle( QString("BMSapp - %1 - Profile Fermentation").arg(VERSIONSTRING) );
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
32 }
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
33
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
34
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
35 void ProfileFerments::refreshTable()
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
36 {
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
37 QString w;
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
38 QWidget* pWidget;
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
39 QLabel *label;
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
40 QHBoxLayout* pLayout;
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
41
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
42 qDebug() << "ProfileFerments reload";
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
43
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
44 QSqlQuery query("SELECT * FROM profile_fermentation ORDER BY name");
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
45 const QStringList labels({tr("Name"), tr("Start low"), tr("Start high"), tr("Sensor"), tr("Steps"), tr("Duration"), tr("Edit")});
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
46
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
47 ui->tableFerments->setColumnCount(7);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
48 ui->tableFerments->setColumnWidth(0, 450); /* Name */
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
49 ui->tableFerments->setColumnWidth(1, 90); /* Min temp */
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
50 ui->tableFerments->setColumnWidth(2, 90); /* Max temp */
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
51 ui->tableFerments->setColumnWidth(3, 75); /* Sensor */
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
52 ui->tableFerments->setColumnWidth(4, 75); /* Steps */
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
53 ui->tableFerments->setColumnWidth(5, 120); /* Duration */
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
54 ui->tableFerments->setColumnWidth(6, 80); /* Edit button */
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
55 ui->tableFerments->setRowCount(query.size());
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
56 ui->tableFerments->setHorizontalHeaderLabels(labels);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
57 ui->tableFerments->verticalHeader()->hide();
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
58 ui->tableFerments->setFixedSize(980 + 24, 640); /* Even if this is too large, it works */
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
59
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
60 QTableWidgetItem *rightitem = new QTableWidgetItem();
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
61 rightitem->setTextAlignment(Qt::AlignRight);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
62
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
63 query.first();
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
64 for (int ridx = 0 ; ridx < query.size() ; ridx++ ) {
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
65 ui->tableFerments->setItem(ridx, 0, new QTableWidgetItem(query.value(2).toString())); /* Name */
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
66
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
67 w = QString("%1 °C").arg(query.value(3).toDouble(), 2, 'f', 1, '0' ); /* Min start temp */
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
68 QTableWidgetItem *item = new QTableWidgetItem(w);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
69 item->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
70 ui->tableFerments->setItem(ridx, 1, item);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
71
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
72 w = QString("%1 °C").arg(query.value(4).toDouble(), 2, 'f', 1, '0' ); /* Max start temp */
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
73 item = new QTableWidgetItem(w);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
74 item->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
75 ui->tableFerments->setItem(ridx, 2, item);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
76
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
77 w = (query.value(5).toInt()) ? tr("Fridge") : tr("Beer"); /* Initial sensor */
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
78 item = new QTableWidgetItem(w);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
79 item->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
80 ui->tableFerments->setItem(ridx, 3, item);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
81
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
82 w = QString("%1").arg(query.value(6).toInt()); /* Number of steps */
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
83 item = new QTableWidgetItem(w);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
84 item->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
85 ui->tableFerments->setItem(ridx, 4, item);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
86
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
87 w = Utils::hours_to_string(query.value(7).toInt()); /* Duration */
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
88 item = new QTableWidgetItem(w);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
89 item->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
90 ui->tableFerments->setItem(ridx, 5, item);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
91
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
92 /* Add the Edit button */
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
93 pWidget = new QWidget();
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
94 QPushButton* btn_edit = new QPushButton();
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
95 btn_edit->setObjectName(QString("%1").arg(query.value(0).toString())); /* Send record with the button */
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
96 btn_edit->setText(tr("Edit"));
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
97 connect(btn_edit, SIGNAL(clicked()), this, SLOT(on_editButton_clicked()));
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
98 pLayout = new QHBoxLayout(pWidget);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
99 pLayout->addWidget(btn_edit);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
100 pLayout->setContentsMargins(5, 0, 5, 0);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
101 pWidget->setLayout(pLayout);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
102 ui->tableFerments->setCellWidget(ridx, 6, pWidget);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
103 query.next();
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
104 }
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
105 }
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
106
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
107
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
108 ProfileFerments::~ProfileFerments()
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
109 {
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
110 qDebug() << "ProfileFerments done";
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
111 delete ui;
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
112 }
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
113
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
114
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
115 void ProfileFerments::edit(int recno)
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
116 {
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
117 qDebug() << "ProfileFerments edit:" << recno;
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
118
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
119 EditProfileFerment dialog(recno, this);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
120 /* Signal from editor if a refresh is needed */
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
121 connect(&dialog, SIGNAL(entry_changed()), this, SLOT(refreshTable()));
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
122 dialog.setModal(true);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
123 dialog.exec();
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
124 }
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
125
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
126
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
127 void ProfileFerments::on_editButton_clicked()
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
128 {
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
129 QPushButton *pb = qobject_cast<QPushButton *>(QObject::sender());
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
130 int recno = pb->objectName().toInt();
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
131 qDebug() << Q_FUNC_INFO << recno;
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
132 edit(recno);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
133 }
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
134
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
135
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
136 void ProfileFerments::on_insertButton_clicked()
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
137 {
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
138 qDebug() << Q_FUNC_INFO;
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
139 edit(-1);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
140 }
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
141
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
142
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
143 void ProfileFerments::on_quitButton_clicked()
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
144 {
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
145 emit firstWindow();
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
146 }
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
147

mercurial