src/RecipesTree.cpp

Sun, 27 Mar 2022 20:38:25 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 27 Mar 2022 20:38:25 +0200
changeset 89
231a0b1292f3
parent 82
84e5dcab868f
child 90
2396457a8167
permissions
-rw-r--r--

Added MQTT settings.

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

mercurial