+ std::string aTypes = theData->getProperty("string_list");
+ QStringList aList;
+
+ foreach(QString aType, QString(aTypes.c_str()).split(' ')) {
+ aList.append(translate(aType.toStdString()));
+ }
+ if (aTypes.empty()) {
+ myStringListAttribute = theData->getProperty("string_list_attribute");
+ if (!myStringListAttribute.empty())
+ aList.clear();
+ }
+ if (theData->getBooleanAttribute("use_in_title", false))
+ myButtonTitles = aList;
+
+ bool aHasDefaultValue;
+ int aDefaultVal = QString::fromStdString(getDefaultValue()).toInt(&aHasDefaultValue);
+
+ // Widget type can be combobox or radiobuttons
+ std::string aWgtType = theData->getProperty("widget_type");
+ std::string aIcons = theData->getProperty("icons_list");
+ QStringList aIconList = QString(aIcons.c_str()).split(' ');
+
+ std::string aWgtDir = theData->getProperty("buttons_dir");
+
+ QHBoxLayout* aLayout = new QHBoxLayout(this);
+ myChoiceCtrl = new ModuleBase_ChoiceCtrl(this, aList, aIconList,
+ (aWgtType == "radiobuttons")? ModuleBase_ChoiceCtrl::RadioButtons :
+ ModuleBase_ChoiceCtrl::ComboBox,
+ (aWgtDir == "horizontal")? Qt::Horizontal : Qt::Vertical);
+ myChoiceCtrl->setLabel(aLabelText);
+