![]() |
QElectroTech
0.8-dev
|
#include <parttext.h>


Public Types | |
| enum | { Type = UserType + 1107 } |
Public Slots | |
| void | adjustItemPosition (int=0) |
| void | setEditable (bool) |
| void | startEdition () |
| void | endEdition () |
Signals | |
| void | fontChanged (const QFont &font) |
| void | colorChanged (const QColor &color) |
| void | plainTextChanged (const QString &text) |
Public Member Functions | |
| PartText (QETElementEditor *, QGraphicsItem *=nullptr) | |
| ~PartText () override | |
| Destructeur. More... | |
| int | type () const override |
| QString | name () const override |
| QString | xmlName () const override |
| void | fromXml (const QDomElement &) override |
| const QDomElement | toXml (QDomDocument &) const override |
| void | setRotation (qreal angle) |
| bool | isUseless () const override |
| QRectF | sceneGeometricRect () const override |
| void | startUserTransformation (const QRectF &) override |
| void | handleUserTransformation (const QRectF &, const QRectF &) override |
| void | setProperty (const char *name, const QVariant &value) override |
| QVariant | property (const char *name) const override |
| qreal | realSize () const |
| void | setRealSize (qreal rs) |
| void | setDefaultTextColor (const QColor &color) |
| void | setPlainText (const QString &text) |
| void | setFont (const QFont &font) |
Public Member Functions inherited from CustomElementPart | |
| CustomElementPart (QETElementEditor *editor) | |
| CustomElementPart Constructor. More... | |
| virtual | ~CustomElementPart () |
| ~CustomElementPart Destructor More... | |
| virtual QETElementEditor * | elementEditor () const |
| virtual void | updateCurrentPartEditor () const |
| virtual ElementScene * | elementScene () const |
| virtual QUndoStack & | undoStack () const |
| virtual QGraphicsItem * | toItem () |
| virtual QET::ScalingMethod | preferredScalingMethod () const |
Protected Member Functions | |
| void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) override |
| void | mousePressEvent (QGraphicsSceneMouseEvent *event) override |
| void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override |
| void | focusInEvent (QFocusEvent *) override |
| PartText::focusInEvent. More... | |
| void | focusOutEvent (QFocusEvent *) override |
| PartText::focusOutEvent. More... | |
| void | keyPressEvent (QKeyEvent *) override |
| PartText::keyPressEvent Used to handle the escape key when the event is delivered to the field, not to the decorator. More... | |
| void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *) override |
| QVariant | itemChange (GraphicsItemChange, const QVariant &) override |
| QRectF | boundingRect () const override |
Protected Member Functions inherited from CustomElementPart | |
| QList< QPointF > | mapPoints (const QRectF &, const QRectF &, const QList< QPointF > &) |
Properties | |
| qreal | real_size |
| QColor | color |
| QString | text |
| QFont | font |
Private Member Functions | |
| PartText (const PartText &) | |
| QPointF | margin () const |
Private Attributes | |
| QString | previous_text |
| qreal | real_font_size_ |
| QPointF | saved_point_ |
| qreal | saved_font_size_ |
| QGraphicsItem * | decorator_ |
| QPointF | m_origine_pos |
This class represents an static text primitive which may be used to compose the drawing of an electrical element within the element editor.
| PartText::PartText | ( | QETElementEditor * | editor, |
| QGraphicsItem * | parent = nullptr |
||
| ) |
Constructeur
| editor | L'editeur d'element concerne |
| parent | Le QGraphicsItem parent de ce texte statique |

|
override |
Destructeur.
|
private |
|
slot |
Cette methode s'assure que la position du champ de texte est coherente en repositionnant son origine (c-a-d le milieu du bord gauche du champ de texte) a la position originale. Cela est notamment utile lorsque le champ de texte est agrandi ou retreci verticalement (ajout ou retrait de lignes).
| new_block_count | Nombre de blocs dans le PartText |


|
overrideprotected |
|
signal |

|
slot |
End text edition, potentially generating a ChangePartCommand if the text has changed.


|
overrideprotected |
| e | : The QFocusEvent object describing the focus gain. Start text edition when the item gains focus. |

|
overrideprotected |
| e | : The QFocusEvent object describing the focus loss. End text edition when the item loses focus. |

|
signal |

|
overridevirtual |
Importe les proprietes d'un texte statique depuis un element XML
| xml_element | Element XML a lire |
Implements CustomElementPart.

|
overridevirtual |
Handle the user-induced transformation from initial_selection_rect to new_selection_rect
Implements CustomElementPart.

|
overridevirtual |
Implements CustomElementPart.
|
overrideprotected |
Gere les changements intervenant sur cette partie
| change | Type de changement |
| value | Valeur numerique relative au changement |

|
overrideprotected |
PartText::keyPressEvent Used to handle the escape key when the event is delivered to the field, not to the decorator.
| event |

|
private |

|
overrideprotected |
Permet a l'element texte de devenir editable lorsqu'on double-clique dessus
| e | Le QGraphicsSceneMouseEvent qui decrit le double-clic |

|
overrideprotected |

|
overrideprotected |
|
overrideprotected |

|
inlineoverridevirtual |
Implements CustomElementPart.

|
signal |

|
inlineoverridevirtual |
Get the current value of a specific primitive property
Implements CustomElementPart.

|
inline |
|
overridevirtual |
Implements CustomElementPart.
| void PartText::setDefaultTextColor | ( | const QColor & | color | ) |

|
slot |
| editable | Whether this text item should be interactively editable. |

| void PartText::setFont | ( | const QFont & | font | ) |

| void PartText::setPlainText | ( | const QString & | text | ) |

|
inlineoverridevirtual |
Set a specific property of the primitive
Implements CustomElementPart.


|
inline |
|
inline |


|
slot |
Start text edition by storing the former value of the text.

|
overridevirtual |
Start the user-induced transformation, provided this primitive is contained within the rect bounding rectangle.
Implements CustomElementPart.
|
overridevirtual |
Exporte le texte statique en XML
| xml_document | Document XML a utiliser pour creer l'element XML |
Implements CustomElementPart.

|
inlineoverride |
Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartText.
|
inlineoverridevirtual |
Implements CustomElementPart.

|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
1.8.18