Frapper  1.0a
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
Frapper::ParameterTypeIcon Class Reference

Class representing an icon representing a parameter type. More...

#include <ParameterTypeIcon.h>

Inheritance diagram for Frapper::ParameterTypeIcon:
Inheritance graph
[legend]
Collaboration diagram for Frapper::ParameterTypeIcon:
Collaboration graph
[legend]

Public Member Functions

 ParameterTypeIcon (const QColor &color)
 Constructor of the ParameterTypeIcon class.
 
virtual ~ParameterTypeIcon ()
 Destructor of the ParameterTypeIcon class.
 
void paint (QPainter *painter, const QRect &rect, Qt::Alignment alignment=Qt::AlignCenter, Mode mode=Normal, State state=Off) const
 Uses the given painter to paint the icon with specified alignment, required mode, and state into the given rectangle.
 

Static Public Member Functions

static QIcon getIcon (const QString &parameterTypeName)
 Returns the icon for the parameter type with the given name. Creates the icon if it doesn't exist yet and stores it in the parameter type icon cache.
 

Private Attributes

QColor m_color
 The color to use when painting the icon.
 

Static Private Attributes

static QMap< QString, QIcon > s_iconCache
 Map for action icons by parameter type name.
 

Detailed Description

Class representing an icon representing a parameter type.

Inheritance Diagram
dot_inline_dotgraph_9.png
[legend]

Constructor & Destructor Documentation

Frapper::ParameterTypeIcon::ParameterTypeIcon ( const QColor &  color)

Constructor of the ParameterTypeIcon class.

Constructors and Destructors.

Parameters
colorThe color for the parameter type icon.

Constructor of the ParameterTypeIcon class.

Parameters
colorThe color for the parameter type icon.
Frapper::ParameterTypeIcon::~ParameterTypeIcon ( )
virtual

Destructor of the ParameterTypeIcon class.

Member Function Documentation

QIcon Frapper::ParameterTypeIcon::getIcon ( const QString &  parameterTypeName)
static

Returns the icon for the parameter type with the given name. Creates the icon if it doesn't exist yet and stores it in the parameter type icon cache.

Private Static Functions.

Parameters
parameterTypeNameThe name of the parameter type to return the icon for.
Returns
The icon that represents the parameter type with the given name.

Returns the icon for the parameter type with the given name. Creates the icon if it doesn't exist yet and stores it in the parameter type icon cache.

Parameters
parameterTypeNameThe name of the parameter type to return the icon for.
Returns
The icon that represents the parameter type with the given name.
void Frapper::ParameterTypeIcon::paint ( QPainter *  painter,
const QRect &  rect,
Qt::Alignment  alignment = Qt::AlignCenter,
Mode  mode = Normal,
State  state = Off 
) const

Uses the given painter to paint the icon with specified alignment, required mode, and state into the given rectangle.

Public Functions.

Parameters
painterThe object to use for painting.
rectThe rectangle in which to paint.
alignmentThe alignment to use for painting.
modeThe mode for which to paint the icon.
stateThe state in which to paint the icon.

Uses the given painter to paint the icon with specified alignment, required mode, and state into the given rectangle.

Parameters
painterThe object to use for painting.
rectThe rectangle in which to paint.
alignmentThe alignment to use for painting.
modeThe mode for which to paint the icon.
stateThe state in which to paint the icon.

Member Data Documentation

QMap< QString, QIcon > Frapper::ParameterTypeIcon::s_iconCache
staticprivate

Map for action icons by parameter type name.

Private Static Data.

QColor Frapper::ParameterTypeIcon::m_color
private

The color to use when painting the icon.


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