41 connect(widget.btnRequest,
44 SLOT(on_btnRequest_clicked()),
45 Qt::UniqueConnection);
46 connect(widget.btnRelease,
49 SLOT(on_btnRelease_clicked()),
50 Qt::UniqueConnection);
78 getProxy(omo,
"ObjectMemoryObserver");
81 on_toolButtonRefresh_clicked();
94 auto entities = prior->getObjectClassesSegment()->getAllEntities();
95 QString oldSelection = widget.comboBoxAvailableObjectClasses->currentText();
96 widget.comboBoxAvailableObjectClasses->clear();
98 for (memoryx::EntityBasePtr base : entities)
101 auto var = entity->getAttributeValue(
"recognitionMethod");
102 if (var && !var->getString().empty() && var->getString() !=
"<none>")
104 objects << (QString::fromStdString(entity->getName()));
108 widget.comboBoxAvailableObjectClasses->addItems(objects);
109 int index = widget.comboBoxAvailableObjectClasses->findText(oldSelection);
112 widget.comboBoxAvailableObjectClasses->setCurrentIndex(
index);
120 channels = omo->getAvailableChannels(
false);
122 widget.comboBoxRequestedObjectClasses->clear();
123 for (
auto& channel : channels)
125 if (channel.first.find(
"_query_") != std::string::npos)
127 widget.comboBoxRequestedObjectClasses->addItem(
128 QString::fromStdString(channel.first));
134 armarx::ObjectLocalizationRequesterWidgetController::on_toolButtonRefresh_clicked()
137 updateAvailableChannels();
138 updateAvailableObjects();
142 armarx::ObjectLocalizationRequesterWidgetController::on_btnRequest_clicked()
145 if (!widget.comboBoxAvailableObjectClasses->currentText().isEmpty())
147 omo->requestObjectClassRepeated(
148 widget.comboBoxAvailableObjectClasses->currentText().toStdString(),
149 widget.spinBoxInterval->value(),
150 widget.spinBoxPriority->value());
152 updateAvailableChannels();
156 armarx::ObjectLocalizationRequesterWidgetController::on_btnRelease_clicked()
160 channels[widget.comboBoxRequestedObjectClasses->currentText().toStdString()].name;
161 if (!channelName.empty())
164 omo->releaseObjectClass(ref);
166 updateAvailableChannels();
174 if (parent != customToolbar->parent())
176 customToolbar->setParent(parent);
179 return customToolbar;
182 customToolbar =
new QToolBar(parent);
183 customToolbar->setIconSize(QSize(16, 16));
184 customToolbar->addAction(QIcon(
"://icons/view-refresh-7.png"),
187 SLOT(on_toolButtonRefresh_clicked()));
189 return customToolbar;