ui/EditRecipe.ui

Thu, 31 Mar 2022 23:10:57 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Thu, 31 Mar 2022 23:10:57 +0200
changeset 97
8283bbf95806
parent 96
c36fef8bb088
child 99
053c0578cf58
permissions
-rw-r--r--

Stripped down the RangedSlider. It is more compact and still does everything. Base colors (red and green) are fixed inside, also automatisc setting of outer limits. The tooltip shows the current ranges. Still some finetuning to be done.

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>EditRecipe</class>
 <widget class="QDialog" name="EditRecipe">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>1152</width>
    <height>560</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="QPushButton" name="quitButton">
      <property name="geometry">
       <rect>
        <x>90</x>
        <y>510</y>
        <width>80</width>
        <height>23</height>
       </rect>
      </property>
      <property name="sizePolicy">
       <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
      </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="enabled">
       <bool>true</bool>
      </property>
      <property name="geometry">
       <rect>
        <x>940</x>
        <y>510</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="deleteButton">
      <property name="enabled">
       <bool>true</bool>
      </property>
      <property name="geometry">
       <rect>
        <x>520</x>
        <y>510</y>
        <width>80</width>
        <height>23</height>
       </rect>
      </property>
      <property name="text">
       <string>Delete</string>
      </property>
      <property name="icon">
       <iconset>
        <normaloff>:icons/silk/delete.png</normaloff>:icons/silk/delete.png</iconset>
      </property>
     </widget>
     <widget class="QTabWidget" name="tabWidget">
      <property name="geometry">
       <rect>
        <x>0</x>
        <y>0</y>
        <width>1131</width>
        <height>501</height>
       </rect>
      </property>
      <property name="tabPosition">
       <enum>QTabWidget::North</enum>
      </property>
      <property name="tabShape">
       <enum>QTabWidget::Rounded</enum>
      </property>
      <property name="currentIndex">
       <number>0</number>
      </property>
      <property name="elideMode">
       <enum>Qt::ElideNone</enum>
      </property>
      <property name="usesScrollButtons">
       <bool>true</bool>
      </property>
      <property name="documentMode">
       <bool>false</bool>
      </property>
      <property name="tabBarAutoHide">
       <bool>false</bool>
      </property>
      <widget class="QWidget" name="generic">
       <attribute name="icon">
        <iconset resource="../../../../../../home/mbroek/MyProjects/bmsapp/resources/icons.qrc">
         <normaloff>:/icons/bms/beerstyles.png</normaloff>:/icons/bms/beerstyles.png</iconset>
       </attribute>
       <attribute name="title">
        <string>Generic</string>
       </attribute>
       <widget class="QLabel" name="nameLabel">
        <property name="geometry">
         <rect>
          <x>0</x>
          <y>20</y>
          <width>131</width>
          <height>20</height>
         </rect>
        </property>
        <property name="text">
         <string>Recipe name:</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
       <widget class="QLabel" name="notesLabel">
        <property name="geometry">
         <rect>
          <x>0</x>
          <y>50</y>
          <width>131</width>
          <height>20</height>
         </rect>
        </property>
        <property name="text">
         <string>Recipe notes:</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
       <widget class="QLineEdit" name="nameEdit">
        <property name="geometry">
         <rect>
          <x>140</x>
          <y>20</y>
          <width>741</width>
          <height>23</height>
         </rect>
        </property>
       </widget>
       <widget class="QPlainTextEdit" name="notesEdit">
        <property name="geometry">
         <rect>
          <x>140</x>
          <y>50</y>
          <width>881</width>
          <height>81</height>
         </rect>
        </property>
       </widget>
       <widget class="QLabel" name="lockedLabel">
        <property name="geometry">
         <rect>
          <x>900</x>
          <y>20</y>
          <width>131</width>
          <height>20</height>
         </rect>
        </property>
        <property name="text">
         <string>Read only:</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
       <widget class="QCheckBox" name="lockedEdit">
        <property name="geometry">
         <rect>
          <x>1040</x>
          <y>20</y>
          <width>61</width>
          <height>21</height>
         </rect>
        </property>
        <property name="text">
         <string>Yes</string>
        </property>
       </widget>
       <widget class="QLabel" name="typeLabel">
        <property name="geometry">
         <rect>
          <x>0</x>
          <y>140</y>
          <width>131</width>
          <height>20</height>
         </rect>
        </property>
        <property name="text">
         <string>Brew type:</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
       <widget class="QComboBox" name="typeEdit">
        <property name="geometry">
         <rect>
          <x>140</x>
          <y>140</y>
          <width>181</width>
          <height>23</height>
         </rect>
        </property>
       </widget>
       <widget class="QLabel" name="efficiencyLabel">
        <property name="geometry">
         <rect>
          <x>380</x>
          <y>140</y>
          <width>131</width>
          <height>20</height>
         </rect>
        </property>
        <property name="text">
         <string>Efficiency:</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
       <widget class="QLabel" name="boil_timeLabel">
        <property name="geometry">
         <rect>
          <x>380</x>
          <y>170</y>
          <width>131</width>
          <height>20</height>
         </rect>
        </property>
        <property name="text">
         <string>Boil time:</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
       <widget class="QLabel" name="batch_sizeLabel">
        <property name="geometry">
         <rect>
          <x>760</x>
          <y>140</y>
          <width>131</width>
          <height>20</height>
         </rect>
        </property>
        <property name="text">
         <string>Batch size:</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
       <widget class="QLabel" name="boil_sizeLabel">
        <property name="geometry">
         <rect>
          <x>760</x>
          <y>170</y>
          <width>131</width>
          <height>20</height>
         </rect>
        </property>
        <property name="text">
         <string>Boil size:</string>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
       <widget class="QDoubleSpinBox" name="efficiencyEdit">
        <property name="geometry">
         <rect>
          <x>520</x>
          <y>140</y>
          <width>101</width>
          <height>24</height>
         </rect>
        </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="decimals">
         <number>1</number>
        </property>
        <property name="singleStep">
         <double>0.100000000000000</double>
        </property>
       </widget>
       <widget class="QSpinBox" name="boil_timeEdit">
        <property name="geometry">
         <rect>
          <x>520</x>
          <y>170</y>
          <width>101</width>
          <height>24</height>
         </rect>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
        <property name="accelerated">
         <bool>true</bool>
        </property>
        <property name="suffix">
         <string> min</string>
        </property>
        <property name="maximum">
         <number>1536</number>
        </property>
       </widget>
       <widget class="QDoubleSpinBox" name="batch_sizeEdit">
        <property name="geometry">
         <rect>
          <x>900</x>
          <y>140</y>
          <width>101</width>
          <height>24</height>
         </rect>
        </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</string>
        </property>
        <property name="decimals">
         <number>1</number>
        </property>
        <property name="maximum">
         <double>100000.000000000000000</double>
        </property>
        <property name="singleStep">
         <double>0.500000000000000</double>
        </property>
       </widget>
       <widget class="QDoubleSpinBox" name="boil_sizeEdit">
        <property name="geometry">
         <rect>
          <x>900</x>
          <y>170</y>
          <width>101</width>
          <height>24</height>
         </rect>
        </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</string>
        </property>
        <property name="decimals">
         <number>1</number>
        </property>
        <property name="maximum">
         <double>100000.000000000000000</double>
        </property>
        <property name="singleStep">
         <double>0.500000000000000</double>
        </property>
       </widget>
       <widget class="RangedSlider" name="est_ogShow">
        <property name="geometry">
         <rect>
          <x>220</x>
          <y>200</y>
          <width>148</width>
          <height>24</height>
         </rect>
        </property>
       </widget>
       <widget class="QLabel" name="est_ogLabel">
        <property name="geometry">
         <rect>
          <x>0</x>
          <y>200</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>200</y>
          <width>71</width>
          <height>24</height>
         </rect>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </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>0</x>
          <y>230</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>0</x>
          <y>260</y>
          <width>131</width>
          <height>20</height>
         </rect>
        </property>
        <property name="text">
         <string>Estimated ABV:</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>290</y>
          <width>131</width>
          <height>20</height>
         </rect>
        </property>
        <property name="text">
         <string>Estimated 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>140</x>
          <y>230</y>
          <width>71</width>
          <height>24</height>
         </rect>
        </property>
        <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </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>220</x>
          <y>230</y>
          <width>148</width>
          <height>24</height>
         </rect>
        </property>
       </widget>
       <widget class="QDoubleSpinBox" name="est_abvEdit">
        <property name="geometry">
         <rect>
          <x>140</x>
          <y>260</y>
          <width>57</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>290</y>
          <width>57</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>220</x>
          <y>260</y>
          <width>148</width>
          <height>24</height>
         </rect>
        </property>
       </widget>
       <widget class="BeerColor" name="est_colorGlass">
        <property name="geometry">
         <rect>
          <x>590</x>
          <y>270</y>
          <width>90</width>
          <height>130</height>
         </rect>
        </property>
       </widget>
       <widget class="QComboBox" name="color_methodEdit">
        <property name="geometry">
         <rect>
          <x>140</x>
          <y>320</y>
          <width>201</width>
          <height>23</height>
         </rect>
        </property>
       </widget>
       <widget class="RangedSlider" name="est_colorShow">
        <property name="geometry">
         <rect>
          <x>220</x>
          <y>290</y>
          <width>151</width>
          <height>24</height>
         </rect>
        </property>
       </widget>
      </widget>
      <widget class="QWidget" name="fermentables">
       <attribute name="icon">
        <iconset resource="../../../../../../home/mbroek/MyProjects/bmsapp/resources/icons.qrc">
         <normaloff>:/icons/bms/graan.png</normaloff>:/icons/bms/graan.png</iconset>
       </attribute>
       <attribute name="title">
        <string>Fermentables</string>
       </attribute>
      </widget>
      <widget class="QWidget" name="hops">
       <attribute name="icon">
        <iconset resource="../../../../../../home/mbroek/MyProjects/bmsapp/resources/icons.qrc">
         <normaloff>:/icons/bms/hop.png</normaloff>:/icons/bms/hop.png</iconset>
       </attribute>
       <attribute name="title">
        <string>Hops</string>
       </attribute>
      </widget>
      <widget class="QWidget" name="miscs">
       <attribute name="icon">
        <iconset resource="../../../../../../home/mbroek/MyProjects/bmsapp/resources/icons.qrc">
         <normaloff>:/icons/bms/peper.png</normaloff>:/icons/bms/peper.png</iconset>
       </attribute>
       <attribute name="title">
        <string>Miscs</string>
       </attribute>
      </widget>
      <widget class="QWidget" name="yeasts">
       <attribute name="icon">
        <iconset resource="../../../../../../home/mbroek/MyProjects/bmsapp/resources/icons.qrc">
         <normaloff>:/icons/bms/erlenmeyer.png</normaloff>:/icons/bms/erlenmeyer.png</iconset>
       </attribute>
       <attribute name="title">
        <string>Yeasts</string>
       </attribute>
      </widget>
      <widget class="QWidget" name="mash">
       <attribute name="icon">
        <iconset resource="../../../../../../home/mbroek/MyProjects/bmsapp/resources/icons.qrc">
         <normaloff>:/icons/bms/mash.png</normaloff>:/icons/bms/mash.png</iconset>
       </attribute>
       <attribute name="title">
        <string>Mash</string>
       </attribute>
      </widget>
      <widget class="QWidget" name="water">
       <attribute name="icon">
        <iconset resource="../../../../../../home/mbroek/MyProjects/bmsapp/resources/icons.qrc">
         <normaloff>:/icons/bms/water.png</normaloff>:/icons/bms/water.png</iconset>
       </attribute>
       <attribute name="title">
        <string>Water</string>
       </attribute>
      </widget>
     </widget>
     <widget class="QPushButton" name="exportButton">
      <property name="geometry">
       <rect>
        <x>300</x>
        <y>510</y>
        <width>80</width>
        <height>23</height>
       </rect>
      </property>
      <property name="text">
       <string>Export</string>
      </property>
      <property name="icon">
       <iconset resource="../../../../../../home/mbroek/MyProjects/bmsapp/resources/icons.qrc">
        <normaloff>:/icons/silk/disk_multiple.png</normaloff>:/icons/silk/disk_multiple.png</iconset>
      </property>
     </widget>
     <widget class="QPushButton" name="printButton">
      <property name="geometry">
       <rect>
        <x>730</x>
        <y>510</y>
        <width>80</width>
        <height>23</height>
       </rect>
      </property>
      <property name="text">
       <string>Print</string>
      </property>
      <property name="icon">
       <iconset resource="../../../../../../home/mbroek/MyProjects/bmsapp/resources/icons.qrc">
        <normaloff>:/icons/silk/printer.png</normaloff>:/icons/silk/printer.png</iconset>
      </property>
     </widget>
    </widget>
   </item>
  </layout>
 </widget>
 <customwidgets>
  <customwidget>
   <class>BeerColor</class>
   <extends>QWidget</extends>
   <header>BeerColor.h</header>
  </customwidget>
  <customwidget>
   <class>RangedSlider</class>
   <extends>QWidget</extends>
   <header>RangedSlider.h</header>
  </customwidget>
 </customwidgets>
 <tabstops>
  <tabstop>quitButton</tabstop>
  <tabstop>deleteButton</tabstop>
  <tabstop>saveButton</tabstop>
 </tabstops>
 <resources>
  <include location="../../../../../../home/mbroek/MyProjects/bmsapp/resources/icons.qrc"/>
 </resources>
 <connections/>
</ui>

mercurial