#include <label.h>
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 |
Transition * | getTransition () |
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 |
StringProcessor * | m_pStringProcessor |
Transition * | m_pTransition |
QString | m_text |
Definition at line 9 of file label.h.
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.
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().
const QColor& LabelX::color | ( | ) | const [inline] |
StringProcessor::TCharacterList LabelX::getCharacterList | ( | ) | const |
Support method, returns list of CharcterInfo parsed from label text.
Definition at line 97 of file label.cpp.
References StringProcessor::getCharacterList(), and m_pStringProcessor.
Referenced by Transition::getCharacters().
QStringList LabelX::getCharacters | ( | ) | const |
Support method, returns list of used characters in label text.
Definition at line 91 of file label.cpp.
References StringProcessor::getCharacters(), and m_pStringProcessor.
Referenced by Transition::getCharactersOccurences().
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().
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().
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().
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().
void LabelX::mousePressEvent | ( | QGraphicsSceneMouseEvent * | event | ) | [protected, virtual] |
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.
float LabelX::posParam | ( | ) | const [inline] |
Definition at line 33 of file label.h.
References m_posParam.
Referenced by NextLabelsDialog::editLabel(), Transition::getLabelPos(), NextLabelsDialog::getListLine(), TransitionVCurve::getVCCommand(), TransitionVArc::getVCCommand(), TransitionLoop::getVCCommand(), TransitionLine::getVCCommand(), TransitionArc::getVCCommand(), NextLabelEditCommand::NextLabelEditCommand(), TransitionVCurve::setLabelPosition(), TransitionVArc::setLabelPosition(), TransitionLoop::setLabelPosition(), TransitionLine::setLabelPosition(), TransitionArc::setLabelPosition(), and TransitionSerializer::TransitionSerializer().
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().
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().
void LabelX::setLeftOriented | ( | bool | leftOriented | ) | [inline] |
Definition at line 31 of file label.h.
References m_leftOriented.
Referenced by NextLabelEditCommand::redo(), and NextLabelEditCommand::undo().
void LabelX::setPosParam | ( | float | posParam | ) | [inline] |
Definition at line 34 of file label.h.
References m_posParam.
Referenced by NextLabelEditCommand::redo(), Transition::setLabelPos(), TransitionArc::TransitionArc(), TransitionLine::TransitionLine(), TransitionLoop::TransitionLoop(), TransitionVArc::TransitionVArc(), TransitionVCurve::TransitionVCurve(), and NextLabelEditCommand::undo().
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().
QPainterPath LabelX::shape | ( | ) | const [virtual] |
Definition at line 43 of file label.cpp.
References boundingRect().
const QString& LabelX::text | ( | ) | const [inline] |
Definition at line 23 of file label.h.
References m_text.
Referenced by Transition::createShape(), NextLabelsDialog::editLabel(), Transition::getLabelText(), NextLabelsDialog::getListLine(), TransitionVCurve::getVCCommand(), TransitionVArc::getVCCommand(), TransitionLoop::getVCCommand(), TransitionLine::getVCCommand(), TransitionArc::getVCCommand(), NextLabelEditCommand::NextLabelEditCommand(), Transition::setSelected(), and TransitionSerializer::TransitionSerializer().
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().
StringProcessor* LabelX::m_pStringProcessor [protected] |
Definition at line 53 of file label.h.
Referenced by boundingRect(), getCharacterList(), getCharacters(), getHeight(), getWidth(), LabelX(), paint(), setFontSize(), setText(), and ~LabelX().
Transition* LabelX::m_pTransition [protected] |
Definition at line 52 of file label.h.
Referenced by getTransition().
QString LabelX::m_text [protected] |