304 ui->brew_logButton->show(); |
304 ui->brew_logButton->show(); |
305 } else { |
305 } else { |
306 ui->brew_logLabel->hide(); |
306 ui->brew_logLabel->hide(); |
307 ui->brew_logButton->hide(); |
307 ui->brew_logButton->hide(); |
308 } |
308 } |
|
309 ui->brew_ackLabel->hide(); |
|
310 ui->brew_ackButton->hide(); |
309 if (product->stage < PROD_STAGE_BREW) { |
311 if (product->stage < PROD_STAGE_BREW) { |
310 ui->brew_startButton1->show(); |
312 ui->brew_startButton1->show(); |
311 ui->brew_startButton2->show(); |
313 ui->brew_startButton2->show(); |
312 ui->brew_startDate->setReadOnly(false); |
314 ui->brew_startDate->setReadOnly(false); |
313 ui->brew_endButton1->hide(); |
315 ui->brew_endButton1->hide(); |
340 ui->brew_endDate->setButtonSymbols(QAbstractSpinBox::UpDownArrows); |
342 ui->brew_endDate->setButtonSymbols(QAbstractSpinBox::UpDownArrows); |
341 ui->brew_endDate->show(); |
343 ui->brew_endDate->show(); |
342 ui->brew_endDate->setReadOnly(false); |
344 ui->brew_endDate->setReadOnly(false); |
343 ui->brew_endTime->setButtonSymbols(QAbstractSpinBox::UpDownArrows); |
345 ui->brew_endTime->setButtonSymbols(QAbstractSpinBox::UpDownArrows); |
344 ui->brew_endTime->show(); |
346 ui->brew_endTime->show(); |
|
347 if (product->brew_date_end.isValid() && product->brew_date_start.isValid() && |
|
348 (product->brew_date_start.msecsTo(product->brew_date_end) > 7200000)) { |
|
349 /* The start and end dates are valid, and the end is more then two hours after the start. */ |
|
350 ui->brew_ackLabel->show(); |
|
351 ui->brew_ackButton->show(); |
|
352 } |
345 } else { |
353 } else { |
346 ui->brew_endButton1->hide(); |
354 ui->brew_endButton1->hide(); |
347 ui->brew_startLabel2->hide(); |
355 ui->brew_startLabel2->hide(); |
348 ui->brew_endLabel->hide(); |
356 ui->brew_endLabel->hide(); |
349 ui->brew_endLabel2->hide(); |
357 ui->brew_endLabel2->hide(); |