mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-23 10:30:53 +01:00
Documentation des methodes non documentees
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@84 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -1,25 +1,48 @@
|
||||
#include "elementtextitem.h"
|
||||
|
||||
/**
|
||||
Constructeur
|
||||
@param parent Le QGraphicsItem parent du champ de texte
|
||||
@param scene La scene a laquelle appartient le champ de texte
|
||||
*/
|
||||
ElementTextItem::ElementTextItem(QGraphicsItem *parent, QGraphicsScene *scene) : QGraphicsTextItem(parent, scene) {
|
||||
follow_parent_rotations = false;
|
||||
setTextInteractionFlags(Qt::TextEditorInteraction);
|
||||
}
|
||||
|
||||
/**
|
||||
Constructeur
|
||||
@param parent Le QGraphicsItem parent du champ de texte
|
||||
@param scene La scene a laquelle appartient le champ de texte
|
||||
@param text Le texte affiche par le champ de texte
|
||||
*/
|
||||
ElementTextItem::ElementTextItem(const QString &text, QGraphicsItem *parent, QGraphicsScene *scene) : QGraphicsTextItem(text, parent, scene) {
|
||||
follow_parent_rotations = false;
|
||||
setTextInteractionFlags(Qt::TextEditorInteraction);
|
||||
}
|
||||
|
||||
/**
|
||||
Modifie la position du champ de texte
|
||||
@param pos La nouvelle position du champ de texte
|
||||
*/
|
||||
void ElementTextItem::setPos(const QPointF &pos) {
|
||||
QPointF actual_pos = pos;
|
||||
actual_pos -= QPointF(0.0, boundingRect().height() / 2.0);
|
||||
QGraphicsItem::setPos(actual_pos);
|
||||
}
|
||||
|
||||
/**
|
||||
Modifie la position du champ de texte
|
||||
@param x La nouvelle abscisse du champ de texte
|
||||
@param y La nouvelle ordonnee du champ de texte
|
||||
*/
|
||||
void ElementTextItem::setPos(qreal x, qreal y) {
|
||||
setPos(QPointF(x, y));
|
||||
}
|
||||
|
||||
/**
|
||||
@return La position (bidouillee) du champ de texte
|
||||
*/
|
||||
QPointF ElementTextItem::pos() const {
|
||||
QPointF actual_pos = QGraphicsTextItem::pos();
|
||||
actual_pos += QPointF(0.0, boundingRect().height() / 2.0);
|
||||
|
||||
Reference in New Issue
Block a user