void NineSliceRecipe::selectedRecipeChanged(int selected) { RadioGroup* myRadioGroup = dynamic_cast<RadioGroup*>(sender()); QString selectedName = myRadioGroup->at(selected)->objectName(); if (mRecipeText2) { // Change the text in TextArea depending on which option was selected. if (selectedName.compare("fast") == 0) { mRecipeText->setText("1. Pour Mix.\n2. Add Water.\n3. Stir and heat."); mRecipeText2->setText(""); } else { mRecipeText->setText( "1. Grind tomatoes.\n2. Fry minced meat.\n3. Add lasagna plates."); mRecipeText2->setText( "4. Grind Cheese.\n 5. Season with salt.\n6. Voila! Its ready!"); } } else { // Change the text in TextArea depending on which option was selected. if (selectedName.compare("fast") == 0) { mRecipeText->setText("1. Pour Mix.\n2. Add Water.\n3. Stir and heat."); } else { mRecipeText->setText( "1. Grind tomatoes.\n2. Fry minced meat.\n3. Add lasagna plates.\n4. Grind Cheese.\n5. Season with salt."); } } }
void SelectionRecipe::fillingSelectedOptionChanged(int selected) { RadioGroup *radioGroup = dynamic_cast<RadioGroup*>(sender()); if(radioGroup != 0) { // When a new option is selected we print the selection to the console. Option *option = radioGroup->at(selected); qDebug() << "New filling set: " << option->text(); } }