|
QElectroTech
0.70
|
#include <independenttextitem.h>
Public Types | |
| enum | { Type = UserType + 1005 } |
Public Types inherited from DiagramTextItem | |
| enum | { Type = UserType + 1004 } |
Public Member Functions | |
| IndependentTextItem () | |
| IndependentTextItem (const QString &) | |
| ~IndependentTextItem () override | |
| Destructeur. More... | |
| int | type () const override |
| void | fromXml (const QDomElement &) override |
| QDomElement | toXml (QDomDocument &) const override |
Public Member Functions inherited from DiagramTextItem | |
| DiagramTextItem (QGraphicsItem *=nullptr) | |
| DiagramTextItem::DiagramTextItem. More... | |
| DiagramTextItem (const QString &, QGraphicsItem *=nullptr) | |
| DiagramTextItem::DiagramTextItem. More... | |
| int | type () const override |
| Diagram * | diagram () const |
| DiagramTextItem::diagram. More... | |
| void | edit () |
| Edit the text with HtmlEditor. More... | |
| QPointF | mapMovementToScene (const QPointF &) const |
| QPointF | mapMovementFromScene (const QPointF &) const |
| QPointF | mapMovementToParent (const QPointF &) const |
| QPointF | mapMovementFromParent (const QPointF &) const |
| void | setFont (const QFont &font) |
| void | setColor (const QColor &color) |
| QColor | color () const |
| void | setNoEditable (bool e=true) |
| void | setAlignment (const Qt::Alignment &alignment) |
| Qt::Alignment | alignment () const |
| QRectF | frameRect () const |
| DiagramTextItem::frameRect. More... | |
| void | setHtml (const QString &text) |
| void | setPlainText (const QString &text) |
| bool | isHtml () const |
Protected Member Functions | |
| void | focusOutEvent (QFocusEvent *event) override |
Protected Member Functions inherited from DiagramTextItem | |
| void | paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override |
| DiagramTextItem::paint Draw this text field. This method draw the text by calling QGraphicsTextItem::paint. If text is hovered, this method draw the bounding rect in grey. More... | |
| void | focusInEvent (QFocusEvent *) override |
| DiagramTextItem::focusInEvent. More... | |
| void | focusOutEvent (QFocusEvent *) override |
| DiagramTextItem::focusOutEvent. More... | |
| void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override |
| void | mousePressEvent (QGraphicsSceneMouseEvent *event) override |
| DiagramTextItem::mousePressEvent. More... | |
| void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) override |
| DiagramTextItem::mouseMoveEvent. More... | |
| void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override |
| DiagramTextItem::mouseReleaseEvent. More... | |
| void | hoverEnterEvent (QGraphicsSceneHoverEvent *) override |
| void | hoverLeaveEvent (QGraphicsSceneHoverEvent *) override |
| void | hoverMoveEvent (QGraphicsSceneHoverEvent *) override |
| virtual void | applyRotation (const qreal &) |
| void | prepareAlignment () |
| DiagramTextItem::prepareAlignment Call this function before changing the bounding rect of this text. More... | |
| void | finishAlignment () |
| DiagramTextItem::finishAlignment Call this function after changing the bouding rect of this text to set the position of this text according to the alignment property. More... | |
Additional Inherited Members | |
Signals inherited from DiagramTextItem | |
| void | colorChanged (QColor color) |
| void | alignmentChanged (Qt::Alignment alignment) |
| void | textEdited (const QString &old_str, const QString &new_str) |
| void | fontChanged (QFont font) |
Public Attributes inherited from DiagramTextItem | |
| bool | m_block_alignment = false |
Protected Attributes inherited from DiagramTextItem | |
| bool | m_mouse_hover = false |
| bool | m_first_move = true |
| bool | m_no_editable |
| bool | m_is_html = false |
| QString | m_previous_html_text |
| QString | m_previous_text |
| QPointF | m_mouse_to_origin_movement |
Properties inherited from DiagramTextItem | |
| QColor | color |
| Qt::Alignment | alignment |
| QString | plainText |
| QFont | font |
This class represents an independent text field on a particular diagram. It may be moved, edited, and rotated.
Definition at line 27 of file independenttextitem.h.
| anonymous enum |
| Enumerator | |
|---|---|
| Type | |
Definition at line 39 of file independenttextitem.h.
| IndependentTextItem::IndependentTextItem | ( | ) |
Constructeur
| parent_diagram | Le schema auquel est rattache le champ de texte |
Definition at line 31 of file independenttextitem.cpp.
References QETApp::indiTextsItemFont(), and DiagramTextItem::setFont().
| IndependentTextItem::IndependentTextItem | ( | const QString & | text | ) |
Constructeur
| text | Le texte affiche par le champ de texte |
| parent_diagram | Le schema auquel est rattache le champ de texte |
Definition at line 44 of file independenttextitem.cpp.
|
override |
Destructeur.
Definition at line 49 of file independenttextitem.cpp.
|
overrideprotected |
Definition at line 86 of file independenttextitem.cpp.
References DiagramTextItem::diagram(), DiagramTextItem::focusOutEvent(), DiagramTextItem::m_previous_html_text, and Diagram::undoStack().
|
overridevirtual |
Permet de lire le texte a mettre dans le champ a partir d'un element XML. Cette methode se base sur la position du champ pour assigner ou non la valeur a ce champ.
| e | L'element XML representant le champ de texte |
Implements DiagramTextItem.
Definition at line 58 of file independenttextitem.cpp.
References DiagramTextItem::font, DiagramTextItem::setFont(), and DiagramTextItem::setHtml().
|
overridevirtual |
| document | Le document XML a utiliser |
Reimplemented from DiagramTextItem.
Definition at line 74 of file independenttextitem.cpp.
References QET::correctAngle(), and DiagramTextItem::font.
|
inlineoverride |
Definition at line 40 of file independenttextitem.h.
References Type.
1.8.15