src/EditProduct.cpp

changeset 190
bb6c06910f0f
parent 189
722a4eed545d
child 191
7446ee2fb427
equal deleted inserted replaced
189:722a4eed545d 190:bb6c06910f0f
1087 { 1087 {
1088 qDebug() << "EditProduct done start"; 1088 qDebug() << "EditProduct done start";
1089 delete ui; 1089 delete ui;
1090 emit entry_changed(); 1090 emit entry_changed();
1091 qDebug() << "EditProduct done final"; 1091 qDebug() << "EditProduct done final";
1092 }
1093
1094
1095 void EditProduct::calcSupplies()
1096 {
1097 if (product->inventory_reduced > PROD_STAGE_PACKAGE) {
1098 ui->ok_pmptLabel->setVisible(false);
1099 ui->ok_pmptIcon->setVisible(false);
1100 return;
1101 }
1102
1103 qDebug() << "calcSupplies() f:" << product->fermentables_ok /*<< "h:" << product->hops_ok << "m:" << product->miscs_ok << "y:" << product->yeasts_ok << "w:" << product->waters_ok*/;
1104 if (product->fermentables_ok /*&& product->hops_ok && product->miscs_ok && product->yeasts_ok && product->waters_ok */) {
1105 ui->ok_pmptIcon->setPixmap(QPixmap(QString::fromUtf8(":/icons/silk/tick.png")));
1106 } else {
1107 ui->ok_pmptIcon->setPixmap(QPixmap(QString::fromUtf8(":/icons/silk/error.png")));
1108 }
1092 } 1109 }
1093 1110
1094 1111
1095 void EditProduct::refreshAll() 1112 void EditProduct::refreshAll()
1096 { 1113 {

mercurial