src/EditProduct.cpp

changeset 205
ae6109192fb2
parent 204
decbf82ae9a5
child 207
3b164a0aea90
equal deleted inserted replaced
204:decbf82ae9a5 205:ae6109192fb2
921 ui->sp_acidtypeEdit->setCurrentIndex(product->sparge_acid_type); 921 ui->sp_acidtypeEdit->setCurrentIndex(product->sparge_acid_type);
922 ui->sp_acidpercEdit->setValue(product->sparge_acid_perc); 922 ui->sp_acidpercEdit->setValue(product->sparge_acid_perc);
923 ui->sp_acidvolEdit->setValue(product->sparge_acid_amount); 923 ui->sp_acidvolEdit->setValue(product->sparge_acid_amount);
924 924
925 // Tab brewday. 925 // Tab brewday.
926 ui->brew_startEdit->setText(product->brew_date_start.toString("dd MMM yyyy hh:mm")); 926 updateBrewday();
927 ui->brew_endEdit->setText(product->brew_date_end.toString("dd MMM yyyy hh:mm"));
928 ui->brew_mashphEdit->setValue(product->brew_mash_ph); 927 ui->brew_mashphEdit->setValue(product->brew_mash_ph);
929 ui->brew_mashphShow->setValue(product->mash_ph); 928 ui->brew_mashphShow->setValue(product->mash_ph);
930 ui->brew_mashsgEdit->setValue(product->brew_mash_sg); 929 ui->brew_mashsgEdit->setValue(product->brew_mash_sg);
931 ui->brew_mashsgShow->setValue(0); 930 ui->brew_mashsgShow->setValue(0);
932 ui->brew_masheffShow->setValue(product->brew_mash_efficiency); 931 ui->brew_masheffShow->setValue(product->brew_mash_efficiency);
1077 connect(ui->w2_nameEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::w2_name_changed); 1076 connect(ui->w2_nameEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::w2_name_changed);
1078 connect(ui->w2_volEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditProduct::w2_volume_changed); 1077 connect(ui->w2_volEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditProduct::w2_volume_changed);
1079 connect(ui->sp_sourceEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::sp_source_changed); 1078 connect(ui->sp_sourceEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::sp_source_changed);
1080 connect(ui->sp_acidtypeEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::sp_type_changed); 1079 connect(ui->sp_acidtypeEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::sp_type_changed);
1081 connect(ui->sp_phEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditProduct::sp_ph_changed); 1080 connect(ui->sp_phEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditProduct::sp_ph_changed);
1081
1082 /* All signals from tab Brewday */
1083 connect(ui->brew_startButton1, SIGNAL(clicked()), this, SLOT(brew_date_today()));
1084 connect(ui->brew_startButton2, SIGNAL(clicked()), this, SLOT(brew_date_clear()));
1085 connect(ui->brew_startDate, &QDateEdit::dateChanged, this, &EditProduct::brew_start_date_changed);
1082 1086
1083 setStage(); 1087 setStage();
1084 1088
1085 ui->saveButton->setEnabled(false); 1089 ui->saveButton->setEnabled(false);
1086 ui->deleteButton->setEnabled((id >= 0 && ! product->locked) ? true:false); 1090 ui->deleteButton->setEnabled((id >= 0 && ! product->locked) ? true:false);

mercurial