# HG changeset patch # User Michiel Broek # Date 1645782696 -3600 # Node ID 93a70b1502cac4e6f3923c5f9efa63c2b1dc5340 # Parent 94da58c66913a6c55f1aff80464caef07a41876b Added the inventory miscs table. diff -r 94da58c66913 -r 93a70b1502ca CMakeLists.txt --- a/CMakeLists.txt Thu Feb 24 14:36:56 2022 +0100 +++ b/CMakeLists.txt Fri Feb 25 10:51:36 2022 +0100 @@ -106,6 +106,8 @@ ${SRCDIR}/EditHop.cpp ${SRCDIR}/InventoryYeasts.cpp ${SRCDIR}/EditYeast.cpp + ${SRCDIR}/InventoryMiscs.cpp + ${SRCDIR}/EditMisc.cpp ${SRCDIR}/Setup.cpp ${SRCDIR}/Utils.cpp ${SRCDIR}/MainWindow.cpp @@ -124,6 +126,8 @@ ${SRCDIR}/EditHop.h ${SRCDIR}/InventoryYeasts.h ${SRCDIR}/EditYeast.h + ${SRCDIR}/InventoryMiscs.h + ${SRCDIR}/EditMisc.h ${SRCDIR}/Setup.h ${SRCDIR}/Utils.h ${SRCDIR}/MainWindow.h diff -r 94da58c66913 -r 93a70b1502ca src/EditMisc.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/EditMisc.cpp Fri Feb 25 10:51:36 2022 +0100 @@ -0,0 +1,290 @@ +/** + * EditMisc.cpp is part of bmsapp. + * + * bmsapp is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * bmsapp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "EditMisc.h" +#include "../ui/ui_EditMisc.h" +#include "bmsapp.h" + + +EditMisc::EditMisc(int id, QWidget *parent) : QDialog(parent), ui(new Ui::EditMisc) +{ + QSqlQuery query; + + qDebug() << "EditMisc record:" << id; + ui->setupUi(this); + this->recno = id; + + WindowTitle(); + + ui->typeEdit->addItem(tr("Spice")); + ui->typeEdit->addItem(tr("Herb")); + ui->typeEdit->addItem(tr("Flavor")); + ui->typeEdit->addItem(tr("Fining")); + ui->typeEdit->addItem(tr("Water agent")); + ui->typeEdit->addItem(tr("Yeast nutrient")); + ui->typeEdit->addItem(tr("Other")); + + ui->useEdit->addItem(tr("Starter")); + ui->useEdit->addItem(tr("Mash")); + ui->useEdit->addItem(tr("Boil")); + ui->useEdit->addItem(tr("Primary")); + ui->useEdit->addItem(tr("Secondary")); + ui->useEdit->addItem(tr("Bottling")); + + if (id >= 0) { + query.prepare("SELECT * FROM inventory_miscs WHERE record = :recno"); + query.bindValue(":recno", id); + query.exec(); + query.next(); + + ui->nameEdit->setText(query.value(1).toString()); + ui->typeEdit->setCurrentIndex(query.value(2).toInt()); + ui->useEdit->setCurrentIndex(query.value(3).toInt()); + ui->timeEdit->setValue(query.value(4).toInt()); + ui->isweightEdit->setChecked(query.value(5).toInt() ? true:false); + ui->useforEdit->setPlainText(query.value(6).toString()); + ui->notesEdit->setPlainText(query.value(7).toString()); + ui->alwaysEdit->setChecked(query.value(8).toInt() ? true:false); + ui->inventoryEdit->setValue(query.value(9).toDouble()); + ui->costEdit->setValue(query.value(10).toDouble()); + ui->valueEdit->setValue(query.value(9).toDouble() * query.value(10).toDouble()); + if (query.value(11).toString().length() == 10) { + ui->prodEdit->setDate(query.value(11).toDate()); + } else { + ui->prodEdit->clear(); + } + if (query.value(12).toString().length() == 10) { + ui->thtEdit->setDate(query.value(12).toDate()); + } else { + ui->thtEdit->clear(); + } + } else { + /* Set some defaults */ + ui->typeEdit->setCurrentIndex(0); + ui->useEdit->setCurrentIndex(0); + ui->timeEdit->setValue(0); + ui->prodEdit->clear(); + ui->thtEdit->clear(); + } + TimeSet(); + connect(ui->nameEdit, &QLineEdit::textChanged, this, &EditMisc::is_changed); + connect(ui->typeEdit, &QComboBox::currentTextChanged, this, &EditMisc::is_changed); + connect(ui->useEdit, &QComboBox::currentTextChanged, this, &EditMisc::is_changed); + connect(ui->timeEdit, &QSpinBox::textChanged, this, &EditMisc::time_changed); + connect(ui->isweightEdit, &QCheckBox::stateChanged, this, &EditMisc::is_changed); + connect(ui->useforEdit, SIGNAL(textChanged()), this, SLOT(is_changed())); + connect(ui->notesEdit, SIGNAL(textChanged()), this, SLOT(is_changed())); + connect(ui->alwaysEdit, &QCheckBox::stateChanged, this, &EditMisc::is_changed); + connect(ui->inventoryEdit, &QDoubleSpinBox::textChanged, this, &EditMisc::is_changed); + connect(ui->costEdit, &QDoubleSpinBox::textChanged, this, &EditMisc::is_changed); + connect(ui->prodEdit, &QDateEdit::dateChanged, this, &EditMisc::is_changed); + connect(ui->thtEdit, &QDateEdit::dateChanged, this, &EditMisc::is_changed); + + ui->saveButton->setEnabled(false); + ui->deleteButton->setEnabled((ui->inventoryEdit->value() == 0 && id >= 0) ? true:false); +} + + +EditMisc::~EditMisc() +{ + qDebug() << "EditMisc done"; + delete ui; + emit entry_changed(); +} + + +/* + * Window header, mark any change with '**' + */ +void EditMisc::WindowTitle() +{ + QString txt; + + if (this->recno < 0) { + txt = QString(tr("BMSapp - Add new misc ingredient")); + } else { + txt = QString(tr("BMSapp - Edit misc ingredient %1").arg(this->recno)); + } + + if (this->textIsChanged) { + txt.append((QString(" **"))); + } + setWindowTitle(txt); +} + + +void EditMisc::on_saveButton_clicked() +{ + QSqlQuery query; + + /* If there are errors in the form, show a message and do "return;" */ + if (ui->nameEdit->text().length() < 2) { + QMessageBox::warning(this, tr("Edit Misc"), tr("Name empty or too short.")); + return; + } + + if (this->textIsChanged) { + if (this->recno == -1) { + query.prepare("INSERT INTO inventory_miscs SET name=:name, type=:type, use_use=:use, " + "time=:time, amount_is_weight=:isweight, use_for=:usefor, notes=:notes, " + "always_on_stock=:always, inventory=:inventory, cost=:cost, production_date=:prod, " + "tht_date=:tht, uuid = :uuid"); + } else { + query.prepare("UPDATE inventory_miscs SET name=:name, type=:type, use_use=:use, " + "time=:time, amount_is_weight=:isweight, use_for=:usefor, notes=:notes, " + "always_on_stock=:always, inventory=:inventory, cost=:cost, production_date=:prod, " + "tht_date=:tht WHERE record = :recno"); + } + query.bindValue(":name", ui->nameEdit->text()); + query.bindValue(":type", ui->typeEdit->currentIndex()); + query.bindValue(":use", ui->useEdit->currentIndex()); + query.bindValue(":time", ui->timeEdit->value()); + query.bindValue(":isweight", ui->isweightEdit->isChecked() ? 1:0); + query.bindValue(":usefor", ui->useforEdit->toPlainText()); + query.bindValue(":notes", ui->notesEdit->toPlainText()); + query.bindValue(":always", ui->alwaysEdit->isChecked() ? 1:0); + query.bindValue(":inventory", QString("%1").arg(ui->inventoryEdit->value() / 1000.0, 5, 'f', 4, '0')); + query.bindValue(":cost", QString("%1").arg(ui->costEdit->value(), 3, 'f', 2, '0')); + /* Uses https://www.qtcentre.org/threads/17295-How-to-put-empty-value-in-QDateEdit */ + query.bindValue(":prod", ui->prodEdit->nullDate()); + query.bindValue(":tht", ui->thtEdit->nullDate()); + if (this->recno == -1) { + query.bindValue(":uuid", QUuid::createUuid().toString().mid(1, 36)); + } else { + query.bindValue(":recno", this->recno); + } + query.exec(); + if (query.lastError().isValid()) { + qDebug() << "EditMisc" << query.lastError(); + QMessageBox::warning(this, tr("Database error"), + tr("MySQL error: %1\n%2\n%3") + .arg(query.lastError().nativeErrorCode()) + .arg(query.lastError().driverText()) + .arg(query.lastError().databaseText())); + } else { + qDebug() << "EditMisc Saved"; + } + } + + ui->saveButton->setEnabled(false); + this->textIsChanged = false; + WindowTitle(); +} + + +void EditMisc::on_deleteButton_clicked() +{ + QSqlQuery query; + + query.prepare("DELETE FROM inventory_miscs WHERE record = :recno"); + query.bindValue(":recno", this->recno); + query.exec(); + if (query.lastError().isValid()) { + qDebug() << "EditMisc" << query.lastError(); + QMessageBox::warning(this, tr("Database error"), + tr("MySQL error: %1\n%2\n%3") + .arg(query.lastError().nativeErrorCode()) + .arg(query.lastError().driverText()) + .arg(query.lastError().databaseText())); + } else { + qDebug() << "EditMisc Deleted" << this->recno; + } + + this->close(); + this->setResult(1); +} + + +void EditMisc::TimeSet() +{ + int time = ui->timeEdit->value(); + QString w = QString(""); + + if (time == 0) { + ui->timeEdit->setSingleStep(1); + + } else if (time == 1) { + w = QString("1 minute"); + ui->timeEdit->setSingleStep(1); + + } else if (time < 180) { + w = QString("%1 minutes").arg(time); + ui->timeEdit->setSingleStep(1); + + } else if (time == 180) { + w = QString("3 hours"); + if (lasttime == 240) + ui->timeEdit->setSingleStep(1); /* Going down */ + else + ui->timeEdit->setSingleStep(60); + + } else if (time < 1440) { + w = QString("%1 hours").arg(time / 60); + ui->timeEdit->setSingleStep(60); + + } else if (time == 1440) { + w = QString("1 day"); + if (lasttime == 2880) + ui->timeEdit->setSingleStep(60); /* Going down */ + else + ui->timeEdit->setSingleStep(1440); + + } else { + w = QString("%1 days").arg(time / 1440); + ui->timeEdit->setSingleStep(1440); + + } + ui->timeShow->setText(w); + lasttime = time; +} + + +void EditMisc::is_changed() +{ + ui->valueEdit->setValue(ui->inventoryEdit->value() * ui->costEdit->value()); + ui->saveButton->setEnabled(true); + ui->deleteButton->setEnabled((ui->inventoryEdit->value() == 0 && this->recno >= 0) ? true:false); + this->textIsChanged = true; + WindowTitle(); +} + + +void EditMisc::time_changed() +{ + TimeSet(); + is_changed(); +} + + +void EditMisc::on_quitButton_clicked() +{ + if (this->textIsChanged) { + int rc = QMessageBox::warning(this, tr("Misc changed"), tr("The ingredient has been modified\n Save changes?"), + QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Save); + switch (rc) { + case QMessageBox::Save: + on_saveButton_clicked(); + break; /* Saved and then Quit */ + case QMessageBox::Discard: + break; /* Quit without Save */ + case QMessageBox::Cancel: + return; /* Return to the editor page */ + } + } + + this->close(); + this->setResult(1); +} diff -r 94da58c66913 -r 93a70b1502ca src/EditMisc.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/EditMisc.h Fri Feb 25 10:51:36 2022 +0100 @@ -0,0 +1,38 @@ +#ifndef _EDITMISC_H +#define _EDITMISC_H + +#include + + +namespace Ui { +class EditMisc; +} + +class EditMisc : public QDialog +{ + Q_OBJECT + +signals: + void entry_changed(); + +public: + explicit EditMisc(int id, QWidget *parent = 0); + ~EditMisc(); + +private slots: + void on_saveButton_clicked(); + void on_quitButton_clicked(); + void on_deleteButton_clicked(); + void is_changed(); + void time_changed(); + +private: + Ui::EditMisc *ui; + int recno, lasttime = 0; + bool textIsChanged = false; + + void WindowTitle(); + void TimeSet(); +}; + +#endif diff -r 94da58c66913 -r 93a70b1502ca src/InventoryMiscs.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/InventoryMiscs.cpp Fri Feb 25 10:51:36 2022 +0100 @@ -0,0 +1,154 @@ +/** + * InventoryMiscs.cpp is part of bmsapp. + * + * bmsapp is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * bmsapp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "InventoryMiscs.h" +#include "EditMisc.h" +#include "../ui/ui_InventoryMiscs.h" +#include "config.h" +#include "bmsapp.h" + + +InventoryMiscs::InventoryMiscs(QWidget *parent) : QDialog(parent), ui(new Ui::InventoryMiscs) +{ + qDebug() << "InventoryMiscs start"; + + ui->setupUi(this); + emit refreshTable(); + + setWindowTitle( QString("BMSapp - %1 - Inventory Miscs").arg(VERSIONSTRING) ); +} + + +void InventoryMiscs::refreshTable() +{ + QString w; + + qDebug() << "InventoryMiscs reload"; + + QSqlQuery query("SELECT * FROM inventory_miscs ORDER BY name"); + const QStringList labels({tr("Name"), tr("Type"), tr("Use"), tr("Time"), tr("Stock"), tr("Edit")}); + const QStringList types({tr("Spice"), tr("Herb"), tr("Flavor"), tr("Fining"), tr("Water agent"), tr("Yeast nutrient"), tr("Other")}); + const QStringList use({tr("Starter"), tr("Mash"), tr("Boil"), tr("Primary"), tr("Secondary"), tr("Bottling")}); + + /* origin supplier name type graintype color yield inventory Edit */ + ui->tableMiscs->setColumnCount(6); + ui->tableMiscs->setColumnWidth(0, 275); /* Name */ + ui->tableMiscs->setColumnWidth(1, 120); /* Type */ + ui->tableMiscs->setColumnWidth(2, 120); /* Use */ + ui->tableMiscs->setColumnWidth(3, 120); /* Time */ + ui->tableMiscs->setColumnWidth(4, 80); /* Stock */ + ui->tableMiscs->setColumnWidth(5, 80); /* Edit button */ + ui->tableMiscs->setRowCount(query.size()); + ui->tableMiscs->setHorizontalHeaderLabels(labels); + ui->tableMiscs->verticalHeader()->hide(); + ui->tableMiscs->setFixedSize(795 + 24, 640); /* Even if this is too large, it works */ + + QTableWidgetItem *rightitem = new QTableWidgetItem(); + rightitem->setTextAlignment(Qt::AlignRight); + + query.first(); + for (int ridx = 0 ; ridx < query.size() ; ridx++ ) { + ui->tableMiscs->setItem(ridx, 0, new QTableWidgetItem(query.value(1).toString())); /* Name */ + ui->tableMiscs->setItem(ridx, 1, new QTableWidgetItem(types[query.value(2).toInt()])); /* Type */ + ui->tableMiscs->setItem(ridx, 2, new QTableWidgetItem(use[query.value(3).toInt()])); /* Use */ + + w = QString(""); /* Use time */ + if (query.value(4).toInt() > 0) { + if (query.value(4).toInt() == 1) + w = QString("1 minute"); + else if (query.value(4).toInt() < 180) + w = QString("%1 minutes").arg(query.value(4).toInt()); + else if (query.value(4).toInt() < 1440) + w = QString("%1 hours").arg(query.value(4).toInt() / 60); + else if (query.value(4).toInt() == 1440) + w = QString("1 day"); + else + w = QString("%1 days").arg(query.value(4).toInt() / 1440); + } + QTableWidgetItem *item = new QTableWidgetItem(w); + item->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter); + ui->tableMiscs->setItem(ridx, 3, item); + + w = QString(""); + if (query.value(9).toDouble() > 0) { + if (query.value(5).toInt()) { /* Amount is weight */ + w = QString("%1 gr").arg(query.value(9).toDouble() * 1000.0, 2, 'f', 1, '0' ); + } else { + w = QString("%1 ml").arg(query.value(9).toDouble() * 1000.0, 2, 'f', 1, '0' ); + } + } + item = new QTableWidgetItem(w); + item->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter); + ui->tableMiscs->setItem(ridx, 4, item); + + /* Add the Edit button */ + QWidget* pWidget = new QWidget(); + QPushButton* btn_edit = new QPushButton(); + btn_edit->setObjectName(QString("%1").arg(query.value(0).toString())); /* Send record with the button */ + btn_edit->setText(tr("Edit")); + connect(btn_edit, SIGNAL(clicked()), this, SLOT(on_editButton_clicked())); + QHBoxLayout* pLayout = new QHBoxLayout(pWidget); + pLayout->addWidget(btn_edit); + pLayout->setContentsMargins(5, 0, 5, 0); + pWidget->setLayout(pLayout); + ui->tableMiscs->setCellWidget(ridx, 5, pWidget); + query.next(); + } + + setWindowTitle( QString("BMSapp - %1 - Inventory Miscs").arg(VERSIONSTRING) ); +} + + +InventoryMiscs::~InventoryMiscs() +{ + qDebug() << "InventoryMiscs done"; + delete ui; +} + + +void InventoryMiscs::edit(int recno) +{ + qDebug() << "InventoryMiscs edit:" << recno; + + EditMisc dialog(recno, this); + /* Signal from editor if a refresh is needed */ + connect(&dialog, SIGNAL(entry_changed()), this, SLOT(refreshTable())); + dialog.setModal(true); + dialog.exec(); +} + + +void InventoryMiscs::on_editButton_clicked() +{ + QPushButton *pb = qobject_cast(QObject::sender()); + int recno = pb->objectName().toInt(); + qDebug() << Q_FUNC_INFO << recno; + edit(recno); +} + + +void InventoryMiscs::on_insertButton_clicked() +{ + qDebug() << Q_FUNC_INFO; + edit(-1); +} + + +void InventoryMiscs::on_quitButton_clicked() +{ + emit firstWindow(); +} + diff -r 94da58c66913 -r 93a70b1502ca src/InventoryMiscs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/InventoryMiscs.h Fri Feb 25 10:51:36 2022 +0100 @@ -0,0 +1,32 @@ +#ifndef _INVENTORYMISCS_H +#define _INVENTORYMISCS_H + +#include + +namespace Ui { +class InventoryMiscs; +} + +class InventoryMiscs : public QDialog +{ + Q_OBJECT + +public: + explicit InventoryMiscs(QWidget *parent = nullptr); + ~InventoryMiscs(); + +signals: + void firstWindow(); + +private slots: + void on_quitButton_clicked(); + void on_insertButton_clicked(); + void on_editButton_clicked(); + void refreshTable(void); + +private: + Ui::InventoryMiscs *ui; + void edit(int recno); +}; + +#endif diff -r 94da58c66913 -r 93a70b1502ca src/MainWindow.cpp --- a/src/MainWindow.cpp Thu Feb 24 14:36:56 2022 +0100 +++ b/src/MainWindow.cpp Fri Feb 25 10:51:36 2022 +0100 @@ -20,6 +20,7 @@ #include "InventoryFermentables.h" #include "InventoryHops.h" #include "InventoryYeasts.h" +#include "InventoryMiscs.h" #include "Setup.h" #include "../ui/ui_MainWindow.h" #include "config.h" @@ -126,6 +127,24 @@ } +void MainWindow::fromInventoryMiscs() +{ + qDebug() << Q_FUNC_INFO; + delete InventoryMiscsWindow; + this->show(); +} + + +void MainWindow::on_actionMiscs_triggered() +{ + qDebug() << Q_FUNC_INFO; + InventoryMiscsWindow = new InventoryMiscs(this); + QObject::connect(InventoryMiscsWindow, SIGNAL(firstWindow()), this, SLOT(fromInventoryMiscs())); + this->hide(); // Close the main window + InventoryMiscsWindow->show(); // Show a second window +} + + void MainWindow::fromSetup() { qDebug() << Q_FUNC_INFO; diff -r 94da58c66913 -r 93a70b1502ca src/MainWindow.h --- a/src/MainWindow.h Thu Feb 24 14:36:56 2022 +0100 +++ b/src/MainWindow.h Fri Feb 25 10:51:36 2022 +0100 @@ -5,6 +5,7 @@ #include "InventoryFermentables.h" #include "InventoryHops.h" #include "InventoryYeasts.h" +#include "InventoryMiscs.h" #include "Setup.h" #include @@ -30,6 +31,7 @@ void on_actionFermentables_triggered(); void on_actionHops_triggered(); void on_actionYeasts_triggered(); + void on_actionMiscs_triggered(); void on_actionSetup_triggered(); void on_actionAbout_triggered(); @@ -38,6 +40,7 @@ void fromInventoryFermentables(); void fromInventoryHops(); void fromInventoryYeasts(); + void fromInventoryMiscs(); void fromSetup(); private: @@ -48,6 +51,7 @@ InventoryFermentables *InventoryFermentablesWindow; InventoryHops *InventoryHopsWindow; InventoryYeasts *InventoryYeastsWindow; + InventoryMiscs *InventoryMiscsWindow; Setup *SetupWindow; }; diff -r 94da58c66913 -r 93a70b1502ca ui/EditMisc.ui --- a/ui/EditMisc.ui Thu Feb 24 14:36:56 2022 +0100 +++ b/ui/EditMisc.ui Fri Feb 25 10:51:36 2022 +0100 @@ -51,8 +51,8 @@ - 5 - 410 + 680 + 130 121 20 @@ -67,8 +67,8 @@ - 5 - 440 + 680 + 160 121 20 @@ -83,8 +83,8 @@ - 5 - 470 + 680 + 190 121 20 @@ -99,9 +99,9 @@ - 660 - 410 - 141 + 20 + 340 + 101 20 @@ -116,7 +116,7 @@ 660 - 440 + 340 141 20 @@ -141,7 +141,7 @@ 128 - Name of the fermentable + Name of the misc ingredient @@ -160,8 +160,8 @@ - 140 - 410 + 810 + 130 121 24 @@ -194,8 +194,8 @@ - 140 - 440 + 810 + 160 121 24 @@ -219,8 +219,8 @@ - 810 - 410 + 140 + 340 121 24 @@ -246,7 +246,7 @@ 810 - 440 + 340 121 24 @@ -277,7 +277,7 @@ Quit - + :icons/silk/door_out.png:icons/silk/door_out.png @@ -297,7 +297,7 @@ Save - + :icons/silk/disk.png:icons/silk/disk.png @@ -317,15 +317,15 @@ Delete - + :icons/silk/delete.png:icons/silk/delete.png - 140 - 470 + 810 + 190 107 24 @@ -340,6 +340,193 @@ QAbstractSpinBox::NoButtons + + + + 30 + 130 + 91 + 20 + + + + Type: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 10 + 160 + 111 + 20 + + + + Amount is weight: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 30 + 190 + 91 + 20 + + + + Use at: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 30 + 220 + 91 + 20 + + + + Time: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 30 + 250 + 91 + 20 + + + + Use for: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 690 + 220 + 111 + 20 + + + + Always on stock: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 140 + 130 + 131 + 23 + + + + + + + 140 + 190 + 131 + 23 + + + + + + + 140 + 160 + 85 + 21 + + + + Yes + + + + + + 140 + 220 + 71 + 24 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + 99360 + + + + + + 810 + 220 + 85 + 21 + + + + Yes + + + + + + 140 + 250 + 791 + 61 + + + + + + + 220 + 220 + 113 + 23 + + + + Qt::AlignCenter + + + true + + diff -r 94da58c66913 -r 93a70b1502ca ui/MainWindow.ui --- a/ui/MainWindow.ui Thu Feb 24 14:36:56 2022 +0100 +++ b/ui/MainWindow.ui Fri Feb 25 10:51:36 2022 +0100 @@ -131,7 +131,7 @@ - + :icons/silk/cross.png:icons/silk/cross.png @@ -140,7 +140,7 @@ - + :icons/silk/information.png:icons/silk/information.png @@ -149,7 +149,7 @@ - + :icons/silk/server.png:icons/silk/server.png @@ -158,7 +158,7 @@ - + :icons/bms/fridge.png:icons/bms/fridge.png @@ -167,7 +167,7 @@ - + :icons/bms/beerbottle.png:icons/bms/beerbottle.png @@ -176,7 +176,7 @@ - + :icons/bms/fermenter.png:icons/bms/fermenter.png @@ -185,7 +185,7 @@ - + :icons/silk/user.png:icons/silk/user.png @@ -197,7 +197,7 @@ true - + :icons/bms/graan.png:icons/bms/graan.png @@ -209,7 +209,7 @@ true - + :icons/bms/hop.png:icons/bms/hop.png @@ -221,7 +221,7 @@ true - + :icons/bms/erlenmeyer.png:icons/bms/erlenmeyer.png @@ -230,10 +230,10 @@ - false + true - + :icons/bms/peper.png:icons/bms/peper.png @@ -245,7 +245,7 @@ false - + :icons/bms/water.png:icons/bms/water.png @@ -257,7 +257,7 @@ false - + :icons/bms/mash.png:icons/bms/mash.png @@ -269,7 +269,7 @@ false - + :icons/silk/database.png:icons/silk/database.png @@ -281,7 +281,7 @@ false - + :icons/bms/science.png:icons/bms/science.png @@ -293,7 +293,7 @@ false - + :icons/bms/water.png:icons/bms/water.png @@ -305,7 +305,7 @@ false - + :icons/bms/mash.png:icons/bms/mash.png @@ -317,7 +317,7 @@ false - + :icons/bms/beerstyles.png:icons/bms/beerstyles.png @@ -329,7 +329,7 @@ false - + :icons/bms/fermenter.png:icons/bms/fermenter.png @@ -338,7 +338,7 @@ - + :icons/silk/wrench.png:icons/silk/wrench.png