diff -r 1189d072f346 -r f947c6988e91 src/EditRecipe.cpp --- a/src/EditRecipe.cpp Sat Apr 16 15:19:04 2022 +0200 +++ b/src/EditRecipe.cpp Sat Apr 16 21:54:43 2022 +0200 @@ -50,7 +50,6 @@ ui->ibu_methodEdit->addItem("Daniels"); for (int i = 0; i < my_acids.size(); i++) { - qDebug() << i << my_acids.at(i).name_en; ui->mw_acidPick->addItem(my_acids.at(i).name_en); ui->sp_acidtypeEdit->addItem(my_acids.at(i).name_en); } @@ -189,7 +188,7 @@ } else if (fermentables.isArray()) { for (int i = 0; i < fermentables.array().size(); i++) { QJsonObject obj = fermentables.array().at(i).toObject(); - qDebug() << i << obj; + //qDebug() << i << obj; Fermentables f; f.f_name = obj["f_name"].toString(); f.f_origin = obj["f_origin"].toString(); @@ -232,7 +231,7 @@ } else if (hops.isArray()) { for (int i = 0; i < hops.array().size(); i++) { QJsonObject obj = hops.array().at(i).toObject(); -// qDebug() << i << obj; + //qDebug() << i << obj; Hops h; h.h_name = obj["h_name"].toString(); h.h_origin = obj["h_origin"].toString(); @@ -258,7 +257,6 @@ qDebug() << "empty hops"; } -qDebug() << query.value(86).toString(); const auto& m_json = query.value(86).toString(); if (!m_json.trimmed().isEmpty()) { const auto& formattedJson = QString("%1").arg(m_json); @@ -628,39 +626,40 @@ // All signals from tab "Fermentables" ui->fermentablesTable->setEditTriggers(QAbstractItemView::NoEditTriggers); connect(ui->est_og2Edit, &QDoubleSpinBox::textChanged, this, &EditRecipe::is_changed); - connect(ui->perc_mashShow, &QProgressBar::valueChanged, this, &EditRecipe::on_perc_mash_valueChanged); - connect(ui->perc_sugarsShow, &QProgressBar::valueChanged, this, &EditRecipe::on_perc_sugars_valueChanged); - connect(ui->perc_caraShow, &QProgressBar::valueChanged, this, &EditRecipe::on_perc_cara_valueChanged); - connect(ui->lintnerShow, &QProgressBar::valueChanged, this, &EditRecipe::on_lintner_valueChanged); - connect(ui->addFermentable, SIGNAL(clicked()), this, SLOT(on_addFermentRow_clicked())); + connect(ui->perc_mashShow, &QProgressBar::valueChanged, this, &EditRecipe::ferment_perc_mash_valueChanged); + connect(ui->perc_sugarsShow, &QProgressBar::valueChanged, this, &EditRecipe::ferment_perc_sugars_valueChanged); + connect(ui->perc_caraShow, &QProgressBar::valueChanged, this, &EditRecipe::ferment_perc_cara_valueChanged); + connect(ui->lintnerShow, &QProgressBar::valueChanged, this, &EditRecipe::ferment_lintner_valueChanged); + connect(ui->addFermentable, SIGNAL(clicked()), this, SLOT(addFermentRow_clicked())); // All signals from tab "Hops" ui->hopsTable->setEditTriggers(QAbstractItemView::NoEditTriggers); - connect(ui->hop_tasteShow, &QProgressBar::valueChanged, this, &EditRecipe::on_Flavour_valueChanged); - connect(ui->hop_aromaShow, &QProgressBar::valueChanged, this, &EditRecipe::on_Aroma_valueChanged); - connect(ui->addHop, SIGNAL(clicked()), this, SLOT(on_addHopRow_clicked())); + connect(ui->hop_tasteShow, &QProgressBar::valueChanged, this, &EditRecipe::hop_Flavour_valueChanged); + connect(ui->hop_aromaShow, &QProgressBar::valueChanged, this, &EditRecipe::hop_Aroma_valueChanged); + connect(ui->addHop, SIGNAL(clicked()), this, SLOT(addHopRow_clicked())); // All signals from tab "Miscs" ui->miscsTable->setEditTriggers(QAbstractItemView::NoEditTriggers); + connect(ui->addMisc, SIGNAL(clicked()), this, SLOT(addMiscRow_clicked())); // All signals from tab "Yeasts" // All signals from tab "Mash" // All signals from tab "Water" - connect(ui->bs_cacl2Edit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_cacl2_changed); - connect(ui->bs_caso4Edit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_caso4_changed); - connect(ui->bs_mgso4Edit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_mgso4_changed); - connect(ui->bs_naclEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_nacl_changed); - connect(ui->bs_mgcl2Edit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_mgcl2_changed); - connect(ui->bs_nahco3Edit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_nahco3_changed); - connect(ui->bs_caco3Edit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_caco3_changed); - connect(ui->mw_autoEdit, &QCheckBox::stateChanged, this, &EditRecipe::on_calc_acid_clicked); - connect(ui->mw_phEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_mw_ph_changed); - connect(ui->mw_acidvolEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_mw_acid_changed); - connect(ui->mw_acidPick, QOverload::of(&QComboBox::currentIndexChanged), this, &EditRecipe::on_mw_type_changed); - connect(ui->wt_sourceEdit, QOverload::of(&QComboBox::currentIndexChanged), this, &EditRecipe::on_target_changed); - connect(ui->w2_volEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_w2_vol_changed); + connect(ui->bs_cacl2Edit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::wb_cacl2_changed); + connect(ui->bs_caso4Edit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::wb_caso4_changed); + connect(ui->bs_mgso4Edit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::wb_mgso4_changed); + connect(ui->bs_naclEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::wb_nacl_changed); + connect(ui->bs_mgcl2Edit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::wb_mgcl2_changed); + connect(ui->bs_nahco3Edit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::wb_nahco3_changed); + connect(ui->bs_caco3Edit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::wb_caco3_changed); + connect(ui->mw_autoEdit, &QCheckBox::stateChanged, this, &EditRecipe::mw_calc_acid_clicked); + connect(ui->mw_phEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::mw_ph_changed); + connect(ui->mw_acidvolEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::mw_acid_changed); + connect(ui->mw_acidPick, QOverload::of(&QComboBox::currentIndexChanged), this, &EditRecipe::mw_type_changed); + connect(ui->wt_sourceEdit, QOverload::of(&QComboBox::currentIndexChanged), this, &EditRecipe::wt_target_changed); + connect(ui->w2_volEdit, QOverload::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::w2_volume_changed); ui->saveButton->setEnabled(false); ui->deleteButton->setEnabled((id >= 0) ? true:false);