Public Slots | Signals | Public Member Functions | Protected Attributes
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 (EditableEnumProperty *property_in_need_of_options)
 requestOptions() is emitted each time createEditor() is called.

Public Member Functions

virtual void addOption (const QString &option)
void addOptionStd (const std::string &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)
void sortOptions ()
 Sort the option strings.

Protected 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::addOptionStd ( const std::string &  option) [inline]

Definition at line 57 of file editable_enum_property.h.

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:
parentThe QWidget to set as the parent of the returned QWidget.
optionA 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 ( EditableEnumProperty property_in_need_of_options) [signal]

requestOptions() is emitted each time createEditor() is called.

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

A connected slot should make calls to clearOptions() and/or addOption() as needed. The option list in the EditableEnumProperty will not be cleared before the signal is emitted.

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

Reimplemented from rviz::StringProperty.

Definition at line 74 of file editable_enum_property.cpp.

Sort the option strings.

Definition at line 63 of file editable_enum_property.h.


Member Data Documentation

QStringList rviz::EditableEnumProperty::strings_ [protected]

Definition at line 82 of file editable_enum_property.h.


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


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Thu Aug 27 2015 15:02:28