71 QHBoxLayout *hL =
new QHBoxLayout;
73 combo_ =
new QComboBox ();
74 pickButton_ =
new QPushButton (tr(
"Pick Object"));
76 hL->addWidget (combo_);
77 hL->setStretchFactor (combo_, 1);
78 hL->addWidget (pickButton_);
80 if (_hints.contains (
"flags"))
81 flags_ = _hints[
"flags"].split(
',');
83 if (_hints.contains (
"types"))
84 types_ = _hints[
"types"].split(
',');
86 if (flags_.contains(
"all", Qt::CaseInsensitive))
89 withGroups_ = types_.contains(
"Group");
91 if (types_.contains(
"All"))
96 connect (pickButton_, SIGNAL (pressed()),
this, SLOT (showPickDialog ()));
102 if (!flags_.empty ())
105 foreach (QString flag, flags_)
106 if (o_it->flag (flag))
116 if (!types_.empty ())
118 if (!types_.contains (
typeName (o_it->dataType())))
122 if (o_it->isGroup() && !withGroups_)
127 combo_->addItem (o_it->name() +
" (" + QString::number (o_it->id ()) +
")", QVariant (o_it->id()));
134 pickButton_->setEnabled (
false);
135 combo_->setEnabled (
false);