src/EditRecipe.cpp

changeset 144
c4b107bf153a
parent 142
1caa15a0eefc
child 145
fd4f0de86fd9
--- a/src/EditRecipe.cpp	Mon Apr 18 21:56:11 2022 +0200
+++ b/src/EditRecipe.cpp	Tue Apr 19 11:17:16 2022 +0200
@@ -76,6 +76,13 @@
         ui->wt_sourceEdit->addItem(query.value(0).toString());
     }
 
+    query.prepare("SELECT name FROM profile_mash ORDER BY name");
+    query.exec();
+    ui->mash_pickEdit->addItem("");
+    while (query.next()) {
+	ui->mash_pickEdit->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();
@@ -531,6 +538,9 @@
     ui->est_fg3Edit->setValue(recipe->est_fg);
     ui->est_abv2Edit->setValue(recipe->est_abv);
 
+    // Tab mashs.
+    ui->mash_nameEdit->setText(recipe->mash_name);
+
     // Tab waters.
     qDebug() << "water 1" << recipe->w1_name << "default" << my_default_water;
     if (recipe->w1_ph > 4.0) {
@@ -673,6 +683,9 @@
     connect(ui->addYeast, SIGNAL(clicked()), this, SLOT(addYeastRow_clicked()));
 
     // All signals from tab "Mash"
+    ui->mashsTable->setEditTriggers(QAbstractItemView::NoEditTriggers);
+    //connect(ui->addMash, SIGNAL(clicked()), this, SLOT(addMashRow_clicked()));
+    //connect(ui->mash_pickEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::mash_select_changed);
 
     // All signals from tab "Water"
     connect(ui->bs_cacl2Edit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::wb_cacl2_changed);

mercurial