Public Member Functions | Protected Member Functions | Protected Attributes

LabelX Class Reference

#include <label.h>

Collaboration diagram for LabelX:

List of all members.

Public Member Functions

 LabelX (Transition *tr, const QString &text, bool leftOriented, int fontSize=EDGE_LABEL_SIZE *DEF_LABEL_SCALE, const QColor &color=QColor("black"), float posParam=DEF_EDGE_LAB_POS, const QPointF &pos=QPoint(0, 0))
 ~LabelX ()
virtual QRectF boundingRect () const
const QColor & color () const
StringProcessor::TCharacterList getCharacterList () const
QStringList getCharacters () const
int getHeight () const
TransitiongetTransition ()
int getWidth () const
bool left () const
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
float posParam () const
void setColor (const QColor &color)
void setFontSize (int fontSize)
void setLeftOriented (bool leftOriented)
void setPosParam (float posParam)
bool setText (const QString &text)
 check brace matching and if it's incorrect, change isn't applied
virtual QPainterPath shape () const
const QString & text () const

Protected Member Functions

virtual void mousePressEvent (QGraphicsSceneMouseEvent *event)

Protected Attributes

QColor m_color
int m_fontSize
bool m_leftOriented
float m_posParam
StringProcessorm_pStringProcessor
Transitionm_pTransition
QString m_text

Detailed Description

Definition at line 9 of file label.h.


Constructor & Destructor Documentation

LabelX::LabelX ( Transition tr,
const QString &  text,
bool  leftOriented,
int  fontSize = EDGE_LABEL_SIZE*DEF_LABEL_SCALE,
const QColor &  color = QColor("black"),
float  posParam = DEF_EDGE_LAB_POS,
const QPointF &  pos = QPoint(0,0) 
)

Definition at line 14 of file label.cpp.

References m_fontSize, m_pStringProcessor, and m_text.

LabelX::~LabelX (  ) 

Definition at line 27 of file label.cpp.

References DBGLOG, and m_pStringProcessor.


Member Function Documentation

QRectF LabelX::boundingRect (  )  const [virtual]

Definition at line 33 of file label.cpp.

References StringProcessor::getHeight(), StringProcessor::getWidth(), and m_pStringProcessor.

Referenced by Transition::boundingRect(), Transition::createShape(), and shape().

Here is the call graph for this function:

Here is the caller graph for this function:

const QColor& LabelX::color (  )  const [inline]

Definition at line 27 of file label.h.

References m_color.

StringProcessor::TCharacterList LabelX::getCharacterList (  )  const

Support method, returns list of CharcterInfo parsed from label text.

See also:
StringProcessor::getCharacterList()

Definition at line 97 of file label.cpp.

References StringProcessor::getCharacterList(), and m_pStringProcessor.

Referenced by Transition::getCharacters().

Here is the call graph for this function:

Here is the caller graph for this function:

QStringList LabelX::getCharacters (  )  const

Support method, returns list of used characters in label text.

See also:
StringProcessor::getCharacters()

Definition at line 91 of file label.cpp.

References StringProcessor::getCharacters(), and m_pStringProcessor.

Referenced by Transition::getCharactersOccurences().

Here is the call graph for this function:

Here is the caller graph for this function:

int LabelX::getHeight (  )  const

Definition at line 79 of file label.cpp.

References StringProcessor::getHeight(), and m_pStringProcessor.

Referenced by paint(), TransitionVCurve::setLabelPosition(), TransitionVArc::setLabelPosition(), TransitionLoop::setLabelPosition(), TransitionLine::setLabelPosition(), and TransitionArc::setLabelPosition().

Here is the call graph for this function:

Here is the caller graph for this function:

Transition* LabelX::getTransition (  )  [inline]

Definition at line 41 of file label.h.

References m_pTransition.

Referenced by Editor::addToListAndScene(), NextLabelEditCommand::redo(), Editor::removeFromListAndScene(), and NextLabelEditCommand::undo().

Here is the caller graph for this function:

int LabelX::getWidth (  )  const

Definition at line 74 of file label.cpp.

References StringProcessor::getWidth(), and m_pStringProcessor.

Referenced by TransitionVCurve::setLabelPosition(), TransitionVArc::setLabelPosition(), TransitionLoop::setLabelPosition(), TransitionLine::setLabelPosition(), and TransitionArc::setLabelPosition().

Here is the call graph for this function:

Here is the caller graph for this function:

bool LabelX::left (  )  const [inline]

Definition at line 30 of file label.h.

References m_leftOriented.

Referenced by NextLabelsDialog::editLabel(), NextLabelsDialog::getListLine(), NextLabelEditCommand::NextLabelEditCommand(), and TransitionSerializer::TransitionSerializer().

Here is the caller graph for this function:

void LabelX::mousePressEvent ( QGraphicsSceneMouseEvent *  event  )  [protected, virtual]

Definition at line 103 of file label.cpp.

void LabelX::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget 
) [virtual]

Definition at line 51 of file label.cpp.

References StringProcessor::drawText(), getHeight(), m_color, m_pStringProcessor, and m_text.

Here is the call graph for this function:

float LabelX::posParam (  )  const [inline]
void LabelX::setColor ( const QColor &  color  )  [inline]

Definition at line 28 of file label.h.

References m_color.

Referenced by Transition::addNextLabel(), Transition::setChecked(), and Transition::setDimmed().

Here is the caller graph for this function:

void LabelX::setFontSize ( int  fontSize  ) 

Definition at line 84 of file label.cpp.

References m_fontSize, m_pStringProcessor, and StringProcessor::setFontSize().

Referenced by Transition::setEdgeLabelScale().

Here is the call graph for this function:

Here is the caller graph for this function:

void LabelX::setLeftOriented ( bool  leftOriented  )  [inline]

Definition at line 31 of file label.h.

References m_leftOriented.

Referenced by NextLabelEditCommand::redo(), and NextLabelEditCommand::undo().

Here is the caller graph for this function:

void LabelX::setPosParam ( float  posParam  )  [inline]
bool LabelX::setText ( const QString &  text  ) 

check brace matching and if it's incorrect, change isn't applied

Definition at line 61 of file label.cpp.

References m_pStringProcessor, m_text, StringProcessor::setText(), and StringProcessor::text().

Referenced by NextLabelEditCommand::redo(), Transition::setLabelText(), and NextLabelEditCommand::undo().

Here is the call graph for this function:

Here is the caller graph for this function:

QPainterPath LabelX::shape (  )  const [virtual]

Definition at line 43 of file label.cpp.

References boundingRect().

Here is the call graph for this function:

const QString& LabelX::text (  )  const [inline]

Member Data Documentation

QColor LabelX::m_color [protected]

Definition at line 60 of file label.h.

Referenced by color(), paint(), and setColor().

int LabelX::m_fontSize [protected]

Definition at line 59 of file label.h.

Referenced by LabelX(), and setFontSize().

bool LabelX::m_leftOriented [protected]

Definition at line 58 of file label.h.

Referenced by left(), and setLeftOriented().

float LabelX::m_posParam [protected]

Definition at line 61 of file label.h.

Referenced by posParam(), and setPosParam().

Definition at line 52 of file label.h.

Referenced by getTransition().

QString LabelX::m_text [protected]

Definition at line 57 of file label.h.

Referenced by LabelX(), paint(), setText(), and text().


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