#include <stateVar.h>
Public Member Functions | |
StateVar (const QPoint &position, Editor *parent, const QString l, const QString n, bool dBorder, bool dim) | |
virtual int | getHeight () const |
virtual QString | getTypeName () const |
virtual int | getWidth () const |
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
virtual void | setLabel (const QString &label) |
virtual QPainterPath | shape () const |
export support functions | |
Protected Member Functions | |
virtual void | updateMyPolygon () |
compute states polygon |
Definition at line 6 of file stateVar.h.
StateVar::StateVar | ( | const QPoint & | position, | |
Editor * | parent, | |||
const QString | l, | |||
const QString | n, | |||
bool | dBorder, | |||
bool | dim | |||
) |
all other functionality is in State constructor
Definition at line 8 of file stateVar.cpp.
References updateMyPolygon().
virtual int StateVar::getHeight | ( | ) | const [inline, virtual] |
Implements State.
Definition at line 16 of file stateVar.h.
Referenced by paint(), and updateMyPolygon().
QString StateVar::getTypeName | ( | ) | const [virtual] |
virtual int StateVar::getWidth | ( | ) | const [inline, virtual] |
Implements State.
Definition at line 14 of file stateVar.h.
References StringProcessor::getWidth(), S_W, State::stringProcessor, and VAR_STATE_WIDTH_ADDITION.
Referenced by paint(), and updateMyPolygon().
void StateVar::paint | ( | QPainter * | painter, | |
const QStyleOptionGraphicsItem * | option, | |||
QWidget * | widget | |||
) | [virtual] |
Implements State.
Definition at line 140 of file stateVar.cpp.
References State::boundingRect(), State::checked, State::checkedColor, State::dimmed, State::dimStateFillColor, State::dimStateLabelColor, State::dimStateLineColor, State::dimStateLineStyle, State::doubleBorder, StringProcessor::drawText(), getHeight(), State::getTextAscent(), State::getTextDescent(), State::getTextWidth(), getWidth(), State::m_lineWidth, State::paintSelectionDecoration(), shape(), State::stateFillColor, State::stateFillStatus, State::stateLabelColor, State::stateLineColor, State::stateLineDoubleCoef, State::stateLineDoubleSep, State::stateLineStyle, State::stringProcessor, StringProcessor::text(), VAR_STATE_R_X, and VAR_STATE_R_Y.
void StateVar::setLabel | ( | const QString & | label | ) | [virtual] |
Reimplemented from State.
Definition at line 49 of file stateVar.cpp.
References State::adjustTransitions(), and updateMyPolygon().
QPainterPath StateVar::shape | ( | ) | const [virtual] |
export support functions
implements QGraphicsItems functions
Implements State.
Definition at line 135 of file stateVar.cpp.
References State::myPath.
Referenced by paint().
void StateVar::updateMyPolygon | ( | ) | [protected, virtual] |
compute states polygon
Implements State.
Definition at line 21 of file stateVar.cpp.
References State::doubleBorder, getHeight(), getWidth(), State::m_lineWidth, State::myPath, State::myPolygon, State::stateLineDoubleCoef, State::stateLineDoubleSep, VAR_STATE_R_X, VAR_STATE_R_X_DBL, and VAR_STATE_R_Y.
Referenced by setLabel(), and StateVar().