I am beginner as the developer in QT, Here is the task for the button D, below is the code for the buttons A,B and C. Need to write code for the button D, if we press button D, it should execute the operations of A, B and C buttons ( one after one).
if(ui->radioButton_wake->isChecked()) // Button A
{
ui->label_lastCommand->setText("Last command: Wake");
ui->progressBar->setMaximum(UPDATE_FREQUENCY * 122);
pJMPX->RDS_Set_11A_Enable(true);
progressTimer->start();
}
else if(ui->radioButton_beep->isChecked()) // Button B
{
ui->label_lastCommand->setText("Last command: Beep");
ui->progressBar->setMaximum(UPDATE_FREQUENCY * (ui->doubleSpinBox_general->value() + 122));
pJMPX->RDS_Set_11A_Enable(true);
progressTimer->start();
QTimer::singleShot(122000, this, [this](){
pJMPX->RDS_Set_11A_data(0x0008, 0x0000);
});
}
else if(ui->radioButton_beginPlayback->isChecked()) // Button c
{
ui->label_lastCommand->setText("Last command: Begin Playback");
ui->progressBar->setMaximum(UPDATE_FREQUENCY * (ui->doubleSpinBox_general->value() + 122));
pJMPX->RDS_Set_11A_Enable(true);
progressTimer->start();
QTimer::singleShot(122000, this, [this](){
pJMPX->RDS_Set_11A_data(0x0005, 0x0000);
});
}
else if(ui->radioButton->isChecked()) // Button D
{
// Code to execute operations of button A, B and C ( one after one ) ?
}
`````