rviz::StatusProperty Class Reference

#include <status_property.h>

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

List of all members.

Public Types

enum  Level { Ok = 0, Warn = 1, Error = 2 }

Public Member Functions

virtual Level getLevel () const
virtual QVariant getViewData (int column, int role) const
 Return data appropriate for the given column (0 or 1) and role for this StatusProperty.
virtual Qt::ItemFlags getViewFlags (int column) const
 Return item flags appropriate for the given column (0 or 1) for this StatusProperty.
virtual void setLevel (Level level)
virtual bool setValue (const QVariant &new_value)
 Set the status text. Overridden from Property.
virtual bool shouldBeSaved () const
 Override this function to return true if this property should be saved to the config file, or false if it should not. The default implementation returns the opposite of getReadOnly().
 StatusProperty (const QString &name, const QString &text, Level level, Property *parent)

Static Public Member Functions

static QColor statusColor (Level level)
 Return the color appropriate for the given status level.
static QString statusWord (Level level)
 Return the word appropriate for the given status level: "Ok", "Warn", or "Error".

Protected Attributes

Level level_

Static Private Attributes

static QColor status_colors_ [3] = { QColor(), QColor( 195, 180, 0 ), QColor( 178, 23, 46 ) }
static QString status_words_ [3] = { "Ok", "Warn", "Error" }

Detailed Description

Definition at line 37 of file status_property.h.


Member Enumeration Documentation

Enumerator:
Ok 
Warn 
Error 

Definition at line 41 of file status_property.h.


Constructor & Destructor Documentation

rviz::StatusProperty::StatusProperty ( const QString &  name,
const QString &  text,
Level  level,
Property parent 
)

Definition at line 42 of file status_property.cpp.


Member Function Documentation

virtual Level rviz::StatusProperty::getLevel (  )  const [inline, virtual]

Definition at line 68 of file status_property.h.

QVariant rviz::StatusProperty::getViewData ( int  column,
int  role 
) const [virtual]

Return data appropriate for the given column (0 or 1) and role for this StatusProperty.

Reimplemented from rviz::Property.

Definition at line 54 of file status_property.cpp.

Qt::ItemFlags rviz::StatusProperty::getViewFlags ( int  column  )  const [virtual]

Return item flags appropriate for the given column (0 or 1) for this StatusProperty.

Reimplemented from rviz::Property.

Definition at line 63 of file status_property.cpp.

void rviz::StatusProperty::setLevel ( Level  level  )  [virtual]

Reimplemented in rviz::StatusList.

Definition at line 83 of file status_property.cpp.

bool rviz::StatusProperty::setValue ( const QVariant &  new_value  )  [virtual]

Set the status text. Overridden from Property.

Reimplemented from rviz::Property.

Definition at line 48 of file status_property.cpp.

virtual bool rviz::StatusProperty::shouldBeSaved (  )  const [inline, virtual]

Override this function to return true if this property should be saved to the config file, or false if it should not. The default implementation returns the opposite of getReadOnly().

Reimplemented from rviz::Property.

Reimplemented in rviz::StatusList.

Definition at line 70 of file status_property.h.

QColor rviz::StatusProperty::statusColor ( Level  level  )  [static]

Return the color appropriate for the given status level.

Returns an invalid QColor for Ok status, meaning we should use the default text color.

Definition at line 69 of file status_property.cpp.

QString rviz::StatusProperty::statusWord ( Level  level  )  [static]

Return the word appropriate for the given status level: "Ok", "Warn", or "Error".

Definition at line 77 of file status_property.cpp.


Member Data Documentation

Definition at line 73 of file status_property.h.

QColor rviz::StatusProperty::status_colors_ = { QColor(), QColor( 195, 180, 0 ), QColor( 178, 23, 46 ) } [static, private]

Definition at line 76 of file status_property.h.

QString rviz::StatusProperty::status_words_ = { "Ok", "Warn", "Error" } [static, private]

Definition at line 77 of file status_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:48 2012