QElectroTech
0.8-dev
|
#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::IndependentTextItem Constructeur. More... | |
~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.
IndependentTextItem::IndependentTextItem | ( | ) |
Constructeur
parent_diagram | Le schema auquel est rattache le champ de texte |
IndependentTextItem::IndependentTextItem | ( | const QString & | text | ) |
IndependentTextItem::IndependentTextItem Constructeur.
text | Le texte affiche par le champ de texte |
|
override |
Destructeur.
|
overrideprotected |
|
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.
|
overridevirtual |
document | Le document XML a utiliser |
Reimplemented from DiagramTextItem.
|
inlineoverride |