#include <new_object_dialog.h>
Public Slots | |
virtual void | accept () |
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=0, QWidget *parent=0) | |
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_ |
Factory * | factory_ |
QString | lookup_name_ |
QString * | lookup_name_output_ |
QLineEdit * | name_editor_ |
Definition at line 47 of file new_object_dialog.h.
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 = 0 , |
|||
QWidget * | parent = 0 | |||
) |
Dialog for choosing a new object to load with a pluginlib ClassLoader.
disallowed_display_names | set of display names to prevent the user from using. | |
disallowed_class_lookup_names | set 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_output | Pointer to a string where dialog will put the class lookup name chosen. | |
display_name_output | Pointer 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 46 of file new_object_dialog.cpp.
void rviz::NewObjectDialog::accept | ( | ) | [virtual, slot] |
Definition at line 235 of file new_object_dialog.cpp.
void rviz::NewObjectDialog::fillTree | ( | QTreeWidget * | tree | ) | [private] |
Fill the tree widget with classes from the class loader.
Definition at line 120 of file new_object_dialog.cpp.
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 200 of file new_object_dialog.cpp.
void rviz::NewObjectDialog::onDisplaySelected | ( | QTreeWidgetItem * | selected_item | ) | [private, slot] |
Definition at line 158 of file new_object_dialog.cpp.
void rviz::NewObjectDialog::onNameChanged | ( | ) | [private, slot] |
Definition at line 230 of file new_object_dialog.cpp.
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 225 of file new_object_dialog.cpp.
QDialogButtonBox* rviz::NewObjectDialog::button_box_ [private] |
Widget with OK and CANCEL buttons.
Definition at line 106 of file new_object_dialog.h.
QTextBrowser* rviz::NewObjectDialog::description_ [private] |
Widget showing description of the class.
Definition at line 101 of file new_object_dialog.h.
const QStringList& rviz::NewObjectDialog::disallowed_class_lookup_names_ [private] |
Definition at line 95 of file new_object_dialog.h.
const QStringList& rviz::NewObjectDialog::disallowed_display_names_ [private] |
Definition at line 94 of file new_object_dialog.h.
QString* rviz::NewObjectDialog::display_name_output_ [private] |
Definition at line 98 of file new_object_dialog.h.
Factory* rviz::NewObjectDialog::factory_ [private] |
Definition at line 93 of file new_object_dialog.h.
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 110 of file new_object_dialog.h.
QString* rviz::NewObjectDialog::lookup_name_output_ [private] |
Definition at line 97 of file new_object_dialog.h.
QLineEdit* rviz::NewObjectDialog::name_editor_ [private] |
Definition at line 103 of file new_object_dialog.h.