66 ui->w2_nameEdit->addItem(""); |
66 ui->w2_nameEdit->addItem(""); |
67 for (int i = 0; i < query.size(); i++) { |
67 for (int i = 0; i < query.size(); i++) { |
68 ui->w1_nameEdit->addItem(query.value(0).toString()); |
68 ui->w1_nameEdit->addItem(query.value(0).toString()); |
69 ui->w2_nameEdit->addItem(query.value(0).toString()); |
69 ui->w2_nameEdit->addItem(query.value(0).toString()); |
70 query.next(); |
70 query.next(); |
|
71 } |
|
72 |
|
73 query.prepare("SELECT name FROM profile_water ORDER BY name"); |
|
74 query.exec(); |
|
75 ui->wt_sourceEdit->addItem(""); |
|
76 while (query.next()) { |
|
77 ui->wt_sourceEdit->addItem(query.value(0).toString()); |
71 } |
78 } |
72 |
79 |
73 ui->beerstyleEdit->addItem(""); // First add a dummy |
80 ui->beerstyleEdit->addItem(""); // First add a dummy |
74 query.prepare("SELECT style_guide,style_letter,name FROM profile_styles ORDER BY style_guide,style_letter,name"); |
81 query.prepare("SELECT style_guide,style_letter,name FROM profile_styles ORDER BY style_guide,style_letter,name"); |
75 query.exec(); |
82 query.exec(); |
650 connect(ui->bs_caco3Edit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_caco3_changed); |
657 connect(ui->bs_caco3Edit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_caco3_changed); |
651 connect(ui->mw_autoEdit, &QCheckBox::stateChanged, this, &EditRecipe::on_calc_acid_clicked); |
658 connect(ui->mw_autoEdit, &QCheckBox::stateChanged, this, &EditRecipe::on_calc_acid_clicked); |
652 connect(ui->mw_phEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_mw_ph_changed); |
659 connect(ui->mw_phEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_mw_ph_changed); |
653 connect(ui->mw_acidvolEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_mw_acid_changed); |
660 connect(ui->mw_acidvolEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_mw_acid_changed); |
654 connect(ui->mw_acidPick, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::on_mw_type_changed); |
661 connect(ui->mw_acidPick, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::on_mw_type_changed); |
|
662 connect(ui->wt_sourceEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::on_target_changed); |
655 connect(ui->w2_volEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_w2_vol_changed); |
663 connect(ui->w2_volEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::on_w2_vol_changed); |
656 |
664 |
657 ui->saveButton->setEnabled(false); |
665 ui->saveButton->setEnabled(false); |
658 ui->deleteButton->setEnabled((id >= 0) ? true:false); |
666 ui->deleteButton->setEnabled((id >= 0) ? true:false); |
659 |
667 |