Public Slots | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
rviz::AddDisplayDialog Class Reference

#include <add_display_dialog.h>

Inheritance diagram for rviz::AddDisplayDialog:
Inheritance graph
[legend]

Public Slots

void accept () override
 

Public Member Functions

 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)
 
QSize sizeHint () const override
 

Private Slots

void onDisplaySelected (SelectionData *data)
 
void onNameChanged ()
 
void onTabChanged (int index)
 
void onTopicSelected (SelectionData *data)
 

Private Member Functions

void fillTree (QTreeWidget *tree)
 
bool isValid ()
 
void setError (const QString &error_text)
 
void updateDisplay ()
 

Private Attributes

QDialogButtonBox * button_box_
 
QString * datatype_output_
 
QTextBrowser * description_
 
const QStringList & disallowed_class_lookup_names_
 
const QStringList & disallowed_display_names_
 
SelectionData display_data_
 
QString * display_name_output_
 
int display_tab_
 
Factoryfactory_
 
QString lookup_name_
 
QString * lookup_name_output_
 
QLineEdit * name_editor_
 
QTabWidget * tab_widget_
 
SelectionData topic_data_
 
QString * topic_output_
 
int topic_tab_
 

Detailed Description

Definition at line 64 of file add_display_dialog.h.

Constructor & Destructor Documentation

◆ AddDisplayDialog()

rviz::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 
)

Dialog for choosing a new object to load with a pluginlib ClassLoader.

Parameters
disallowed_display_namesset of display names to prevent the user from using.
disallowed_class_lookup_namesset of class lookup names to prevent the user from selecting. Names found in the class loader which are in this list will appear disabled.
lookup_name_outputPointer to a string where dialog will put the class lookup name chosen.
display_name_outputPointer to a string where dialog will put the display name entered, or NULL (default) if display name entry field should not be shown.

Definition at line 167 of file add_display_dialog.cpp.

Member Function Documentation

◆ accept

void rviz::AddDisplayDialog::accept ( )
overrideslot

Definition at line 344 of file add_display_dialog.cpp.

◆ fillTree()

void rviz::AddDisplayDialog::fillTree ( QTreeWidget *  tree)
private

Fill the tree widget with classes from the class loader.

◆ isValid()

bool rviz::AddDisplayDialog::isValid ( )
private

Returns true if entered display name is non-empty and unique and if lookup name is non-empty.

Definition at line 309 of file add_display_dialog.cpp.

◆ onDisplaySelected

void rviz::AddDisplayDialog::onDisplaySelected ( SelectionData data)
privateslot

Definition at line 265 of file add_display_dialog.cpp.

◆ onNameChanged

void rviz::AddDisplayDialog::onNameChanged ( )
privateslot

Definition at line 339 of file add_display_dialog.cpp.

◆ onTabChanged

void rviz::AddDisplayDialog::onTabChanged ( int  index)
privateslot

Definition at line 260 of file add_display_dialog.cpp.

◆ onTopicSelected

void rviz::AddDisplayDialog::onTopicSelected ( SelectionData data)
privateslot

Definition at line 271 of file add_display_dialog.cpp.

◆ setError()

void rviz::AddDisplayDialog::setError ( const QString &  error_text)
private

Display an error message to the user, or clear the previous error message if error_text is empty.

Definition at line 334 of file add_display_dialog.cpp.

◆ sizeHint()

QSize rviz::AddDisplayDialog::sizeHint ( ) const
override

Definition at line 255 of file add_display_dialog.cpp.

◆ updateDisplay()

void rviz::AddDisplayDialog::updateDisplay ( )
private

Populate text boxes based on current tab and selection

Definition at line 277 of file add_display_dialog.cpp.

Member Data Documentation

◆ button_box_

QDialogButtonBox* rviz::AddDisplayDialog::button_box_
private

Widget with OK and CANCEL buttons.

Definition at line 145 of file add_display_dialog.h.

◆ datatype_output_

QString* rviz::AddDisplayDialog::datatype_output_
private

Definition at line 126 of file add_display_dialog.h.

◆ description_

QTextBrowser* rviz::AddDisplayDialog::description_
private

Widget showing description of the class.

Definition at line 140 of file add_display_dialog.h.

◆ disallowed_class_lookup_names_

const QStringList& rviz::AddDisplayDialog::disallowed_class_lookup_names_
private

Definition at line 121 of file add_display_dialog.h.

◆ disallowed_display_names_

const QStringList& rviz::AddDisplayDialog::disallowed_display_names_
private

Definition at line 120 of file add_display_dialog.h.

◆ display_data_

SelectionData rviz::AddDisplayDialog::display_data_
private

Current data for display tab

Definition at line 135 of file add_display_dialog.h.

◆ display_name_output_

QString* rviz::AddDisplayDialog::display_name_output_
private

Definition at line 124 of file add_display_dialog.h.

◆ display_tab_

int rviz::AddDisplayDialog::display_tab_
private

Index of tab for selection by display

Definition at line 133 of file add_display_dialog.h.

◆ factory_

Factory* rviz::AddDisplayDialog::factory_
private

Definition at line 119 of file add_display_dialog.h.

◆ lookup_name_

QString rviz::AddDisplayDialog::lookup_name_
private

Current value of selected class-lookup name. Copied to *lookup_name_output_ when "ok" is clicked.

Definition at line 149 of file add_display_dialog.h.

◆ lookup_name_output_

QString* rviz::AddDisplayDialog::lookup_name_output_
private

Definition at line 123 of file add_display_dialog.h.

◆ name_editor_

QLineEdit* rviz::AddDisplayDialog::name_editor_
private

Definition at line 142 of file add_display_dialog.h.

◆ tab_widget_

QTabWidget* rviz::AddDisplayDialog::tab_widget_
private

Widget holding tabs

Definition at line 129 of file add_display_dialog.h.

◆ topic_data_

SelectionData rviz::AddDisplayDialog::topic_data_
private

Current data for topic tab

Definition at line 137 of file add_display_dialog.h.

◆ topic_output_

QString* rviz::AddDisplayDialog::topic_output_
private

Definition at line 125 of file add_display_dialog.h.

◆ topic_tab_

int rviz::AddDisplayDialog::topic_tab_
private

Index of tab for selection by topic

Definition at line 131 of file add_display_dialog.h.


The documentation for this class was generated from the following files:


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Sat May 27 2023 02:06:25