MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / setInfos

Method setInfos

src/common/widget/singlechoicebox.cpp:43–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void 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
61void SingleChoiceBox::setChoiceTitle(const QString &title)
62{

Callers 1

singleChoiceMethod · 0.80

Calls 4

connectFunction · 0.85
setIconMethod · 0.45
setTextMethod · 0.45
addWidgetMethod · 0.45

Tested by

no test coverage detected