# HG changeset patch # User Michiel Broek # Date 1645474653 -3600 # Node ID a9da2744609e74a8f6f5cab483dba784d8934c1d # Parent 684c6e74cc1b48a9c5d1f401c8df37405265399d Added inventory yeasts editor. Fixed resource icons location. diff -r 684c6e74cc1b -r a9da2744609e CMakeLists.txt --- a/CMakeLists.txt Sun Feb 20 20:22:49 2022 +0100 +++ b/CMakeLists.txt Mon Feb 21 21:17:33 2022 +0100 @@ -104,6 +104,8 @@ ${SRCDIR}/EditFermentable.cpp ${SRCDIR}/InventoryHops.cpp ${SRCDIR}/EditHop.cpp + ${SRCDIR}/InventoryYeasts.cpp + ${SRCDIR}/EditYeast.cpp ${SRCDIR}/Setup.cpp ${SRCDIR}/Utils.cpp ${SRCDIR}/MainWindow.cpp @@ -120,6 +122,8 @@ ${SRCDIR}/EditFermentable.h ${SRCDIR}/InventoryHops.h ${SRCDIR}/EditHop.h + ${SRCDIR}/InventoryYeasts.h + ${SRCDIR}/EditYeast.h ${SRCDIR}/Setup.h ${SRCDIR}/Utils.h ${SRCDIR}/MainWindow.h diff -r 684c6e74cc1b -r a9da2744609e resources/icons.qrc --- a/resources/icons.qrc Sun Feb 20 20:22:49 2022 +0100 +++ b/resources/icons.qrc Mon Feb 21 21:17:33 2022 +0100 @@ -1,5 +1,5 @@ - + icons/silk/accept.png icons/silk/add.png icons/silk/anchor.png @@ -1001,7 +1001,7 @@ icons/silk/zoom_out.png icons/silk/zoom.png - + icons/bms/beer.png icons/bms/beerbottle.png icons/bms/beerstyles.png diff -r 684c6e74cc1b -r a9da2744609e src/EditYeast.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/EditYeast.cpp Mon Feb 21 21:17:33 2022 +0100 @@ -0,0 +1,373 @@ +/** + * EditYeast.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 "EditYeast.h" +#include "../ui/ui_EditYeast.h" +#include "bmsapp.h" + + +EditYeast::EditYeast(int id, QWidget *parent) : QDialog(parent), ui(new Ui::EditYeast) +{ + QSqlQuery query; + + qDebug() << "EditYeast record:" << id; + ui->setupUi(this); + this->recno = id; + + WindowTitle(); + + ui->typeEdit->addItem(tr("Lager")); + ui->typeEdit->addItem(tr("Ale")); + ui->typeEdit->addItem(tr("Wheat")); + ui->typeEdit->addItem(tr("Wine")); + ui->typeEdit->addItem(tr("Champagne")); + ui->typeEdit->addItem(tr("Brett")); + ui->typeEdit->addItem(tr("Kveik")); + ui->typeEdit->addItem(tr("Hybrid")); + + ui->formEdit->addItem(tr("Liquid")); + ui->formEdit->addItem(tr("Dry")); + ui->formEdit->addItem(tr("Slant")); + ui->formEdit->addItem(tr("Culture")); + ui->formEdit->addItem(tr("Frozen")); + ui->formEdit->addItem(tr("Bottle")); + ui->formEdit->addItem(tr("Dried")); + + ui->flocEdit->addItem(tr("Low")); + ui->flocEdit->addItem(tr("Medium")); + ui->flocEdit->addItem(tr("High")); + ui->flocEdit->addItem(tr("Very high")); + + if (id >= 0) { + query.prepare("SELECT * FROM inventory_yeasts 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->formEdit->setCurrentIndex(query.value(3).toInt()); + ui->laboratoryEdit->setText(query.value(4).toString()); + ui->productidEdit->setText(query.value(5).toString()); + ui->temploEdit->setValue(query.value(6).toDouble()); + ui->temphiEdit->setValue(query.value(7).toDouble()); + ui->flocEdit->setCurrentIndex(query.value(8).toInt()); + ui->attEdit->setValue(query.value(9).toDouble()); + ui->toleranceEdit->setValue(query.value(10).toDouble()); + ui->notesEdit->setPlainText(query.value(11).toString()); + ui->bestforEdit->setPlainText(query.value(12).toString()); + ui->reuseEdit->setValue(query.value(13).toInt()); + if (query.value(3).toInt() == 0) + ui->inventoryEdit->setValue(query.value(14).toDouble()); /* Liquid */ + else + ui->inventoryEdit->setValue(query.value(14).toDouble() * 1000); + ui->costEdit->setValue(query.value(15).toDouble()); + SetForm(query.value(3).toInt()); + if (query.value(16).toString().length() == 10) { + ui->prodEdit->setDate(query.value(16).toDate()); + } else { + ui->prodEdit->clear(); + } + if (query.value(17).toString().length() == 10) { + ui->thtEdit->setDate(query.value(17).toDate()); + } else { + ui->thtEdit->clear(); + } + ui->cellsEdit->setValue(query.value(18).toDouble() / 1000000000); + ui->sta1Edit->setChecked(query.value(19).toInt() ? true:false); + ui->bacteriaEdit->setChecked(query.value(20).toInt() ? true:false); + ui->harvesttopEdit->setChecked(query.value(21).toInt() ? true:false); + ui->harvesttimeEdit->setValue(query.value(22).toInt()); + ui->pitchtempEdit->setValue(query.value(23).toDouble()); + ui->pofEdit->setChecked(query.value(24).toInt() ? true:false); + ui->yeastbankEdit->setText(query.value(26).toString()); + ui->grhlloEdit->setValue(query.value(27).toInt()); + ui->sgloEdit->setValue(query.value(28).toDouble()); + ui->grhlhiEdit->setValue(query.value(29).toInt()); + ui->sghiEdit->setValue(query.value(30).toDouble()); + } else { + /* Set some defaults */ + ui->typeEdit->setCurrentIndex(1); + ui->formEdit->setCurrentIndex(1); + SetForm(1); + ui->temploEdit->setValue(18.0); + ui->temphiEdit->setValue(22.0); + ui->attEdit->setValue(77.0); + ui->reuseEdit->setValue(10); + ui->grhlloEdit->setValue(50); + ui->sgloEdit->setValue(1.050); + ui->grhlhiEdit->setValue(80); + ui->sghiEdit->setValue(1.080); + ui->prodEdit->clear(); + ui->thtEdit->clear(); + } + connect(ui->nameEdit, &QLineEdit::textChanged, this, &EditYeast::is_changed); + connect(ui->typeEdit, &QComboBox::currentTextChanged, this, &EditYeast::is_changed); + connect(ui->formEdit, &QComboBox::currentTextChanged, this, &EditYeast::is_changed); + connect(ui->laboratoryEdit, &QLineEdit::textChanged, this, &EditYeast::is_changed); + connect(ui->productidEdit, &QLineEdit::textChanged, this, &EditYeast::is_changed); + connect(ui->temploEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::temp_lo_changed); + connect(ui->temphiEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::temp_hi_changed); + connect(ui->flocEdit, &QComboBox::currentTextChanged, this, &EditYeast::is_changed); + connect(ui->attEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::is_changed); + connect(ui->toleranceEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::is_changed); + connect(ui->notesEdit, SIGNAL(textChanged()), this, SLOT(is_changed())); + connect(ui->bestforEdit, SIGNAL(textChanged()), this, SLOT(is_changed())); + connect(ui->reuseEdit, &QSpinBox::textChanged, this, &EditYeast::is_changed); + connect(ui->inventoryEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::is_changed); + connect(ui->costEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::is_changed); + connect(ui->prodEdit, &QDateEdit::dateChanged, this, &EditYeast::is_changed); + connect(ui->thtEdit, &QDateEdit::dateChanged, this, &EditYeast::is_changed); + connect(ui->cellsEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::is_changed); + connect(ui->sta1Edit, &QCheckBox::stateChanged, this, &EditYeast::is_changed); + connect(ui->bacteriaEdit, &QCheckBox::stateChanged, this, &EditYeast::is_changed); + connect(ui->harvesttopEdit, &QCheckBox::stateChanged, this, &EditYeast::is_changed); + connect(ui->harvesttimeEdit, &QSpinBox::textChanged, this, &EditYeast::is_changed); + connect(ui->pitchtempEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::is_changed); + connect(ui->pofEdit, &QCheckBox::stateChanged, this, &EditYeast::is_changed); + connect(ui->yeastbankEdit, &QLineEdit::textChanged, this, &EditYeast::is_changed); + connect(ui->grhlloEdit, &QSpinBox::textChanged, this, &EditYeast::is_changed); + connect(ui->sgloEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::is_changed); + connect(ui->grhlhiEdit, &QSpinBox::textChanged, this, &EditYeast::is_changed); + connect(ui->sghiEdit, &QDoubleSpinBox::textChanged, this, &EditYeast::is_changed); + + ui->saveButton->setEnabled(false); + ui->deleteButton->setEnabled((ui->inventoryEdit->value() == 0 && id >= 0) ? true:false); +} + + +EditYeast::~EditYeast() +{ + qDebug() << "EditYeast done"; + delete ui; + emit entry_changed(); +} + + +void EditYeast::SetForm(int form) +{ + if (form == 0) { + /* + * Liquid yeast + */ + ui->costLabel->setText(tr("Price per pack:")); + ui->inventoryLabel->setText(tr("Inventory Packs:")); + ui->cellsLabel->setText(tr("Billion cells/pack:")); + ui->inventoryEdit->setDecimals(0); + ui->inventoryEdit->setSingleStep(1.0); + ui->valueEdit->setValue(ui->inventoryEdit->value() * ui->costEdit->value()); + } else if (form == 1 || form == 6) { + /* + * Dry or dried yeast + */ + ui->costLabel->setText(tr("Price per Kg:")); + ui->inventoryLabel->setText(tr("Inventory gram:")); + ui->cellsLabel->setText(tr("Billion cells/gram:")); + ui->inventoryEdit->setDecimals(1); + ui->inventoryEdit->setSingleStep(0.5); + ui->valueEdit->setValue((ui->inventoryEdit->value() / 1000) * ui->costEdit->value()); + } else { + /* + * All others + */ + ui->costLabel->setText(tr("Price per litre:")); + ui->inventoryLabel->setText(tr("Inventory ml:")); + ui->cellsLabel->setText(tr("Billion cells/ml:")); + ui->inventoryEdit->setDecimals(1); + ui->inventoryEdit->setSingleStep(0.5); + ui->valueEdit->setValue((ui->inventoryEdit->value() / 1000) * ui->costEdit->value()); + } +} + + + +/* + * Window header, mark any change with '**' + */ +void EditYeast::WindowTitle() +{ + QString txt; + + if (this->recno < 0) { + txt = QString(tr("BMSapp - Add new hop")); + } else { + txt = QString(tr("BMSapp - Edit hop %1").arg(this->recno)); + } + + if (this->textIsChanged) { + txt.append((QString(" **"))); + } + setWindowTitle(txt); +} + + +void EditYeast::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 Yeast"), tr("Name empty or too short.")); + return; + } + if (ui->laboratoryEdit->text().length() < 2) { + QMessageBox::warning(this, tr("Edit Yeast"), tr("Laboratory empty or too short.")); + return; + } + + if (this->textIsChanged) { + if (this->recno == -1) { + query.prepare("INSERT INTO inventory_yeasts SET name=:name, type=:type, form=:form, " + "laboratory=:laboratory, product_id=:productid, min_temperature=:templo, max_temperature=:temphi, " + "flocculation=:floc, attenuation=:att, tolerance=:tolerance, notes=:notes, best_for=:bestfor, " + "max_reuse=:reuse, inventory=:inventory, cost=:cost, production_date=:prod, tht_date=:tht, " + "cells=:cells, sta1=:sta1, bacteria=:bacteria, harvest_top=:harvesttop, harvest_time=:harvesttime, " + "pitch_temperature=:pitchtemp, pofpos=:pof, short_desc=:yeastbank, gr_hl_lo=:grhllo, sg_lo=:sglo, " + "gr_hl_hi=:grhlhi, sg_hi=:sghi, uuid = :uuid"); + } else { + query.prepare("UPDATE inventory_yeasts SET name=:name, type=:type, form=:form, " + "laboratory=:laboratory, product_id=:productid, min_temperature=:templo, max_temperature=:temphi, " + "flocculation=:floc, attenuation=:att, tolerance=:tolerance, notes=:notes, best_for=:bestfor, " + "max_reuse=:reuse, inventory=:inventory, cost=:cost, production_date=:prod, tht_date=:tht, " + "cells=:cells, sta1=:sta1, bacteria=:bacteria, harvest_top=:harvesttop, harvest_time=:harvesttime, " + "pitch_temperature=:pitchtemp, pofpos=:pof, short_desc=:yeastbank, gr_hl_lo=:grhllo, sg_lo=:sglo, " + "gr_hl_hi=:grhlhi, sg_hi=:sghi WHERE record = :recno"); + } + query.bindValue(":name", ui->nameEdit->text()); + query.bindValue(":type", ui->typeEdit->currentIndex()); + query.bindValue(":form", ui->formEdit->currentIndex()); + query.bindValue(":laboratory", ui->laboratoryEdit->text()); + query.bindValue(":productid", ui->productidEdit->text()); + query.bindValue(":templo", QString("%1").arg(ui->temploEdit->value(), 2, 'f', 1, '0')); + query.bindValue(":temphi", QString("%1").arg(ui->temphiEdit->value(), 2, 'f', 1, '0')); + query.bindValue(":floc", ui->flocEdit->currentIndex()); + query.bindValue(":att", QString("%1").arg(ui->attEdit->value(), 2, 'f', 1, '0')); + query.bindValue(":tolerance", QString("%1").arg(ui->toleranceEdit->value(), 2, 'f', 1, '0')); + query.bindValue(":notes", ui->notesEdit->toPlainText()); + query.bindValue(":bestfor", ui->bestforEdit->toPlainText()); + query.bindValue(":reuse", ui->reuseEdit->value()); + if (ui->formEdit->currentIndex() == 0) + query.bindValue(":inventory", QString("%1").arg(ui->inventoryEdit->value(), 5, 'f', 4, '0')); + else + query.bindValue(":inventory", QString("%1").arg(ui->inventoryEdit->value() / 1000, 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()); + query.bindValue(":cells", QString("%1").arg(ui->cellsEdit->value() * 1000000000, 1, 'f', 0, '0')); + query.bindValue(":sta1", ui->sta1Edit->isChecked() ? 1:0); + query.bindValue(":bacteria", ui->bacteriaEdit->isChecked() ? 1:0); + query.bindValue(":harvesttop", ui->harvesttopEdit->isChecked() ? 1:0); + query.bindValue(":harvesttime", ui->harvesttimeEdit->value()); + query.bindValue(":pitchtemp", QString("%1").arg(ui->pitchtempEdit->value(), 2, 'f', 1, '0')); + query.bindValue(":pof", ui->pofEdit->isChecked() ? 1:0); + query.bindValue(":yeastbank", ui->yeastbankEdit->text()); + query.bindValue(":grhllo", QString("%1").arg(ui->grhlloEdit->value(), 2, 'f', 1, '0')); + query.bindValue(":sglo", ui->sgloEdit->value()); + query.bindValue(":grhlhi", QString("%1").arg(ui->grhlhiEdit->value(), 2, 'f', 1, '0')); + query.bindValue(":sghi", ui->sghiEdit->value()); + 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() << "EditYeast" << 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() << "EditYeast Saved"; + } + } + + ui->saveButton->setEnabled(false); + this->textIsChanged = false; + WindowTitle(); +} + + +void EditYeast::on_deleteButton_clicked() +{ + QSqlQuery query; + + query.prepare("DELETE FROM inventory_yeasts WHERE record = :recno"); + query.bindValue(":recno", this->recno); + query.exec(); + if (query.lastError().isValid()) { + qDebug() << "EditYeast" << 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() << "EditYeast Deleted" << this->recno; + } + + this->close(); + this->setResult(1); +} + + +void EditYeast::is_changed() +{ + SetForm(ui->formEdit->currentIndex()); + ui->saveButton->setEnabled(true); + ui->deleteButton->setEnabled((ui->inventoryEdit->value() == 0 && this->recno >= 0) ? true:false); + this->textIsChanged = true; + WindowTitle(); +} + + +void EditYeast::temp_lo_changed() +{ + if (ui->temploEdit->value() > (ui->temphiEdit->value() - 1)) + ui->temphiEdit->setValue(ui->temploEdit->value() + 1); + is_changed(); +} + + +void EditYeast::temp_hi_changed() +{ + if (ui->temphiEdit->value() < (ui->temploEdit->value() + 1)) + ui->temploEdit->setValue(ui->temphiEdit->value() - 1); + is_changed(); +} + + +void EditYeast::on_quitButton_clicked() +{ + if (this->textIsChanged) { + int rc = QMessageBox::warning(this, tr("Yeast changed"), tr("The yeast 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 684c6e74cc1b -r a9da2744609e src/EditYeast.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/EditYeast.h Mon Feb 21 21:17:33 2022 +0100 @@ -0,0 +1,39 @@ +#ifndef _EDITYEAST_H +#define _EDITYEAST_H + +#include + + +namespace Ui { +class EditYeast; +} + +class EditYeast : public QDialog +{ + Q_OBJECT + +signals: + void entry_changed(); + +public: + explicit EditYeast(int id, QWidget *parent = 0); + ~EditYeast(); + +private slots: + void on_saveButton_clicked(); + void on_quitButton_clicked(); + void on_deleteButton_clicked(); + void is_changed(); + void temp_lo_changed(); + void temp_hi_changed(); + +private: + Ui::EditYeast *ui; + int recno; + bool textIsChanged = false; + + void WindowTitle(); + void SetForm(int form); +}; + +#endif diff -r 684c6e74cc1b -r a9da2744609e src/InventoryYeasts.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/InventoryYeasts.cpp Mon Feb 21 21:17:33 2022 +0100 @@ -0,0 +1,184 @@ +/** + * InventoryYeasts.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 "InventoryYeasts.h" +#include "EditYeast.h" +#include "../ui/ui_InventoryYeasts.h" +#include "config.h" +#include "bmsapp.h" + + +InventoryYeasts::InventoryYeasts(QWidget *parent) : QDialog(parent), ui(new Ui::InventoryYeasts) +{ + qDebug() << "InventoryYeasts start"; + + ui->setupUi(this); + emit refreshTable(); + + setWindowTitle( QString("BMSapp - %1 - Inventory Yeasts").arg(VERSIONSTRING) ); +} + + +void InventoryYeasts::refreshTable() +{ + QString w; + QWidget* pWidget; + QLabel *label; + QHBoxLayout* pLayout; + + qDebug() << "InventoryYeasts reload"; + + QSqlQuery query("SELECT * FROM inventory_yeasts ORDER BY laboratory,product_id,name"); + const QStringList labels({tr("Laboratory"), tr("Product id"), tr("Name"), tr("Type"), tr("Form"), tr("SVG %"), tr("Tol %"), tr("POF+"), tr("STA1"), tr("Stock"), tr("Edit")}); + const QStringList types({tr("Lager"), tr("Ale"), tr("Wheat"), tr("Wine"), tr("Champagne"), tr("Brett"), tr("Kveik"), tr("Hybrid")}); + const QStringList form({tr("Liquid"), tr("Dry"), tr("Slant"), tr("Culture"), tr("Frozen"), tr("Bottle"), tr("Dried")}); + + /* origin supplier name type graintype color yield inventory Edit */ + ui->tableYeasts->setColumnCount(11); + ui->tableYeasts->setColumnWidth(0, 120); /* Laboratory */ + ui->tableYeasts->setColumnWidth(1, 120); /* Product ID */ + ui->tableYeasts->setColumnWidth(2, 250); /* Name */ + ui->tableYeasts->setColumnWidth(3, 70); /* Type */ + ui->tableYeasts->setColumnWidth(4, 70); /* Form */ + ui->tableYeasts->setColumnWidth(5, 80); /* SVG */ + ui->tableYeasts->setColumnWidth(6, 80); /* Tolerance */ + ui->tableYeasts->setColumnWidth(7, 60); /* POF+ */ + ui->tableYeasts->setColumnWidth(8, 60); /* STA1 */ + ui->tableYeasts->setColumnWidth(9, 80); /* Stock */ + ui->tableYeasts->setColumnWidth(10, 80); /* Edit button */ + ui->tableYeasts->setRowCount(query.size()); + ui->tableYeasts->setHorizontalHeaderLabels(labels); + ui->tableYeasts->verticalHeader()->hide(); + ui->tableYeasts->setFixedSize(1070 + 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->tableYeasts->setItem(ridx, 0, new QTableWidgetItem(query.value(4).toString())); /* Laboratory */ + ui->tableYeasts->setItem(ridx, 1, new QTableWidgetItem(query.value(5).toString())); /* Product id */ + ui->tableYeasts->setItem(ridx, 2, new QTableWidgetItem(query.value(1).toString())); /* Name */ + ui->tableYeasts->setItem(ridx, 3, new QTableWidgetItem(types[query.value(2).toInt()])); /* Type */ + ui->tableYeasts->setItem(ridx, 4, new QTableWidgetItem(form[query.value(3).toInt()])); /* Form */ + w = QString("%1 %").arg(query.value(9).toDouble(), 2, 'f', 1, '0' ); /* Attenuation% */ + QTableWidgetItem *item = new QTableWidgetItem(w); + item->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter); + ui->tableYeasts->setItem(ridx, 5, item); + w = QString(""); + if (query.value(10).toDouble() > 0) + w = QString("%1 %").arg(query.value(10).toDouble(), 2, 'f', 1, '0' ); /* Alcohol% */ + item = new QTableWidgetItem(w); + item->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter); + ui->tableYeasts->setItem(ridx, 6, item); + + if (query.value(24).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->tableYeasts->setCellWidget(ridx, 7, pWidget); + } + if (query.value(19).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->tableYeasts->setCellWidget(ridx, 8, pWidget); + } + + w = QString(""); + if (query.value(14).toDouble() > 0) { + if (query.value(3).toInt() == 0 && query.value(14).toDouble() > 1) { /* Liquid yeast, multiple packs */ + w = QString("%1 packs").arg(query.value(14).toDouble(), 1, 'f', 0, '0'); + } else if (query.value(3).toInt() == 0) { /* Liquid yeast */ + w = QString("%1 pack").arg(query.value(14).toDouble(), 1, 'f', 0, '0'); + } else if (query.value(3).toInt() == 1 || query.value(3).toInt() == 6) { /* Dry or dried */ + w = QString("%1 gram").arg(query.value(14).toDouble() * 1000, 2, 'f', 1, '0'); + } else { /* Any other form */ + w = QString("%1 ml").arg(query.value(14).toDouble() * 1000, 2, 'f', 1, '0'); + } + } + item = new QTableWidgetItem(w); + item->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter); + ui->tableYeasts->setItem(ridx, 9, item); + + /* Add the Edit button */ + 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())); + pLayout = new QHBoxLayout(pWidget); + pLayout->addWidget(btn_edit); + pLayout->setContentsMargins(5, 0, 5, 0); + pWidget->setLayout(pLayout); + ui->tableYeasts->setCellWidget(ridx, 10, pWidget); + query.next(); + } + + setWindowTitle( QString("BMSapp - %1 - Inventory Yeasts").arg(VERSIONSTRING) ); +} + + +InventoryYeasts::~InventoryYeasts() +{ + qDebug() << "InventoryYeasts done"; + delete ui; +} + + +void InventoryYeasts::edit(int recno) +{ + qDebug() << "InventoryYeasts edit:" << recno; + + EditYeast 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 InventoryYeasts::on_editButton_clicked() +{ + QPushButton *pb = qobject_cast(QObject::sender()); + int recno = pb->objectName().toInt(); + qDebug() << Q_FUNC_INFO << recno; + edit(recno); +} + + +void InventoryYeasts::on_insertButton_clicked() +{ + qDebug() << Q_FUNC_INFO; + edit(-1); +} + + +void InventoryYeasts::on_quitButton_clicked() +{ + emit firstWindow(); +} + diff -r 684c6e74cc1b -r a9da2744609e src/InventoryYeasts.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/InventoryYeasts.h Mon Feb 21 21:17:33 2022 +0100 @@ -0,0 +1,32 @@ +#ifndef _INVENTORYYEASTS_H +#define _INVENTORYYEASTS_H + +#include + +namespace Ui { +class InventoryYeasts; +} + +class InventoryYeasts : public QDialog +{ + Q_OBJECT + +public: + explicit InventoryYeasts(QWidget *parent = nullptr); + ~InventoryYeasts(); + +signals: + void firstWindow(); + +private slots: + void on_quitButton_clicked(); + void on_insertButton_clicked(); + void on_editButton_clicked(); + void refreshTable(void); + +private: + Ui::InventoryYeasts *ui; + void edit(int recno); +}; + +#endif diff -r 684c6e74cc1b -r a9da2744609e src/MainWindow.cpp --- a/src/MainWindow.cpp Sun Feb 20 20:22:49 2022 +0100 +++ b/src/MainWindow.cpp Mon Feb 21 21:17:33 2022 +0100 @@ -19,6 +19,7 @@ #include "InventorySuppliers.h" #include "InventoryFermentables.h" #include "InventoryHops.h" +#include "InventoryYeasts.h" #include "Setup.h" #include "../ui/ui_MainWindow.h" #include "config.h" @@ -107,6 +108,24 @@ } +void MainWindow::fromInventoryYeasts() +{ + qDebug() << Q_FUNC_INFO; + delete InventoryYeastsWindow; + this->show(); +} + + +void MainWindow::on_actionYeasts_triggered() +{ + qDebug() << Q_FUNC_INFO; + InventoryYeastsWindow = new InventoryYeasts(this); + QObject::connect(InventoryYeastsWindow, SIGNAL(firstWindow()), this, SLOT(fromInventoryYeasts())); + this->hide(); // Close the main window + InventoryYeastsWindow->show(); // Show a second window +} + + void MainWindow::fromSetup() { qDebug() << Q_FUNC_INFO; diff -r 684c6e74cc1b -r a9da2744609e src/MainWindow.h --- a/src/MainWindow.h Sun Feb 20 20:22:49 2022 +0100 +++ b/src/MainWindow.h Mon Feb 21 21:17:33 2022 +0100 @@ -4,6 +4,7 @@ #include "InventorySuppliers.h" #include "InventoryFermentables.h" #include "InventoryHops.h" +#include "InventoryYeasts.h" #include "Setup.h" #include @@ -28,6 +29,7 @@ void on_actionSuppliers_triggered(); void on_actionFermentables_triggered(); void on_actionHops_triggered(); + void on_actionYeasts_triggered(); void on_actionSetup_triggered(); void on_actionAbout_triggered(); @@ -35,6 +37,7 @@ void fromInventorySuppliers(); void fromInventoryFermentables(); void fromInventoryHops(); + void fromInventoryYeasts(); void fromSetup(); private: @@ -43,7 +46,8 @@ // Keep pointers to new windows. InventorySuppliers *InventorySuppliersWindow; InventoryFermentables *InventoryFermentablesWindow; - InventoryHops * InventoryHopsWindow; + InventoryHops *InventoryHopsWindow; + InventoryYeasts *InventoryYeastsWindow; Setup *SetupWindow; }; diff -r 684c6e74cc1b -r a9da2744609e src/bmsapp.h --- a/src/bmsapp.h Sun Feb 20 20:22:49 2022 +0100 +++ b/src/bmsapp.h Mon Feb 21 21:17:33 2022 +0100 @@ -20,6 +20,7 @@ #include #include #include +#include #include "Utils.h" #include "database/database.h" diff -r 684c6e74cc1b -r a9da2744609e ui/EditFermentable.ui --- a/ui/EditFermentable.ui Sun Feb 20 20:22:49 2022 +0100 +++ b/ui/EditFermentable.ui Mon Feb 21 21:17:33 2022 +0100 @@ -848,7 +848,7 @@ - :/icons/silk/icons/silk/door_out.png:/icons/silk/icons/silk/door_out.png + :icons/silk/door_out.png:icons/silk/door_out.png @@ -868,7 +868,7 @@ - :/icons/silk/icons/silk/disk.png:/icons/silk/icons/silk/disk.png + :icons/silk/disk.png:icons/silk/disk.png @@ -888,7 +888,7 @@ - :/icons/silk/icons/silk/delete.png:/icons/silk/icons/silk/delete.png + :icons/silk/delete.png:icons/silk/delete.png diff -r 684c6e74cc1b -r a9da2744609e ui/EditHop.ui --- a/ui/EditHop.ui Sun Feb 20 20:22:49 2022 +0100 +++ b/ui/EditHop.ui Mon Feb 21 21:17:33 2022 +0100 @@ -278,7 +278,7 @@ - :/icons/silk/icons/silk/door_out.png:/icons/silk/icons/silk/door_out.png + :icons/silk/door_out.png:icons/silk/door_out.png @@ -298,7 +298,7 @@ - :/icons/silk/icons/silk/disk.png:/icons/silk/icons/silk/disk.png + :icons/silk/disk.png:icons/silk/disk.png @@ -318,7 +318,7 @@ - :/icons/silk/icons/silk/delete.png:/icons/silk/icons/silk/delete.png + :icons/silk/delete.png:icons/silk/delete.png diff -r 684c6e74cc1b -r a9da2744609e ui/EditMisc.ui --- a/ui/EditMisc.ui Sun Feb 20 20:22:49 2022 +0100 +++ b/ui/EditMisc.ui Mon Feb 21 21:17:33 2022 +0100 @@ -278,7 +278,7 @@ - :/icons/silk/icons/silk/door_out.png:/icons/silk/icons/silk/door_out.png + :icons/silk/door_out.png:icons/silk/door_out.png @@ -298,7 +298,7 @@ - :/icons/silk/icons/silk/disk.png:/icons/silk/icons/silk/disk.png + :icons/silk/disk.png:icons/silk/disk.png @@ -318,7 +318,7 @@ - :/icons/silk/icons/silk/delete.png:/icons/silk/icons/silk/delete.png + :icons/silk/delete.png:icons/silk/delete.png diff -r 684c6e74cc1b -r a9da2744609e ui/EditSupplier.ui --- a/ui/EditSupplier.ui Sun Feb 20 20:22:49 2022 +0100 +++ b/ui/EditSupplier.ui Mon Feb 21 21:17:33 2022 +0100 @@ -346,7 +346,7 @@ - :/icons/silk/icons/silk/door_out.png:/icons/silk/icons/silk/door_out.png + :icons/silk/door_out.png:icons/silk/door_out.png @@ -363,7 +363,7 @@ - :/icons/silk/icons/silk/disk.png:/icons/silk/icons/silk/disk.png + :icons/silk/disk.png:icons/silk/disk.png @@ -380,7 +380,7 @@ - :/icons/silk/icons/silk/delete.png:/icons/silk/icons/silk/delete.png + :icons/silk/delete.png:icons/silk/delete.png diff -r 684c6e74cc1b -r a9da2744609e ui/EditYeast.ui --- a/ui/EditYeast.ui Sun Feb 20 20:22:49 2022 +0100 +++ b/ui/EditYeast.ui Mon Feb 21 21:17:33 2022 +0100 @@ -19,9 +19,9 @@ - 30 + 5 10 - 91 + 121 20 @@ -35,9 +35,9 @@ - 30 - 40 - 91 + 5 + 70 + 121 20 @@ -52,7 +52,7 @@ 5 - 410 + 430 121 20 @@ -68,7 +68,7 @@ 5 - 440 + 460 121 20 @@ -83,9 +83,9 @@ - 5 - 470 - 121 + 270 + 460 + 81 20 @@ -100,7 +100,7 @@ 660 - 410 + 430 141 20 @@ -116,7 +116,7 @@ 660 - 440 + 460 141 20 @@ -141,14 +141,14 @@ 128 - Name of the fermentable + Name of the yeast 140 - 40 + 70 791 81 @@ -161,7 +161,7 @@ 140 - 410 + 430 121 24 @@ -195,7 +195,7 @@ 140 - 440 + 460 121 24 @@ -220,7 +220,7 @@ 810 - 410 + 430 121 24 @@ -246,7 +246,7 @@ 810 - 440 + 460 121 24 @@ -277,8 +277,8 @@ Quit - - :/icons/silk/icons/silk/door_out.png:/icons/silk/icons/silk/door_out.png + + :icons/silk/door_out.png:icons/silk/door_out.png @@ -297,8 +297,8 @@ Save - - :/icons/silk/icons/silk/disk.png:/icons/silk/icons/silk/disk.png + + :icons/silk/disk.png:icons/silk/disk.png @@ -317,15 +317,15 @@ Delete - - :/icons/silk/icons/silk/delete.png:/icons/silk/icons/silk/delete.png + + :icons/silk/delete.png:icons/silk/delete.png - 140 - 470 + 360 + 460 107 24 @@ -340,6 +340,751 @@ QAbstractSpinBox::NoButtons + + + + 5 + 40 + 121 + 20 + + + + Product id: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 140 + 40 + 271 + 23 + + + + 128 + + + Product number, name or code + + + + + + 5 + 160 + 121 + 20 + + + + Type: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 5 + 190 + 121 + 20 + + + + Form: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 5 + 220 + 121 + 20 + + + + Laboratory: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 5 + 250 + 121 + 20 + + + + Best for: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 5 + 310 + 121 + 20 + + + + Yeast bank: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 5 + 340 + 121 + 20 + + + + POF+: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 5 + 370 + 121 + 20 + + + + STA1 (diastatic): + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 140 + 160 + 121 + 23 + + + + + + + 140 + 190 + 121 + 23 + + + + + + + 140 + 220 + 511 + 23 + + + + 128 + + + Yeast laboratory + + + + + + 140 + 310 + 511 + 23 + + + + 128 + + + Yeast bank remark + + + + + + 140 + 250 + 511 + 51 + + + + Best used in these style of beers + + + + + + 140 + 340 + 85 + 21 + + + + Yes + + + + + + 140 + 370 + 85 + 21 + + + + Yes + + + + + + 810 + 160 + 121 + 24 + + + + true + + + 1 + + + 45.000000000000000 + + + 0.500000000000000 + + + + + + 660 + 160 + 141 + 20 + + + + Min. temperature °C: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 660 + 190 + 141 + 20 + + + + Max. temperature °C: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 660 + 220 + 141 + 20 + + + + Attenuatiom %: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 660 + 250 + 141 + 20 + + + + Alcohol tolerance %: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 660 + 280 + 141 + 20 + + + + Flocculation: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 660 + 310 + 141 + 20 + + + + Billion cells/gram: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 660 + 340 + 141 + 20 + + + + Max. reuse: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 660 + 370 + 141 + 20 + + + + Pitch temperature °C: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 660 + 400 + 141 + 20 + + + + Harvest time: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 810 + 190 + 121 + 24 + + + + true + + + 1 + + + 45.000000000000000 + + + 0.500000000000000 + + + + + + 810 + 220 + 121 + 24 + + + + true + + + 1 + + + 50.000000000000000 + + + 100.000000000000000 + + + 0.500000000000000 + + + + + + 810 + 250 + 121 + 24 + + + + 1 + + + 25.000000000000000 + + + 0.500000000000000 + + + + + + 810 + 310 + 121 + 24 + + + + 1 + + + 500.000000000000000 + + + + + + 810 + 340 + 121 + 24 + + + + 25 + + + + + + 810 + 370 + 121 + 24 + + + + true + + + 1 + + + 45.000000000000000 + + + 0.500000000000000 + + + + + + 810 + 400 + 121 + 24 + + + + true + + + + + + 810 + 280 + 121 + 23 + + + + + + + 500 + 160 + 51 + 24 + + + + grams / 100 litres + + + 2 + + + 400 + + + + + + 500 + 190 + 51 + 24 + + + + grams / 100 litres + + + 4 + + + 400 + + + + + + 580 + 160 + 71 + 24 + + + + at this gravity + + + 3 + + + 1.020000000000000 + + + 1.100000000000000 + + + 0.005000000000000 + + + + + + 580 + 190 + 71 + 24 + + + + at this gravity + + + 3 + + + 1.020000000000000 + + + 1.100000000000000 + + + 0.005000000000000 + + + + + + 350 + 160 + 141 + 20 + + + + Pitch from gr/hl: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 350 + 190 + 141 + 20 + + + + Pitch upto gr/hl: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 5 + 400 + 121 + 20 + + + + Bacteria: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 140 + 400 + 85 + 21 + + + + Yes + + + + + + 350 + 400 + 141 + 20 + + + + Harvest top: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 500 + 400 + 85 + 21 + + + + Yes + + + + + + 555 + 160 + 20 + 20 + + + + @ + + + + + + 555 + 190 + 20 + 20 + + + + @ + + diff -r 684c6e74cc1b -r a9da2744609e ui/InventoryFermentables.ui --- a/ui/InventoryFermentables.ui Sun Feb 20 20:22:49 2022 +0100 +++ b/ui/InventoryFermentables.ui Mon Feb 21 21:17:33 2022 +0100 @@ -64,7 +64,7 @@ - :/icons/silk/icons/silk/door_out.png:/icons/silk/icons/silk/door_out.png + :icons/silk/door_out.png:icons/silk/door_out.png @@ -125,7 +125,7 @@ - :/icons/silk/icons/silk/table_row_insert.png:/icons/silk/icons/silk/table_row_insert.png + :icons/silk/table_row_insert.png:icons/silk/table_row_insert.png diff -r 684c6e74cc1b -r a9da2744609e ui/InventoryHops.ui --- a/ui/InventoryHops.ui Sun Feb 20 20:22:49 2022 +0100 +++ b/ui/InventoryHops.ui Mon Feb 21 21:17:33 2022 +0100 @@ -64,7 +64,7 @@ - :/icons/silk/icons/silk/door_out.png:/icons/silk/icons/silk/door_out.png + :icons/silk/door_out.png:icons/silk/door_out.png @@ -125,7 +125,7 @@ - :/icons/silk/icons/silk/table_row_insert.png:/icons/silk/icons/silk/table_row_insert.png + :icons/silk/table_row_insert.png:icons/silk/table_row_insert.png diff -r 684c6e74cc1b -r a9da2744609e ui/InventoryMiscs.ui --- a/ui/InventoryMiscs.ui Sun Feb 20 20:22:49 2022 +0100 +++ b/ui/InventoryMiscs.ui Mon Feb 21 21:17:33 2022 +0100 @@ -64,7 +64,7 @@ - :/icons/silk/icons/silk/door_out.png:/icons/silk/icons/silk/door_out.png + :icons/silk/door_out.png:icons/silk/door_out.png @@ -125,7 +125,7 @@ - :/icons/silk/icons/silk/table_row_insert.png:/icons/silk/icons/silk/table_row_insert.png + :icons/silk/table_row_insert.png:icons/silk/table_row_insert.png diff -r 684c6e74cc1b -r a9da2744609e ui/InventorySuppliers.ui --- a/ui/InventorySuppliers.ui Sun Feb 20 20:22:49 2022 +0100 +++ b/ui/InventorySuppliers.ui Mon Feb 21 21:17:33 2022 +0100 @@ -58,7 +58,7 @@ - :/icons/silk/icons/silk/door_out.png:/icons/silk/icons/silk/door_out.png + :icons/silk/door_out.png:icons/silk/door_out.png @@ -75,7 +75,7 @@ - :/icons/silk/icons/silk/table_row_insert.png:/icons/silk/icons/silk/table_row_insert.png + :icons/silk/table_row_insert.png:icons/silk/table_row_insert.png diff -r 684c6e74cc1b -r a9da2744609e ui/InventoryYeasts.ui --- a/ui/InventoryYeasts.ui Sun Feb 20 20:22:49 2022 +0100 +++ b/ui/InventoryYeasts.ui Mon Feb 21 21:17:33 2022 +0100 @@ -64,7 +64,7 @@ - :/icons/silk/icons/silk/door_out.png:/icons/silk/icons/silk/door_out.png + :icons/silk/door_out.png:icons/silk/door_out.png @@ -125,7 +125,7 @@ - :/icons/silk/icons/silk/table_row_insert.png:/icons/silk/icons/silk/table_row_insert.png + :icons/silk/table_row_insert.png:icons/silk/table_row_insert.png diff -r 684c6e74cc1b -r a9da2744609e ui/MainWindow.ui --- a/ui/MainWindow.ui Sun Feb 20 20:22:49 2022 +0100 +++ b/ui/MainWindow.ui Mon Feb 21 21:17:33 2022 +0100 @@ -132,7 +132,7 @@ - :/icons/silk/icons/silk/cross.png:/icons/silk/icons/silk/cross.png + :icons/silk/cross.png:icons/silk/cross.png Exit @@ -141,7 +141,7 @@ - :/icons/silk/icons/silk/information.png:/icons/silk/icons/silk/information.png + :icons/silk/information.png:icons/silk/information.png About @@ -150,7 +150,7 @@ - :/icons/silk/icons/silk/server.png:/icons/silk/icons/silk/server.png + :icons/silk/server.png:icons/silk/server.png Systems @@ -159,7 +159,7 @@ - :/icons/bms/icons/bms/fridge.png:/icons/bms/icons/bms/fridge.png + :icons/bms/fridge.png:icons/bms/fridge.png Fermenters @@ -168,7 +168,7 @@ - :/icons/bms/icons/bms/beerbottle.png:/icons/bms/icons/bms/beerbottle.png + :icons/bms/beerbottle.png:icons/bms/beerbottle.png CO2 Meters @@ -177,7 +177,7 @@ - :/icons/bms/icons/bms/fermenter.png:/icons/bms/icons/bms/fermenter.png + :icons/bms/fermenter.png:icons/bms/fermenter.png iSpindels @@ -186,7 +186,7 @@ - :/icons/silk/icons/silk/user.png:/icons/silk/icons/silk/user.png + :icons/silk/user.png:icons/silk/user.png Suppliers @@ -198,7 +198,7 @@ - :/icons/bms/icons/bms/graan.png:/icons/bms/icons/bms/graan.png + :icons/bms/graan.png:icons/bms/graan.png Fermentables @@ -210,7 +210,7 @@ - :/icons/bms/icons/bms/hop.png:/icons/bms/icons/bms/hop.png + :icons/bms/hop.png:icons/bms/hop.png Hops @@ -218,11 +218,11 @@ - false + true - :/icons/bms/icons/bms/erlenmeyer.png:/icons/bms/icons/bms/erlenmeyer.png + :icons/bms/erlenmeyer.png:icons/bms/erlenmeyer.png Yeasts @@ -234,7 +234,7 @@ - :/icons/bms/icons/bms/peper.png:/icons/bms/icons/bms/peper.png + :icons/bms/peper.png:icons/bms/peper.png Miscs @@ -246,7 +246,7 @@ - :/icons/bms/icons/bms/water.png:/icons/bms/icons/bms/water.png + :icons/bms/water.png:icons/bms/water.png Waters @@ -258,7 +258,7 @@ - :/icons/bms/icons/bms/mash.png:/icons/bms/icons/bms/mash.png + :icons/bms/mash.png:icons/bms/mash.png Equipments @@ -270,7 +270,7 @@ - :/icons/silk/icons/silk/database.png:/icons/silk/icons/silk/database.png + :icons/silk/database.png:icons/silk/database.png Supplies list @@ -282,7 +282,7 @@ - :/icons/bms/icons/bms/science.png:/icons/bms/icons/bms/science.png + :icons/bms/science.png:icons/bms/science.png Yeast bank @@ -294,7 +294,7 @@ - :/icons/bms/icons/bms/water.png:/icons/bms/icons/bms/water.png + :icons/bms/water.png:icons/bms/water.png Water profiles @@ -306,7 +306,7 @@ - :/icons/bms/icons/bms/mash.png:/icons/bms/icons/bms/mash.png + :icons/bms/mash.png:icons/bms/mash.png Mash schedules @@ -318,7 +318,7 @@ - :/icons/bms/icons/bms/beerstyles.png:/icons/bms/icons/bms/beerstyles.png + :icons/bms/beerstyles.png:icons/bms/beerstyles.png Beer styles @@ -330,7 +330,7 @@ - :/icons/bms/icons/bms/fermenter.png:/icons/bms/icons/bms/fermenter.png + :icons/bms/fermenter.png:icons/bms/fermenter.png Fermentation schedules @@ -339,7 +339,7 @@ - :/icons/silk/icons/silk/wrench.png:/icons/silk/icons/silk/wrench.png + :icons/silk/wrench.png:icons/silk/wrench.png Global settings diff -r 684c6e74cc1b -r a9da2744609e ui/Setup.ui --- a/ui/Setup.ui Sun Feb 20 20:22:49 2022 +0100 +++ b/ui/Setup.ui Mon Feb 21 21:17:33 2022 +0100 @@ -616,7 +616,7 @@ - :/icons/silk/icons/silk/door_out.png:/icons/silk/icons/silk/door_out.png + :icons/silk/door_out.png:icons/silk/door_out.png @@ -633,7 +633,7 @@ - :/icons/silk/icons/silk/disk.png:/icons/silk/icons/silk/disk.png + :icons/silk/disk.png:icons/silk/disk.png