rviz::EditableEnumProperty Class Reference

Editable Enum property. More...

#include <editable_enum_property.h>

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

List of all members.

Public Slots

virtual void setString (const QString &str)

Signals

void requestOptions (QStringList *option_list_return)
 requestOptions() is emitted each time createEditor() is called. If anything is added to option_list_return after this is emitted, it will be used instead of the options defined by calls to addOption() and clearOptions().

Public Member Functions

virtual void addOption (const QString &option)
virtual void clearOptions ()
virtual QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option)
 Create an editor widget to edit the value of this property.
 EditableEnumProperty (const QString &name=QString(), const QString &default_value=QString(), const QString &description=QString(), Property *parent=0, const char *changed_slot=0, QObject *receiver=0)

Private Attributes

QStringList strings_

Detailed Description

Editable Enum property.

An editable enum property works like a string property, but with the addition of a drop-down list of predefined choices.

Definition at line 44 of file editable_enum_property.h.


Constructor & Destructor Documentation

rviz::EditableEnumProperty::EditableEnumProperty ( const QString &  name = QString(),
const QString &  default_value = QString(),
const QString &  description = QString(),
Property parent = 0,
const char *  changed_slot = 0,
QObject *  receiver = 0 
)

Definition at line 39 of file editable_enum_property.cpp.


Member Function Documentation

void rviz::EditableEnumProperty::addOption ( const QString &  option  )  [virtual]

Definition at line 54 of file editable_enum_property.cpp.

void rviz::EditableEnumProperty::clearOptions (  )  [virtual]

Definition at line 49 of file editable_enum_property.cpp.

QWidget * rviz::EditableEnumProperty::createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  option 
) [virtual]

Create an editor widget to edit the value of this property.

Parameters:
parent The QWidget to set as the parent of the returned QWidget.
option A QStyleOptionViewItem with parameters of the editor widget, like the rectangle, alignments, etc.
Returns:
the newly-created editor widget. The default implementation creates a QSpinBox for integer values, a FloatEdit for float or double values, or a QLineEdit for anything else.

If this function returns NULL, a QStyledItemDelegate will make an editor widget.

The widget returned by createEditor() must have one Q_PROPERTY with USER set to true. The PropertyTreeDelegate finds it, sets it with the results of PropertyTreeModel::data() after creation, and after editing is finished it reads it and calls PropertyTreeModel::setData() with the contents.

Reimplemented from rviz::Property.

Definition at line 59 of file editable_enum_property.cpp.

void rviz::EditableEnumProperty::requestOptions ( QStringList *  option_list_return  )  [signal]

requestOptions() is emitted each time createEditor() is called. If anything is added to option_list_return after this is emitted, it will be used instead of the options defined by calls to addOption() and clearOptions().

A connection to this signal should never be made with a queued connection, because then the "emit" would return before the changes to the list were made.

A connected slot should just add options to "*option_list_return". It will be cleared before this signal is emitted.

void rviz::EditableEnumProperty::setString ( const QString &  str  )  [virtual, slot]

Definition at line 83 of file editable_enum_property.cpp.


Member Data Documentation

QStringList rviz::EditableEnumProperty::strings_ [private]

Definition at line 80 of file editable_enum_property.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


rviz
Author(s): Dave Hershberger, Josh Faust
autogenerated on Wed Jun 6 11:25:47 2012