src/RecipesTree.cpp

Thu, 31 Mar 2022 17:16:44 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Thu, 31 Mar 2022 17:16:44 +0200
changeset 96
c36fef8bb088
parent 95
ef6048186cb3
child 98
1425bf3e18ed
permissions
-rw-r--r--

Removed the ugly green value text from the ranged slider.

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"
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21
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()));
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
254
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
255 connect(this, SIGNAL(setStatus(QString)), parent, SLOT(statusMsg(QString)));
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
256 emit refreshTable();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
257 }
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
258
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
259
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
260 void RecipesTree::refreshTable()
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
261 {
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
262 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
263
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
264 qDebug() << "RecipesTree reload" << treeWidget->autoExpandDelay();
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
265
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
266 treeWidget->clear();
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
267 // treeWidget->setAutoExpandDelay(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
268 // treeWidget->setUpdatesEnabled(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
269 // treeWidget->collapseAll();
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
270 // treeWidget->setRootIsDecorated(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
271 treeWidget->setColumnCount(4);
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
272 treeWidget->setHeaderLabels({ tr("Guide"), tr("Group"), tr("Style"), tr("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
273 treeWidget->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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->setEditTriggers(QAbstractItemView::NoEditTriggers);
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
275
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
276 connect(treeWidget, SIGNAL(itemClicked(QTreeWidgetItem *, int)), this, SLOT(on_item_clicked(QTreeWidgetItem*, int)));
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
277 connect(treeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(on_item_doubleclicked(QTreeWidgetItem*, int)));
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
278
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
279 QSqlQuery query0;
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
280 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
281 query0.exec();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
282 query0.first();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
283 for (int i = 0; i < query0.size() ; i++) {
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
284 st_guide = new QTreeWidgetItem(treeWidget);
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
285 st_guide->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled );
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
286 st_guide->setText(0, 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
287 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
288 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
289
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
290 QSqlQuery query1;
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
291 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
292 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
293 query1.exec();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
294 query1.first();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
295 for (int j = 0; j < query1.size(); j++) {
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
296 st_group = new QTreeWidgetItem(treeWidget);
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
297 st_group->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled );
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
298 st_group->setText(1, 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
299 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
300 st_guide->addChild( st_group );
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
301
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
302 QSqlQuery query2;
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
303 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
304 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
305 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
306 query2.exec();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
307 query2.first();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
308 for (int k = 0; k < query2.size(); k++) {
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
309 st_name = new QTreeWidgetItem(treeWidget);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
310 st_name->setText(2, 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
311 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
312 st_group->addChild( st_name );
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
313
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
314 QSqlQuery query3;
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
315 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
316 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
317 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
318 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
319 query3.exec();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
320 query3.first();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
321 for (int l = 0; l < query3.size(); l++) {
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
322 name = new QTreeWidgetItem(treeWidget);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
323 name->setText(3, query3.value(0).toString());
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
324 name->setText(4, query3.value(1).toString());
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
325 st_name->addChild( name );
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
326
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
327 query3.next();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
328 }
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
329
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
330 query2.next();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
331 }
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
332 query1.next();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
333 }
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
334 query0.next();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
335 }
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
336
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
337 QSqlQuery query("SELECT * FROM recipes ORDER BY st_guide,st_letter,st_name,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
338 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
339
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
341 }
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
345 {
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
347
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
349
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
351 const QStringList i_method({"Tinseth", "Rager", "Daniels" });
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 /*
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 * 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
355 */
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
357 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
358 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
359 }
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
360
95
ef6048186cb3 Added part of a beercolor plugin that needs a lot of work. Added some rangesliders in the recipe editor. Added EBC and SRM color mapping to QColor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
361 qDebug() << "showRecipe 2";
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
362 /*
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
363 * 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
364 */
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
366 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
367 "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
368 query.bindValue(":record", record);
95
ef6048186cb3 Added part of a beercolor plugin that needs a lot of work. Added some rangesliders in the recipe editor. Added EBC and SRM color mapping to QColor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
369 qDebug() << "showRecipe 3";
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
370 query.exec();
95
ef6048186cb3 Added part of a beercolor plugin that needs a lot of work. Added some rangesliders in the recipe editor. Added EBC and SRM color mapping to QColor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
371 qDebug() << "showRecipe 4";
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
372 if (query.size() == 1) {
95
ef6048186cb3 Added part of a beercolor plugin that needs a lot of work. Added some rangesliders in the recipe editor. Added EBC and SRM color mapping to QColor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
373 qDebug() << "showRecipe 5 ok";
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
374 query.first();
95
ef6048186cb3 Added part of a beercolor plugin that needs a lot of work. Added some rangesliders in the recipe editor. Added EBC and SRM color mapping to QColor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
375 qDebug() << "showRecipe 6";
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
376 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
377 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
378 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
379 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
380 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
381 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
382 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
383 colorEdit->setValue(query.value(7).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
384 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
385 ibuEdit->setValue(query.value(9).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
386 ibumethodEdit->setText(i_method[query.value(10).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
387 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
388 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
389 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
390 recipeBox->setEnabled(true);
95
ef6048186cb3 Added part of a beercolor plugin that needs a lot of work. Added some rangesliders in the recipe editor. Added EBC and SRM color mapping to QColor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
391 qDebug() << "showRecipe 7";
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
392 } else {
95
ef6048186cb3 Added part of a beercolor plugin that needs a lot of work. Added some rangesliders in the recipe editor. Added EBC and SRM color mapping to QColor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
393 qDebug() << "showRecipe 5 error";
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
394 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
395 }
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
396 }
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 RecipesTree::~RecipesTree() {}
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
400
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
401
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
402 void RecipesTree::edit(int recno)
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
403 {
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
404 qDebug() << "edit" << recno;
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
405 EditRecipe dialog(recno, this);
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
406 /* 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
407 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
408 dialog.setModal(true);
95
ef6048186cb3 Added part of a beercolor plugin that needs a lot of work. Added some rangesliders in the recipe editor. Added EBC and SRM color mapping to QColor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
409 int rc = dialog.exec();
ef6048186cb3 Added part of a beercolor plugin that needs a lot of work. Added some rangesliders in the recipe editor. Added EBC and SRM color mapping to QColor.
Michiel Broek <mbroek@mbse.eu>
parents: 92
diff changeset
410 qDebug() << "edit is ready rc=" << rc;
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
411 }
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
412
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
413
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
414 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
415 {
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
416 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
417 edit(record);
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
418 }
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
419
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
420
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
421 void RecipesTree::on_insertButton_clicked()
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
422 {
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
423 edit(-1);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
424 }
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
425
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
426
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
427 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
428 {
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 // qDebug() << Q_FUNC_INFO << item->text(col) << "col:" << col << item->text(4);
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
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 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
434 qDebug() << item->text(0) << item->text(0).length() << 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
435 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
436 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
437 } 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
438 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
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 } 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
441 qDebug() << item->text(1) << item->text(1).length() << 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
442 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
443 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
444 } 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
445 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
446 }
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
447 } 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
448 qDebug() << item->text(2) << item->text(2).length() << 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
449 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
450 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
451 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
452 } 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
453 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
454 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
455 }
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
456 } 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
457 /*
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
458 * 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
459 * 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
460 * 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
461 */
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
462 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
463 qDebug() << "save for openButton" << item->text(4);
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
464 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
465 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
466 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
467 }
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
468 }
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
469 }
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
470 }
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
471
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
472
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
473 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
474 {
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
475 // qDebug() << Q_FUNC_INFO << item->text(col) << "col:" << 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
476
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
477 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
478 qDebug() << "shorcut open record" << item->text(4);
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
479 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
480 } else if (item->text(col).length() > 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
481 qDebug() << "doubleclick on" << item->text(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
482 }
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
483 }
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
484
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
485

mercurial