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:
blacksun
2018-06-21 18:44:13 +00:00
parent 4cdd17e21f
commit de9096d8a2
4 changed files with 95 additions and 10 deletions

View File

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