summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicswidget.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-03-31 10:12:43 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-03-31 10:12:43 (GMT)
commit93135ba7f52e0ccbbcd8bda390a69d089da62b83 (patch)
treeedbdf52864f6e430aabc876316c9f29fdc66c019 /src/gui/graphicsview/qgraphicswidget.cpp
parent0c439d67f567ba2e7a1b9ada4e3953e5e598f168 (diff)
downloadQt-93135ba7f52e0ccbbcd8bda390a69d089da62b83.zip
Qt-93135ba7f52e0ccbbcd8bda390a69d089da62b83.tar.gz
Qt-93135ba7f52e0ccbbcd8bda390a69d089da62b83.tar.bz2
Revert 4.6 commits that shouldn't be in 4.7.
Commits reverted: 880e4935410769b8337d75f219bef70493c4bb2c 82a306e7dda06909801f576bbbbebb59dc41c563 6cb935dd89a391f792f8ad42012b5c7c38712f17 ebd1c45822aca087be994c898cfb01cd41599429 4e4c0055d59978850796ff8c1b5015e17459e8d2
Diffstat (limited to 'src/gui/graphicsview/qgraphicswidget.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicswidget.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp
index edb648b..8e439be 100644
--- a/src/gui/graphicsview/qgraphicswidget.cpp
+++ b/src/gui/graphicsview/qgraphicswidget.cpp
@@ -324,6 +324,14 @@ void QGraphicsWidget::resize(const QSizeF &size)
*/
/*!
+
+ \fn QGraphicsWidget::geometryChanged()
+
+ This signal gets emitted whenever the geometry of the item changes
+ \internal
+*/
+
+/*!
\property QGraphicsWidget::geometry
\brief the geometry of the widget
@@ -384,13 +392,17 @@ void QGraphicsWidget::setGeometry(const QRectF &rect)
}
QSizeF oldSize = size();
QGraphicsLayoutItem::setGeometry(newGeom);
-
+ emit geometryChanged();
// Send resize event
bool resized = newGeom.size() != oldSize;
if (resized) {
QGraphicsSceneResizeEvent re;
re.setOldSize(oldSize);
re.setNewSize(newGeom.size());
+ if (oldSize.width() != newGeom.size().width())
+ emit widthChanged();
+ if (oldSize.height() != newGeom.size().height())
+ emit heightChanged();
QApplication::sendEvent(this, &re);
}
}
@@ -795,6 +807,7 @@ void QGraphicsWidget::setLayout(QGraphicsLayout *l)
l->setParentLayoutItem(this);
l->d_func()->reparentChildItems(this);
l->invalidate();
+ emit layoutChanged();
}
/*!