Public Member Functions | Private Slots | Private Attributes
rviz::EditEnumItem Class Reference

#include <edit_enum_item.h>

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

List of all members.

Public Member Functions

virtual QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option)
 EditEnumItem (EditEnumProperty *property)
std::string getChoice ()
void setChoice (const std::string &choice)
void setChoices (V_string &choices)
virtual bool setEditorData (QWidget *editor)
virtual bool setModelData (QWidget *editor)
void setOptionCallback (EditEnumOptionCallback cb)

Private Slots

void setChoiceIndex (int new_choice_index)

Private Attributes

std::string choice_
V_string choices_
EditEnumOptionCallback option_cb_
bool signal_changes_

Detailed Description

Definition at line 43 of file edit_enum_item.h.


Constructor & Destructor Documentation

Definition at line 42 of file edit_enum_item.cpp.


Member Function Documentation

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

Override to create a custom editor widget for this item. The base implementation returns NULL, which will case the default QLineEdit to be created.

Reimplemented from rviz::PropertyWidgetItem.

Definition at line 48 of file edit_enum_item.cpp.

std::string rviz::EditEnumItem::getChoice ( ) [inline]

Definition at line 64 of file edit_enum_item.h.

void rviz::EditEnumItem::setChoice ( const std::string &  choice)

Set the current choice.

Definition at line 109 of file edit_enum_item.cpp.

void rviz::EditEnumItem::setChoiceIndex ( int  new_choice_index) [private, slot]

Set a new choice by index into choices_. Called from user GUI events, so emits data-changed signal.

Definition at line 129 of file edit_enum_item.cpp.

Set the list of choice names and values.

Definition at line 118 of file edit_enum_item.cpp.

bool rviz::EditEnumItem::setEditorData ( QWidget *  editor) [virtual]

Override to load an editor with data from the model. Return true to claim to have done the work, false to fall back on the default behavior.

Reimplemented from rviz::PropertyWidgetItem.

Definition at line 57 of file edit_enum_item.cpp.

bool rviz::EditEnumItem::setModelData ( QWidget *  editor) [virtual]

Override to read data from an editor and store it in the model. Return true to claim to have done the work, false to fall back on the default behavior.

Reimplemented from rviz::PropertyWidgetItem.

Definition at line 93 of file edit_enum_item.cpp.

Definition at line 66 of file edit_enum_item.h.


Member Data Documentation

std::string rviz::EditEnumItem::choice_ [private]

Definition at line 75 of file edit_enum_item.h.

Definition at line 74 of file edit_enum_item.h.

Function to call to get option list, called each time option list is shown.

Definition at line 80 of file edit_enum_item.h.

Definition at line 76 of file edit_enum_item.h.


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


rviz
Author(s): Dave Hershberger, Josh Faust
autogenerated on Mon Jan 6 2014 11:54:33