summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicswidget.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-03-29 08:45:22 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-03-29 08:45:22 (GMT)
commitde306893b464ed0fa00f98488912fd6269713519 (patch)
treeb1ef87ee3e5afa0722c9da87a45e11ff3f620fdc /src/gui/graphicsview/qgraphicswidget.cpp
parent4fb6cae4dd0c6a90008780df606abb8a9e73cb2c (diff)
parent473da75ed84651c70ae0d10e23f09e1a0e4ae799 (diff)
downloadQt-de306893b464ed0fa00f98488912fd6269713519.zip
Qt-de306893b464ed0fa00f98488912fd6269713519.tar.gz
Qt-de306893b464ed0fa00f98488912fd6269713519.tar.bz2
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts: mkspecs/common/symbian/symbian.conf qmake/generators/symbian/symmake.cpp src/3rdparty/webkit/WebCore/WebCore.pro
Diffstat (limited to 'src/gui/graphicsview/qgraphicswidget.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicswidget.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp
index a257e0d..c5ec01c 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
@@ -334,7 +342,7 @@ void QGraphicsWidget::resize(const QSizeF &size)
A side effect of calling this function is that the widget will receive
a move event and a resize event. Also, if the widget has a layout
assigned, the layout will activate.
-
+
\sa geometry(), resize()
*/
void QGraphicsWidget::setGeometry(const QRectF &rect)
@@ -391,6 +399,10 @@ void QGraphicsWidget::setGeometry(const QRectF &rect)
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);
}
}
@@ -568,7 +580,7 @@ void QGraphicsWidget::getWindowFrameMargins(qreal *left, qreal *top, qreal *righ
void QGraphicsWidget::unsetWindowFrameMargins()
{
Q_D(QGraphicsWidget);
- if ((d->windowFlags & Qt::Window) && (d->windowFlags & Qt::WindowType_Mask) != Qt::Popup &&
+ if ((d->windowFlags & Qt::Window) && (d->windowFlags & Qt::WindowType_Mask) != Qt::Popup &&
(d->windowFlags & Qt::WindowType_Mask) != Qt::ToolTip && !(d->windowFlags & Qt::FramelessWindowHint)) {
QStyleOptionTitleBar bar;
d->initStyleOptionTitleBar(&bar);
@@ -1175,7 +1187,7 @@ bool QGraphicsWidget::sceneEvent(QEvent *event)
Returns true if \a event has been recognized and processed; otherwise,
returns false.
-
+
\sa event()
*/
bool QGraphicsWidget::windowFrameEvent(QEvent *event)
@@ -1232,7 +1244,7 @@ Qt::WindowFrameSection QGraphicsWidget::windowFrameSectionAt(const QPointF &pos)
const QRectF r = windowFrameRect();
if (!r.contains(pos))
return Qt::NoSection;
-
+
const qreal left = r.left();
const qreal top = r.top();
const qreal right = r.right();
@@ -2358,5 +2370,5 @@ void QGraphicsWidget::dumpFocusChain()
#endif
QT_END_NAMESPACE
-
+
#endif //QT_NO_GRAPHICSVIEW