- myCombo = new QComboBox(myContainer);
- aLayout->addWidget(myCombo);
- connect(myCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(onCurrentIndexChanged(int)));
+ } else {
+ int aId = 0;
+ foreach(QString aBtnTxt, aList) {
+ QRadioButton* aBtn = new QRadioButton(aBtnTxt, aGroupBox);
+ aBtnLayout->addWidget(aBtn);
+ myButtons->addButton(aBtn, aId++);
+ }
+ }
+ myButtons->button(0)->setChecked(true);
+ connect(myButtons, SIGNAL(buttonClicked(int)), this, SLOT(onCurrentIndexChanged(int)));
+ connect(myButtons, SIGNAL(buttonClicked(int)), this, SIGNAL(itemSelected(int)));
+ } else {
+ myLabel = new QLabel(aLabelText, this);
+ if (!aLabelIcon.isEmpty())
+ myLabel->setPixmap(QPixmap(aLabelIcon));
+ aLayout->addWidget(myLabel);
+
+ std::string aToolstr = theData->widgetTooltip();
+ if (!aToolstr.empty()) {
+ myLabel->setToolTip(QString::fromStdString(aToolstr));
+ }
+
+ myCombo = new QComboBox(this);
+ aLayout->addWidget(myCombo, 1);
+
+ myCombo->addItems(aList);
+
+ connect(myCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(onCurrentIndexChanged(int)));
+ connect(myCombo, SIGNAL(currentIndexChanged(int)), this, SIGNAL(itemSelected(int)));
+ }