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

#include <new_object_dialog.h>

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

Public Slots

void accept () override
 

Public Member Functions

 NewObjectDialog (Factory *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, QWidget *parent=nullptr)
 
QSize sizeHint () const override
 

Private Slots

void onDisplaySelected (QTreeWidgetItem *selected_item)
 
void onNameChanged ()
 

Private Member Functions

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

Private Attributes

QDialogButtonBox * button_box_
 
QTextBrowser * description_
 
const QStringList & disallowed_class_lookup_names_
 
const QStringList & disallowed_display_names_
 
QString * display_name_output_
 
Factoryfactory_
 
QString lookup_name_
 
QString * lookup_name_output_
 
QLineEdit * name_editor_
 

Detailed Description

Definition at line 46 of file new_object_dialog.h.

Constructor & Destructor Documentation

◆ NewObjectDialog()

rviz::NewObjectDialog::NewObjectDialog ( Factory 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,
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 51 of file new_object_dialog.cpp.

Member Function Documentation

◆ accept

void rviz::NewObjectDialog::accept ( )
overrideslot

Definition at line 249 of file new_object_dialog.cpp.

◆ fillTree()

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

Fill the tree widget with classes from the class loader.

Definition at line 126 of file new_object_dialog.cpp.

◆ isValid()

bool rviz::NewObjectDialog::isValid ( )
private

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

Definition at line 214 of file new_object_dialog.cpp.

◆ onDisplaySelected

void rviz::NewObjectDialog::onDisplaySelected ( QTreeWidgetItem *  selected_item)
privateslot

Definition at line 172 of file new_object_dialog.cpp.

◆ onNameChanged

void rviz::NewObjectDialog::onNameChanged ( )
privateslot

Definition at line 244 of file new_object_dialog.cpp.

◆ setError()

void rviz::NewObjectDialog::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 239 of file new_object_dialog.cpp.

◆ sizeHint()

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

Definition at line 121 of file new_object_dialog.cpp.

Member Data Documentation

◆ button_box_

QDialogButtonBox* rviz::NewObjectDialog::button_box_
private

Widget with OK and CANCEL buttons.

Definition at line 107 of file new_object_dialog.h.

◆ description_

QTextBrowser* rviz::NewObjectDialog::description_
private

Widget showing description of the class.

Definition at line 102 of file new_object_dialog.h.

◆ disallowed_class_lookup_names_

const QStringList& rviz::NewObjectDialog::disallowed_class_lookup_names_
private

Definition at line 96 of file new_object_dialog.h.

◆ disallowed_display_names_

const QStringList& rviz::NewObjectDialog::disallowed_display_names_
private

Definition at line 95 of file new_object_dialog.h.

◆ display_name_output_

QString* rviz::NewObjectDialog::display_name_output_
private

Definition at line 99 of file new_object_dialog.h.

◆ factory_

Factory* rviz::NewObjectDialog::factory_
private

Definition at line 94 of file new_object_dialog.h.

◆ lookup_name_

QString rviz::NewObjectDialog::lookup_name_
private

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

Definition at line 111 of file new_object_dialog.h.

◆ lookup_name_output_

QString* rviz::NewObjectDialog::lookup_name_output_
private

Definition at line 98 of file new_object_dialog.h.

◆ name_editor_

QLineEdit* rviz::NewObjectDialog::name_editor_
private

Definition at line 104 of file new_object_dialog.h.


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


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