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:
xavierqet
2007-04-09 02:56:47 +00:00
parent 79e057c186
commit 7d25e6091f
20 changed files with 743 additions and 296 deletions

View File

@@ -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);