Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Private Attributes | Static Private Attributes
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.
QIcon statusIcon (Level level) const
 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_

Private Attributes

QIcon status_icons_ [3]

Static Private Attributes

static QColor status_colors_ [3] = { QColor(), QColor( 192, 128, 0 ), QColor( 192, 32, 32 ) }
static QString status_words_ [3] = { "Ok", "Warn", "Error" }

Detailed Description

Definition at line 39 of file status_property.h.


Member Enumeration Documentation

Enumerator:
Ok 
Warn 
Error 

Definition at line 43 of file status_property.h.


Constructor & Destructor Documentation

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

Definition at line 43 of file status_property.cpp.


Member Function Documentation

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

Definition at line 72 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 59 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 72 of file status_property.cpp.

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

Reimplemented in rviz::StatusList.

Definition at line 98 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 53 of file status_property.cpp.

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 78 of file status_property.cpp.

QIcon rviz::StatusProperty::statusIcon ( Level  level) const

Definition at line 84 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 92 of file status_property.cpp.


Member Data Documentation

Definition at line 75 of file status_property.h.

QColor rviz::StatusProperty::status_colors_ = { QColor(), QColor( 192, 128, 0 ), QColor( 192, 32, 32 ) } [static, private]

Definition at line 78 of file status_property.h.

Definition at line 80 of file status_property.h.

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

Definition at line 79 of file status_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:29