25#include <RobotAPI/gui-plugins/ViewSelection/ui_ViewSelectionWidget.h>
29#include <QListWidgetItem>
35 widget = std::make_unique<Ui::ViewSelectionWidget>();
59 return qobject_cast<ViewSelectionConfigDialog*>(configDialog);
65 viewSelectionName = settings->value(
"viewSelectionName",
"").toString().toStdString();
72 settings->value(
"viewSelectionName", QString::fromStdString(viewSelectionName))
89 widget->checkBox->setChecked(viewSelection->isEnabledAutomaticViewSelection());
95 widget->checkBox->setChecked(
true);
101 widget->checkBox->setChecked(
false);
112 ARMARX_LOG <<
"toggling view selection " << isEnabled;
116 viewSelection->activateAutomaticViewSelection();
120 viewSelection->deactivateAutomaticViewSelection();
127 std::vector<std::string> names;
129 for (
int r = 0; r < widget->listWidget->count(); r++)
131 QListWidgetItem* item = widget->listWidget->item(r);
133 if (item->checkState() == Qt::Checked)
135 names.push_back(item->text().toStdString());
138 viewSelection->drawSaliencySphere(names);
144 std::vector<std::string> names = viewSelection->getSaliencyMapNames();
146 widget->listWidget->clear();
148 for (std::string name : names)
150 QListWidgetItem* item =
151 new QListWidgetItem(QString::fromStdString(name), widget->listWidget);
152 item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
153 item->setCheckState(Qt::Unchecked);
160 viewSelection->clearSaliencySphere();
166 viewSelectionName = configDialog->getViewSelectionName();
bool usingProxy(const std::string &name, const std::string &endpoints="")
Registers a proxy for retrieval after initialization and adds it to the dependency list.
void usingTopic(const std::string &name, bool orderedPublishing=false)
Registers a proxy for subscription after initialization.
Ice::ObjectPrx getProxy(long timeoutMs=0, bool waitForScheduler=true) const
Returns the proxy of this object (optionally it waits for the proxy)
This file offers overloads of toIce() and fromIce() functions for STL container types.