summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-21 21:40:46 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-21 21:40:46 (GMT)
commit91215b48022b3b3980960f1b5f301ac84f14d49d (patch)
treec71963ebb5270b0f8a85177c22377b7e625fb994 /src/gui
parent07f131927faa09402589da7b4bfb516482f59e46 (diff)
parentb05e07835c376857da0a0f9cb85bbab001f145dd (diff)
downloadQt-91215b48022b3b3980960f1b5f301ac84f14d49d.zip
Qt-91215b48022b3b3980960f1b5f301ac84f14d49d.tar.gz
Qt-91215b48022b3b3980960f1b5f301ac84f14d49d.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (26 commits) Expand QDeclarativeExtensionPlugin docs Add missing snippet files Expand QtObject doc Indicate default values Use snippets instead to avoid quoting license headers Rename remaining 'wantsFocus'. Bounding rect of text was not always calculated correctly. Add QML tutorials to the tutorials page QML focus API updates. Do not show copyright header in documentation. Ensure redirects (and indeed all reply process) is done in the right thread. Only ignore the same target value for a Behavior when it is running. Fix clock example: make sure hands always moves forward. font.letterSpacing used percentage rather than absolute values. Rewinding AnchorChanges should not make target item's implicit width and height explicit Compile: include <float.h> for usage of FLT_MAX. Restore the FLT_MAX define. Make Item::transformOriginPoint read-only Ensure the boundingRect() of Text is correctly calculated. Better defaults for MouseArea's drag. ...
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp12
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 6249822..56182d1 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1150,6 +1150,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
if (q_ptr == fsi || q_ptr->isAncestorOf(fsi)) {
parentFocusScopeItem = fsi;
p->d_ptr->focusScopeItem = 0;
+ fsi->d_ptr->focusScopeItemChange(false);
}
break;
}
@@ -1182,6 +1183,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
while (p) {
if (p->d_ptr->flags & QGraphicsItem::ItemIsFocusScope) {
p->d_ptr->focusScopeItem = newFocusScopeItem;
+ newFocusScopeItem->d_ptr->focusScopeItemChange(true);
// Ensure the new item is no longer the subFocusItem. The
// only way to set focus on a child of a focus scope is
// by setting focus on the scope itself.
@@ -5587,6 +5589,16 @@ void QGraphicsItemPrivate::subFocusItemChange()
/*!
\internal
+ Subclasses can reimplement this function to be notified when an item
+ becomes a focusScopeItem (or is no longer a focusScopeItem).
+*/
+void QGraphicsItemPrivate::focusScopeItemChange(bool isSubFocusItem)
+{
+}
+
+/*!
+ \internal
+
Subclasses can reimplement this function to be notified when its
siblingIndex order is changed.
*/
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index 5b9a710..d60dffb 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -482,6 +482,7 @@ public:
void clearSubFocus(QGraphicsItem *rootItem = 0);
void resetFocusProxy();
virtual void subFocusItemChange();
+ virtual void focusScopeItemChange(bool isSubFocusItem);
static void children_append(QDeclarativeListProperty<QGraphicsObject> *list, QGraphicsObject *item);
static int children_count(QDeclarativeListProperty<QGraphicsObject> *list);