681 connect(ui->efficiencyEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::efficiency_changed); |
681 connect(ui->efficiencyEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::efficiency_changed); |
682 connect(ui->beerstyleEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::style_changed); |
682 connect(ui->beerstyleEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::style_changed); |
683 connect(ui->est_ogEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::est_og_changed); |
683 connect(ui->est_ogEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::est_og_changed); |
684 connect(ui->color_methodEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::colormethod_changed); |
684 connect(ui->color_methodEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::colormethod_changed); |
685 connect(ui->ibu_methodEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::ibumethod_changed); |
685 connect(ui->ibu_methodEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::ibumethod_changed); |
|
686 connect(ui->lockedEdit, &QCheckBox::stateChanged, this, &EditRecipe::locked_changed); |
686 |
687 |
687 // All signals from tab "Fermentables" |
688 // All signals from tab "Fermentables" |
688 ui->fermentablesTable->setEditTriggers(QAbstractItemView::NoEditTriggers); |
689 ui->fermentablesTable->setEditTriggers(QAbstractItemView::NoEditTriggers); |
689 connect(ui->est_og2Edit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::est_og_changed); |
690 connect(ui->est_og2Edit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::est_og_changed); |
690 connect(ui->perc_mashShow, &QProgressBar::valueChanged, this, &EditRecipe::ferment_perc_mash_valueChanged); |
691 connect(ui->perc_mashShow, &QProgressBar::valueChanged, this, &EditRecipe::ferment_perc_mash_valueChanged); |
731 connect(ui->w2_volEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::w2_volume_changed); |
732 connect(ui->w2_volEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::w2_volume_changed); |
732 connect(ui->sp_sourceEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::sp_source_changed); |
733 connect(ui->sp_sourceEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::sp_source_changed); |
733 connect(ui->sp_acidtypeEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::sp_type_changed); |
734 connect(ui->sp_acidtypeEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditRecipe::sp_type_changed); |
734 connect(ui->sp_phEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::sp_ph_changed); |
735 connect(ui->sp_phEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditRecipe::sp_ph_changed); |
735 |
736 |
|
737 setLocked(recipe->locked); |
|
738 |
736 ui->saveButton->setEnabled(false); |
739 ui->saveButton->setEnabled(false); |
737 ui->deleteButton->setEnabled((id >= 0) ? true:false); |
740 ui->deleteButton->setEnabled((id >= 0 && ! recipe->locked) ? true:false); |
738 |
741 |
739 emit refreshAll(); |
742 emit refreshAll(); |
740 } |
743 } |
741 |
744 |
742 |
745 |