src/EditRecipe.cpp

changeset 138
1189d072f346
parent 136
17030224d919
child 139
f947c6988e91
--- a/src/EditRecipe.cpp	Sat Apr 16 14:44:50 2022 +0200
+++ b/src/EditRecipe.cpp	Sat Apr 16 15:19:04 2022 +0200
@@ -70,6 +70,13 @@
 	query.next();
     }
 
+    query.prepare("SELECT name FROM profile_water ORDER BY name");
+    query.exec();
+    ui->wt_sourceEdit->addItem("");
+    while (query.next()) {
+        ui->wt_sourceEdit->addItem(query.value(0).toString());
+    }
+
     ui->beerstyleEdit->addItem("");	// First add a dummy
     query.prepare("SELECT style_guide,style_letter,name FROM profile_styles ORDER BY style_guide,style_letter,name");
     query.exec();
@@ -652,6 +659,7 @@
     connect(ui->mw_phEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_mw_ph_changed);
     connect(ui->mw_acidvolEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_mw_acid_changed);
     connect(ui->mw_acidPick, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::on_mw_type_changed);
+    connect(ui->wt_sourceEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::on_target_changed);
     connect(ui->w2_volEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_w2_vol_changed);
 
     ui->saveButton->setEnabled(false);

mercurial