Added start of the Recipes Tree to select a recipe

Wed, 23 Mar 2022 22:00:28 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Wed, 23 Mar 2022 22:00:28 +0100
changeset 81
562ed7d1b74d
parent 80
b319a1175092
child 82
84e5dcab868f

Added start of the Recipes Tree to select a recipe

CMakeLists.txt file | annotate | diff | comparison | revisions
src/MainWindow.cpp file | annotate | diff | comparison | revisions
src/MainWindow.h file | annotate | diff | comparison | revisions
src/RecipesTree.cpp file | annotate | diff | comparison | revisions
src/RecipesTree.h file | annotate | diff | comparison | revisions
ui/Setup.ui file | annotate | diff | comparison | revisions
--- a/CMakeLists.txt	Mon Mar 21 13:46:33 2022 +0100
+++ b/CMakeLists.txt	Wed Mar 23 22:00:28 2022 +0100
@@ -100,6 +100,7 @@
 set( SRCS
     ${SRCDIR}/main.cpp
     ${SRCDIR}/bmsapp.cpp
+    ${SRCDIR}/RecipesTree.cpp
     ${SRCDIR}/AboutDialog.cpp
     ${SRCDIR}/InventorySuppliers.cpp
     ${SRCDIR}/EditSupplier.cpp
@@ -133,6 +134,7 @@
 
 set( HDRS
     ${SRCDIR}/bmsapp.h
+    ${SRCDIR}/RecipesTree.h
     ${SRCDIR}/AboutDialog.h
     ${SRCDIR}/InventorySuppliers.h
     ${SRCDIR}/EditSupplier.h
@@ -177,7 +179,6 @@
     ${UIDIR}/EditProfileMash.ui
     ${UIDIR}/EditProfileStyle.ui
     ${UIDIR}/EditProfileFerment.ui
-    ${UIDIR}/Setup.ui
     ${UIDIR}/MainWindow.ui
 )
 
--- a/src/MainWindow.cpp	Mon Mar 21 13:46:33 2022 +0100
+++ b/src/MainWindow.cpp	Wed Mar 23 22:00:28 2022 +0100
@@ -16,6 +16,7 @@
  */
 #include "MainWindow.h"
 #include "AboutDialog.h"
+#include "RecipesTree.h"
 #include "InventorySuppliers.h"
 #include "InventoryFermentables.h"
 #include "InventoryHops.h"
@@ -65,6 +66,30 @@
 }
 
 
+void MainWindow::fromRecipesTree()
+{
+    qDebug() << Q_FUNC_INFO;
+    ui->mainStack->setCurrentIndex(-1);
+    ui->mainStack->removeWidget(RecipesTreeWindow);
+    delete RecipesTreeWindow;
+    setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) );
+    ui->menuBar->setVisible(true);
+}
+
+
+void MainWindow::on_actionRecipes_triggered()
+{
+    qDebug() << Q_FUNC_INFO;
+
+    RecipesTreeWindow = new RecipesTree(this);
+    int index = ui->mainStack->count();
+    ui->mainStack->addWidget(RecipesTreeWindow);
+    ui->mainStack->setCurrentIndex(index);
+    setWindowTitle( QString("BMSapp - %1 - Recipes").arg(VERSIONSTRING));
+//    ui->menuBar->setVisible(false);
+}
+
+
 void MainWindow::fromInventorySuppliers()
 {
     qDebug() << Q_FUNC_INFO;
--- a/src/MainWindow.h	Mon Mar 21 13:46:33 2022 +0100
+++ b/src/MainWindow.h	Wed Mar 23 22:00:28 2022 +0100
@@ -1,6 +1,7 @@
 #ifndef _MAINWINDOW_H
 #define _MAINWINDOW_H
 
+#include "RecipesTree.h"
 #include "InventorySuppliers.h"
 #include "InventoryFermentables.h"
 #include "InventoryHops.h"
@@ -32,6 +33,7 @@
     ~MainWindow();
 
     // Keep pointers to new windows.
+    RecipesTree *RecipesTreeWindow;
     InventorySuppliers *InventorySuppliersWindow;
     InventoryFermentables *InventoryFermentablesWindow;
     InventoryHops *InventoryHopsWindow;
@@ -47,6 +49,7 @@
 
 private slots:
     void on_actionExit_triggered();
+    void on_actionRecipes_triggered();
     void on_actionSuppliers_triggered();
     void on_actionFermentables_triggered();
     void on_actionHops_triggered();
@@ -64,6 +67,7 @@
     void on_actionAbout_triggered();
 
 public slots:
+    void fromRecipesTree();
     void fromInventorySuppliers();
     void fromInventoryFermentables();
     void fromInventoryHops();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/RecipesTree.cpp	Wed Mar 23 22:00:28 2022 +0100
@@ -0,0 +1,196 @@
+/**
+ * RecipesTree.cpp is part of bmsapp.
+ *
+ * bmsapp is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * bmsapp is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "RecipesTree.h"
+//#include "EditMisc.h"
+#include "MainWindow.h"
+#include "config.h"
+#include "bmsapp.h"
+
+
+
+RecipesTree::RecipesTree(QWidget *parent) : QDialog(parent)
+{
+    qDebug() << "RecipesTree start";
+
+    gridLayout = new QGridLayout(this);
+    gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
+    treeWidget = new QTreeWidget(this);
+    treeWidget->setObjectName(QString::fromUtf8("treeWidget"));
+    QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    sizePolicy.setHorizontalStretch(0);
+    sizePolicy.setVerticalStretch(0);
+    sizePolicy.setHeightForWidth(treeWidget->sizePolicy().hasHeightForWidth());
+    treeWidget->setSizePolicy(sizePolicy);
+    gridLayout->addWidget(treeWidget, 0, 0, 1, 1);
+
+    listView = new QListView(this);
+    listView->setObjectName(QString::fromUtf8("listView"));
+    QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Expanding);
+    sizePolicy1.setHorizontalStretch(0);
+    sizePolicy1.setVerticalStretch(0);
+    sizePolicy1.setHeightForWidth(listView->sizePolicy().hasHeightForWidth());
+    listView->setSizePolicy(sizePolicy1);
+    listView->setMinimumSize(QSize(500, 0));
+    gridLayout->addWidget(listView, 0, 1, 2, 1);
+
+    groupBox = new QGroupBox(this);
+    groupBox->setObjectName(QString::fromUtf8("groupBox"));
+    QSizePolicy sizePolicy2(QSizePolicy::Preferred, QSizePolicy::Preferred);
+    sizePolicy2.setHorizontalStretch(0);
+    sizePolicy2.setVerticalStretch(0);
+    sizePolicy2.setHeightForWidth(groupBox->sizePolicy().hasHeightForWidth());
+    groupBox->setSizePolicy(sizePolicy2);
+    groupBox->setMinimumSize(QSize(0, 0));
+    horizontalLayout = new QHBoxLayout(groupBox);
+    horizontalLayout->setSpacing(200);
+    horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
+    horizontalLayout->setContentsMargins(0, 0, 0, 0);
+
+    quitButton = new QPushButton(groupBox);
+    quitButton->setObjectName(QString::fromUtf8("quitButton"));
+    quitButton->setText(tr("Quit"));
+    QIcon icon;
+    icon.addFile(QString::fromUtf8(":icons/silk/door_out.png"), QSize(), QIcon::Normal, QIcon::Off);
+    quitButton->setIcon(icon);
+    horizontalLayout->addWidget(quitButton);
+
+    insertButton = new QPushButton(groupBox);
+    insertButton->setObjectName(QString::fromUtf8("insertButton"));
+    insertButton->setText(tr("New"));
+    QIcon icon3;
+    icon3.addFile(QString::fromUtf8(":icons/silk/table_row_insert.png"), QSize(), QIcon::Normal, QIcon::Off);
+    insertButton->setIcon(icon3);
+    horizontalLayout->addWidget(insertButton);
+
+    openButton = new QPushButton(groupBox);
+    openButton->setObjectName(QString::fromUtf8("openButton"));
+    openButton->setText(tr("Open"));
+    QIcon icon1;
+    icon1.addFile(QString::fromUtf8(":icons/silk/cup_go.png"), QSize(), QIcon::Normal, QIcon::Off);
+    openButton->setIcon(icon1);
+    horizontalLayout->addWidget(openButton);
+
+    gridLayout->addWidget(groupBox, 1, 0, 1, 1);
+
+    connect(quitButton, SIGNAL(clicked()), parent, SLOT(fromRecipesTree()));
+    //connect(insertButton, SIGNAL(clicked()), this, SLOT(on_insertButton_clicked()));
+    //connect(exportButton, SIGNAL(clicked()), this, SLOT(on_exportButton_clicked()));
+
+//    connect(this, SIGNAL(setStatus(QString)), parent, SLOT(statusMsg(QString)));
+    emit refreshTable();
+}
+
+
+void RecipesTree::refreshTable()
+{
+    QTreeWidgetItem *st_guide, *st_group, *st_name, *name;
+
+    qDebug() << "RecipesTree reload";
+
+    treeWidget->setRootIsDecorated(false);
+    treeWidget->resizeColumnToContents(2);
+    treeWidget->setColumnCount(5);
+    treeWidget->setHeaderLabels(QStringList() << "Guide" << "Group" << "Style" << "Recipe" << "Record");
+
+    QSqlQuery query0;
+    query0.prepare("SELECT DISTINCT st_guide FROM recipes ORDER BY st_guide");
+    query0.exec();
+    query0.first();
+    for (int i = 0; i < query0.size() ; i++) {
+    	st_guide = new QTreeWidgetItem(treeWidget);
+	st_guide->setText(0, query0.value(0).toString());
+
+	QSqlQuery query1;
+	query1.prepare("SELECT DISTINCT st_letter FROM recipes WHERE st_guide=:guide ORDER BY st_letter");
+	query1.bindValue(":guide", query0.value(0).toString());
+	query1.exec();
+	query1.first();
+	for (int j = 0; j < query1.size(); j++) {
+	    st_group = new QTreeWidgetItem(treeWidget);
+	    st_group->setText(1, query1.value(0).toString());
+	    st_group->setChildIndicatorPolicy(QTreeWidgetItem::DontShowIndicator);
+	    st_guide->addChild( st_group );
+
+	    QSqlQuery query2;
+            query2.prepare("SELECT DISTINCT st_name FROM recipes WHERE st_guide=:guide AND st_letter=:group ORDER BY st_name");
+            query2.bindValue(":guide", query0.value(0).toString());
+	    query2.bindValue(":group", query1.value(0).toString());
+            query2.exec();
+            query2.first();
+	    for (int k = 0; k < query2.size(); k++) {
+		st_name = new QTreeWidgetItem(treeWidget);
+		st_name->setText(2, query2.value(0).toString());
+		st_group->addChild( st_name );
+
+		QSqlQuery query3;
+            	query3.prepare("SELECT name,record FROM recipes WHERE st_guide=:guide AND st_letter=:group AND st_name=:name ORDER BY name");
+            	query3.bindValue(":guide", query0.value(0).toString());
+            	query3.bindValue(":group", query1.value(0).toString());
+		query3.bindValue(":name", query2.value(0).toString());
+            	query3.exec();
+            	query3.first();
+		for (int l = 0; l < query3.size(); l++) {
+		    name = new QTreeWidgetItem(treeWidget);
+                    name->setText(3, query3.value(0).toString());
+		    name->setText(4, query3.value(1).toString());
+		    st_name->addChild( name );
+
+		    query3.next();
+		}
+
+//		qDebug() << query0.value(0).toString() << query1.value(0).toString() << query2.value(0).toString();
+		query2.next();
+	    }
+	    query1.next();
+	}
+    	query0.next();
+    }
+
+//    treeWidget->expandAll();
+
+//    QSqlQuery query("SELECT * FROM recipes ORDER BY st_guide,st_letter,st_name,name");
+//    emit setStatus(QString(tr("Total items: %1")).arg(query.size()));
+}
+
+
+RecipesTree::~RecipesTree() {}
+
+
+void RecipesTree::edit(int recno)
+{
+//    EditMisc dialog(recno, this);
+    /* Signal from editor if a refresh is needed */
+//    connect(&dialog, SIGNAL(entry_changed()), this, SLOT(refreshTable()));
+//    dialog.setModal(true);
+//    dialog.exec();
+}
+
+
+void RecipesTree::on_editButton_clicked()
+{
+    QPushButton *pb = qobject_cast<QPushButton *>(QObject::sender());
+    int recno = pb->objectName().toInt();
+    edit(recno);
+}
+
+
+void RecipesTree::on_insertButton_clicked()
+{
+    edit(-1);
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/RecipesTree.h	Wed Mar 23 22:00:28 2022 +0100
@@ -0,0 +1,47 @@
+#ifndef _RECIPESTREE_H
+#define _RECIPESTREE_H
+
+#include <QDialog>
+#include <QtWidgets/QGridLayout>
+#include <QtWidgets/QGroupBox>
+#include <QtWidgets/QPushButton>
+#include <QtWidgets/QListView>
+#include <QtWidgets/QTreeWidget>
+#include <QtWidgets/QDialog>
+#include <QtWidgets/QHeaderView>
+
+
+namespace Ui {
+class RecipesTree;
+}
+
+class RecipesTree : public QDialog
+{
+    Q_OBJECT
+
+public:
+    explicit RecipesTree(QWidget *parent = nullptr);
+    ~RecipesTree();
+
+signals:
+    void setStatus(QString);
+
+private slots:
+    void on_insertButton_clicked();
+    void on_editButton_clicked();
+    void refreshTable(void);
+
+private:
+    QGridLayout *gridLayout;
+    QListView *listView;
+    QTreeWidget *treeWidget;
+    QGroupBox *groupBox;
+    QHBoxLayout *horizontalLayout;
+    QPushButton *quitButton;
+    QPushButton *insertButton;
+    QPushButton *openButton;
+
+    void edit(int recno);
+};
+
+#endif
--- a/ui/Setup.ui	Mon Mar 21 13:46:33 2022 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,688 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Setup</class>
- <widget class="QDialog" name="Setup">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>1280</width>
-    <height>640</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Dialog</string>
-  </property>
-  <layout class="QGridLayout" name="gridLayout">
-   <item row="0" column="0">
-    <widget class="QWidget" name="topWidget" native="true">
-     <widget class="QLabel" name="breweryLabel">
-      <property name="geometry">
-       <rect>
-        <x>60</x>
-        <y>20</y>
-        <width>131</width>
-        <height>20</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>Brewery name:</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-     </widget>
-     <widget class="QLineEdit" name="breweryEdit">
-      <property name="geometry">
-       <rect>
-        <x>212</x>
-        <y>20</y>
-        <width>941</width>
-        <height>23</height>
-       </rect>
-      </property>
-      <property name="toolTip">
-       <string>The name for this brewery.</string>
-      </property>
-     </widget>
-     <widget class="Line" name="line">
-      <property name="geometry">
-       <rect>
-        <x>0</x>
-        <y>60</y>
-        <width>1251</width>
-        <height>20</height>
-       </rect>
-      </property>
-      <property name="orientation">
-       <enum>Qt::Horizontal</enum>
-      </property>
-     </widget>
-     <widget class="QLabel" name="fwhLabel">
-      <property name="geometry">
-       <rect>
-        <x>60</x>
-        <y>120</y>
-        <width>131</width>
-        <height>20</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>First Wort Hop factor:</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-     </widget>
-     <widget class="QLabel" name="mashhopLabel">
-      <property name="geometry">
-       <rect>
-        <x>60</x>
-        <y>150</y>
-        <width>131</width>
-        <height>20</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>Mash Hop factor:</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-     </widget>
-     <widget class="QLabel" name="pelletLabel">
-      <property name="geometry">
-       <rect>
-        <x>60</x>
-        <y>180</y>
-        <width>131</width>
-        <height>20</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>Pellet Hop factor:</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-     </widget>
-     <widget class="QLabel" name="hopplugLabel">
-      <property name="geometry">
-       <rect>
-        <x>60</x>
-        <y>210</y>
-        <width>131</width>
-        <height>20</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>Hop Plugs factor:</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-     </widget>
-     <widget class="QLabel" name="wethopLabel">
-      <property name="geometry">
-       <rect>
-        <x>60</x>
-        <y>240</y>
-        <width>131</width>
-        <height>20</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>Wet Hop factor:</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-     </widget>
-     <widget class="QLabel" name="cryohopLabel">
-      <property name="geometry">
-       <rect>
-        <x>60</x>
-        <y>270</y>
-        <width>131</width>
-        <height>20</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>Cryo HopĀ® factor:</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-     </widget>
-     <widget class="QSpinBox" name="fwhEdit">
-      <property name="geometry">
-       <rect>
-        <x>210</x>
-        <y>120</y>
-        <width>81</width>
-        <height>24</height>
-       </rect>
-      </property>
-      <property name="toolTip">
-       <string>The efficiency for First Wort Hopping.</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-      <property name="accelerated">
-       <bool>true</bool>
-      </property>
-      <property name="suffix">
-       <string>%</string>
-      </property>
-      <property name="minimum">
-       <number>-50</number>
-      </property>
-      <property name="maximum">
-       <number>50</number>
-      </property>
-     </widget>
-     <widget class="QSpinBox" name="mashhopEdit">
-      <property name="geometry">
-       <rect>
-        <x>210</x>
-        <y>150</y>
-        <width>81</width>
-        <height>24</height>
-       </rect>
-      </property>
-      <property name="toolTip">
-       <string>The efficiency for Mash hopping.</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-      <property name="accelerated">
-       <bool>true</bool>
-      </property>
-      <property name="suffix">
-       <string>%</string>
-      </property>
-      <property name="minimum">
-       <number>-50</number>
-      </property>
-      <property name="maximum">
-       <number>50</number>
-      </property>
-     </widget>
-     <widget class="QSpinBox" name="pelletEdit">
-      <property name="geometry">
-       <rect>
-        <x>210</x>
-        <y>180</y>
-        <width>81</width>
-        <height>24</height>
-       </rect>
-      </property>
-      <property name="toolTip">
-       <string>The efficiency for hop pellets.</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-      <property name="accelerated">
-       <bool>true</bool>
-      </property>
-      <property name="suffix">
-       <string>%</string>
-      </property>
-      <property name="minimum">
-       <number>0</number>
-      </property>
-      <property name="maximum">
-       <number>20</number>
-      </property>
-     </widget>
-     <widget class="QSpinBox" name="hopplugEdit">
-      <property name="geometry">
-       <rect>
-        <x>210</x>
-        <y>210</y>
-        <width>81</width>
-        <height>24</height>
-       </rect>
-      </property>
-      <property name="toolTip">
-       <string>The efficiency for hop plugs.</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-      <property name="accelerated">
-       <bool>true</bool>
-      </property>
-      <property name="suffix">
-       <string>%</string>
-      </property>
-      <property name="maximum">
-       <number>20</number>
-      </property>
-     </widget>
-     <widget class="QSpinBox" name="wethopEdit">
-      <property name="geometry">
-       <rect>
-        <x>210</x>
-        <y>240</y>
-        <width>81</width>
-        <height>24</height>
-       </rect>
-      </property>
-      <property name="toolTip">
-       <string>The efficiency for fresh hops.</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-      <property name="accelerated">
-       <bool>true</bool>
-      </property>
-      <property name="suffix">
-       <string>%</string>
-      </property>
-      <property name="minimum">
-       <number>-98</number>
-      </property>
-      <property name="maximum">
-       <number>-20</number>
-      </property>
-     </widget>
-     <widget class="QSpinBox" name="cryohopEdit">
-      <property name="geometry">
-       <rect>
-        <x>210</x>
-        <y>270</y>
-        <width>81</width>
-        <height>24</height>
-       </rect>
-      </property>
-      <property name="toolTip">
-       <string>The efficiency for using Cryo HopĀ®.</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-      <property name="accelerated">
-       <bool>true</bool>
-      </property>
-      <property name="suffix">
-       <string>%</string>
-      </property>
-      <property name="minimum">
-       <number>-20</number>
-      </property>
-      <property name="maximum">
-       <number>150</number>
-      </property>
-     </widget>
-     <widget class="QLabel" name="grainLabel">
-      <property name="geometry">
-       <rect>
-        <x>400</x>
-        <y>120</y>
-        <width>161</width>
-        <height>20</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>Grain Absorbtion:</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-     </widget>
-     <widget class="QLabel" name="brixLabel">
-      <property name="geometry">
-       <rect>
-        <x>400</x>
-        <y>150</y>
-        <width>161</width>
-        <height>20</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>Brix Correction factor:</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-     </widget>
-     <widget class="QLabel" name="titleLabel">
-      <property name="geometry">
-       <rect>
-        <x>5</x>
-        <y>80</y>
-        <width>1251</width>
-        <height>20</height>
-       </rect>
-      </property>
-      <property name="font">
-       <font>
-        <family>DejaVu Sans</family>
-        <pointsize>12</pointsize>
-        <weight>75</weight>
-        <bold>true</bold>
-       </font>
-      </property>
-      <property name="text">
-       <string>Brew settings.</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignCenter</set>
-      </property>
-     </widget>
-     <widget class="QLabel" name="colorLabel">
-      <property name="geometry">
-       <rect>
-        <x>800</x>
-        <y>120</y>
-        <width>121</width>
-        <height>16</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>Color Calculation:</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-     </widget>
-     <widget class="QLabel" name="ibuLabel">
-      <property name="geometry">
-       <rect>
-        <x>800</x>
-        <y>150</y>
-        <width>121</width>
-        <height>16</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>IBU Calculation:</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-     </widget>
-     <widget class="QLabel" name="waterLabel">
-      <property name="geometry">
-       <rect>
-        <x>800</x>
-        <y>180</y>
-        <width>121</width>
-        <height>16</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>Default Water:</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-     </widget>
-     <widget class="QLabel" name="yeastLabel">
-      <property name="geometry">
-       <rect>
-        <x>800</x>
-        <y>210</y>
-        <width>121</width>
-        <height>16</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>Private Yeast bank:</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-     </widget>
-     <widget class="QDoubleSpinBox" name="grainEdit">
-      <property name="geometry">
-       <rect>
-        <x>580</x>
-        <y>120</y>
-        <width>101</width>
-        <height>24</height>
-       </rect>
-      </property>
-      <property name="toolTip">
-       <string>Absorbtion with water by the grain (L/Kg)</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-      <property name="accelerated">
-       <bool>true</bool>
-      </property>
-      <property name="suffix">
-       <string> L/Kg</string>
-      </property>
-      <property name="minimum">
-       <double>0.500000000000000</double>
-      </property>
-      <property name="maximum">
-       <double>1.100000000000000</double>
-      </property>
-      <property name="singleStep">
-       <double>0.010000000000000</double>
-      </property>
-      <property name="stepType">
-       <enum>QAbstractSpinBox::DefaultStepType</enum>
-      </property>
-      <property name="value">
-       <double>1.000000000000000</double>
-      </property>
-     </widget>
-     <widget class="QDoubleSpinBox" name="brixEdit">
-      <property name="geometry">
-       <rect>
-        <x>580</x>
-        <y>150</y>
-        <width>101</width>
-        <height>24</height>
-       </rect>
-      </property>
-      <property name="toolTip">
-       <string>Plato to Brix conversion factor.</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-      </property>
-      <property name="accelerated">
-       <bool>true</bool>
-      </property>
-      <property name="minimum">
-       <double>1.000000000000000</double>
-      </property>
-      <property name="maximum">
-       <double>1.090000000000000</double>
-      </property>
-      <property name="singleStep">
-       <double>0.010000000000000</double>
-      </property>
-      <property name="stepType">
-       <enum>QAbstractSpinBox::DefaultStepType</enum>
-      </property>
-      <property name="value">
-       <double>1.000000000000000</double>
-      </property>
-     </widget>
-     <widget class="QComboBox" name="colorEdit">
-      <property name="geometry">
-       <rect>
-        <x>940</x>
-        <y>120</y>
-        <width>161</width>
-        <height>23</height>
-       </rect>
-      </property>
-      <property name="currentText">
-       <string/>
-      </property>
-      <property name="minimumContentsLength">
-       <number>4</number>
-      </property>
-      <property name="iconSize">
-       <size>
-        <width>0</width>
-        <height>0</height>
-       </size>
-      </property>
-      <property name="placeholderText">
-       <string>Choose color</string>
-      </property>
-     </widget>
-     <widget class="QComboBox" name="ibuEdit">
-      <property name="geometry">
-       <rect>
-        <x>940</x>
-        <y>150</y>
-        <width>161</width>
-        <height>23</height>
-       </rect>
-      </property>
-      <property name="currentText">
-       <string/>
-      </property>
-      <property name="minimumContentsLength">
-       <number>4</number>
-      </property>
-      <property name="iconSize">
-       <size>
-        <width>0</width>
-        <height>0</height>
-       </size>
-      </property>
-      <property name="placeholderText">
-       <string>Choose color</string>
-      </property>
-     </widget>
-     <widget class="QComboBox" name="waterEdit">
-      <property name="geometry">
-       <rect>
-        <x>940</x>
-        <y>180</y>
-        <width>211</width>
-        <height>23</height>
-       </rect>
-      </property>
-      <property name="currentText">
-       <string/>
-      </property>
-      <property name="minimumContentsLength">
-       <number>4</number>
-      </property>
-      <property name="iconSize">
-       <size>
-        <width>0</width>
-        <height>0</height>
-       </size>
-      </property>
-      <property name="placeholderText">
-       <string>Choose color</string>
-      </property>
-     </widget>
-     <widget class="QComboBox" name="yeastEdit">
-      <property name="geometry">
-       <rect>
-        <x>940</x>
-        <y>210</y>
-        <width>211</width>
-        <height>23</height>
-       </rect>
-      </property>
-      <property name="currentText">
-       <string/>
-      </property>
-      <property name="minimumContentsLength">
-       <number>4</number>
-      </property>
-      <property name="iconSize">
-       <size>
-        <width>0</width>
-        <height>0</height>
-       </size>
-      </property>
-      <property name="placeholderText">
-       <string>Choose color</string>
-      </property>
-     </widget>
-     <widget class="QLabel" name="logoLabel">
-      <property name="geometry">
-       <rect>
-        <x>940</x>
-        <y>260</y>
-        <width>211</width>
-        <height>211</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>Logo here</string>
-      </property>
-      <property name="alignment">
-       <set>Qt::AlignCenter</set>
-      </property>
-     </widget>
-     <widget class="QPushButton" name="quitButton">
-      <property name="geometry">
-       <rect>
-        <x>50</x>
-        <y>520</y>
-        <width>80</width>
-        <height>23</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>Quit</string>
-      </property>
-      <property name="icon">
-       <iconset>
-        <normaloff>:icons/silk/door_out.png</normaloff>:icons/silk/door_out.png</iconset>
-      </property>
-     </widget>
-     <widget class="QPushButton" name="saveButton">
-      <property name="geometry">
-       <rect>
-        <x>200</x>
-        <y>520</y>
-        <width>80</width>
-        <height>23</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>Save</string>
-      </property>
-      <property name="icon">
-       <iconset>
-        <normaloff>:icons/silk/disk.png</normaloff>:icons/silk/disk.png</iconset>
-      </property>
-     </widget>
-     <widget class="QPushButton" name="openButton">
-      <property name="geometry">
-       <rect>
-        <x>810</x>
-        <y>260</y>
-        <width>111</width>
-        <height>23</height>
-       </rect>
-      </property>
-      <property name="text">
-       <string>Load logo</string>
-      </property>
-      <property name="icon">
-       <iconset resource="../../../../../../home/mbroek/MyProjects/bmsapp/resources/icons.qrc">
-        <normaloff>:/icons/silk/folder_picture.png</normaloff>:/icons/silk/folder_picture.png</iconset>
-      </property>
-     </widget>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources>
-  <include location="../../../../../../home/mbroek/MyProjects/bmsapp/resources/icons.qrc"/>
- </resources>
- <connections/>
-</ui>

mercurial