25 #include <QListWidgetItem>
59 return qobject_cast<ViewSelectionConfigDialog*>(configDialog);
65 viewSelectionName = settings->value(
"viewSelectionName",
"").toString().toStdString();
70 viewSelectionName = settings->value(
"viewSelectionName", QString::fromStdString(viewSelectionName)).toString().toStdString();
84 viewSelection = getProxy<ViewSelectionInterfacePrx>(viewSelectionName);
86 widget.checkBox->setChecked(viewSelection->isEnabledAutomaticViewSelection());
92 widget.checkBox->setChecked(
true);
97 widget.checkBox->setChecked(
false);
106 ARMARX_LOG <<
"toggling view selection " << isEnabled;
110 viewSelection->activateAutomaticViewSelection();
114 viewSelection->deactivateAutomaticViewSelection();
120 std::vector<std::string>
names;
122 for (
int r = 0; r < widget.listWidget->count(); r++)
124 QListWidgetItem* item = widget.listWidget->item(r);
126 if (item->checkState() == Qt::Checked)
128 names.push_back(item->text().toStdString());
132 viewSelection->drawSaliencySphere(
names);
138 std::vector<std::string>
names = viewSelection->getSaliencyMapNames();
140 widget.listWidget->clear();
142 for (std::string name :
names)
144 QListWidgetItem* item =
new QListWidgetItem(QString::fromStdString(name), widget.listWidget);
145 item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
146 item->setCheckState(Qt::Unchecked);
153 viewSelection->clearSaliencySphere();
158 viewSelectionName = configDialog->getViewSelectionName();