add_display_dialog.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008, Willow Garage, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * * Neither the name of the Willow Garage, Inc. nor the names of its
14  * contributors may be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27  * POSSIBILITY OF SUCH DAMAGE.
28  */
29 
30 #include <map>
31 
32 #include <boost/filesystem.hpp>
33 
34 #include <ros/package.h>
35 #include <ros/ros.h>
36 
37 #include <QGroupBox>
38 #include <QLabel>
39 #include <QLineEdit>
40 #include <QTextBrowser>
41 #include <QVBoxLayout>
42 #include <QDialogButtonBox>
43 #include <QPushButton>
44 #include <QTabWidget>
45 #include <QCheckBox>
46 #include <QComboBox>
47 #include <QHeaderView>
48 
49 #include "add_display_dialog.h"
50 #include <rviz/load_resource.h>
51 
52 #include "display_factory.h"
53 
54 namespace rviz
55 {
56 // Utilities for grouping topics together
57 
59 {
61  {
62  return a.name < b.name;
63  }
64 };
65 
80 bool isSubtopic(const std::string& base, const std::string& topic)
81 {
82  std::string error;
83  if (!ros::names::validate(base, error))
84  {
85  ROS_ERROR_STREAM("isSubtopic() Invalid basename: " << error);
86  return false;
87  }
88  if (!ros::names::validate(topic, error))
89  {
90  ROS_ERROR_STREAM("isSubtopic() Invalid topic: " << error);
91  return false;
92  }
93 
94  std::string query = topic;
95  while (query != "/")
96  {
97  if (query == base)
98  {
99  return true;
100  }
101  query = ros::names::parentNamespace(query);
102  }
103  return false;
104 }
105 
107 {
108  struct Info
109  {
110  QStringList topic_suffixes;
111  QStringList datatypes;
112  };
113 
114  QString base_topic;
115  // Map from plugin name to plugin data
116  QMap<QString, Info> plugins;
117 };
118 
119 void getPluginGroups(const QMultiMap<QString, QString>& datatype_plugins,
120  QList<PluginGroup>* groups,
121  QList<ros::master::TopicInfo>* unvisualizable)
122 {
123  ros::master::V_TopicInfo all_topics;
124  ros::master::getTopics(all_topics);
125  std::sort(all_topics.begin(), all_topics.end(), LexicalTopicInfo());
126  ros::master::V_TopicInfo::iterator topic_it;
127 
128  for (topic_it = all_topics.begin(); topic_it != all_topics.end(); ++topic_it)
129  {
130  QString topic = QString::fromStdString(topic_it->name);
131  QString datatype = QString::fromStdString(topic_it->datatype);
132 
133  if (datatype_plugins.contains(datatype))
134  {
135  if (groups->empty() || !isSubtopic(groups->back().base_topic.toStdString(), topic.toStdString()))
136  {
137  PluginGroup pi;
138  pi.base_topic = topic;
139  groups->append(pi);
140  }
141 
142  PluginGroup& group = groups->back();
143  QString topic_suffix("raw");
144  if (topic != group.base_topic)
145  {
146  // Remove base_topic and leading slash
147  topic_suffix = topic.right(topic.size() - group.base_topic.size() - 1);
148  }
149 
150  const QList<QString>& plugin_names = datatype_plugins.values(datatype);
151  for (int i = 0; i < plugin_names.size(); ++i)
152  {
153  const QString& name = plugin_names[i];
154  PluginGroup::Info& info = group.plugins[name];
155  info.topic_suffixes.append(topic_suffix);
156  info.datatypes.append(datatype);
157  }
158  }
159  else
160  {
161  unvisualizable->append(*topic_it);
162  }
163  }
164 }
165 
166 // Dialog implementation
168  const QString& /*object_type*/,
169  const QStringList& disallowed_display_names,
170  const QStringList& disallowed_class_lookup_names,
171  QString* lookup_name_output,
172  QString* display_name_output,
173  QString* topic_output,
174  QString* datatype_output,
175  QWidget* parent)
176  : QDialog(parent)
177  , factory_(factory)
178  , disallowed_display_names_(disallowed_display_names)
179  , disallowed_class_lookup_names_(disallowed_class_lookup_names)
180  , lookup_name_output_(lookup_name_output)
181  , display_name_output_(display_name_output)
182  , topic_output_(topic_output)
183  , datatype_output_(datatype_output)
184 {
185  //***** Layout
186 
187  // Display Type group
188  QGroupBox* type_box = new QGroupBox("Create visualization");
189 
190  QLabel* description_label = new QLabel("Description:");
191  description_ = new QTextBrowser;
192  description_->setMaximumHeight(100);
193  description_->setOpenExternalLinks(true);
194 
195  DisplayTypeTree* display_tree = new DisplayTypeTree;
196  display_tree->fillTree(factory);
197 
198  TopicDisplayWidget* topic_widget = new TopicDisplayWidget;
199  topic_widget->fill(factory);
200 
201  tab_widget_ = new QTabWidget;
202  display_tab_ = tab_widget_->addTab(display_tree, tr("By display type"));
203  topic_tab_ = tab_widget_->addTab(topic_widget, tr("By topic"));
204 
205  QVBoxLayout* type_layout = new QVBoxLayout;
206  type_layout->addWidget(tab_widget_);
207  type_layout->addWidget(description_label);
208  type_layout->addWidget(description_);
209 
210  type_box->setLayout(type_layout);
211 
212  // Display Name group
213  QGroupBox* name_box = nullptr;
215  {
216  name_box = new QGroupBox("Display Name");
217  name_editor_ = new QLineEdit;
218  QVBoxLayout* name_layout = new QVBoxLayout;
219  name_layout->addWidget(name_editor_);
220  name_box->setLayout(name_layout);
221  }
222 
223  // Buttons
224  button_box_ = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal);
225 
226  QVBoxLayout* main_layout = new QVBoxLayout;
227  main_layout->addWidget(type_box);
229  {
230  main_layout->addWidget(name_box);
231  }
232  main_layout->addWidget(button_box_);
233  setLayout(main_layout);
234 
235  //***** Connections
237  connect(display_tree, &DisplayTypeTree::itemActivated, this, &AddDisplayDialog::accept);
238 
240  connect(topic_widget, &TopicDisplayWidget::itemActivated, this, &AddDisplayDialog::accept);
241 
242  connect(button_box_, &QDialogButtonBox::accepted, this, &AddDisplayDialog::accept);
243  connect(button_box_, &QDialogButtonBox::rejected, this, &AddDisplayDialog::reject);
244 
245  connect(tab_widget_, &QTabWidget::currentChanged, this, &AddDisplayDialog::onTabChanged);
247  {
248  connect(name_editor_, &QLineEdit::textEdited, this, &AddDisplayDialog::onNameChanged);
249  }
250 
251  button_box_->button(QDialogButtonBox::Ok)->setEnabled(isValid());
252 }
253 
255 {
256  return (QSize(500, 660));
257 }
258 
260 {
261  updateDisplay();
262 }
263 
265 {
266  display_data_ = *data;
267  updateDisplay();
268 }
269 
271 {
272  topic_data_ = *data;
273  updateDisplay();
274 }
275 
277 {
278  SelectionData* data = nullptr;
279  if (tab_widget_->currentIndex() == topic_tab_)
280  {
281  data = &topic_data_;
282  }
283  else if (tab_widget_->currentIndex() == display_tab_)
284  {
285  data = &display_data_;
286  }
287  else
288  {
289  ROS_WARN("Unknown tab index: %i", tab_widget_->currentIndex());
290  return;
291  }
292 
293  QString html = "<html><body>" + data->whats_this + "</body></html>";
294  description_->setHtml(html);
295 
296  lookup_name_ = data->lookup_name;
298  {
299  name_editor_->setText(data->display_name);
300  }
301 
302  *topic_output_ = data->topic;
303  *datatype_output_ = data->datatype;
304 
305  button_box_->button(QDialogButtonBox::Ok)->setEnabled(isValid());
306 }
307 
309 {
310  if (lookup_name_.size() == 0)
311  {
312  setError("Select a Display type.");
313  return false;
314  }
316  {
317  QString display_name = name_editor_->text();
318  if (display_name.size() == 0)
319  {
320  setError("Enter a name for the display.");
321  return false;
322  }
323  if (disallowed_display_names_.contains(display_name))
324  {
325  setError("Name in use. Display names must be unique.");
326  return false;
327  }
328  }
329  setError("");
330  return true;
331 }
332 
333 void AddDisplayDialog::setError(const QString& error_text)
334 {
335  button_box_->button(QDialogButtonBox::Ok)->setToolTip(error_text);
336 }
337 
339 {
340  button_box_->button(QDialogButtonBox::Ok)->setEnabled(isValid());
341 }
342 
344 {
345  if (isValid())
346  {
349  {
351  }
352  QDialog::accept();
353  }
354 }
355 
357 {
358  setHeaderHidden(true);
359  connect(this, &DisplayTypeTree::currentItemChanged, this, &DisplayTypeTree::onCurrentItemChanged);
360 }
361 
362 void DisplayTypeTree::onCurrentItemChanged(QTreeWidgetItem* curr, QTreeWidgetItem* /*prev*/)
363 {
364  // If display is selected, populate selection data. Otherwise, clear data.
365  SelectionData sd;
366  if (curr->parent() != nullptr)
367  {
368  // Leave topic and datatype blank
369  sd.whats_this = curr->whatsThis(0);
370  sd.lookup_name = curr->data(0, Qt::UserRole).toString();
371  sd.display_name = curr->text(0);
372  }
373  Q_EMIT itemChanged(&sd);
374 }
375 
377 {
378  QIcon default_package_icon = loadPixmap("package://rviz/icons/default_package_icon.png");
379 
380  QStringList classes = factory->getDeclaredClassIds();
381  classes.sort();
382 
383  // Map from package names to the corresponding top-level tree widget items.
384  std::map<QString, QTreeWidgetItem*> package_items;
385 
386  for (int i = 0; i < classes.size(); i++)
387  {
388  QString lookup_name = classes[i];
389  QString package = factory->getClassPackage(lookup_name);
390  QString description = factory->getClassDescription(lookup_name);
391  QString name = factory->getClassName(lookup_name);
392 
393  QTreeWidgetItem* package_item;
394 
395  std::map<QString, QTreeWidgetItem*>::iterator mi;
396  mi = package_items.find(package);
397  if (mi == package_items.end())
398  {
399  package_item = new QTreeWidgetItem(this);
400  package_item->setText(0, package);
401  package_item->setIcon(0, default_package_icon);
402 
403  package_item->setExpanded(true);
404  package_items[package] = package_item;
405  }
406  else
407  {
408  package_item = (*mi).second;
409  }
410  QTreeWidgetItem* class_item = new QTreeWidgetItem(package_item);
411 
412  class_item->setIcon(0, factory->getIcon(lookup_name));
413 
414  class_item->setText(0, name);
415  class_item->setWhatsThis(0, description);
416  // Store the lookup name for each class in the UserRole of the item.
417  class_item->setData(0, Qt::UserRole, lookup_name);
418  }
419 }
420 
422 {
423  tree_ = new QTreeWidget;
424  tree_->setHeaderHidden(true);
425  tree_->setColumnCount(2);
426 
427  tree_->header()->setStretchLastSection(false);
428  tree_->header()->setSectionResizeMode(0, QHeaderView::Stretch);
429 
430  enable_hidden_box_ = new QCheckBox("Show unvisualizable topics");
431  enable_hidden_box_->setCheckState(Qt::Unchecked);
432 
433  QVBoxLayout* layout = new QVBoxLayout;
434  layout->setContentsMargins(QMargins(0, 0, 0, 0));
435 
436  layout->addWidget(tree_);
437  layout->addWidget(enable_hidden_box_);
438 
439  // Forward signals from tree_
440  connect(tree_, &QTreeWidget::currentItemChanged, this, &TopicDisplayWidget::onCurrentItemChanged);
441  connect(tree_, &QTreeWidget::itemActivated, this, &TopicDisplayWidget::itemActivated);
442 
443  // Connect signal from checkbox
444  connect(enable_hidden_box_, &QCheckBox::stateChanged, this, &TopicDisplayWidget::stateChanged);
445 
446  setLayout(layout);
447 }
448 
449 void TopicDisplayWidget::onCurrentItemChanged(QTreeWidgetItem* curr)
450 {
451  // If plugin is selected, populate selection data. Otherwise, clear data.
452  SelectionData sd;
453  if (curr->data(1, Qt::UserRole).isValid())
454  {
455  QTreeWidgetItem* parent = curr->parent();
456  sd.whats_this = curr->whatsThis(0);
457 
458  sd.topic = parent->data(0, Qt::UserRole).toString();
459  sd.lookup_name = curr->data(0, Qt::UserRole).toString();
460  sd.display_name = curr->text(0);
461 
462  QComboBox* combo = qobject_cast<QComboBox*>(tree_->itemWidget(curr, 1));
463  if (combo != nullptr)
464  {
465  QString combo_text = combo->currentText();
466  if (combo_text != "raw")
467  {
468  sd.topic += "/" + combo_text;
469  }
470  sd.datatype = combo->itemData(combo->currentIndex()).toString();
471  }
472  else
473  {
474  sd.datatype = curr->data(1, Qt::UserRole).toString();
475  }
476  }
477  Q_EMIT itemChanged(&sd);
478 }
479 
480 void TopicDisplayWidget::onComboBoxClicked(QTreeWidgetItem* curr)
481 {
482  tree_->setCurrentItem(curr);
483 }
484 
486 {
487  bool hide_disabled = state == Qt::Unchecked;
488  QTreeWidgetItemIterator it(tree_, QTreeWidgetItemIterator::Disabled);
489  for (; *it; ++it)
490  {
491  QTreeWidgetItem* item = *it;
492  item->setHidden(hide_disabled);
493  }
494 }
495 
497 {
498  findPlugins(factory);
499 
500  QList<PluginGroup> groups;
501  QList<ros::master::TopicInfo> unvisualizable;
502  getPluginGroups(datatype_plugins_, &groups, &unvisualizable);
503 
504  // Insert visualizable topics along with their plugins
505  QList<PluginGroup>::const_iterator pg_it;
506  for (pg_it = groups.begin(); pg_it < groups.end(); ++pg_it)
507  {
508  const PluginGroup& pg = *pg_it;
509 
510  QTreeWidgetItem* item = insertItem(pg.base_topic, false);
511  item->setData(0, Qt::UserRole, pg.base_topic);
512 
513  QMap<QString, PluginGroup::Info>::const_iterator it;
514  for (it = pg.plugins.begin(); it != pg.plugins.end(); ++it)
515  {
516  const QString& plugin_name = it.key();
517  const PluginGroup::Info& info = it.value();
518  QTreeWidgetItem* row = new QTreeWidgetItem(item);
519 
520  row->setText(0, factory->getClassName(plugin_name));
521  row->setIcon(0, factory->getIcon(plugin_name));
522  row->setWhatsThis(0, factory->getClassDescription(plugin_name));
523  row->setData(0, Qt::UserRole, plugin_name);
524  row->setData(1, Qt::UserRole, info.datatypes[0]);
525 
526  if (info.topic_suffixes.size() > 1)
527  {
528  EmbeddableComboBox* box = new EmbeddableComboBox(row, 1);
530  for (int i = 0; i < info.topic_suffixes.size(); ++i)
531  {
532  box->addItem(info.topic_suffixes[i], info.datatypes[i]);
533  }
534  tree_->setItemWidget(row, 1, box);
535  tree_->setColumnWidth(1, std::max(tree_->columnWidth(1), box->width()));
536  }
537  }
538  }
539 
540  // Insert unvisualizable topics
541  for (int i = 0; i < unvisualizable.size(); ++i)
542  {
543  const ros::master::TopicInfo& ti = unvisualizable.at(i);
544  insertItem(QString::fromStdString(ti.name), true);
545  }
546 
547  // Hide unvisualizable topics if necessary
548  stateChanged(enable_hidden_box_->isChecked());
549 }
550 
552 {
553  // Build map from topic type to plugin by instantiating every plugin we have.
554  QStringList lookup_names = factory->getDeclaredClassIds();
555 
556  QStringList::iterator it;
557  for (it = lookup_names.begin(); it != lookup_names.end(); ++it)
558  {
559  const QString& lookup_name = *it;
560  // ROS_INFO("Class: %s", lookup_name.toStdString().c_str());
561 
562  QSet<QString> topic_types = factory->getMessageTypes(lookup_name);
563  Q_FOREACH (QString topic_type, topic_types)
564  {
565  // ROS_INFO("Type: %s", topic_type.toStdString().c_str());
566  datatype_plugins_.insert(topic_type, lookup_name);
567  }
568  }
569 }
570 
571 QTreeWidgetItem* TopicDisplayWidget::insertItem(const QString& topic, bool disabled)
572 {
573  QTreeWidgetItem* current = tree_->invisibleRootItem();
574  ;
575  QStringList parts = topic.split("/");
576 
577  for (int part_ind = 1; part_ind < parts.size(); ++part_ind)
578  {
579  QString part = "/" + parts[part_ind];
580  // If any child matches, use that one.
581  bool match = false;
582  for (int c = 0; c < current->childCount(); ++c)
583  {
584  QTreeWidgetItem* child = current->child(c);
585  if (child->text(0) == part && !child->data(1, Qt::UserRole).isValid())
586  {
587  match = true;
588  current = child;
589  break;
590  }
591  }
592  // If no match, create a new child.
593  if (!match)
594  {
595  QTreeWidgetItem* new_child = new QTreeWidgetItem(current);
596  // Only expand first few levels of the tree
597  new_child->setExpanded(3 > part_ind);
598  new_child->setText(0, part);
599  new_child->setDisabled(disabled);
600  current = new_child;
601  }
602  }
603  return current;
604 }
605 
606 } // namespace rviz
rviz::AddDisplayDialog::onNameChanged
void onNameChanged()
Definition: add_display_dialog.cpp:338
rviz::AddDisplayDialog::topic_data_
SelectionData topic_data_
Definition: add_display_dialog.h:137
rviz::TopicDisplayWidget
Widget for selecting a display by topic.
Definition: add_display_dialog.h:170
ROS_ERROR_STREAM
#define ROS_ERROR_STREAM(args)
rviz::AddDisplayDialog::onDisplaySelected
void onDisplaySelected(SelectionData *data)
Definition: add_display_dialog.cpp:264
display_factory.h
rviz::TopicDisplayWidget::itemChanged
void itemChanged(SelectionData *selection)
rviz::SelectionData
Definition: add_display_dialog.h:55
ros.h
rviz::AddDisplayDialog::display_data_
SelectionData display_data_
Definition: add_display_dialog.h:135
description
description
rviz::AddDisplayDialog::sizeHint
QSize sizeHint() const override
Definition: add_display_dialog.cpp:254
rviz::AddDisplayDialog::topic_output_
QString * topic_output_
Definition: add_display_dialog.h:125
rviz::PluginlibFactory::getClassName
QString getClassName(const QString &class_id) const override
Definition: pluginlib_factory.h:100
rviz::DisplayTypeTree::fillTree
void fillTree(Factory *factory)
Definition: add_display_dialog.cpp:376
rviz::DisplayTypeTree
Widget for selecting a display by display type.
Definition: add_display_dialog.h:154
rviz::SelectionData::whats_this
QString whats_this
Definition: add_display_dialog.h:57
rviz::AddDisplayDialog::isValid
bool isValid()
Definition: add_display_dialog.cpp:308
rviz::PluginGroup::base_topic
QString base_topic
Definition: add_display_dialog.cpp:114
rviz::SelectionData::datatype
QString datatype
Definition: add_display_dialog.h:61
rviz::AddDisplayDialog::description_
QTextBrowser * description_
Definition: add_display_dialog.h:140
ros::master::getTopics
ROSCPP_DECL bool getTopics(V_TopicInfo &topics)
rviz::loadPixmap
QPixmap loadPixmap(const QString &url, bool fill_cache)
Definition: load_resource.cpp:65
ros::names::parentNamespace
ROSCPP_DECL std::string parentNamespace(const std::string &name)
ros::names::validate
ROSCPP_DECL bool validate(const std::string &name, std::string &error)
rviz::AddDisplayDialog::topic_tab_
int topic_tab_
Definition: add_display_dialog.h:131
rviz::PluginlibFactory::getIcon
QIcon getIcon(const QString &class_id) const override
Definition: pluginlib_factory.h:130
rviz::PluginGroup::Info
Definition: add_display_dialog.cpp:108
package
string package
add_display_dialog.h
rviz::AddDisplayDialog::lookup_name_output_
QString * lookup_name_output_
Definition: add_display_dialog.h:123
rviz::AddDisplayDialog::onTopicSelected
void onTopicSelected(SelectionData *data)
Definition: add_display_dialog.cpp:270
rviz::AddDisplayDialog::tab_widget_
QTabWidget * tab_widget_
Definition: add_display_dialog.h:129
rviz::PluginGroup
Definition: add_display_dialog.cpp:106
rviz::SelectionData::lookup_name
QString lookup_name
Definition: add_display_dialog.h:58
rviz::SelectionData::display_name
QString display_name
Definition: add_display_dialog.h:59
rviz::TopicDisplayWidget::TopicDisplayWidget
TopicDisplayWidget()
Definition: add_display_dialog.cpp:421
rviz::AddDisplayDialog::name_editor_
QLineEdit * name_editor_
Definition: add_display_dialog.h:142
rviz
Definition: add_display_dialog.cpp:54
ros::master::V_TopicInfo
std::vector< TopicInfo > V_TopicInfo
rviz::AddDisplayDialog::updateDisplay
void updateDisplay()
Definition: add_display_dialog.cpp:276
rviz::PluginlibFactory::getDeclaredClassIds
QStringList getDeclaredClassIds() override
Definition: pluginlib_factory.h:74
rviz::AddDisplayDialog::onTabChanged
void onTabChanged(int index)
Definition: add_display_dialog.cpp:259
rviz::TopicDisplayWidget::onComboBoxClicked
void onComboBoxClicked(QTreeWidgetItem *curr)
Definition: add_display_dialog.cpp:480
rviz::PluginGroup::plugins
QMap< QString, Info > plugins
Definition: add_display_dialog.cpp:116
rviz::PluginGroup::Info::datatypes
QStringList datatypes
Definition: add_display_dialog.cpp:111
rviz::SelectionData::topic
QString topic
Definition: add_display_dialog.h:60
rviz::DisplayFactory::getMessageTypes
virtual QSet< QString > getMessageTypes(const QString &class_id)
Get all supported message types for the given class id.
Definition: display_factory.cpp:58
rviz::TopicDisplayWidget::onCurrentItemChanged
void onCurrentItemChanged(QTreeWidgetItem *curr)
Definition: add_display_dialog.cpp:449
ROS_WARN
#define ROS_WARN(...)
rviz::PluginlibFactory::getClassDescription
QString getClassDescription(const QString &class_id) const override
Definition: pluginlib_factory.h:90
rviz::AddDisplayDialog::button_box_
QDialogButtonBox * button_box_
Definition: add_display_dialog.h:145
rviz::Factory::getClassDescription
virtual QString getClassDescription(const QString &class_id) const =0
rviz::TopicDisplayWidget::itemActivated
void itemActivated(QTreeWidgetItem *item, int column)
rviz::PluginGroup::Info::topic_suffixes
QStringList topic_suffixes
Definition: add_display_dialog.cpp:110
rviz::EmbeddableComboBox
Definition: add_display_dialog.h:209
rviz::LexicalTopicInfo::operator()
bool operator()(const ros::master::TopicInfo &a, const ros::master::TopicInfo &b)
Definition: add_display_dialog.cpp:60
rviz::Factory::getDeclaredClassIds
virtual QStringList getDeclaredClassIds()=0
package.h
rviz::Factory::getClassName
virtual QString getClassName(const QString &class_id) const =0
rviz::DisplayTypeTree::onCurrentItemChanged
void onCurrentItemChanged(QTreeWidgetItem *curr, QTreeWidgetItem *prev)
Definition: add_display_dialog.cpp:362
rviz::AddDisplayDialog::disallowed_display_names_
const QStringList & disallowed_display_names_
Definition: add_display_dialog.h:120
rviz::AddDisplayDialog::display_tab_
int display_tab_
Definition: add_display_dialog.h:133
rviz::AddDisplayDialog::display_name_output_
QString * display_name_output_
Definition: add_display_dialog.h:124
rviz::DisplayFactory
Definition: display_factory.h:42
rviz::DisplayTypeTree::DisplayTypeTree
DisplayTypeTree()
Definition: add_display_dialog.cpp:356
rviz::LexicalTopicInfo
Definition: add_display_dialog.cpp:58
rviz::EmbeddableComboBox::itemClicked
void itemClicked(QTreeWidgetItem *item, int column)
rviz::AddDisplayDialog::lookup_name_
QString lookup_name_
Definition: add_display_dialog.h:149
rviz::isSubtopic
bool isSubtopic(const std::string &base, const std::string &topic)
Definition: add_display_dialog.cpp:80
datatype
const char * datatype()
rviz::getPluginGroups
void getPluginGroups(const QMultiMap< QString, QString > &datatype_plugins, QList< PluginGroup > *groups, QList< ros::master::TopicInfo > *unvisualizable)
Definition: add_display_dialog.cpp:119
rviz::TopicDisplayWidget::insertItem
QTreeWidgetItem * insertItem(const QString &topic, bool disabled)
Definition: add_display_dialog.cpp:571
rviz::AddDisplayDialog::accept
void accept() override
Definition: add_display_dialog.cpp:343
load_resource.h
rviz::Factory
Abstract superclass representing the ability to get a list of class IDs and the ability to get name,...
Definition: factory.h:42
rviz::Factory::getIcon
virtual QIcon getIcon(const QString &class_id) const =0
rviz::AddDisplayDialog::AddDisplayDialog
AddDisplayDialog(DisplayFactory *factory, const QString &object_type, const QStringList &disallowed_display_names, const QStringList &disallowed_class_lookup_names, QString *lookup_name_output, QString *display_name_output=nullptr, QString *topic_output=nullptr, QString *datatype_output=nullptr, QWidget *parent=nullptr)
Definition: add_display_dialog.cpp:167
ros::master::TopicInfo
rviz::TopicDisplayWidget::stateChanged
void stateChanged(int state)
Definition: add_display_dialog.cpp:485
rviz::AddDisplayDialog::datatype_output_
QString * datatype_output_
Definition: add_display_dialog.h:126
rviz::DisplayTypeTree::itemChanged
void itemChanged(SelectionData *selection)
rviz::TopicDisplayWidget::findPlugins
void findPlugins(DisplayFactory *)
Definition: add_display_dialog.cpp:551
rviz::TopicDisplayWidget::fill
void fill(DisplayFactory *factory)
Definition: add_display_dialog.cpp:496
rviz::AddDisplayDialog::setError
void setError(const QString &error_text)
Definition: add_display_dialog.cpp:333
ros::master::TopicInfo::name
std::string name


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Dec 13 2024 03:31:02