src/RecipesTree.cpp

Sun, 27 Mar 2022 22:03:18 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 27 Mar 2022 22:03:18 +0200
changeset 90
2396457a8167
parent 82
84e5dcab868f
child 92
fb0bb9a2a7e1
permissions
-rw-r--r--

Moved functions from bmsapp.cpp to MainWindow.cpp

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"
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
19 #include "config.h"
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20
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 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
24 {
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
25 qDebug() << "RecipesTree start";
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
26
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
27 gridLayout = new QGridLayout(this);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
28 gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
29 treeWidget = new QTreeWidget(this);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
30 treeWidget->setObjectName(QString::fromUtf8("treeWidget"));
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
31 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
32 sizePolicy.setHorizontalStretch(0);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
33 sizePolicy.setVerticalStretch(0);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
34 sizePolicy.setHeightForWidth(treeWidget->sizePolicy().hasHeightForWidth());
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
35 treeWidget->setSizePolicy(sizePolicy);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
36 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
37
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
38 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
39 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
40 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
41 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
42 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
43 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
44 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
45 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
46
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
48 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
49 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
50 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
51 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
52 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
53 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
54 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
55 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
56 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
57 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
58 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
59 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
60 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
61 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
62 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
63 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
64 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
65 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
66 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
67 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
68 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
69 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
70 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
71 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
72 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
73 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
74 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
75 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
76 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
77 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
78 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
79 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
80 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
81 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
82 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
83 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
84 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
85 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
86 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
87 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
88 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
89 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
90 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
91 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
92 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
93 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
94 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
95 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
96 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
97 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
98 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
99 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
100 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
101 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
102 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
103 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
104 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
105 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
106 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
107 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
108 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
109 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
110 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
111 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
112
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
114 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
115 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
116 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
117 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
118 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
119 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
120 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
121 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
122 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
123 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
124 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
125 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
126 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
127 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
128 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
129 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
130 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
131 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
132 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
133 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
134 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
135 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
136 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
137 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
138 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
139 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
140 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
141 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
142 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
143 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
144 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
145 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
146 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
147 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
148 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
149 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
150 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
151 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
152 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
153 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
154 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
155 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
156 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
157 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
158 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
159 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
160 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
161 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
162 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
163 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
164 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
165 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
166 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
167 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
168 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
169 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
170 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
171 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
172 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
173 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
174 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
175 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
176 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
177 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
178 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
179 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
180 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
181 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
182 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
183 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
184 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
185 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
186 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
187 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
188 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
189 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
190 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
191 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
192 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
193 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
194 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
195 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
196 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
197 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
198 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
199 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
200 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
201 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
202 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
203 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
204 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
205 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
206 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
207
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
209
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
210 groupBox = new QGroupBox(this);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
211 groupBox->setObjectName(QString::fromUtf8("groupBox"));
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
212 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
213 sizePolicy2.setHorizontalStretch(0);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
214 sizePolicy2.setVerticalStretch(0);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
215 sizePolicy2.setHeightForWidth(groupBox->sizePolicy().hasHeightForWidth());
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
216 groupBox->setSizePolicy(sizePolicy2);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
217 groupBox->setMinimumSize(QSize(0, 0));
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
218 horizontalLayout = new QHBoxLayout(groupBox);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
219 horizontalLayout->setSpacing(200);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
220 horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
221 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
222
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
223 quitButton = new QPushButton(groupBox);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
224 quitButton->setObjectName(QString::fromUtf8("quitButton"));
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
225 quitButton->setText(tr("Quit"));
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
226 QIcon icon;
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
227 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
228 quitButton->setIcon(icon);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
229 horizontalLayout->addWidget(quitButton);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
230
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
231 insertButton = new QPushButton(groupBox);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
232 insertButton->setObjectName(QString::fromUtf8("insertButton"));
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
233 insertButton->setText(tr("New"));
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
234 QIcon icon3;
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
235 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
236 insertButton->setIcon(icon3);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
237 horizontalLayout->addWidget(insertButton);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
238
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
239 openButton = new QPushButton(groupBox);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
240 openButton->setObjectName(QString::fromUtf8("openButton"));
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
241 openButton->setText(tr("Open"));
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
242 QIcon icon1;
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
243 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
244 openButton->setIcon(icon1);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
245 horizontalLayout->addWidget(openButton);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
246
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
247 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
248
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
249 record = -2;
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
250 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
251 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
252 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
253
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
254 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
255 emit refreshTable();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
256 }
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 void RecipesTree::refreshTable()
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
260 {
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
261 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
262
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
263 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
264
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
265 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
266 // 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
267 // 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
268 // 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
269 // 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
270 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
271 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
272 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
273 // 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
274
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
276 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
277
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
278 QSqlQuery query0;
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
279 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
280 query0.exec();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
281 query0.first();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
282 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
283 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
284 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
285 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
286 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
287 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
288
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
289 QSqlQuery query1;
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
290 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
291 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
292 query1.exec();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
293 query1.first();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
294 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
295 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
296 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
297 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
298 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
299 st_guide->addChild( st_group );
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
300
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
301 QSqlQuery query2;
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
302 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
303 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
304 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
305 query2.exec();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
306 query2.first();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
307 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
308 st_name = new QTreeWidgetItem(treeWidget);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
309 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
310 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
311 st_group->addChild( st_name );
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
312
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
313 QSqlQuery query3;
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
314 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
315 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
316 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
317 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
318 query3.exec();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
319 query3.first();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
320 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
321 name = new QTreeWidgetItem(treeWidget);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
322 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
323 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
324 st_name->addChild( name );
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
325
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
326 query3.next();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
327 }
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 query2.next();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
330 }
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
331 query1.next();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
332 }
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
333 query0.next();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
334 }
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
335
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
336 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
337 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
338
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
340 }
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
344 {
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
345 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
346
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
348
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
350 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
351
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 * 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
354 */
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
356 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
357 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
358 }
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
359
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
360 /*
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
361 * 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
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 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
364 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
365 "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
366 query.bindValue(":record", record);
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
367 query.exec();
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
368 if (query.size() == 1) {
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
369 query.first();
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
370 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
371 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
372 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
373 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
374 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
375 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
376 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
377 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
378 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
379 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
380 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
381 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
382 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
383 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
384 recipeBox->setEnabled(true);
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
385 } 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
386 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
387 }
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
388 }
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
389
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
390
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
391 RecipesTree::~RecipesTree() {}
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
392
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
393
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
394 void RecipesTree::edit(int recno)
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
395 {
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
396 qDebug() << "edit" << recno;
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
397 // EditMisc dialog(recno, this);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
398 /* Signal from editor if a refresh is needed */
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
399 // connect(&dialog, SIGNAL(entry_changed()), this, SLOT(refreshTable()));
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
400 // dialog.setModal(true);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
401 // dialog.exec();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
402 }
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
403
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
404
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
405 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
406 {
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
407 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
408 edit(record);
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
409 }
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
410
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 void RecipesTree::on_insertButton_clicked()
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
413 {
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
414 edit(-1);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
415 }
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
416
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
417
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
418 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
419 {
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
420 // 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
421
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
422 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
423
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
424 if (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
425 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
426 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
427 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
428 } 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
429 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
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 } 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
432 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
433 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
434 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
435 } 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
436 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
437 }
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
438 } 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
439 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
440 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
441 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
442 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
443 } 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
444 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
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 == 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
448 /*
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
450 * 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
451 * 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
452 */
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
454 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
455 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
456 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
457 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
458 }
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 }
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 }
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 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
465 {
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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 // 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
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 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
469 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
470 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
471 } 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
472 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
473 }
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current 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

mercurial