239 ui->boil_timeEdit->setButtonSymbols((stage > PROD_STAGE_WAIT) ? QAbstractSpinBox::NoButtons : QAbstractSpinBox::UpDownArrows); |
239 ui->boil_timeEdit->setButtonSymbols((stage > PROD_STAGE_WAIT) ? QAbstractSpinBox::NoButtons : QAbstractSpinBox::UpDownArrows); |
240 ui->efficiencyEdit->setReadOnly(stage > PROD_STAGE_WAIT); |
240 ui->efficiencyEdit->setReadOnly(stage > PROD_STAGE_WAIT); |
241 ui->efficiencyEdit->setButtonSymbols((stage > PROD_STAGE_WAIT) ? QAbstractSpinBox::NoButtons : QAbstractSpinBox::UpDownArrows); |
241 ui->efficiencyEdit->setButtonSymbols((stage > PROD_STAGE_WAIT) ? QAbstractSpinBox::NoButtons : QAbstractSpinBox::UpDownArrows); |
242 ui->est_ogEdit->setReadOnly(stage > PROD_STAGE_WAIT); |
242 ui->est_ogEdit->setReadOnly(stage > PROD_STAGE_WAIT); |
243 ui->est_ogEdit->setButtonSymbols((stage > PROD_STAGE_WAIT) ? QAbstractSpinBox::NoButtons : QAbstractSpinBox::UpDownArrows); |
243 ui->est_ogEdit->setButtonSymbols((stage > PROD_STAGE_WAIT) ? QAbstractSpinBox::NoButtons : QAbstractSpinBox::UpDownArrows); |
244 // Block locked if stage <= PROD_STAGE_TASTE |
244 if (stage > PROD_STAGE_PACKAGE) { |
|
245 ui->ok_pmptLabel->hide(); |
|
246 ui->ok_pmptIcon->hide(); |
|
247 } else { |
|
248 ui->ok_pmptLabel->show(); |
|
249 ui->ok_pmptIcon->show(); |
|
250 } |
|
251 if (stage >= PROD_STAGE_READY) { |
|
252 ui->lockedLabel->show(); |
|
253 ui->lockedEdit->show(); |
|
254 } else { |
|
255 ui->lockedLabel->hide(); |
|
256 ui->lockedEdit->hide(); |
|
257 } |
245 |
258 |
246 /* Tab 2, equipment */ |
259 /* Tab 2, equipment */ |
247 ui->tabWidget->setTabEnabled(1, stage < PROD_STAGE_BREW); |
260 ui->tabWidget->setTabEnabled(1, stage < PROD_STAGE_BREW); |
248 |
261 |
249 /* Tab 3, fermentables */ |
262 /* Tab 3, fermentables */ |
535 ui->pack_dateButton->show(); |
548 ui->pack_dateButton->show(); |
536 if (stage == PROD_STAGE_PACKAGE) |
549 if (stage == PROD_STAGE_PACKAGE) |
537 ui->pack_ackButton->show(); |
550 ui->pack_ackButton->show(); |
538 } |
551 } |
539 |
552 |
540 |
|
541 /* Tab 12, tasting */ |
553 /* Tab 12, tasting */ |
542 ui->tabWidget->setTabEnabled(11, stage > PROD_STAGE_PACKAGE); |
554 ui->tabWidget->setTabEnabled(11, stage > PROD_STAGE_PACKAGE); |
543 |
555 ui->taste_dateEdit->setEnabled(stage == PROD_STAGE_TASTE); |
544 } |
556 if (stage == PROD_STAGE_TASTE) { |
545 |
557 ui->taste_dateEdit->setMinimumDate(product->package_date.addDays(41)); |
546 |
558 ui->taste_dateEdit->setMaximumDate(QDate::currentDate()); |
|
559 } |
|
560 ui->taste_dateButton->setEnabled(stage == PROD_STAGE_TASTE); |
|
561 ui->taste_colorEdit->setEnabled(stage == PROD_STAGE_TASTE); |
|
562 ui->taste_transparencyEdit->setEnabled(stage == PROD_STAGE_TASTE); |
|
563 ui->taste_headEdit->setEnabled(stage == PROD_STAGE_TASTE); |
|
564 ui->taste_aromaEdit->setEnabled(stage == PROD_STAGE_TASTE); |
|
565 ui->taste_tasteEdit->setEnabled(stage == PROD_STAGE_TASTE); |
|
566 ui->taste_mouthfeelEdit->setEnabled(stage == PROD_STAGE_TASTE); |
|
567 ui->taste_aftertasteEdit->setEnabled(stage == PROD_STAGE_TASTE); |
|
568 ui->taste_notesEdit->setEnabled(stage == PROD_STAGE_TASTE); |
|
569 ui->taste_rateEdit->setEnabled(stage == PROD_STAGE_TASTE); |
|
570 if ((product->taste_color != "") && (product->taste_transparency != "") && (product->taste_head != "") && |
|
571 (product->taste_aroma != "") && (product->taste_taste != "") && (product->taste_mouthfeel != "") && |
|
572 (product->taste_aftertaste != "") && (product->taste_notes != "") && (product->taste_rate > 0) && |
|
573 (product->taste_date.isValid())) |
|
574 ui->taste_ackButton->show(); |
|
575 else |
|
576 ui->taste_ackButton->hide(); |
|
577 } |
|
578 |
|
579 |