Experiment with checkboxes in the fermentable table.

Sun, 03 Apr 2022 22:02:12 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 03 Apr 2022 22:02:12 +0200
changeset 103
6da4e93b6ceb
parent 102
b017001850df
child 104
c02dfb7bb2f9

Experiment with checkboxes in the fermentable table.

src/EditRecipe.cpp file | annotate | diff | comparison | revisions
src/EditRecipe.h file | annotate | diff | comparison | revisions
src/MainWindow.cpp file | annotate | diff | comparison | revisions
ui/EditRecipe.ui file | annotate | diff | comparison | revisions
--- a/src/EditRecipe.cpp	Sun Apr 03 17:43:45 2022 +0200
+++ b/src/EditRecipe.cpp	Sun Apr 03 22:02:12 2022 +0200
@@ -254,7 +254,7 @@
     connect(ui->perc_sugarsShow, &QProgressBar::valueChanged, this, &EditRecipe::on_perc_sugars_valueChanged);
     connect(ui->perc_caraShow, &QProgressBar::valueChanged, this, &EditRecipe::on_perc_cara_valueChanged);
     connect(ui->lintnerShow, &QProgressBar::valueChanged, this, &EditRecipe::on_lintner_valueChanged);
-//    connect(ui->fermentablesTable, SIGNAL(cellChanged(int, int)), this, SLOT(cell_Changed(int, int)));
+    connect(ui->fermentablesTable, SIGNAL(cellChanged(int, int)), this, SLOT(cell_Fermentable_changed(int, int)));
 
     // All signals from tab "Hops"
 //    connect(ui->hopsTable, SIGNAL(cellChanged(int, int)), this, SLOT(cell_Changed(int, int)));
@@ -385,19 +385,10 @@
             item->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter);
             ui->fermentablesTable->setItem(i, 7, item);
 
-	    if (obj["f_adjust_to_total_100"].toString().toInt()) {
-            	pWidget = new QWidget();
-            	label = new QLabel;
-            	label->setPixmap(QPixmap(":icons/silk/tick.png"));
-            	pLayout = new QHBoxLayout(pWidget);
-            	pLayout->addWidget(label);
-            	pLayout->setAlignment(Qt::AlignCenter);
-            	pLayout->setContentsMargins(0, 0, 0, 0);
-            	pWidget->setLayout(pLayout);
-            	ui->fermentablesTable->setCellWidget(i, 8, pWidget);
-            } else {
-            	ui->fermentablesTable->removeCellWidget(i, 8);
-            }
+	    QTableWidgetItem *checkBoxItem = new QTableWidgetItem();
+	    checkBoxItem->setCheckState((obj["f_adjust_to_total_100"].toInt()) ? Qt::Checked : Qt::Unchecked);
+	    checkBoxItem->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter);
+            ui->fermentablesTable->setItem(i, 8, checkBoxItem);
 
 	    /* Add the Delete row button */
             pWidget = new QWidget();
@@ -806,6 +797,41 @@
 }
 
 
+void EditRecipe::cell_Fermentable_changed(int nRow, int nCol)
+{
+    if (this->ignoreChanges)
+        return;
+
+    qDebug() << "Cell at row " + QString::number(nRow) + " column " + QString::number(nCol) + " was changed.";
+
+    if (nCol == 8) {	// 100% checkbox
+	this->ignoreChanges = true;
+
+	if (ui->fermentablesTable->item(nRow, nCol)->checkState() == Qt::Checked) {
+	    /*
+	     * This row is checked. Remove any other checked item.
+	     */
+	    for (int i = 0; i < ui->fermentablesTable->rowCount(); i++) {
+		if (i != nRow) {
+		    QTableWidgetItem *checkBoxItem = ui->fermentablesTable->item(i, nCol);
+		    checkBoxItem->setCheckState(Qt::Unchecked);
+		    ui->fermentablesTable->setItem(i, nCol, checkBoxItem);
+		}
+	    }
+	} else {
+	    /*
+	     * Unchecked, start working with amounts instead of percentages.
+	     */
+	}
+	qDebug() << ui->fermentablesTable->item(nRow, nCol)->checkState();
+	this->ignoreChanges = false;
+    }
+
+    // TODO: some checks and auto fixes.
+//    make_Json();
+}
+
+
 void EditRecipe::on_deleteFermentRow_clicked()
 {
     QPushButton *pb = qobject_cast<QPushButton *>(QObject::sender());
--- a/src/EditRecipe.h	Sun Apr 03 17:43:45 2022 +0200
+++ b/src/EditRecipe.h	Sun Apr 03 22:02:12 2022 +0200
@@ -34,6 +34,7 @@
     void refreshYeasts();
     void refreshMashs();
     void refreshAll();
+    void cell_Fermentable_changed(int nRow, int nCol);
     void on_deleteFermentRow_clicked();
 
     void on_perc_mash_valueChanged(int value);
--- a/src/MainWindow.cpp	Sun Apr 03 17:43:45 2022 +0200
+++ b/src/MainWindow.cpp	Sun Apr 03 22:02:12 2022 +0200
@@ -247,7 +247,7 @@
     ui->mainStack->addWidget(RecipesTreeWindow);
     ui->mainStack->setCurrentIndex(index);
     setWindowTitle( QString("BMSapp - %1 - Recipes").arg(VERSIONSTRING));
-//    ui->menuBar->setVisible(false);
+    ui->menuBar->setVisible(false);
 }
 
 
--- a/ui/EditRecipe.ui	Sun Apr 03 17:43:45 2022 +0200
+++ b/ui/EditRecipe.ui	Sun Apr 03 22:02:12 2022 +0200
@@ -15,7 +15,7 @@
   </property>
   <layout class="QGridLayout" name="gridLayout">
    <item row="0" column="0">
-    <widget class="QWidget" name="topWidget" native="true">
+    <widget class="QWidget" name="overviewBox" native="true">
      <widget class="QPushButton" name="quitButton">
       <property name="geometry">
        <rect>
@@ -95,7 +95,7 @@
        <enum>QTabWidget::Rounded</enum>
       </property>
       <property name="currentIndex">
-       <number>4</number>
+       <number>0</number>
       </property>
       <property name="elideMode">
        <enum>Qt::ElideNone</enum>
@@ -165,15 +165,15 @@
           <x>140</x>
           <y>50</y>
           <width>881</width>
-          <height>81</height>
+          <height>91</height>
          </rect>
         </property>
        </widget>
        <widget class="QLabel" name="lockedLabel">
         <property name="geometry">
          <rect>
-          <x>900</x>
-          <y>20</y>
+          <x>0</x>
+          <y>180</y>
           <width>131</width>
           <height>20</height>
          </rect>
@@ -188,8 +188,8 @@
        <widget class="QCheckBox" name="lockedEdit">
         <property name="geometry">
          <rect>
-          <x>1040</x>
-          <y>20</y>
+          <x>140</x>
+          <y>180</y>
           <width>61</width>
           <height>21</height>
          </rect>
@@ -202,7 +202,7 @@
         <property name="geometry">
          <rect>
           <x>0</x>
-          <y>140</y>
+          <y>150</y>
           <width>131</width>
           <height>20</height>
          </rect>
@@ -218,7 +218,7 @@
         <property name="geometry">
          <rect>
           <x>140</x>
-          <y>140</y>
+          <y>150</y>
           <width>181</width>
           <height>23</height>
          </rect>
@@ -228,7 +228,7 @@
         <property name="geometry">
          <rect>
           <x>370</x>
-          <y>140</y>
+          <y>150</y>
           <width>131</width>
           <height>20</height>
          </rect>
@@ -244,7 +244,7 @@
         <property name="geometry">
          <rect>
           <x>370</x>
-          <y>170</y>
+          <y>180</y>
           <width>131</width>
           <height>20</height>
          </rect>
@@ -260,7 +260,7 @@
         <property name="geometry">
          <rect>
           <x>740</x>
-          <y>140</y>
+          <y>150</y>
           <width>131</width>
           <height>20</height>
          </rect>
@@ -276,7 +276,7 @@
         <property name="geometry">
          <rect>
           <x>740</x>
-          <y>170</y>
+          <y>180</y>
           <width>131</width>
           <height>20</height>
          </rect>
@@ -292,7 +292,7 @@
         <property name="geometry">
          <rect>
           <x>510</x>
-          <y>140</y>
+          <y>150</y>
           <width>101</width>
           <height>24</height>
          </rect>
@@ -317,7 +317,7 @@
         <property name="geometry">
          <rect>
           <x>510</x>
-          <y>170</y>
+          <y>180</y>
           <width>101</width>
           <height>24</height>
          </rect>
@@ -339,7 +339,7 @@
         <property name="geometry">
          <rect>
           <x>880</x>
-          <y>140</y>
+          <y>150</y>
           <width>101</width>
           <height>24</height>
          </rect>
@@ -367,7 +367,7 @@
         <property name="geometry">
          <rect>
           <x>880</x>
-          <y>170</y>
+          <y>180</y>
           <width>87</width>
           <height>24</height>
          </rect>
@@ -397,637 +397,693 @@
          <double>0.500000000000000</double>
         </property>
        </widget>
-       <widget class="RangedSlider" name="est_ogShow">
-        <property name="geometry">
-         <rect>
-          <x>220</x>
-          <y>320</y>
-          <width>148</width>
-          <height>24</height>
-         </rect>
-        </property>
-       </widget>
-       <widget class="QLabel" name="est_ogLabel">
-        <property name="geometry">
-         <rect>
-          <x>0</x>
-          <y>320</y>
-          <width>131</width>
-          <height>20</height>
-         </rect>
-        </property>
-        <property name="text">
-         <string>Estimated OG:</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-       </widget>
-       <widget class="QDoubleSpinBox" name="est_ogEdit">
-        <property name="geometry">
-         <rect>
-          <x>140</x>
-          <y>320</y>
-          <width>71</width>
-          <height>24</height>
-         </rect>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-        <property name="buttonSymbols">
-         <enum>QAbstractSpinBox::UpDownArrows</enum>
-        </property>
-        <property name="accelerated">
-         <bool>true</bool>
-        </property>
-        <property name="decimals">
-         <number>3</number>
-        </property>
-        <property name="minimum">
-         <double>0.980000000000000</double>
-        </property>
-        <property name="maximum">
-         <double>2.000000000000000</double>
-        </property>
-        <property name="singleStep">
-         <double>0.001000000000000</double>
-        </property>
-       </widget>
-       <widget class="QLabel" name="est_fgLabel">
-        <property name="geometry">
-         <rect>
-          <x>370</x>
-          <y>320</y>
-          <width>131</width>
-          <height>20</height>
-         </rect>
-        </property>
-        <property name="text">
-         <string>Estimated FG:</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-       </widget>
-       <widget class="QLabel" name="est_abvLabel">
-        <property name="geometry">
-         <rect>
-          <x>740</x>
-          <y>320</y>
-          <width>131</width>
-          <height>20</height>
-         </rect>
-        </property>
-        <property name="text">
-         <string>Alcohol Volume:</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-       </widget>
-       <widget class="QLabel" name="est_colorLabel">
-        <property name="geometry">
-         <rect>
-          <x>0</x>
-          <y>350</y>
-          <width>131</width>
-          <height>20</height>
-         </rect>
-        </property>
-        <property name="text">
-         <string>Color EBC:</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-       </widget>
-       <widget class="QDoubleSpinBox" name="est_fgEdit">
-        <property name="geometry">
-         <rect>
-          <x>510</x>
-          <y>320</y>
-          <width>71</width>
-          <height>24</height>
-         </rect>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-        <property name="buttonSymbols">
-         <enum>QAbstractSpinBox::NoButtons</enum>
-        </property>
-        <property name="accelerated">
-         <bool>true</bool>
-        </property>
-        <property name="decimals">
-         <number>3</number>
-        </property>
-        <property name="minimum">
-         <double>0.980000000000000</double>
-        </property>
-        <property name="maximum">
-         <double>2.000000000000000</double>
-        </property>
-        <property name="singleStep">
-         <double>0.001000000000000</double>
-        </property>
-       </widget>
-       <widget class="RangedSlider" name="est_fgShow">
-        <property name="geometry">
-         <rect>
-          <x>590</x>
-          <y>320</y>
-          <width>148</width>
-          <height>24</height>
-         </rect>
-        </property>
-       </widget>
-       <widget class="QDoubleSpinBox" name="est_abvEdit">
+       <widget class="QGroupBox" name="groupBox">
         <property name="geometry">
          <rect>
-          <x>880</x>
-          <y>320</y>
-          <width>71</width>
-          <height>24</height>
-         </rect>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-        <property name="readOnly">
-         <bool>true</bool>
-        </property>
-        <property name="buttonSymbols">
-         <enum>QAbstractSpinBox::NoButtons</enum>
-        </property>
-        <property name="accelerated">
-         <bool>false</bool>
-        </property>
-        <property name="suffix">
-         <string> %</string>
-        </property>
-        <property name="decimals">
-         <number>1</number>
-        </property>
-        <property name="minimum">
-         <double>0.000000000000000</double>
-        </property>
-        <property name="maximum">
-         <double>80.000000000000000</double>
-        </property>
-        <property name="singleStep">
-         <double>0.100000000000000</double>
-        </property>
-       </widget>
-       <widget class="QDoubleSpinBox" name="est_colorEdit">
-        <property name="geometry">
-         <rect>
-          <x>140</x>
-          <y>350</y>
-          <width>71</width>
-          <height>24</height>
-         </rect>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-        <property name="readOnly">
-         <bool>true</bool>
-        </property>
-        <property name="buttonSymbols">
-         <enum>QAbstractSpinBox::NoButtons</enum>
-        </property>
-        <property name="accelerated">
-         <bool>false</bool>
-        </property>
-        <property name="decimals">
-         <number>0</number>
-        </property>
-        <property name="minimum">
-         <double>0.000000000000000</double>
-        </property>
-        <property name="maximum">
-         <double>400.000000000000000</double>
-        </property>
-        <property name="singleStep">
-         <double>1.000000000000000</double>
-        </property>
-       </widget>
-       <widget class="RangedSlider" name="est_abvShow">
-        <property name="geometry">
-         <rect>
-          <x>960</x>
-          <y>320</y>
-          <width>148</width>
-          <height>24</height>
-         </rect>
-        </property>
-       </widget>
-       <widget class="QComboBox" name="color_methodEdit">
-        <property name="geometry">
-         <rect>
-          <x>510</x>
-          <y>350</y>
-          <width>141</width>
-          <height>23</height>
-         </rect>
-        </property>
-       </widget>
-       <widget class="RangedSlider" name="est_colorShow">
-        <property name="geometry">
-         <rect>
-          <x>220</x>
-          <y>350</y>
-          <width>148</width>
-          <height>24</height>
-         </rect>
-        </property>
-       </widget>
-       <widget class="QComboBox" name="beerstyleEdit">
-        <property name="geometry">
-         <rect>
-          <x>510</x>
-          <y>200</y>
-          <width>226</width>
-          <height>23</height>
-         </rect>
-        </property>
-       </widget>
-       <widget class="QLabel" name="st_typeLabel">
-        <property name="geometry">
-         <rect>
-          <x>0</x>
-          <y>260</y>
-          <width>131</width>
-          <height>20</height>
-         </rect>
-        </property>
-        <property name="text">
-         <string>Style type:</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-       </widget>
-       <widget class="QLabel" name="st_guideLabel">
-        <property name="geometry">
-         <rect>
-          <x>0</x>
-          <y>230</y>
-          <width>131</width>
-          <height>20</height>
-         </rect>
-        </property>
-        <property name="text">
-         <string>Style guide:</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-       </widget>
-       <widget class="QLabel" name="st_nameLabel">
-        <property name="geometry">
-         <rect>
-          <x>370</x>
-          <y>230</y>
-          <width>131</width>
-          <height>20</height>
-         </rect>
-        </property>
-        <property name="text">
-         <string>Style name:</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-       </widget>
-       <widget class="QLabel" name="st_catLabel">
-        <property name="geometry">
-         <rect>
-          <x>370</x>
-          <y>260</y>
-          <width>131</width>
-          <height>20</height>
+          <x>10</x>
+          <y>340</y>
+          <width>1101</width>
+          <height>121</height>
          </rect>
         </property>
-        <property name="text">
-         <string>Category:</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-       </widget>
-       <widget class="QLabel" name="st_groupLabel">
-        <property name="geometry">
-         <rect>
-          <x>740</x>
-          <y>230</y>
-          <width>131</width>
-          <height>20</height>
-         </rect>
-        </property>
-        <property name="text">
-         <string>Style group:</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-       </widget>
-       <widget class="QLabel" name="st_catnrLabel">
-        <property name="geometry">
-         <rect>
-          <x>740</x>
-          <y>260</y>
-          <width>131</width>
-          <height>20</height>
-         </rect>
-        </property>
-        <property name="text">
-         <string>Category number:</string>
+        <property name="title">
+         <string>Overview</string>
         </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-       </widget>
-       <widget class="QLabel" name="stylelableLabel">
-        <property name="geometry">
-         <rect>
-          <x>140</x>
-          <y>200</y>
-          <width>131</width>
-          <height>20</height>
-         </rect>
-        </property>
-        <property name="font">
-         <font>
-          <pointsize>11</pointsize>
-          <weight>75</weight>
-          <bold>true</bold>
-         </font>
-        </property>
-        <property name="text">
-         <string>Beerstyle data</string>
-        </property>
-       </widget>
-       <widget class="QLabel" name="color_methodLabel">
-        <property name="geometry">
-         <rect>
-          <x>370</x>
-          <y>350</y>
-          <width>131</width>
-          <height>20</height>
-         </rect>
-        </property>
-        <property name="text">
-         <string>Color method:</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
+        <widget class="QDoubleSpinBox" name="est_ogEdit">
+         <property name="geometry">
+          <rect>
+           <x>130</x>
+           <y>20</y>
+           <width>71</width>
+           <height>24</height>
+          </rect>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+         <property name="buttonSymbols">
+          <enum>QAbstractSpinBox::UpDownArrows</enum>
+         </property>
+         <property name="accelerated">
+          <bool>true</bool>
+         </property>
+         <property name="decimals">
+          <number>3</number>
+         </property>
+         <property name="minimum">
+          <double>0.980000000000000</double>
+         </property>
+         <property name="maximum">
+          <double>2.000000000000000</double>
+         </property>
+         <property name="singleStep">
+          <double>0.001000000000000</double>
+         </property>
+        </widget>
+        <widget class="QDoubleSpinBox" name="est_abvEdit">
+         <property name="geometry">
+          <rect>
+           <x>870</x>
+           <y>20</y>
+           <width>71</width>
+           <height>24</height>
+          </rect>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+         <property name="readOnly">
+          <bool>true</bool>
+         </property>
+         <property name="buttonSymbols">
+          <enum>QAbstractSpinBox::NoButtons</enum>
+         </property>
+         <property name="accelerated">
+          <bool>false</bool>
+         </property>
+         <property name="suffix">
+          <string> %</string>
+         </property>
+         <property name="decimals">
+          <number>1</number>
+         </property>
+         <property name="minimum">
+          <double>0.000000000000000</double>
+         </property>
+         <property name="maximum">
+          <double>80.000000000000000</double>
+         </property>
+         <property name="singleStep">
+          <double>0.100000000000000</double>
+         </property>
+        </widget>
+        <widget class="QDoubleSpinBox" name="est_fgEdit">
+         <property name="geometry">
+          <rect>
+           <x>500</x>
+           <y>20</y>
+           <width>71</width>
+           <height>24</height>
+          </rect>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+         <property name="buttonSymbols">
+          <enum>QAbstractSpinBox::NoButtons</enum>
+         </property>
+         <property name="accelerated">
+          <bool>true</bool>
+         </property>
+         <property name="decimals">
+          <number>3</number>
+         </property>
+         <property name="minimum">
+          <double>0.980000000000000</double>
+         </property>
+         <property name="maximum">
+          <double>2.000000000000000</double>
+         </property>
+         <property name="singleStep">
+          <double>0.001000000000000</double>
+         </property>
+        </widget>
+        <widget class="QLabel" name="est_abvLabel">
+         <property name="geometry">
+          <rect>
+           <x>730</x>
+           <y>20</y>
+           <width>131</width>
+           <height>20</height>
+          </rect>
+         </property>
+         <property name="text">
+          <string>Alcohol Volume:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+        <widget class="QLabel" name="est_fgLabel">
+         <property name="geometry">
+          <rect>
+           <x>360</x>
+           <y>20</y>
+           <width>131</width>
+           <height>20</height>
+          </rect>
+         </property>
+         <property name="text">
+          <string>Estimated FG:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+        <widget class="RangedSlider" name="est_fgShow">
+         <property name="geometry">
+          <rect>
+           <x>580</x>
+           <y>20</y>
+           <width>148</width>
+           <height>24</height>
+          </rect>
+         </property>
+        </widget>
+        <widget class="RangedSlider" name="est_ogShow">
+         <property name="geometry">
+          <rect>
+           <x>210</x>
+           <y>20</y>
+           <width>148</width>
+           <height>24</height>
+          </rect>
+         </property>
+        </widget>
+        <widget class="QLabel" name="est_ogLabel">
+         <property name="geometry">
+          <rect>
+           <x>10</x>
+           <y>20</y>
+           <width>111</width>
+           <height>20</height>
+          </rect>
+         </property>
+         <property name="text">
+          <string>Estimated OG:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+        <widget class="RangedSlider" name="est_abvShow">
+         <property name="geometry">
+          <rect>
+           <x>950</x>
+           <y>20</y>
+           <width>148</width>
+           <height>24</height>
+          </rect>
+         </property>
+        </widget>
+        <widget class="QComboBox" name="color_methodEdit">
+         <property name="geometry">
+          <rect>
+           <x>500</x>
+           <y>50</y>
+           <width>141</width>
+           <height>23</height>
+          </rect>
+         </property>
+        </widget>
+        <widget class="RangedSlider" name="est_colorShow">
+         <property name="geometry">
+          <rect>
+           <x>210</x>
+           <y>50</y>
+           <width>148</width>
+           <height>24</height>
+          </rect>
+         </property>
+        </widget>
+        <widget class="QDoubleSpinBox" name="est_carbEdit">
+         <property name="geometry">
+          <rect>
+           <x>870</x>
+           <y>50</y>
+           <width>71</width>
+           <height>24</height>
+          </rect>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+         <property name="readOnly">
+          <bool>true</bool>
+         </property>
+         <property name="buttonSymbols">
+          <enum>QAbstractSpinBox::NoButtons</enum>
+         </property>
+         <property name="accelerated">
+          <bool>false</bool>
+         </property>
+         <property name="suffix">
+          <string> %</string>
+         </property>
+         <property name="decimals">
+          <number>1</number>
+         </property>
+         <property name="minimum">
+          <double>0.000000000000000</double>
+         </property>
+         <property name="maximum">
+          <double>80.000000000000000</double>
+         </property>
+         <property name="singleStep">
+          <double>0.100000000000000</double>
+         </property>
+        </widget>
+        <widget class="QDoubleSpinBox" name="est_colorEdit">
+         <property name="geometry">
+          <rect>
+           <x>130</x>
+           <y>50</y>
+           <width>71</width>
+           <height>24</height>
+          </rect>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+         <property name="readOnly">
+          <bool>true</bool>
+         </property>
+         <property name="buttonSymbols">
+          <enum>QAbstractSpinBox::NoButtons</enum>
+         </property>
+         <property name="accelerated">
+          <bool>false</bool>
+         </property>
+         <property name="decimals">
+          <number>0</number>
+         </property>
+         <property name="minimum">
+          <double>0.000000000000000</double>
+         </property>
+         <property name="maximum">
+          <double>400.000000000000000</double>
+         </property>
+         <property name="singleStep">
+          <double>1.000000000000000</double>
+         </property>
+        </widget>
+        <widget class="QLabel" name="color_methodLabel">
+         <property name="geometry">
+          <rect>
+           <x>360</x>
+           <y>50</y>
+           <width>131</width>
+           <height>20</height>
+          </rect>
+         </property>
+         <property name="text">
+          <string>Color method:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+        <widget class="QLabel" name="est_carbLabel">
+         <property name="geometry">
+          <rect>
+           <x>730</x>
+           <y>50</y>
+           <width>131</width>
+           <height>20</height>
+          </rect>
+         </property>
+         <property name="text">
+          <string>Carbonation:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+        <widget class="RangedSlider" name="est_carbShow">
+         <property name="geometry">
+          <rect>
+           <x>950</x>
+           <y>50</y>
+           <width>148</width>
+           <height>24</height>
+          </rect>
+         </property>
+        </widget>
+        <widget class="QLabel" name="est_colorLabel">
+         <property name="geometry">
+          <rect>
+           <x>10</x>
+           <y>50</y>
+           <width>111</width>
+           <height>20</height>
+          </rect>
+         </property>
+         <property name="text">
+          <string>Color EBC:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+        <widget class="RangedSlider" name="est_ibuShow">
+         <property name="geometry">
+          <rect>
+           <x>210</x>
+           <y>80</y>
+           <width>148</width>
+           <height>24</height>
+          </rect>
+         </property>
+        </widget>
+        <widget class="QComboBox" name="ibu_methodEdit">
+         <property name="geometry">
+          <rect>
+           <x>500</x>
+           <y>80</y>
+           <width>141</width>
+           <height>23</height>
+          </rect>
+         </property>
+        </widget>
+        <widget class="QDoubleSpinBox" name="est_ibuEdit">
+         <property name="geometry">
+          <rect>
+           <x>130</x>
+           <y>80</y>
+           <width>71</width>
+           <height>24</height>
+          </rect>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+         <property name="readOnly">
+          <bool>true</bool>
+         </property>
+         <property name="buttonSymbols">
+          <enum>QAbstractSpinBox::NoButtons</enum>
+         </property>
+         <property name="accelerated">
+          <bool>false</bool>
+         </property>
+         <property name="decimals">
+          <number>0</number>
+         </property>
+         <property name="minimum">
+          <double>0.000000000000000</double>
+         </property>
+         <property name="maximum">
+          <double>400.000000000000000</double>
+         </property>
+         <property name="singleStep">
+          <double>1.000000000000000</double>
+         </property>
+        </widget>
+        <widget class="QLabel" name="ibu_methodLabel">
+         <property name="geometry">
+          <rect>
+           <x>360</x>
+           <y>80</y>
+           <width>131</width>
+           <height>20</height>
+          </rect>
+         </property>
+         <property name="text">
+          <string>IBU method:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+        <widget class="QLabel" name="calLabel">
+         <property name="geometry">
+          <rect>
+           <x>730</x>
+           <y>80</y>
+           <width>131</width>
+           <height>20</height>
+          </rect>
+         </property>
+         <property name="text">
+          <string>Energy kcal/l:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+        <widget class="QLabel" name="est_ibuLabel">
+         <property name="geometry">
+          <rect>
+           <x>20</x>
+           <y>80</y>
+           <width>111</width>
+           <height>20</height>
+          </rect>
+         </property>
+         <property name="text">
+          <string>Bitterness IBU:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+        <widget class="QDoubleSpinBox" name="calEdit">
+         <property name="geometry">
+          <rect>
+           <x>870</x>
+           <y>80</y>
+           <width>71</width>
+           <height>24</height>
+          </rect>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+         <property name="readOnly">
+          <bool>true</bool>
+         </property>
+         <property name="buttonSymbols">
+          <enum>QAbstractSpinBox::NoButtons</enum>
+         </property>
+         <property name="accelerated">
+          <bool>false</bool>
+         </property>
+         <property name="decimals">
+          <number>0</number>
+         </property>
+         <property name="minimum">
+          <double>0.000000000000000</double>
+         </property>
+         <property name="maximum">
+          <double>8000.000000000000000</double>
+         </property>
+         <property name="singleStep">
+          <double>0.100000000000000</double>
+         </property>
+        </widget>
        </widget>
-       <widget class="QLabel" name="ibu_methodLabel">
-        <property name="geometry">
-         <rect>
-          <x>370</x>
-          <y>380</y>
-          <width>131</width>
-          <height>20</height>
-         </rect>
-        </property>
-        <property name="text">
-         <string>IBU method:</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-       </widget>
-       <widget class="QComboBox" name="ibu_methodEdit">
-        <property name="geometry">
-         <rect>
-          <x>510</x>
-          <y>380</y>
-          <width>141</width>
-          <height>23</height>
-         </rect>
-        </property>
-       </widget>
-       <widget class="QLineEdit" name="st_guideEdit">
-        <property name="geometry">
-         <rect>
-          <x>140</x>
-          <y>230</y>
-          <width>226</width>
-          <height>23</height>
-         </rect>
-        </property>
-        <property name="dragEnabled">
-         <bool>true</bool>
-        </property>
-       </widget>
-       <widget class="QLineEdit" name="st_typeEdit">
-        <property name="geometry">
-         <rect>
-          <x>140</x>
-          <y>260</y>
-          <width>226</width>
-          <height>23</height>
-         </rect>
-        </property>
-        <property name="dragEnabled">
-         <bool>true</bool>
-        </property>
-       </widget>
-       <widget class="QLineEdit" name="st_nameEdit">
-        <property name="geometry">
-         <rect>
-          <x>510</x>
-          <y>230</y>
-          <width>226</width>
-          <height>23</height>
-         </rect>
-        </property>
-        <property name="dragEnabled">
-         <bool>true</bool>
-        </property>
-       </widget>
-       <widget class="QLineEdit" name="st_catEdit">
-        <property name="geometry">
-         <rect>
-          <x>510</x>
-          <y>260</y>
-          <width>226</width>
-          <height>23</height>
-         </rect>
-        </property>
-        <property name="dragEnabled">
-         <bool>true</bool>
-        </property>
-       </widget>
-       <widget class="QLineEdit" name="st_groupEdit">
+       <widget class="QGroupBox" name="styleBox">
         <property name="geometry">
          <rect>
-          <x>880</x>
-          <y>230</y>
-          <width>101</width>
-          <height>23</height>
-         </rect>
-        </property>
-        <property name="dragEnabled">
-         <bool>true</bool>
-        </property>
-       </widget>
-       <widget class="QLineEdit" name="st_catnrEdit">
-        <property name="geometry">
-         <rect>
-          <x>880</x>
-          <y>260</y>
-          <width>71</width>
-          <height>23</height>
-         </rect>
-        </property>
-        <property name="dragEnabled">
-         <bool>true</bool>
-        </property>
-       </widget>
-       <widget class="QLabel" name="est_ibuLabel">
-        <property name="geometry">
-         <rect>
-          <x>0</x>
-          <y>380</y>
-          <width>131</width>
-          <height>20</height>
-         </rect>
-        </property>
-        <property name="text">
-         <string>Bitterness IBU:</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-       </widget>
-       <widget class="QDoubleSpinBox" name="est_ibuEdit">
-        <property name="geometry">
-         <rect>
-          <x>140</x>
-          <y>380</y>
-          <width>71</width>
-          <height>24</height>
+          <x>10</x>
+          <y>210</y>
+          <width>1101</width>
+          <height>121</height>
          </rect>
         </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-        <property name="readOnly">
-         <bool>true</bool>
-        </property>
-        <property name="buttonSymbols">
-         <enum>QAbstractSpinBox::NoButtons</enum>
-        </property>
-        <property name="accelerated">
-         <bool>false</bool>
-        </property>
-        <property name="decimals">
-         <number>0</number>
-        </property>
-        <property name="minimum">
-         <double>0.000000000000000</double>
-        </property>
-        <property name="maximum">
-         <double>400.000000000000000</double>
-        </property>
-        <property name="singleStep">
-         <double>1.000000000000000</double>
-        </property>
-       </widget>
-       <widget class="RangedSlider" name="est_ibuShow">
-        <property name="geometry">
-         <rect>
-          <x>220</x>
-          <y>380</y>
-          <width>148</width>
-          <height>24</height>
-         </rect>
-        </property>
-       </widget>
-       <widget class="RangedSlider" name="est_carbShow">
-        <property name="geometry">
-         <rect>
-          <x>960</x>
-          <y>350</y>
-          <width>148</width>
-          <height>24</height>
-         </rect>
-        </property>
-       </widget>
-       <widget class="QDoubleSpinBox" name="est_carbEdit">
-        <property name="geometry">
-         <rect>
-          <x>880</x>
-          <y>350</y>
-          <width>71</width>
-          <height>24</height>
-         </rect>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+        <property name="title">
+         <string>Beerstyle</string>
         </property>
-        <property name="readOnly">
-         <bool>true</bool>
-        </property>
-        <property name="buttonSymbols">
-         <enum>QAbstractSpinBox::NoButtons</enum>
-        </property>
-        <property name="accelerated">
-         <bool>false</bool>
-        </property>
-        <property name="suffix">
-         <string> %</string>
-        </property>
-        <property name="decimals">
-         <number>1</number>
-        </property>
-        <property name="minimum">
-         <double>0.000000000000000</double>
-        </property>
-        <property name="maximum">
-         <double>80.000000000000000</double>
-        </property>
-        <property name="singleStep">
-         <double>0.100000000000000</double>
-        </property>
-       </widget>
-       <widget class="QLabel" name="est_carbLabel">
-        <property name="geometry">
-         <rect>
-          <x>740</x>
-          <y>350</y>
-          <width>131</width>
-          <height>20</height>
-         </rect>
-        </property>
-        <property name="text">
-         <string>Carbonation:</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-       </widget>
-       <widget class="QLabel" name="beerstyleLabel">
-        <property name="geometry">
-         <rect>
-          <x>370</x>
-          <y>200</y>
-          <width>131</width>
-          <height>20</height>
-         </rect>
-        </property>
-        <property name="text">
-         <string>Select style:</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
+        <widget class="QComboBox" name="beerstyleEdit">
+         <property name="geometry">
+          <rect>
+           <x>500</x>
+           <y>20</y>
+           <width>226</width>
+           <height>23</height>
+          </rect>
+         </property>
+        </widget>
+        <widget class="QLineEdit" name="st_groupEdit">
+         <property name="geometry">
+          <rect>
+           <x>870</x>
+           <y>50</y>
+           <width>101</width>
+           <height>23</height>
+          </rect>
+         </property>
+         <property name="dragEnabled">
+          <bool>true</bool>
+         </property>
+        </widget>
+        <widget class="QLineEdit" name="st_nameEdit">
+         <property name="geometry">
+          <rect>
+           <x>500</x>
+           <y>50</y>
+           <width>226</width>
+           <height>23</height>
+          </rect>
+         </property>
+         <property name="dragEnabled">
+          <bool>true</bool>
+         </property>
+        </widget>
+        <widget class="QLineEdit" name="st_guideEdit">
+         <property name="geometry">
+          <rect>
+           <x>130</x>
+           <y>50</y>
+           <width>226</width>
+           <height>23</height>
+          </rect>
+         </property>
+         <property name="dragEnabled">
+          <bool>true</bool>
+         </property>
+        </widget>
+        <widget class="QLabel" name="st_guideLabel">
+         <property name="geometry">
+          <rect>
+           <x>10</x>
+           <y>50</y>
+           <width>111</width>
+           <height>20</height>
+          </rect>
+         </property>
+         <property name="text">
+          <string>Style guide:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+        <widget class="QLabel" name="st_groupLabel">
+         <property name="geometry">
+          <rect>
+           <x>730</x>
+           <y>50</y>
+           <width>131</width>
+           <height>20</height>
+          </rect>
+         </property>
+         <property name="text">
+          <string>Style group:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+        <widget class="QLabel" name="st_nameLabel">
+         <property name="geometry">
+          <rect>
+           <x>360</x>
+           <y>50</y>
+           <width>131</width>
+           <height>20</height>
+          </rect>
+         </property>
+         <property name="text">
+          <string>Style name:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+        <widget class="QLabel" name="beerstyleLabel">
+         <property name="geometry">
+          <rect>
+           <x>360</x>
+           <y>20</y>
+           <width>131</width>
+           <height>20</height>
+          </rect>
+         </property>
+         <property name="text">
+          <string>Select style:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+        <widget class="QLabel" name="st_typeLabel">
+         <property name="geometry">
+          <rect>
+           <x>10</x>
+           <y>80</y>
+           <width>111</width>
+           <height>20</height>
+          </rect>
+         </property>
+         <property name="text">
+          <string>Style type:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+        <widget class="QLineEdit" name="st_typeEdit">
+         <property name="geometry">
+          <rect>
+           <x>130</x>
+           <y>80</y>
+           <width>226</width>
+           <height>23</height>
+          </rect>
+         </property>
+         <property name="dragEnabled">
+          <bool>true</bool>
+         </property>
+        </widget>
+        <widget class="QLabel" name="st_catLabel">
+         <property name="geometry">
+          <rect>
+           <x>360</x>
+           <y>80</y>
+           <width>131</width>
+           <height>20</height>
+          </rect>
+         </property>
+         <property name="text">
+          <string>Category:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+        <widget class="QLineEdit" name="st_catnrEdit">
+         <property name="geometry">
+          <rect>
+           <x>870</x>
+           <y>80</y>
+           <width>71</width>
+           <height>23</height>
+          </rect>
+         </property>
+         <property name="dragEnabled">
+          <bool>true</bool>
+         </property>
+        </widget>
+        <widget class="QLabel" name="st_catnrLabel">
+         <property name="geometry">
+          <rect>
+           <x>730</x>
+           <y>80</y>
+           <width>131</width>
+           <height>20</height>
+          </rect>
+         </property>
+         <property name="text">
+          <string>Category number:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+        <widget class="QLineEdit" name="st_catEdit">
+         <property name="geometry">
+          <rect>
+           <x>500</x>
+           <y>80</y>
+           <width>226</width>
+           <height>23</height>
+          </rect>
+         </property>
+         <property name="dragEnabled">
+          <bool>true</bool>
+         </property>
+        </widget>
        </widget>
       </widget>
       <widget class="QWidget" name="fermentables">

mercurial