70 QHBoxLayout *hL =
new QHBoxLayout;
72 combo_ =
new QComboBox ();
73 pickButton_ =
new QPushButton (tr(
"Pick Object"));
75 hL->addWidget (combo_);
76 hL->setStretchFactor (combo_, 1);
77 hL->addWidget (pickButton_);
79 if (_hints.contains (
"flags"))
80 flags_ = _hints[
"flags"].split(
',');
82 if (_hints.contains (
"types"))
83 types_ = _hints[
"types"].split(
',');
85 if (flags_.contains(
"all", Qt::CaseInsensitive))
88 withGroups_ = types_.contains(
"Group");
90 if (types_.contains(
"All"))
95 connect (pickButton_, SIGNAL (pressed()),
this, SLOT (showPickDialog ()));
100 if (!flags_.empty ())
103 foreach (QString flag, flags_)
104 if (o_it->flag (flag))
114 if (!types_.empty ())
116 if (!types_.contains (
typeName (o_it->dataType())))
120 if (o_it->isGroup() && !withGroups_)
125 combo_->addItem (o_it->name() +
" (" + QString::number (o_it->id ()) +
")", QVariant (o_it->id()));
132 pickButton_->setEnabled (
false);
133 combo_->setEnabled (
false);