src/EditProductTab1.cpp

changeset 301
fe6346211b5b
parent 297
c8f0ecc8a1cc
child 305
35ce719998e1
equal deleted inserted replaced
300:2a97905cb637 301:fe6346211b5b
77 ui->st_nameEdit->setText(product->st_name); 77 ui->st_nameEdit->setText(product->st_name);
78 ui->st_groupEdit->setText(product->st_letter); 78 ui->st_groupEdit->setText(product->st_letter);
79 ui->st_guideEdit->setText(product->st_guide); 79 ui->st_guideEdit->setText(product->st_guide);
80 ui->st_catEdit->setText(product->st_category); 80 ui->st_catEdit->setText(product->st_category);
81 ui->st_catnrEdit->setText(QString("%1").arg(product->st_category_number)); 81 ui->st_catnrEdit->setText(QString("%1").arg(product->st_category_number));
82 ui->st_typeEdit->setText(style_types[product->st_type]); 82 ui->st_typeEdit->setText(QCoreApplication::translate("BeerType", g_style_types[product->st_type]));
83 83
84 ui->est_ogShow->setRange(query.value(7).toDouble(), query.value(8).toDouble()); 84 ui->est_ogShow->setRange(query.value(7).toDouble(), query.value(8).toDouble());
85 ui->est_fgShow->setRange(query.value(9).toDouble(), query.value(10).toDouble()); 85 ui->est_fgShow->setRange(query.value(9).toDouble(), query.value(10).toDouble());
86 ui->est_ibuShow->setRange(query.value(11).toDouble(), query.value(12).toDouble()); 86 ui->est_ibuShow->setRange(query.value(11).toDouble(), query.value(12).toDouble());
87 ui->est_colorShow->setRange(query.value(13).toDouble(), query.value(14).toDouble()); 87 ui->est_colorShow->setRange(query.value(13).toDouble(), query.value(14).toDouble());
218 /* from PROD_STAGE_PACKAGE to PROD_STAGE_CARBONATION is handled in EditProductTab11.cpp */ 218 /* from PROD_STAGE_PACKAGE to PROD_STAGE_CARBONATION is handled in EditProductTab11.cpp */
219 if ((stage == PROD_STAGE_CARBONATION) && (product->package_date.daysTo(QDate::currentDate()) > 14)) 219 if ((stage == PROD_STAGE_CARBONATION) && (product->package_date.daysTo(QDate::currentDate()) > 14))
220 stage = PROD_STAGE_MATURE; 220 stage = PROD_STAGE_MATURE;
221 221
222 if (product->stage != stage) { 222 if (product->stage != stage) {
223 qDebug() << "setStage() change state:" << prod_stages[product->stage] << "to:" << prod_stages[stage]; 223 qDebug() << "setStage() change state:" << g_prod_stages[product->stage] << "to:" << g_prod_stages[stage];
224 product->stage = stage; 224 product->stage = stage;
225 is_changed(); 225 is_changed();
226 } else { 226 } else {
227 qDebug() << "setStage() stage:" << prod_stages[stage]; 227 qDebug() << "setStage() stage:" << g_prod_stages[stage];
228 } 228 }
229 229
230 ui->stageEdit->setText(prod_stages[stage]); 230 ui->stageEdit->setText(QCoreApplication::translate("ProdStages", g_prod_stages[stage]));
231 231
232 /* Tab 1, generic */ 232 /* Tab 1, generic */
233 ui->typeEdit->setDisabled(stage > PROD_STAGE_WAIT); 233 ui->typeEdit->setDisabled(stage > PROD_STAGE_WAIT);
234 ui->color_methodEdit->setDisabled(locked); 234 ui->color_methodEdit->setDisabled(locked);
235 ui->ibu_methodEdit->setDisabled(locked); 235 ui->ibu_methodEdit->setDisabled(locked);

mercurial