mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-08 14:49:58 +01:00
Widget used to edit text item group can edit the pos of the group.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5408 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -465,6 +465,26 @@ void ElementTextItemGroup::setRotation(qreal angle)
|
||||
emit rotationChanged(angle);
|
||||
}
|
||||
|
||||
void ElementTextItemGroup::setPos(const QPointF &pos)
|
||||
{
|
||||
QPointF old_pos = this->pos();
|
||||
QGraphicsItemGroup::setPos(pos);
|
||||
if (old_pos.x() != this->pos().x())
|
||||
emit xChanged();
|
||||
if (old_pos.y() != this->pos().y())
|
||||
emit yChanged();
|
||||
}
|
||||
|
||||
void ElementTextItemGroup::setPos(qreal x, qreal y)
|
||||
{
|
||||
QPointF old_pos = this->pos();
|
||||
QGraphicsItemGroup::setPos(x,y);
|
||||
if (old_pos.x() != this->pos().x())
|
||||
emit xChanged();
|
||||
if (old_pos.y() != this->pos().y())
|
||||
emit yChanged();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementTextItemGroup::mousePressEvent
|
||||
* @param event
|
||||
|
||||
Reference in New Issue
Block a user