src/Setup.cpp

Tue, 05 Mar 2024 10:39:36 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Tue, 05 Mar 2024 10:39:36 +0100
changeset 522
987bf1122d0d
parent 430
ef2638cfc1b7
permissions
-rw-r--r--

Version 0.4.4

15
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 /**
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 * Setup.cpp is part of bmsapp.
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3 *
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 * bmsapp is free software: you can redistribute it and/or modify
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5 * it under the terms of the GNU General Public License as published by
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6 * the Free Software Foundation, either version 3 of the License, or
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 * (at your option) any later version.
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8 *
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9 * bmsapp is distributed in the hope that it will be useful,
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 * GNU General Public License for more details.
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13 *
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
16 */
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17 #include "Setup.h"
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
18 #include "config.h"
336
e97f9e87d94b IBU method names are now global.
Michiel Broek <mbroek@mbse.eu>
parents: 309
diff changeset
19 #include "global.h"
90
2396457a8167 Moved functions from bmsapp.cpp to MainWindow.cpp
Michiel Broek <mbroek@mbse.eu>
parents: 78
diff changeset
20 #include "MainWindow.h"
15
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
23
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
24 Setup::Setup(QWidget *parent) : QDialog(parent)
15
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
25 {
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
26 QSqlQuery query;
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
27 QGridLayout *gridLayout;
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
28 QWidget *topWidget;
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
29 QFrame *line;
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
30
15
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
31 qDebug() << "Setup start";
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
32
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
33 gridLayout = new QGridLayout(this);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
34 gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
35 topWidget = new QWidget(this);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
36 topWidget->setObjectName(QString::fromUtf8("topWidget"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
37
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
38 breweryLabel = new QLabel(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
39 breweryLabel->setObjectName(QString::fromUtf8("breweryLabel"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
40 breweryLabel->setGeometry(QRect(60, 20, 131, 20));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
41 breweryLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
42 breweryLabel->setText(tr("Brewery name:"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
43 breweryEdit = new QLineEdit(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
44 breweryEdit->setObjectName(QString::fromUtf8("breweryEdit"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
45 breweryEdit->setGeometry(QRect(212, 20, 941, 23));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
46 breweryEdit->setToolTip(tr("The name for this brewery."));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
47
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
48 line = new QFrame(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
49 line->setObjectName(QString::fromUtf8("line"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
50 line->setGeometry(QRect(0, 60, 1251, 20));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
51 line->setFrameShape(QFrame::HLine);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
52 line->setFrameShadow(QFrame::Sunken);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
53
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
54 fwhLabel = new QLabel(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
55 fwhLabel->setObjectName(QString::fromUtf8("fwhLabel"));
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
56 fwhLabel->setGeometry(QRect(10, 120, 181, 20));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
57 fwhLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
58 fwhLabel->setText(tr("First Wort Hop factor:"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
59
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
60 mashhopLabel = new QLabel(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
61 mashhopLabel->setObjectName(QString::fromUtf8("mashhopLabel"));
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
62 mashhopLabel->setGeometry(QRect(10, 150, 181, 20));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
63 mashhopLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
64 mashhopLabel->setText(tr("Mash Hop factor:"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
65
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
66 pelletLabel = new QLabel(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
67 pelletLabel->setObjectName(QString::fromUtf8("pelletLabel"));
430
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
68 pelletLabel->setGeometry(QRect(10, 240, 181, 20));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
69 pelletLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
70 pelletLabel->setText(tr("Hop Pellets utilisation:"));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
71
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
72 hopplugLabel = new QLabel(topWidget);
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
73 hopplugLabel->setObjectName(QString::fromUtf8("plugsLabel"));
430
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
74 hopplugLabel->setGeometry(QRect(10, 270, 181, 20));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
75 hopplugLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
76 hopplugLabel->setText(tr("Hop Plugs utilisation:"));
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
77
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
78 leafLabel = new QLabel(topWidget);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
79 leafLabel->setObjectName(QString::fromUtf8("leafLabel"));
430
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
80 leafLabel->setGeometry(QRect(10, 300, 181, 20));
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
81 leafLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
82 leafLabel->setText(tr("Hop Leafs utilisation:"));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
83
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
84 wethopLabel = new QLabel(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
85 wethopLabel->setObjectName(QString::fromUtf8("wethopLabel"));
430
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
86 wethopLabel->setGeometry(QRect(10, 330, 181, 20));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
87 wethopLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
88 wethopLabel->setText(tr("Wet Hop utilisation:"));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
89
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
90 cryohopLabel = new QLabel(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
91 cryohopLabel->setObjectName(QString::fromUtf8("cryohopLabel"));
430
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
92 cryohopLabel->setGeometry(QRect(10, 360, 181, 20));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
93 cryohopLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
94 cryohopLabel->setText(tr("Cryo Hop\302\256 utilisation:"));
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
95
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
96 extractLabel = new QLabel(topWidget);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
97 extractLabel->setObjectName(QString::fromUtf8("extractLabel"));
430
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
98 extractLabel->setGeometry(QRect(10, 390, 181, 20));
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
99 extractLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
100 extractLabel->setText(tr("CO2 Hop Extract utilisation:"));
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
101
430
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
102 hapelletLabel = new QLabel(topWidget);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
103 hapelletLabel->setObjectName(QString::fromUtf8("hapelletLabel"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
104 hapelletLabel->setGeometry(QRect(380, 240, 181, 20));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
105 hapelletLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
106 hapelletLabel->setText(tr("Hop Pellets water absorption:"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
107
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
108 hahopplugLabel = new QLabel(topWidget);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
109 hahopplugLabel->setObjectName(QString::fromUtf8("haplugsLabel"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
110 hahopplugLabel->setGeometry(QRect(380, 270, 181, 20));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
111 hahopplugLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
112 hahopplugLabel->setText(tr("Hop Plugs water absorption:"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
113
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
114 haleafLabel = new QLabel(topWidget);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
115 haleafLabel->setObjectName(QString::fromUtf8("haleafLabel"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
116 haleafLabel->setGeometry(QRect(380, 300, 181, 20));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
117 haleafLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
118 haleafLabel->setText(tr("Hop Leafs water absorption:"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
119
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
120 hawethopLabel = new QLabel(topWidget);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
121 hawethopLabel->setObjectName(QString::fromUtf8("hawethopLabel"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
122 hawethopLabel->setGeometry(QRect(380, 330, 181, 20));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
123 hawethopLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
124 hawethopLabel->setText(tr("Wet Hop water absorption:"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
125
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
126 hacryohopLabel = new QLabel(topWidget);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
127 hacryohopLabel->setObjectName(QString::fromUtf8("hacryohopLabel"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
128 hacryohopLabel->setGeometry(QRect(380, 360, 181, 20));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
129 hacryohopLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
130 hacryohopLabel->setText(tr("Cryo Hop\302\256 water absorption:"));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
131
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
132 fwhEdit = new QSpinBox(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
133 fwhEdit->setObjectName(QString::fromUtf8("fwhEdit"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
134 fwhEdit->setGeometry(QRect(210, 120, 81, 24));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
135 fwhEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
136 fwhEdit->setAccelerated(true);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
137 fwhEdit->setMinimum(-50);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
138 fwhEdit->setMaximum(50);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
139 fwhEdit->setToolTip(tr("The efficiency for First Wort Hopping."));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
140 fwhEdit->setSuffix(tr("%"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
141
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
142 mashhopEdit = new QSpinBox(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
143 mashhopEdit->setObjectName(QString::fromUtf8("mashhopEdit"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
144 mashhopEdit->setGeometry(QRect(210, 150, 81, 24));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
145 mashhopEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
146 mashhopEdit->setAccelerated(true);
344
9ffac162000c Setting mash hopping efficiency now between -95 and +50. Refresh all after changing the IBU method. Added own part for Mash Hopping. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 337
diff changeset
147 mashhopEdit->setMinimum(-95);
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
148 mashhopEdit->setMaximum(50);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
149 mashhopEdit->setToolTip(tr("The efficiency for Mash hopping."));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
150 mashhopEdit->setSuffix(tr("%"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
151
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
152 pelletEdit = new QDoubleSpinBox(topWidget);
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
153 pelletEdit->setObjectName(QString::fromUtf8("pelletEdit"));
430
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
154 pelletEdit->setGeometry(QRect(210, 240, 81, 24));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
155 pelletEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
156 pelletEdit->setAccelerated(true);
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
157 pelletEdit->setMaximum(100);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
158 pelletEdit->setDecimals(1);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
159 pelletEdit->setToolTip(tr("The utilisation for hop pellets, default 22"));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
160 pelletEdit->setSuffix(tr("%"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
161
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
162 hopplugEdit = new QDoubleSpinBox(topWidget);
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
163 hopplugEdit->setObjectName(QString::fromUtf8("hopplugEdit"));
430
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
164 hopplugEdit->setGeometry(QRect(210, 270, 81, 24));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
165 hopplugEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
166 hopplugEdit->setAccelerated(true);
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
167 hopplugEdit->setMaximum(100);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
168 hopplugEdit->setDecimals(1);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
169 hopplugEdit->setToolTip(tr("The utilisation for hop plugs, default 20.4"));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
170 hopplugEdit->setSuffix(tr("%"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
171
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
172 leafEdit = new QDoubleSpinBox(topWidget);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
173 leafEdit->setObjectName(QString::fromUtf8("leafEdit"));
430
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
174 leafEdit->setGeometry(QRect(210, 300, 81, 24));
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
175 leafEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
176 leafEdit->setAccelerated(true);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
177 leafEdit->setMaximum(100);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
178 leafEdit->setDecimals(1);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
179 leafEdit->setToolTip(tr("The utilisation for hop leafs, default 20"));
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
180 leafEdit->setSuffix(tr("%"));
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
181
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
182 wethopEdit = new QDoubleSpinBox(topWidget);
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
183 wethopEdit->setObjectName(QString::fromUtf8("wethopEdit"));
430
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
184 wethopEdit->setGeometry(QRect(210, 330, 81, 24));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
185 wethopEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
186 wethopEdit->setAccelerated(true);
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
187 wethopEdit->setMaximum(100);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
188 wethopEdit->setDecimals(1);
430
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
189 wethopEdit->setToolTip(tr("The utilisation for fresh hops, default 3.6"));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
190 wethopEdit->setSuffix(tr("%"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
191
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
192 cryohopEdit = new QDoubleSpinBox(topWidget);
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
193 cryohopEdit->setObjectName(QString::fromUtf8("cryohopEdit"));
430
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
194 cryohopEdit->setGeometry(QRect(210, 360, 81, 24));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
195 cryohopEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
196 cryohopEdit->setAccelerated(true);
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
197 cryohopEdit->setMaximum(100);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
198 cryohopEdit->setDecimals(1);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
199 cryohopEdit->setToolTip(tr("The utilisation for using Cryo Hop\302\256, default 50"));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
200 cryohopEdit->setSuffix(tr("%"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
201
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
202 extractEdit = new QDoubleSpinBox(topWidget);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
203 extractEdit->setObjectName(QString::fromUtf8("extractEdit"));
430
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
204 extractEdit->setGeometry(QRect(210, 390, 81, 24));
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
205 extractEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
206 extractEdit->setAccelerated(true);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
207 extractEdit->setMaximum(100);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
208 extractEdit->setDecimals(1);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
209 extractEdit->setToolTip(tr("The utilisation for using CO2 hop extract, default 35"));
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
210 extractEdit->setSuffix(tr("%"));
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
211
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
212 grainLabel = new QLabel(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
213 grainLabel->setObjectName(QString::fromUtf8("grainLabel"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
214 grainLabel->setGeometry(QRect(400, 120, 161, 20));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
215 grainLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
411
c78f8cf11849 Fixed spelling error
Michiel Broek <mbroek@mbse.eu>
parents: 380
diff changeset
216 grainLabel->setText(tr("Grain Absorption:"));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
217
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
218 brixLabel = new QLabel(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
219 brixLabel->setObjectName(QString::fromUtf8("brixLabel"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
220 brixLabel->setGeometry(QRect(400, 150, 161, 20));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
221 brixLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
222 brixLabel->setText(tr("Brix Correction factor:"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
223
337
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
224 heightLabel = new QLabel(topWidget);
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
225 heightLabel->setObjectName(QString::fromUtf8("heightLabel"));
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
226 heightLabel->setGeometry(QRect(400, 180, 161, 20));
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
227 heightLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
228 heightLabel->setText(tr("Brewery height meters:"));
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
229
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
230 titleLabel = new QLabel(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
231 titleLabel->setObjectName(QString::fromUtf8("titleLabel"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
232 titleLabel->setGeometry(QRect(5, 80, 1251, 20));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
233 QFont font;
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
234 font.setFamily(QString::fromUtf8("DejaVu Sans"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
235 font.setPointSize(12);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
236 font.setBold(true);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
237 font.setWeight(75);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
238 titleLabel->setFont(font);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
239 titleLabel->setAlignment(Qt::AlignCenter);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
240 titleLabel->setText(tr("Brew settings."));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
241
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
242 colorLabel = new QLabel(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
243 colorLabel->setObjectName(QString::fromUtf8("colorLabel"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
244 colorLabel->setGeometry(QRect(800, 120, 121, 16));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
245 colorLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
246 colorLabel->setText(tr("Color Calculation:"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
247
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
248 ibuLabel = new QLabel(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
249 ibuLabel->setObjectName(QString::fromUtf8("ibuLabel"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
250 ibuLabel->setGeometry(QRect(800, 150, 121, 16));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
251 ibuLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
252 ibuLabel->setText(tr("IBU Calculation:"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
253
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
254 waterLabel = new QLabel(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
255 waterLabel->setObjectName(QString::fromUtf8("waterLabel"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
256 waterLabel->setGeometry(QRect(800, 180, 121, 16));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
257 waterLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
258 waterLabel->setText(tr("Default Water:"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
259
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
260 yeastLabel = new QLabel(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
261 yeastLabel->setObjectName(QString::fromUtf8("yeastLabel"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
262 yeastLabel->setGeometry(QRect(800, 210, 121, 16));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
263 yeastLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
264 yeastLabel->setText(tr("Private Yeast bank:"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
265
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
266 grainEdit = new QDoubleSpinBox(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
267 grainEdit->setObjectName(QString::fromUtf8("grainEdit"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
268 grainEdit->setGeometry(QRect(580, 120, 101, 24));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
269 grainEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
270 grainEdit->setAccelerated(true);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
271 grainEdit->setMinimum(0.500000000000000);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
272 grainEdit->setMaximum(1.100000000000000);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
273 grainEdit->setSingleStep(0.010000000000000);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
274 grainEdit->setStepType(QAbstractSpinBox::DefaultStepType);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
275 grainEdit->setValue(1.000000000000000);
411
c78f8cf11849 Fixed spelling error
Michiel Broek <mbroek@mbse.eu>
parents: 380
diff changeset
276 grainEdit->setToolTip(tr("Absorption with water by the grain (L/Kg)"));
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
277 grainEdit->setSuffix(tr(" L/Kg"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
278
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
279 brixEdit = new QDoubleSpinBox(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
280 brixEdit->setObjectName(QString::fromUtf8("brixEdit"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
281 brixEdit->setGeometry(QRect(580, 150, 101, 24));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
282 brixEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
283 brixEdit->setAccelerated(true);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
284 brixEdit->setMinimum(1.000000000000000);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
285 brixEdit->setMaximum(1.090000000000000);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
286 brixEdit->setSingleStep(0.010000000000000);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
287 brixEdit->setStepType(QAbstractSpinBox::DefaultStepType);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
288 brixEdit->setValue(1.000000000000000);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
289 brixEdit->setToolTip(tr("Plato to Brix conversion factor."));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
290
337
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
291 heightEdit = new QSpinBox(topWidget);
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
292 heightEdit->setObjectName(QString::fromUtf8("heightEdit"));
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
293 heightEdit->setGeometry(QRect(580, 180, 101, 24));
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
294 heightEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
295 heightEdit->setAccelerated(true);
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
296 heightEdit->setMinimum(-430);
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
297 heightEdit->setMaximum(8849);
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
298 heightEdit->setStepType(QAbstractSpinBox::DefaultStepType);
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
299 heightEdit->setValue(0);
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
300 heightEdit->setToolTip(tr("Height in meters above/below sealevel to calculate the exact boiling point and hop isomerizon."));
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
301
430
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
302 hapelletEdit = new QDoubleSpinBox(topWidget);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
303 hapelletEdit->setObjectName(QString::fromUtf8("hapelletEdit"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
304 hapelletEdit->setGeometry(QRect(580, 240, 101, 24));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
305 hapelletEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
306 hapelletEdit->setAccelerated(true);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
307 hapelletEdit->setSingleStep(0.010000000000000);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
308 hapelletEdit->setMaximum(20);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
309 hapelletEdit->setDecimals(2);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
310 hapelletEdit->setToolTip(tr("The water absorption by hop pellets, default 2.67"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
311 hapelletEdit->setSuffix(tr(" ml/gr"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
312
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
313 hahopplugEdit = new QDoubleSpinBox(topWidget);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
314 hahopplugEdit->setObjectName(QString::fromUtf8("hahopplugEdit"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
315 hahopplugEdit->setGeometry(QRect(580, 270, 101, 24));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
316 hahopplugEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
317 hahopplugEdit->setAccelerated(true);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
318 hahopplugEdit->setSingleStep(0.010000000000000);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
319 hahopplugEdit->setMaximum(20);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
320 hahopplugEdit->setDecimals(2);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
321 hahopplugEdit->setToolTip(tr("The water absorption by hop plugs, default 2.67"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
322 hahopplugEdit->setSuffix(tr(" ml/gr"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
323
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
324 haleafEdit = new QDoubleSpinBox(topWidget);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
325 haleafEdit->setObjectName(QString::fromUtf8("haleafEdit"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
326 haleafEdit->setGeometry(QRect(580, 300, 101, 24));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
327 haleafEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
328 haleafEdit->setAccelerated(true);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
329 haleafEdit->setSingleStep(0.010000000000000);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
330 haleafEdit->setMaximum(20);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
331 haleafEdit->setDecimals(2);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
332 haleafEdit->setToolTip(tr("The water absorption by hop leafs, default 6.01"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
333 haleafEdit->setSuffix(tr(" ml/gr"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
334
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
335 hawethopEdit = new QDoubleSpinBox(topWidget);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
336 hawethopEdit->setObjectName(QString::fromUtf8("hawethopEdit"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
337 hawethopEdit->setGeometry(QRect(580, 330, 101, 24));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
338 hawethopEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
339 hawethopEdit->setAccelerated(true);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
340 hawethopEdit->setSingleStep(0.010000000000000);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
341 hawethopEdit->setMaximum(20);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
342 hawethopEdit->setDecimals(2);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
343 hawethopEdit->setToolTip(tr("The water absorption by fresh hops, default 1.21"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
344 hawethopEdit->setSuffix(tr(" ml/gr"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
345
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
346 hacryohopEdit = new QDoubleSpinBox(topWidget);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
347 hacryohopEdit->setObjectName(QString::fromUtf8("hacryohopEdit"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
348 hacryohopEdit->setGeometry(QRect(580, 360, 101, 24));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
349 hacryohopEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
350 hacryohopEdit->setAccelerated(true);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
351 hacryohopEdit->setSingleStep(0.010000000000000);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
352 hacryohopEdit->setMaximum(20);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
353 hacryohopEdit->setDecimals(2);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
354 hacryohopEdit->setToolTip(tr("The water absorption by Cryo Hop\302\256, default 2.67"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
355 hacryohopEdit->setSuffix(tr(" ml/gr"));
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
356
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
357 colorEdit = new QComboBox(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
358 colorEdit->setObjectName(QString::fromUtf8("colorEdit"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
359 colorEdit->setGeometry(QRect(940, 120, 161, 23));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
360 colorEdit->setMinimumContentsLength(4);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
361 colorEdit->setIconSize(QSize(0, 0));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
362 colorEdit->setCurrentText(QString());
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
363 colorEdit->setPlaceholderText(tr("Choose color"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
364
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
365 ibuEdit = new QComboBox(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
366 ibuEdit->setObjectName(QString::fromUtf8("ibuEdit"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
367 ibuEdit->setGeometry(QRect(940, 150, 161, 23));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
368 ibuEdit->setMinimumContentsLength(4);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
369 ibuEdit->setIconSize(QSize(0, 0));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
370 ibuEdit->setCurrentText(QString());
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
371 ibuEdit->setPlaceholderText(tr("Choose color"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
372
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
373 waterEdit = new QComboBox(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
374 waterEdit->setObjectName(QString::fromUtf8("waterEdit"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
375 waterEdit->setGeometry(QRect(940, 180, 211, 23));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
376 waterEdit->setMinimumContentsLength(4);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
377 waterEdit->setIconSize(QSize(0, 0));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
378 waterEdit->setCurrentText(QString());
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
379 waterEdit->setPlaceholderText(tr("Choose color"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
380
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
381 yeastEdit = new QComboBox(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
382 yeastEdit->setObjectName(QString::fromUtf8("yeastEdit"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
383 yeastEdit->setGeometry(QRect(940, 210, 211, 23));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
384 yeastEdit->setMinimumContentsLength(4);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
385 yeastEdit->setIconSize(QSize(0, 0));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
386 yeastEdit->setCurrentText(QString());
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
387 yeastEdit->setPlaceholderText(tr("Choose color"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
388
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
389 logoLabel = new QLabel(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
390 logoLabel->setObjectName(QString::fromUtf8("logoLabel"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
391 logoLabel->setGeometry(QRect(940, 260, 211, 211));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
392 logoLabel->setAlignment(Qt::AlignCenter);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
393 logoLabel->setText(tr("Logo here"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
394
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
395 quitButton = new QPushButton(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
396 quitButton->setObjectName(QString::fromUtf8("quitButton"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
397 quitButton->setGeometry(QRect(50, 520, 80, 23));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
398 QIcon icon;
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
399 icon.addFile(QString::fromUtf8(":icons/silk/door_out.png"), QSize(), QIcon::Normal, QIcon::Off);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
400 quitButton->setIcon(icon);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
401 quitButton->setText(tr("Quit"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
402
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
403 saveButton = new QPushButton(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
404 saveButton->setObjectName(QString::fromUtf8("saveButton"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
405 saveButton->setGeometry(QRect(200, 520, 80, 23));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
406 QIcon icon1;
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
407 icon1.addFile(QString::fromUtf8(":icons/silk/disk.png"), QSize(), QIcon::Normal, QIcon::Off);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
408 saveButton->setIcon(icon1);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
409 saveButton->setText(tr("Save"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
410 saveButton->setEnabled(false);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
411
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
412 openButton = new QPushButton(topWidget);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
413 openButton->setObjectName(QString::fromUtf8("openButton"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
414 openButton->setGeometry(QRect(810, 260, 111, 23));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
415 QIcon icon2;
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
416 icon2.addFile(QString::fromUtf8(":/icons/silk/folder_picture.png"), QSize(), QIcon::Normal, QIcon::Off);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
417 openButton->setIcon(icon2);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
418 openButton->setText(tr("Load logo"));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
419
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
420 gridLayout->addWidget(topWidget, 0, 0, 1, 1);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
421
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
422 connect(quitButton, SIGNAL(clicked()), this, SLOT(on_quitButton_clicked()));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
423 connect(saveButton, SIGNAL(clicked()), this, SLOT(on_saveButton_clicked()));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
424 connect(openButton, SIGNAL(clicked()), this, SLOT(on_openButton_clicked()));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
425 connect(this, SIGNAL(firstWindow()), parent, SLOT(fromSetup()));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
426 connect(this, SIGNAL(setTitle(QString)), parent, SLOT(windowTitle(QString)));
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
427
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
428 emit setTitle(QString(tr("Setup")));
15
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
429
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
430 query.prepare("SELECT * FROM profile_setup WHERE record='1'");
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
431 query.exec();
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
432 query.next();
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
433
309
8678a0731737 Using names for profile_setup query
Michiel Broek <mbroek@mbse.eu>
parents: 90
diff changeset
434 breweryEdit->setText(query.value("brewery_name").toString()); // max 128
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
435 connect(breweryEdit, &QLineEdit::textChanged, this, &Setup::is_changed);
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
436
309
8678a0731737 Using names for profile_setup query
Michiel Broek <mbroek@mbse.eu>
parents: 90
diff changeset
437 fwhEdit->setValue(query.value("factor_fwh").toInt());
8678a0731737 Using names for profile_setup query
Michiel Broek <mbroek@mbse.eu>
parents: 90
diff changeset
438 mashhopEdit->setValue(query.value("factor_mashhop").toInt());
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
439 pelletEdit->setValue(query.value("ut_pellet").toDouble());
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
440 hopplugEdit->setValue(query.value("ut_plug").toDouble());
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
441 leafEdit->setValue(query.value("ut_leaf").toDouble());
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
442 wethopEdit->setValue(query.value("ut_wethop").toDouble());
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
443 cryohopEdit->setValue(query.value("ut_t45").toDouble());
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
444 extractEdit->setValue(query.value("ut_co2extract").toDouble());
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
445 connect(fwhEdit, &QSpinBox::textChanged, this, &Setup::is_changed);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
446 connect(mashhopEdit, &QSpinBox::textChanged, this, &Setup::is_changed);
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
447 connect(pelletEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
448 connect(hopplugEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
449 connect(leafEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
450 connect(wethopEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
451 connect(cryohopEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed);
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
452 connect(extractEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed);
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
453
411
c78f8cf11849 Fixed spelling error
Michiel Broek <mbroek@mbse.eu>
parents: 380
diff changeset
454 grainEdit->setValue(query.value("grain_absorption").toDouble());
309
8678a0731737 Using names for profile_setup query
Michiel Broek <mbroek@mbse.eu>
parents: 90
diff changeset
455 brixEdit->setValue(query.value("brix_correction").toDouble());
337
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
456 heightEdit->setValue(query.value("brewery_height").toInt());
430
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
457 hapelletEdit->setValue(query.value("ha_pellet").toDouble());
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
458 hahopplugEdit->setValue(query.value("ha_plug").toDouble());
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
459 haleafEdit->setValue(query.value("ha_leaf").toDouble());
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
460 hawethopEdit->setValue(query.value("ha_wethop").toDouble());
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
461 hacryohopEdit->setValue(query.value("ha_t45").toDouble());
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
462 connect(grainEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
463 connect(brixEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed);
337
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
464 connect(heightEdit, &QSpinBox::textChanged, this, &Setup::is_changed);
430
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
465 connect(hapelletEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
466 connect(hahopplugEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
467 connect(haleafEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
468 connect(hawethopEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed);
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
469 connect(hacryohopEdit, &QDoubleSpinBox::textChanged, this, &Setup::is_changed);
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
470
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
471 colorEdit->addItem("Morey");
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
472 colorEdit->addItem("Mosher");
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
473 colorEdit->addItem("Daniels");
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
474 colorEdit->addItem("Halberstadt");
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
475 colorEdit->addItem("Naudts");
309
8678a0731737 Using names for profile_setup query
Michiel Broek <mbroek@mbse.eu>
parents: 90
diff changeset
476 colorEdit->setCurrentIndex(query.value("color_method").toInt());
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
477 connect(colorEdit, &QComboBox::currentTextChanged, this, &Setup::is_changed);
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
478
336
e97f9e87d94b IBU method names are now global.
Michiel Broek <mbroek@mbse.eu>
parents: 309
diff changeset
479 for (int i = 0; i < 3; i++)
e97f9e87d94b IBU method names are now global.
Michiel Broek <mbroek@mbse.eu>
parents: 309
diff changeset
480 ibuEdit->addItem(g_ibu_method[i]);
309
8678a0731737 Using names for profile_setup query
Michiel Broek <mbroek@mbse.eu>
parents: 90
diff changeset
481 ibuEdit->setCurrentIndex(query.value("ibu_method").toInt());
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
482 connect(ibuEdit, &QComboBox::currentTextChanged, this, &Setup::is_changed);
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
483
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
484 QSqlQuery query2("SELECT record,name FROM inventory_waters");
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
485 query2.first();
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
486 int pos = -1;
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
487 waterEdit->setEditable(true);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
488 waterEdit->setPlaceholderText(tr("Choose default water"));
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
489 for (int i = 0 ; i < query2.size() ; i++ ) {
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
490 waterEdit->addItem(query2.value(1).toString());
309
8678a0731737 Using names for profile_setup query
Michiel Broek <mbroek@mbse.eu>
parents: 90
diff changeset
491 if (query2.value(0).toInt() == query.value("default_water").toInt()) {
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
492 pos = i;
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
493 }
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
494 query2.next();
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
495 }
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
496 if (pos >= 0)
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
497 waterEdit->setCurrentIndex(pos);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
498 connect(waterEdit, &QComboBox::currentTextChanged, this, &Setup::is_changed);
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
499
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
500 QSqlQuery query3("SELECT DISTINCT laboratory FROM inventory_yeasts ORDER BY laboratory");
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
501 query3.first();
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
502 pos = -1;
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
503 yeastEdit->setEditable(true);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
504 yeastEdit->setPlaceholderText(tr("Choose laboratory"));
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
505 for (int i = 0 ; i < query3.size() ; i++ ) {
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
506 yeastEdit->addItem(query3.value(0).toString());
309
8678a0731737 Using names for profile_setup query
Michiel Broek <mbroek@mbse.eu>
parents: 90
diff changeset
507 if (QString::compare(query.value("my_yeastlab").toString(), query3.value(0).toString(), Qt::CaseSensitive) == 0)
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
508 pos = i;
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
509 query3.next();
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
510 }
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
511 if (pos >= 0)
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
512 yeastEdit->setCurrentIndex(pos);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
513 connect(yeastEdit, &QComboBox::currentTextChanged, this, &Setup::is_changed);
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
514
41
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
515 /* logo */
309
8678a0731737 Using names for profile_setup query
Michiel Broek <mbroek@mbse.eu>
parents: 90
diff changeset
516 logoByteArray = query.value("brewery_logo").toByteArray();
41
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
517 QPixmap outPixmap = QPixmap();
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
518 outPixmap.loadFromData(logoByteArray);
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
519 logoLabel->setPixmap(outPixmap);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
520 logoLabel->adjustSize();
15
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
521 }
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
522
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
523
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
524 Setup::~Setup() {}
15
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
525
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
526
41
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
527 bool Setup::loadFile(const QString &fileName)
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
528 {
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
529 QImageReader reader(fileName);
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
530 reader.setAutoTransform(true);
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
531 const QImage newImage = reader.read();
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
532 if (newImage.isNull()) {
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
533 QMessageBox::information(this, QGuiApplication::applicationDisplayName(), tr("Cannot load %1: %2")
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
534 .arg(QDir::toNativeSeparators(fileName), reader.errorString()));
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
535 return false;
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
536 }
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
537 setImage(newImage);
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
538 setWindowFilePath(fileName);
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
539 is_changed();
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
540 return true;
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
541 }
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
542
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
543
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
544 void Setup::setImage(const QImage &newImage)
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
545 {
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
546 image = newImage;
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
547
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
548 qDebug() << "setImage" << image.width() << image.height() << "size" << image.sizeInBytes();
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
549
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
550 QBuffer buffer(&logoByteArray);
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
551 buffer.open(QIODevice::WriteOnly);
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
552 image.save(&buffer, "PNG"); // writes image into logoByteArray in PNG format
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
553
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
554 this->logoLabel->setPixmap(QPixmap::fromImage(image));
41
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
555 scaleFactor = 1.0;
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
556
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
557 // this->logoLabel->resize(scaleFactor * ui->logoLabel->pixmap(Qt::ReturnByValue).size());
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
558 this->logoLabel->adjustSize();
41
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
559 }
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
560
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
561
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
562 void Setup::on_openButton_clicked()
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
563 {
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
564 static bool firstDialog = true;
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
565
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
566 qDebug() << "Setup open";
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
567
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
568 QFileDialog dialog(this, tr("Open File"));
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
569
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
570 if (firstDialog) {
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
571 firstDialog = false;
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
572 const QStringList picturesLocations = QStandardPaths::standardLocations(QStandardPaths::PicturesLocation);
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
573 dialog.setDirectory(picturesLocations.isEmpty() ? QDir::currentPath() : picturesLocations.last());
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
574 }
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
575
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
576 /* Only a few image formats are valid */
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
577 QStringList mimeTypeFilters ({ "image/bmp", "image/gif", "image/jpeg", "image/png", "image/svg+xml" });
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
578 dialog.setMimeTypeFilters(mimeTypeFilters);
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
579 dialog.setNameFilter("Images (*.bmp *.BMP *.gif *.GIF *.jpg *.JPG *.png *.PNG *.svg *.SVG)");
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
580 dialog.setAcceptMode(QFileDialog::AcceptOpen);
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
581
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
582 while (dialog.exec() == QDialog::Accepted && !loadFile(dialog.selectedFiles().constFirst())) {}
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
583 }
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
584
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
585
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
586 /*
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
587 * Also called from the Quit button if there are changes to save.
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
588 */
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
589 void Setup::on_saveButton_clicked()
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
590 {
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
591 QSqlQuery query;
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
592
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
593 /*
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
594 * Search record number of the current water.
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
595 */
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
596 query.prepare("SELECT record FROM inventory_waters WHERE name=:name");
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
597 query.bindValue(":name", this->waterEdit->currentText());
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
598 query.exec();
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
599 query.first();
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
600 int record = query.value(0).toInt();
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
601
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
602 /*
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
603 * Update all other data
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
604 */
41
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
605 query.prepare("UPDATE profile_setup SET brewery_name=:brewery, brewery_logo=:logo, factor_mashhop=:mashhop, factor_fwh=:fwh, "
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
606 "ut_pellet=:pellet, ut_plug=:plug, ut_leaf=:leaf, ut_wethop=:wet, ut_t45=:cryo, ut_co2extract=:extract, "
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
607 "color_method=:color, ibu_method=:ibu, "
411
c78f8cf11849 Fixed spelling error
Michiel Broek <mbroek@mbse.eu>
parents: 380
diff changeset
608 "brix_correction=:brix, grain_absorption=:grain, default_water=:water, my_yeastlab=:yeast, "
430
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
609 "brewery_height=:height, "
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
610 "ha_pellet=:hapellet, ha_plug=:haplug, ha_leaf=:haleaf, ha_wethop=:hawet, ha_t45=:hacryo "
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
611 "WHERE record='1'");
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
612 query.bindValue(":brewery", this->breweryEdit->text());
41
dc4b659a320b Added logo load and save in profile setup.
Michiel Broek <mbroek@mbse.eu>
parents: 31
diff changeset
613 query.bindValue(":logo", logoByteArray);
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
614 query.bindValue(":mashhop", this->mashhopEdit->value());
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
615 query.bindValue(":fwh", this->fwhEdit->value());
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
616 query.bindValue(":pellet", this->pelletEdit->value());
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
617 query.bindValue(":plug", this->hopplugEdit->value());
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
618 query.bindValue(":leaf", this->leafEdit->value());
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
619 query.bindValue(":wet", this->wethopEdit->value());
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
620 query.bindValue(":cryo", this->cryohopEdit->value());
380
8f5c03ed4321 Global setup added hop utilisation defaults, these are used by the hops editor. In the hops editor, changing the hop form sets the new default utilisation. Hide and show the time edit entry instead of setting it read-only. The new defaults are loaded at program startup. Changed the global setup for the new utilisation fields and dropped the obsolete factor fields. The toIBU formula doesn't use my_factor_* variables anymore, hop differences now come from the utilisation field per hop. The global database is updated to the new defaults.
Michiel Broek <mbroek@mbse.eu>
parents: 344
diff changeset
621 query.bindValue(":extract", this->extractEdit->value());
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
622 query.bindValue(":color", this->colorEdit->currentIndex());
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
623 query.bindValue(":ibu", this->ibuEdit->currentIndex());
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
624 query.bindValue(":brix", this->brixEdit->value());
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
625 query.bindValue(":grain", this->grainEdit->value());
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
626 query.bindValue(":water", record);
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
627 query.bindValue(":yeast", this->yeastEdit->currentText());
337
8133cdb19aa1 Added my_height global variable and edit in profile setup. This sets the height of the brewery above or below sealevel. Added calculations for the air pressure, boilpoint and IBU_reduction that all depend on the height. Currently not yet in use. Split out the real IBU calculation from the generic toIBU function. This has no effect on the results.
Michiel Broek <mbroek@mbse.eu>
parents: 336
diff changeset
628 query.bindValue(":height", this->heightEdit->value());
430
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
629 query.bindValue(":hapellet", this->hapelletEdit->value());
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
630 query.bindValue(":haplug", this->hahopplugEdit->value());
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
631 query.bindValue(":haleaf", this->haleafEdit->value());
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
632 query.bindValue(":hawet", this->hawethopEdit->value());
ef2638cfc1b7 Added five hop absorption fields to the profile_setup record to set the hop absorption rates. Added edit fields in the global setup. Load global these new variables during application startup.
Michiel Broek <mbroek@mbse.eu>
parents: 411
diff changeset
633 query.bindValue(":hacryo", this->hacryohopEdit->value());
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
634 query.exec();
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
635 if (query.lastError().isValid()) {
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
636 qDebug() << "Setup Save error:" << query.lastError();
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
637 QMessageBox::warning(this, tr("Database error"),
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
638 tr("MySQL error: %1\n%2\n%3")
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
639 .arg(query.lastError().nativeErrorCode())
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
640 .arg(query.lastError().driverText())
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
641 .arg(query.lastError().databaseText()));
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
642 } else {
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
643 qDebug() << "Setup Saved";
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
644 }
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
645
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
646 this->fieldIsChanged = false;
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
647 saveButton->setEnabled(false);
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
648 emit setTitle(QString(tr("Setup")));
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
649 }
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
650
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
651
15
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
652 void Setup::on_quitButton_clicked()
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
653 {
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
654 if (this->fieldIsChanged) {
60
0d65238ebedc Updated translations and some messages.
Michiel Broek <mbroek@mbse.eu>
parents: 41
diff changeset
655 int rc = QMessageBox::warning(this, tr("Setup changed"), tr("The global setup has been modified. Save changes?"),
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
656 QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Save);
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
657 switch (rc) {
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
658 case QMessageBox::Save:
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
659 on_saveButton_clicked();
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
660 break; /* Saved and then Quit */
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
661 case QMessageBox::Discard:
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
662 break; /* Quit without Save */
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
663 case QMessageBox::Cancel:
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
664 return; /* Return to the setup page */
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
665 }
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
666 }
15
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
667 emit firstWindow();
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
668 }
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
669
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
670
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
671 void Setup::is_changed()
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
672 {
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
673 saveButton->setEnabled(true);
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
674 this->fieldIsChanged = true;
78
3a6cba2dd05d Status and Windowtitle messages via signals and slots. Global setup now on the mainwindow.
Michiel Broek <mbroek@mbse.eu>
parents: 60
diff changeset
675 emit setTitle(QString(tr("Setup") + " **"));
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
676 }

mercurial