--- a/ui/EditFermentable.ui Fri Feb 18 15:53:02 2022 +0100 +++ b/ui/EditFermentable.ui Sat Feb 19 22:17:09 2022 +0100 @@ -1,38 +1,838 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> - <class>editFermentable</class> - <widget class="QDialog" name="editFermentable"> + <class>EditFermentable</class> + <widget class="QDialog" name="EditFermentable"> <property name="geometry"> <rect> <x>0</x> <y>0</y> - <width>1280</width> - <height>640</height> + <width>1024</width> + <height>560</height> </rect> </property> <property name="windowTitle"> <string>Dialog</string> </property> <layout class="QGridLayout" name="gridLayout"> - <item row="2" column="0"> - <widget class="QWidget" name="bottomWidget" native="true"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>24</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>24</height> - </size> - </property> + <item row="0" column="0"> + <widget class="QWidget" name="topWidget" native="true"> + <widget class="QLabel" name="nameLabel"> + <property name="geometry"> + <rect> + <x>30</x> + <y>10</y> + <width>91</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>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>30</x> + <y>40</y> + <width>91</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Notes:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="typeLabel"> + <property name="geometry"> + <rect> + <x>5</x> + <y>130</y> + <width>121</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Type:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="graintypeLabel"> + <property name="geometry"> + <rect> + <x>5</x> + <y>160</y> + <width>121</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Grain type:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="originLabel"> + <property name="geometry"> + <rect> + <x>5</x> + <y>190</y> + <width>121</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Origin:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="supplierLabel"> + <property name="geometry"> + <rect> + <x>5</x> + <y>220</y> + <width>121</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Supplier:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="maxinbatchLabel"> + <property name="geometry"> + <rect> + <x>5</x> + <y>250</y> + <width>121</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Max in batch:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="mashLabel"> + <property name="geometry"> + <rect> + <x>5</x> + <y>280</y> + <width>121</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Recommend mash:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="addafterLabel"> + <property name="geometry"> + <rect> + <x>5</x> + <y>310</y> + <width>121</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Add after boil:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="addedLabel"> + <property name="geometry"> + <rect> + <x>5</x> + <y>340</y> + <width>121</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Add moment:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="alwaysLabel"> + <property name="geometry"> + <rect> + <x>5</x> + <y>370</y> + <width>121</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Always on stock:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="inventoryLabel"> + <property name="geometry"> + <rect> + <x>5</x> + <y>410</y> + <width>121</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Inventory:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="costLabel"> + <property name="geometry"> + <rect> + <x>5</x> + <y>440</y> + <width>121</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Cost per Kg:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="valueLabel"> + <property name="geometry"> + <rect> + <x>5</x> + <y>470</y> + <width>121</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Total value:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="yieldLabel"> + <property name="geometry"> + <rect> + <x>660</x> + <y>130</y> + <width>141</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Yield:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="colorLabel"> + <property name="geometry"> + <rect> + <x>660</x> + <y>160</y> + <width>141</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="QLabel" name="moistureLabel"> + <property name="geometry"> + <rect> + <x>660</x> + <y>190</y> + <width>141</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Moisture:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="coarseLabel"> + <property name="geometry"> + <rect> + <x>660</x> + <y>220</y> + <width>141</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Coarse fine diff:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="proteinLabel"> + <property name="geometry"> + <rect> + <x>660</x> + <y>250</y> + <width>141</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Protein:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="diastaticLabel"> + <property name="geometry"> + <rect> + <x>660</x> + <y>310</y> + <width>141</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Diastatic power:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="dissolvedLabel"> + <property name="geometry"> + <rect> + <x>660</x> + <y>280</y> + <width>141</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Dissolved protein:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="diphLabel"> + <property name="geometry"> + <rect> + <x>660</x> + <y>340</y> + <width>141</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Dissolved pH:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="acidphLabel"> + <property name="geometry"> + <rect> + <x>660</x> + <y>370</y> + <width>141</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Acid to pH 5.7:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="prodLabel"> + <property name="geometry"> + <rect> + <x>660</x> + <y>410</y> + <width>141</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Production date:</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QLabel" name="thtLabel"> + <property name="geometry"> + <rect> + <x>660</x> + <y>440</y> + <width>141</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Best before date:</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>10</y> + <width>791</width> + <height>23</height> + </rect> + </property> + <property name="maxLength"> + <number>128</number> + </property> + <property name="placeholderText"> + <string>Name of the fermentable</string> + </property> + </widget> + <widget class="QPlainTextEdit" name="notesEdit"> + <property name="geometry"> + <rect> + <x>140</x> + <y>40</y> + <width>791</width> + <height>81</height> + </rect> + </property> + <property name="placeholderText"> + <string>Notes and usage tips.</string> + </property> + </widget> + <widget class="QComboBox" name="typeEdit"> + <property name="geometry"> + <rect> + <x>140</x> + <y>130</y> + <width>151</width> + <height>23</height> + </rect> + </property> + </widget> + <widget class="QComboBox" name="graintypeEdit"> + <property name="geometry"> + <rect> + <x>140</x> + <y>160</y> + <width>151</width> + <height>23</height> + </rect> + </property> + </widget> + <widget class="QLineEdit" name="originEdit"> + <property name="geometry"> + <rect> + <x>140</x> + <y>190</y> + <width>451</width> + <height>23</height> + </rect> + </property> + <property name="maxLength"> + <number>128</number> + </property> + <property name="placeholderText"> + <string>Country of origin</string> + </property> + </widget> + <widget class="QLineEdit" name="supplierEdit"> + <property name="geometry"> + <rect> + <x>140</x> + <y>220</y> + <width>451</width> + <height>23</height> + </rect> + </property> + <property name="maxLength"> + <number>128</number> + </property> + <property name="placeholderText"> + <string>Producer or supplier</string> + </property> + </widget> + <widget class="QDoubleSpinBox" name="maxinbatchEdit"> + <property name="geometry"> + <rect> + <x>140</x> + <y>250</y> + <width>121</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.500000000000000</double> + </property> + </widget> + <widget class="QDoubleSpinBox" name="inventoryEdit"> + <property name="geometry"> + <rect> + <x>140</x> + <y>410</y> + <width>121</width> + <height>24</height> + </rect> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + <property name="readOnly"> + <bool>false</bool> + </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="maximum"> + <double>100000.000000000000000</double> + </property> + <property name="singleStep"> + <double>0.001000000000000</double> + </property> + <property name="stepType"> + <enum>QAbstractSpinBox::DefaultStepType</enum> + </property> + </widget> + <widget class="QDoubleSpinBox" name="costEdit"> + <property name="geometry"> + <rect> + <x>140</x> + <y>440</y> + <width>121</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="maximum"> + <double>1000.000000000000000</double> + </property> + <property name="singleStep"> + <double>0.010000000000000</double> + </property> + <property name="stepType"> + <enum>QAbstractSpinBox::DefaultStepType</enum> + </property> + </widget> + <widget class="QDoubleSpinBox" name="yieldEdit"> + <property name="geometry"> + <rect> + <x>810</x> + <y>130</y> + <width>121</width> + <height>24</height> + </rect> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + <property name="decimals"> + <number>1</number> + </property> + </widget> + <widget class="QDoubleSpinBox" name="colorEdit"> + <property name="geometry"> + <rect> + <x>810</x> + <y>160</y> + <width>121</width> + <height>24</height> + </rect> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + <property name="decimals"> + <number>1</number> + </property> + </widget> + <widget class="QDoubleSpinBox" name="moistureEdit"> + <property name="geometry"> + <rect> + <x>810</x> + <y>190</y> + <width>121</width> + <height>24</height> + </rect> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + <property name="decimals"> + <number>1</number> + </property> + </widget> + <widget class="QDoubleSpinBox" name="coarseEdit"> + <property name="geometry"> + <rect> + <x>810</x> + <y>220</y> + <width>121</width> + <height>24</height> + </rect> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + <property name="decimals"> + <number>1</number> + </property> + </widget> + <widget class="QDoubleSpinBox" name="proteinEdit"> + <property name="geometry"> + <rect> + <x>810</x> + <y>250</y> + <width>121</width> + <height>24</height> + </rect> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + <property name="decimals"> + <number>1</number> + </property> + </widget> + <widget class="QDoubleSpinBox" name="dissolvedEdit"> + <property name="geometry"> + <rect> + <x>810</x> + <y>280</y> + <width>121</width> + <height>24</height> + </rect> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + <property name="decimals"> + <number>1</number> + </property> + </widget> + <widget class="QDoubleSpinBox" name="diastaticEdit"> + <property name="geometry"> + <rect> + <x>810</x> + <y>310</y> + <width>121</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>0</number> + </property> + <property name="maximum"> + <double>1000.000000000000000</double> + </property> + </widget> + <widget class="QDoubleSpinBox" name="diphEdit"> + <property name="geometry"> + <rect> + <x>810</x> + <y>340</y> + <width>121</width> + <height>24</height> + </rect> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QDoubleSpinBox" name="acidphEdit"> + <property name="geometry"> + <rect> + <x>810</x> + <y>370</y> + <width>121</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>4</number> + </property> + <property name="minimum"> + <double>-1000.000000000000000</double> + </property> + <property name="maximum"> + <double>1000.000000000000000</double> + </property> + </widget> + <widget class="QCheckBox" name="mashEdit"> + <property name="geometry"> + <rect> + <x>140</x> + <y>280</y> + <width>85</width> + <height>21</height> + </rect> + </property> + <property name="text"> + <string>Yes</string> + </property> + </widget> + <widget class="QCheckBox" name="addafterEdit"> + <property name="geometry"> + <rect> + <x>140</x> + <y>310</y> + <width>85</width> + <height>21</height> + </rect> + </property> + <property name="text"> + <string>Yes</string> + </property> + </widget> + <widget class="QCheckBox" name="alwaysEdit"> + <property name="geometry"> + <rect> + <x>140</x> + <y>370</y> + <width>85</width> + <height>21</height> + </rect> + </property> + <property name="text"> + <string>Yes</string> + </property> + </widget> + <widget class="QComboBox" name="addedEdit"> + <property name="geometry"> + <rect> + <x>140</x> + <y>340</y> + <width>151</width> + <height>23</height> + </rect> + </property> + </widget> + <widget class="NullDateEdit" name="prodEdit" native="true"> + <property name="geometry"> + <rect> + <x>810</x> + <y>410</y> + <width>121</width> + <height>24</height> + </rect> + </property> + <property name="dateTime" stdset="0"> + <datetime> + <hour>0</hour> + <minute>0</minute> + <second>0</second> + <year>2000</year> + <month>1</month> + <day>1</day> + </datetime> + </property> + <property name="displayFormat" stdset="0"> + <string>yyyy-MM-dd</string> + </property> + <property name="calendarPopup" stdset="0"> + <bool>true</bool> + </property> + </widget> + <widget class="NullDateEdit" name="thtEdit" native="true"> + <property name="geometry"> + <rect> + <x>810</x> + <y>440</y> + <width>121</width> + <height>24</height> + </rect> + </property> + <property name="displayFormat" stdset="0"> + <string>yyyy-MM-dd</string> + </property> + <property name="calendarPopup" stdset="0"> + <bool>true</bool> + </property> + </widget> <widget class="QPushButton" name="quitButton"> <property name="geometry"> <rect> - <x>10</x> - <y>0</y> + <x>90</x> + <y>510</y> <width>80</width> <height>23</height> </rect> @@ -52,10 +852,13 @@ </property> </widget> <widget class="QPushButton" name="saveButton"> + <property name="enabled"> + <bool>false</bool> + </property> <property name="geometry"> <rect> - <x>1170</x> - <y>0</y> + <x>850</x> + <y>510</y> <width>80</width> <height>23</height> </rect> @@ -68,13 +871,86 @@ <normaloff>:/icons/silk/icons/silk/disk.png</normaloff>:/icons/silk/icons/silk/disk.png</iconset> </property> </widget> + <widget class="QPushButton" name="deleteButton"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="geometry"> + <rect> + <x>463</x> + <y>510</y> + <width>80</width> + <height>23</height> + </rect> + </property> + <property name="text"> + <string>Delete</string> + </property> + <property name="icon"> + <iconset resource="../../../../../../home/mbroek/MyProjects/bmsapp/resources/icons.qrc"> + <normaloff>:/icons/silk/icons/silk/delete.png</normaloff>:/icons/silk/icons/silk/delete.png</iconset> + </property> + </widget> + <widget class="QDoubleSpinBox" name="valueEdit"> + <property name="geometry"> + <rect> + <x>140</x> + <y>470</y> + <width>107</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> + </widget> </widget> </item> - <item row="1" column="0"> - <widget class="QWidget" name="topWidget" native="true"/> - </item> </layout> </widget> + <customwidgets> + <customwidget> + <class>NullDateEdit</class> + <extends>QWidget</extends> + <header>nulldateedit.h</header> + </customwidget> + </customwidgets> + <tabstops> + <tabstop>nameEdit</tabstop> + <tabstop>notesEdit</tabstop> + <tabstop>typeEdit</tabstop> + <tabstop>graintypeEdit</tabstop> + <tabstop>originEdit</tabstop> + <tabstop>supplierEdit</tabstop> + <tabstop>maxinbatchEdit</tabstop> + <tabstop>mashEdit</tabstop> + <tabstop>addafterEdit</tabstop> + <tabstop>addedEdit</tabstop> + <tabstop>alwaysEdit</tabstop> + <tabstop>inventoryEdit</tabstop> + <tabstop>costEdit</tabstop> + <tabstop>yieldEdit</tabstop> + <tabstop>colorEdit</tabstop> + <tabstop>moistureEdit</tabstop> + <tabstop>coarseEdit</tabstop> + <tabstop>proteinEdit</tabstop> + <tabstop>dissolvedEdit</tabstop> + <tabstop>diastaticEdit</tabstop> + <tabstop>diphEdit</tabstop> + <tabstop>acidphEdit</tabstop> + <tabstop>prodEdit</tabstop> + <tabstop>thtEdit</tabstop> + <tabstop>quitButton</tabstop> + <tabstop>deleteButton</tabstop> + <tabstop>saveButton</tabstop> + <tabstop>valueEdit</tabstop> + </tabstops> <resources> <include location="../../../../../../home/mbroek/MyProjects/bmsapp/resources/icons.qrc"/> </resources>