| 41 | } |
| 42 | |
| 43 | void SingleChoiceBox::setInfos(QSet<SingleChoiceBox::Info> infos) |
| 44 | { |
| 45 | for (auto checkbox : d->radioButtons) { |
| 46 | delete checkbox; |
| 47 | } |
| 48 | |
| 49 | for (auto info : infos) { |
| 50 | auto radioButton = new DRadioButton(); |
| 51 | QObject::connect(radioButton, &DRadioButton::toggled, |
| 52 | this, &SingleChoiceBox::toggled,Qt::UniqueConnection); |
| 53 | d->radioButtons << radioButton; |
| 54 | radioButton->setIcon(info.icon); |
| 55 | radioButton->setText(info.text); |
| 56 | radioButton->setToolTip(info.tooltip); |
| 57 | d->vLayoutMain->addWidget(radioButton); |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | void SingleChoiceBox::setChoiceTitle(const QString &title) |
| 62 | { |
no test coverage detected