Fri, 08 Jul 2022 13:24:45 +0200
Removed old experiment to calculate flameout and whirlpool ibu's. Changed Tinseth calculation to use a time window so you can select the ibu contribution during a specified time. Added ibu_method Tinset++. Added calculation extensions for Tinseth++, this calculates the flameout and whirlpool effects on all hops. During cooling is to be done.
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | /** |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2 | * RecipesTree.cpp is part of bmsapp. |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | * |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | * bmsapp is free software: you can redistribute it and/or modify |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | * it under the terms of the GNU General Public License as published by |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | * the Free Software Foundation, either version 3 of the License, or |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | * (at your option) any later version. |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
8 | * |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
9 | * bmsapp is distributed in the hope that it will be useful, |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | * GNU General Public License for more details. |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
13 | * |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
14 | * You should have received a copy of the GNU General Public License |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
16 | */ |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | #include "RecipesTree.h" |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
18 | #include "MainWindow.h" |
92
fb0bb9a2a7e1
Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
19 | #include "EditRecipe.h" |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
20 | #include "config.h" |
98
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
21 | #include "Utils.h" |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
22 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
23 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
24 | RecipesTree::RecipesTree(QWidget *parent) : QDialog(parent) |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
25 | { |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
26 | qDebug() << "RecipesTree start"; |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
27 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
28 | gridLayout = new QGridLayout(this); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
29 | gridLayout->setObjectName(QString::fromUtf8("gridLayout")); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
30 | treeWidget = new QTreeWidget(this); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
31 | treeWidget->setObjectName(QString::fromUtf8("treeWidget")); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
32 | QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
33 | sizePolicy.setHorizontalStretch(0); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
34 | sizePolicy.setVerticalStretch(0); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
35 | sizePolicy.setHeightForWidth(treeWidget->sizePolicy().hasHeightForWidth()); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
36 | treeWidget->setSizePolicy(sizePolicy); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
37 | gridLayout->addWidget(treeWidget, 0, 0, 1, 1); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
38 | |
82
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
39 | recipeBox = new QGroupBox(this); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
40 | recipeBox->setObjectName(QString::fromUtf8("recipeBox")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
41 | QSizePolicy sizePolicy3(QSizePolicy::Preferred, QSizePolicy::Expanding); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
42 | sizePolicy3.setHorizontalStretch(0); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
43 | sizePolicy3.setVerticalStretch(0); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
44 | sizePolicy3.setHeightForWidth(recipeBox->sizePolicy().hasHeightForWidth()); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
45 | recipeBox->setSizePolicy(sizePolicy3); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
46 | recipeBox->setMinimumSize(QSize(500, 0)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
47 | |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
48 | volumeLabel = new QLabel(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
49 | volumeLabel->setObjectName(QString::fromUtf8("volumeLabel")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
50 | volumeLabel->setGeometry(QRect(100, 30, 141, 20)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
51 | volumeLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
52 | volumeLabel->setText(tr("Brew volume:")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
53 | efficiencyLabel = new QLabel(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
54 | efficiencyLabel->setObjectName(QString::fromUtf8("efficiencyLabel")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
55 | efficiencyLabel->setGeometry(QRect(100, 120, 141, 20)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
56 | efficiencyLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
57 | efficiencyLabel->setText(tr("Brewhouse efficiency:")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
58 | boilvolumeLabel = new QLabel(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
59 | boilvolumeLabel->setObjectName(QString::fromUtf8("boilvolumeLabel")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
60 | boilvolumeLabel->setGeometry(QRect(100, 60, 141, 20)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
61 | boilvolumeLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
62 | boilvolumeLabel->setText(tr("Boil volume:")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
63 | boiltimeLabel = new QLabel(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
64 | boiltimeLabel->setObjectName(QString::fromUtf8("boiltimeLabel")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
65 | boiltimeLabel->setGeometry(QRect(100, 90, 141, 20)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
66 | boiltimeLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
67 | boiltimeLabel->setText(tr("Boil time:")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
68 | ogLabel = new QLabel(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
69 | ogLabel->setObjectName(QString::fromUtf8("ogLabel")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
70 | ogLabel->setGeometry(QRect(100, 150, 141, 20)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
71 | ogLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
72 | ogLabel->setText(tr("Original gravity:")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
73 | fgLabel = new QLabel(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
74 | fgLabel->setObjectName(QString::fromUtf8("fgLabel")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
75 | fgLabel->setGeometry(QRect(100, 180, 141, 20)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
76 | fgLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
77 | fgLabel->setText(tr("Final gravity:")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
78 | abvLabel = new QLabel(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
79 | abvLabel->setObjectName(QString::fromUtf8("abvLabel")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
80 | abvLabel->setGeometry(QRect(100, 210, 141, 20)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
81 | abvLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
82 | abvLabel->setText(tr("Alcohol by Volume:")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
83 | co2Label = new QLabel(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
84 | co2Label->setObjectName(QString::fromUtf8("co2Label")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
85 | co2Label->setGeometry(QRect(100, 240, 141, 20)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
86 | co2Label->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
87 | co2Label->setText(tr("CO2 Volume:")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
88 | colorLabel = new QLabel(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
89 | colorLabel->setObjectName(QString::fromUtf8("colorLabel")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
90 | colorLabel->setGeometry(QRect(100, 270, 141, 20)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
91 | colorLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
92 | colorLabel->setText(tr("Color EBC:")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
93 | colormethodLabel = new QLabel(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
94 | colormethodLabel->setObjectName(QString::fromUtf8("colormethodLabel")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
95 | colormethodLabel->setGeometry(QRect(100, 300, 141, 20)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
96 | colormethodLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
97 | colormethodLabel->setText(tr("Color method:")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
98 | ibuLabel = new QLabel(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
99 | ibuLabel->setObjectName(QString::fromUtf8("ibuLabel")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
100 | ibuLabel->setGeometry(QRect(100, 330, 141, 20)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
101 | ibuLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
102 | ibuLabel->setText(tr("Bitterness IBU:")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
103 | ibumethodLabel = new QLabel(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
104 | ibumethodLabel->setObjectName(QString::fromUtf8("ibumethodLabel")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
105 | ibumethodLabel->setGeometry(QRect(100, 360, 141, 20)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
106 | ibumethodLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
107 | ibumethodLabel->setText(tr("Bitterness method:")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
108 | remarksLabel = new QLabel(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
109 | remarksLabel->setObjectName(QString::fromUtf8("remarksLabel")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
110 | remarksLabel->setGeometry(QRect(30, 390, 101, 20)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
111 | remarksLabel->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
112 | remarksLabel->setText(tr("Remarks:")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
113 | |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
114 | volumeEdit = new QDoubleSpinBox(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
115 | volumeEdit->setObjectName(QString::fromUtf8("volumeEdit")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
116 | volumeEdit->setGeometry(QRect(260, 30, 111, 24)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
117 | volumeEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
118 | volumeEdit->setReadOnly(true); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
119 | volumeEdit->setButtonSymbols(QAbstractSpinBox::NoButtons); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
120 | volumeEdit->setDecimals(1); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
121 | volumeEdit->setMaximum(100000.000000000000000); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
122 | volumeEdit->setSuffix(tr(" L")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
123 | boilvolumeEdit = new QDoubleSpinBox(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
124 | boilvolumeEdit->setObjectName(QString::fromUtf8("boilvolumeEdit")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
125 | boilvolumeEdit->setGeometry(QRect(260, 60, 111, 24)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
126 | boilvolumeEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
127 | boilvolumeEdit->setReadOnly(true); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
128 | boilvolumeEdit->setButtonSymbols(QAbstractSpinBox::NoButtons); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
129 | boilvolumeEdit->setDecimals(1); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
130 | boilvolumeEdit->setMaximum(100000.000000000000000); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
131 | boilvolumeEdit->setSuffix(tr(" L")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
132 | efficiencyEdit = new QDoubleSpinBox(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
133 | efficiencyEdit->setObjectName(QString::fromUtf8("efficiencyEdit")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
134 | efficiencyEdit->setGeometry(QRect(260, 120, 111, 24)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
135 | efficiencyEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
136 | efficiencyEdit->setReadOnly(true); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
137 | efficiencyEdit->setButtonSymbols(QAbstractSpinBox::NoButtons); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
138 | efficiencyEdit->setDecimals(1); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
139 | efficiencyEdit->setMaximum(100.000000000000000); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
140 | efficiencyEdit->setSuffix(tr(" %")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
141 | ogEdit = new QDoubleSpinBox(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
142 | ogEdit->setObjectName(QString::fromUtf8("ogEdit")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
143 | ogEdit->setGeometry(QRect(260, 150, 111, 24)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
144 | ogEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
145 | ogEdit->setReadOnly(true); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
146 | ogEdit->setButtonSymbols(QAbstractSpinBox::NoButtons); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
147 | ogEdit->setDecimals(3); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
148 | ogEdit->setMaximum(1.200000000000000); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
149 | fgEdit = new QDoubleSpinBox(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
150 | fgEdit->setObjectName(QString::fromUtf8("fgEdit")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
151 | fgEdit->setGeometry(QRect(260, 180, 111, 24)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
152 | fgEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
153 | fgEdit->setReadOnly(true); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
154 | fgEdit->setButtonSymbols(QAbstractSpinBox::NoButtons); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
155 | fgEdit->setDecimals(3); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
156 | fgEdit->setMaximum(1.200000000000000); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
157 | abvEdit = new QDoubleSpinBox(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
158 | abvEdit->setObjectName(QString::fromUtf8("abvEdit")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
159 | abvEdit->setGeometry(QRect(260, 210, 111, 24)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
160 | abvEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
161 | abvEdit->setReadOnly(true); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
162 | abvEdit->setButtonSymbols(QAbstractSpinBox::NoButtons); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
163 | abvEdit->setDecimals(1); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
164 | abvEdit->setMaximum(100.000000000000000); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
165 | abvEdit->setSuffix(tr(" %")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
166 | co2Edit = new QDoubleSpinBox(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
167 | co2Edit->setObjectName(QString::fromUtf8("co2Edit")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
168 | co2Edit->setGeometry(QRect(260, 240, 111, 24)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
169 | co2Edit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
170 | co2Edit->setReadOnly(true); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
171 | co2Edit->setButtonSymbols(QAbstractSpinBox::NoButtons); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
172 | co2Edit->setDecimals(2); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
173 | co2Edit->setMaximum(100.000000000000000); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
174 | boiltimeEdit = new QSpinBox(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
175 | boiltimeEdit->setObjectName(QString::fromUtf8("boiltimeEdit")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
176 | boiltimeEdit->setGeometry(QRect(260, 90, 111, 24)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
177 | boiltimeEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
178 | boiltimeEdit->setReadOnly(true); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
179 | boiltimeEdit->setButtonSymbols(QAbstractSpinBox::NoButtons); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
180 | boiltimeEdit->setMaximum(1440); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
181 | boiltimeEdit->setSuffix(tr(" min")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
182 | colorEdit = new QSpinBox(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
183 | colorEdit->setObjectName(QString::fromUtf8("colorEdit")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
184 | colorEdit->setGeometry(QRect(260, 270, 111, 24)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
185 | colorEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
186 | colorEdit->setReadOnly(true); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
187 | colorEdit->setButtonSymbols(QAbstractSpinBox::NoButtons); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
188 | colorEdit->setMaximum(1440); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
189 | ibuEdit = new QSpinBox(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
190 | ibuEdit->setObjectName(QString::fromUtf8("ibuEdit")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
191 | ibuEdit->setGeometry(QRect(260, 330, 111, 24)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
192 | ibuEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
193 | ibuEdit->setReadOnly(true); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
194 | ibuEdit->setButtonSymbols(QAbstractSpinBox::NoButtons); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
195 | ibuEdit->setMaximum(1440); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
196 | remarksEdit = new QPlainTextEdit(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
197 | remarksEdit->setObjectName(QString::fromUtf8("remarksEdit")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
198 | remarksEdit->setGeometry(QRect(30, 410, 441, 111)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
199 | remarksEdit->setReadOnly(true); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
200 | colormethodEdit = new QLineEdit(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
201 | colormethodEdit->setObjectName(QString::fromUtf8("colormethodEdit")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
202 | colormethodEdit->setGeometry(QRect(260, 300, 113, 23)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
203 | colormethodEdit->setReadOnly(true); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
204 | ibumethodEdit = new QLineEdit(recipeBox); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
205 | ibumethodEdit->setObjectName(QString::fromUtf8("ibumethodEdit")); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
206 | ibumethodEdit->setGeometry(QRect(260, 360, 113, 23)); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
207 | ibumethodEdit->setReadOnly(true); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
208 | |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
209 | gridLayout->addWidget(recipeBox, 0, 1, 2, 1); |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
210 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
211 | groupBox = new QGroupBox(this); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
212 | groupBox->setObjectName(QString::fromUtf8("groupBox")); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
213 | QSizePolicy sizePolicy2(QSizePolicy::Preferred, QSizePolicy::Preferred); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
214 | sizePolicy2.setHorizontalStretch(0); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
215 | sizePolicy2.setVerticalStretch(0); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
216 | sizePolicy2.setHeightForWidth(groupBox->sizePolicy().hasHeightForWidth()); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
217 | groupBox->setSizePolicy(sizePolicy2); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
218 | groupBox->setMinimumSize(QSize(0, 0)); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
219 | horizontalLayout = new QHBoxLayout(groupBox); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
220 | horizontalLayout->setSpacing(200); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
221 | horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
222 | horizontalLayout->setContentsMargins(0, 0, 0, 0); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
223 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
224 | quitButton = new QPushButton(groupBox); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
225 | quitButton->setObjectName(QString::fromUtf8("quitButton")); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
226 | quitButton->setText(tr("Quit")); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
227 | QIcon icon; |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
228 | icon.addFile(QString::fromUtf8(":icons/silk/door_out.png"), QSize(), QIcon::Normal, QIcon::Off); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
229 | quitButton->setIcon(icon); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
230 | horizontalLayout->addWidget(quitButton); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
231 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
232 | insertButton = new QPushButton(groupBox); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
233 | insertButton->setObjectName(QString::fromUtf8("insertButton")); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
234 | insertButton->setText(tr("New")); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
235 | QIcon icon3; |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
236 | icon3.addFile(QString::fromUtf8(":icons/silk/table_row_insert.png"), QSize(), QIcon::Normal, QIcon::Off); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
237 | insertButton->setIcon(icon3); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
238 | horizontalLayout->addWidget(insertButton); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
239 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
240 | openButton = new QPushButton(groupBox); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
241 | openButton->setObjectName(QString::fromUtf8("openButton")); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
242 | openButton->setText(tr("Open")); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
243 | QIcon icon1; |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
244 | icon1.addFile(QString::fromUtf8(":icons/silk/cup_go.png"), QSize(), QIcon::Normal, QIcon::Off); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
245 | openButton->setIcon(icon1); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
246 | horizontalLayout->addWidget(openButton); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
247 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
248 | gridLayout->addWidget(groupBox, 1, 0, 1, 1); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
249 | |
82
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
250 | record = -2; |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
251 | connect(quitButton, SIGNAL(clicked()), parent, SLOT(fromRecipesTree())); |
82
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
252 | connect(insertButton, SIGNAL(clicked()), this, SLOT(on_insertButton_clicked())); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
253 | connect(openButton, SIGNAL(clicked()), this, SLOT(on_openButton_clicked())); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
254 | connect(this, SIGNAL(setStatus(QString)), parent, SLOT(statusMsg(QString))); |
98
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
255 | |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
256 | treeWidget->setColumnCount(4); |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
257 | treeWidget->setHeaderLabels({ tr("Guide"), tr("Group"), tr("Style"), tr("Recipe") }); |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
258 | treeWidget->header()->setSectionResizeMode(QHeaderView::ResizeToContents); |
153
e71642121fb6
Load recipe seek error, abort implemented. Not yet working correct. The recipetree is finally working.
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
259 | treeWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); |
98
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
260 | |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
261 | connect(treeWidget, SIGNAL(itemClicked(QTreeWidgetItem *, int)), this, SLOT(on_item_clicked(QTreeWidgetItem*, int))); |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
262 | connect(treeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(on_item_doubleclicked(QTreeWidgetItem*, int))); |
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
263 | |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
264 | emit refreshTable(); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
265 | } |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
266 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
267 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
268 | void RecipesTree::refreshTable() |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
269 | { |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
270 | QTreeWidgetItem *st_guide, *st_group, *st_name, *name; |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
271 | |
153
e71642121fb6
Load recipe seek error, abort implemented. Not yet working correct. The recipetree is finally working.
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
272 | qDebug() << "RecipesTree reload"; |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
273 | |
82
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
274 | treeWidget->clear(); |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
275 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
276 | QSqlQuery query0; |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
277 | query0.prepare("SELECT DISTINCT st_guide FROM recipes ORDER BY st_guide"); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
278 | query0.exec(); |
153
e71642121fb6
Load recipe seek error, abort implemented. Not yet working correct. The recipetree is finally working.
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
279 | while (query0.next()) { |
e71642121fb6
Load recipe seek error, abort implemented. Not yet working correct. The recipetree is finally working.
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
280 | st_guide = new QTreeWidgetItem( QStringList( { query0.value(0).toString() } )); |
82
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
281 | treeWidget->addTopLevelItem( st_guide ); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
282 | st_guide->setChildIndicatorPolicy(QTreeWidgetItem::ShowIndicator); |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
283 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
284 | QSqlQuery query1; |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
285 | query1.prepare("SELECT DISTINCT st_letter FROM recipes WHERE st_guide=:guide ORDER BY st_letter"); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
286 | query1.bindValue(":guide", query0.value(0).toString()); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
287 | query1.exec(); |
153
e71642121fb6
Load recipe seek error, abort implemented. Not yet working correct. The recipetree is finally working.
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
288 | while (query1.next()) { |
e71642121fb6
Load recipe seek error, abort implemented. Not yet working correct. The recipetree is finally working.
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
289 | st_group = new QTreeWidgetItem(QStringList({ "", query1.value(0).toString() })); |
82
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
290 | st_group->setChildIndicatorPolicy(QTreeWidgetItem::ShowIndicator); |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
291 | st_guide->addChild( st_group ); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
292 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
293 | QSqlQuery query2; |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
294 | query2.prepare("SELECT DISTINCT st_name FROM recipes WHERE st_guide=:guide AND st_letter=:group ORDER BY st_name"); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
295 | query2.bindValue(":guide", query0.value(0).toString()); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
296 | query2.bindValue(":group", query1.value(0).toString()); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
297 | query2.exec(); |
153
e71642121fb6
Load recipe seek error, abort implemented. Not yet working correct. The recipetree is finally working.
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
298 | while (query2.next()) { |
e71642121fb6
Load recipe seek error, abort implemented. Not yet working correct. The recipetree is finally working.
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
299 | st_name = new QTreeWidgetItem(QStringList({ "", "", query2.value(0).toString() })); |
82
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
300 | st_name->setChildIndicatorPolicy(QTreeWidgetItem::ShowIndicator); |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
301 | st_group->addChild( st_name ); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
302 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
303 | QSqlQuery query3; |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
304 | query3.prepare("SELECT name,record FROM recipes WHERE st_guide=:guide AND st_letter=:group AND st_name=:name ORDER BY name"); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
305 | query3.bindValue(":guide", query0.value(0).toString()); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
306 | query3.bindValue(":group", query1.value(0).toString()); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
307 | query3.bindValue(":name", query2.value(0).toString()); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
308 | query3.exec(); |
153
e71642121fb6
Load recipe seek error, abort implemented. Not yet working correct. The recipetree is finally working.
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
309 | while (query3.next()) { |
e71642121fb6
Load recipe seek error, abort implemented. Not yet working correct. The recipetree is finally working.
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
310 | name = new QTreeWidgetItem(QStringList({ "", "", "", query3.value(0).toString(), query3.value(1).toString() })); |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
311 | st_name->addChild( name ); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
312 | } |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
313 | } |
153
e71642121fb6
Load recipe seek error, abort implemented. Not yet working correct. The recipetree is finally working.
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
314 | treeWidget->expandItem(st_group); |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
315 | } |
153
e71642121fb6
Load recipe seek error, abort implemented. Not yet working correct. The recipetree is finally working.
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
316 | treeWidget->expandItem(st_guide); |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
317 | } |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
318 | |
153
e71642121fb6
Load recipe seek error, abort implemented. Not yet working correct. The recipetree is finally working.
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
319 | QSqlQuery query("SELECT record FROM recipes"); |
82
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
320 | emit setStatus(QString(tr("Total items: %1")).arg(query.size())); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
321 | |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
322 | showRecipe(); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
323 | } |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
324 | |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
325 | |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
326 | void RecipesTree::showRecipe() |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
327 | { |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
328 | QString w; |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
329 | |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
330 | qDebug() << "showRecipe" << record; |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
331 | |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
332 | const QStringList c_method({"Morey", "Mosher", "Daniels", "Halberstadt", "Naudts" }); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
333 | |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
334 | /* |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
335 | * If no recipe is "pre" selected, return. |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
336 | */ |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
337 | if (record < 1) { |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
338 | recipeBox->setEnabled(false); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
339 | return; |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
340 | } |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
341 | |
82
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
342 | /* |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
343 | * Fill in basic details of the selected recipe. |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
344 | */ |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
345 | QSqlQuery query; |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
346 | query.prepare("SELECT batch_size,boil_size,boil_time,efficiency,est_og,est_fg,est_abv,est_color,color_method,est_ibu,ibu_method,est_carb,notes,name " |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
347 | "FROM recipes WHERE record=:record"); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
348 | query.bindValue(":record", record); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
349 | query.exec(); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
350 | if (query.size() == 1) { |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
351 | query.first(); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
352 | volumeEdit->setValue(query.value(0).toDouble()); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
353 | boilvolumeEdit->setValue(query.value(1).toDouble()); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
354 | boiltimeEdit->setValue(query.value(2).toInt()); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
355 | efficiencyEdit->setValue(query.value(3).toDouble()); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
356 | ogEdit->setValue(query.value(4).toDouble()); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
357 | fgEdit->setValue(query.value(5).toDouble()); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
358 | abvEdit->setValue(query.value(6).toInt()); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
359 | colorEdit->setValue(query.value(7).toInt()); |
98
1425bf3e18ed
Solved the segmentation fault when viewing recipes twice. Set colored display for the EBC color fields using a modified dynamic stylesheet.
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
360 | colorEdit->setStyleSheet(Utils::ebc_to_style(query.value(7).toInt())); |
82
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
361 | colormethodEdit->setText(c_method[query.value(8).toInt()]); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
362 | ibuEdit->setValue(query.value(9).toInt()); |
336
e97f9e87d94b
IBU method names are now global.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
363 | ibumethodEdit->setText(g_ibu_method[query.value(10).toInt()]); |
82
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
364 | co2Edit->setValue(query.value(11).toDouble()); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
365 | remarksEdit->setPlainText(query.value(12).toString()); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
366 | recipeBox->setTitle(query.value(13).toString()); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
367 | recipeBox->setEnabled(true); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
368 | } else { |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
369 | qDebug() << "Error getting recipe record" << record; |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
370 | } |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
371 | } |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
372 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
373 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
374 | RecipesTree::~RecipesTree() {} |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
375 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
376 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
377 | void RecipesTree::edit(int recno) |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
378 | { |
92
fb0bb9a2a7e1
Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
379 | EditRecipe dialog(recno, this); |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
380 | /* Signal from editor if a refresh is needed */ |
92
fb0bb9a2a7e1
Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
381 | connect(&dialog, SIGNAL(entry_changed()), this, SLOT(refreshTable())); |
fb0bb9a2a7e1
Added support to build designer plugins, but it is nog yet complete. Added RangedSlider fro the brewtarget project to make our version of it. Started EditRecipe screen.
Michiel Broek <mbroek@mbse.eu>
parents:
90
diff
changeset
|
382 | dialog.setModal(true); |
153
e71642121fb6
Load recipe seek error, abort implemented. Not yet working correct. The recipetree is finally working.
Michiel Broek <mbroek@mbse.eu>
parents:
98
diff
changeset
|
383 | dialog.exec(); |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
384 | } |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
385 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
386 | |
82
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
387 | void RecipesTree::on_openButton_clicked() |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
388 | { |
82
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
389 | if (record > 0) |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
390 | edit(record); |
81
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
391 | } |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
392 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
393 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
394 | void RecipesTree::on_insertButton_clicked() |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
395 | { |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
396 | edit(-1); |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
397 | } |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
398 | |
562ed7d1b74d
Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
399 | |
82
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
400 | void RecipesTree::on_item_clicked(QTreeWidgetItem *item, int col) |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
401 | { |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
402 | record = -2; // Invalid |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
403 | |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
404 | if (col == 0) { |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
405 | if (item->isExpanded()) { |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
406 | treeWidget->collapseItem(item); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
407 | } else { |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
408 | treeWidget->expandItem(item); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
409 | } |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
410 | } else if (col == 1) { |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
411 | if (item->isExpanded()) { |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
412 | treeWidget->collapseItem(item); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
413 | } else { |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
414 | treeWidget->expandItem(item); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
415 | } |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
416 | } else if (col == 2 && item->text(2).length()) { |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
417 | if (item->isExpanded()) { |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
418 | item->setExpanded(false); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
419 | } else { |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
420 | item->setExpanded(true); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
421 | } |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
422 | } else if (col == 3) { |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
423 | /* |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
424 | * if a recipe name is selected then: |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
425 | * item column 3 contains the recipe name, |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
426 | * item column 4 contains the recipe record number. |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
427 | */ |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
428 | if (item->text(4).toInt() > 0) { |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
429 | if (record != item->text(4).toInt()) { |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
430 | record = item->text(4).toInt(); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
431 | showRecipe(); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
432 | } |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
433 | } |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
434 | } |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
435 | } |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
436 | |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
437 | |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
438 | void RecipesTree::on_item_doubleclicked(QTreeWidgetItem *item, int col) |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
439 | { |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
440 | if ((col == 3) && (item->text(4).toInt() > 0)) { |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
441 | edit(item->text(4).toInt()); |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
442 | } |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
443 | } |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
444 | |
84e5dcab868f
The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents:
81
diff
changeset
|
445 |