summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/declarative/contacts/contacts.qml4
-rw-r--r--doc/src/declarative/elements.qdoc2
-rw-r--r--doc/src/declarative/focus.qdoc38
-rw-r--r--doc/src/tutorials/declarative.qdoc4
-rw-r--r--examples/declarative/tutorials/contacts/1_Drawing_and_Animation/GroupBox.qml2
-rw-r--r--examples/declarative/tutorials/contacts/2_Reuse/GroupBox.qml2
-rw-r--r--examples/declarative/tutorials/contacts/3_Collections/GroupBox.qml2
-rw-r--r--src/declarative/fx/fx.pri4
-rw-r--r--src/declarative/fx/qfxfocusscope.cpp (renamed from src/declarative/fx/qfxfocusrealm.cpp)18
-rw-r--r--src/declarative/fx/qfxfocusscope.h (renamed from src/declarative/fx/qfxfocusrealm.h)14
-rw-r--r--tools/qmldebugger/canvasscene.cpp2
11 files changed, 46 insertions, 46 deletions
diff --git a/demos/declarative/contacts/contacts.qml b/demos/declarative/contacts/contacts.qml
index ecafd20..353040c 100644
--- a/demos/declarative/contacts/contacts.qml
+++ b/demos/declarative/contacts/contacts.qml
@@ -227,7 +227,7 @@ Rect {
autoHighlight: true
focus: false
}
- FocusRealm {
+ FocusScope {
id: newContactWrapper
anchors.fill: contactListView
opacity: 0
@@ -257,7 +257,7 @@ Rect {
}
}
}
- FocusRealm {
+ FocusScope {
id: searchBarWrapper
height: 30
anchors.bottom: parent.bottom
diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc
index 63cd377..68db351 100644
--- a/doc/src/declarative/elements.qdoc
+++ b/doc/src/declarative/elements.qdoc
@@ -81,7 +81,7 @@ The following table lists the Qml elements provided by the Qt Declarative module
\list
\o \l MouseRegion
\o \l KeyActions
-\o \l FocusRealm
+\o \l FocusScope
\o \l KeyProxy
\endlist
diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc
index e5c181d..60311da 100644
--- a/doc/src/declarative/focus.qdoc
+++ b/doc/src/declarative/focus.qdoc
@@ -6,7 +6,7 @@
When a key is pressed or released, a key event is generated and delivered to the
focused fluid UI \l Item. To facilitate the construction of reusable components
and to address some of the cases unique to fluid UIs, the fluid UI atoms add a
-"realm" based extension to Qt's traditional keyboard focus model.
+"scope" based extension to Qt's traditional keyboard focus model.
\section1 Key Handling Overview
@@ -44,7 +44,7 @@ Text {
}
\endcode
-\section1 Acquiring Focus and Focus Realms
+\section1 Acquiring Focus and Focus Scopes
An \l Item requests focus by setting the \c {Item::focus} property to true.
@@ -135,17 +135,17 @@ of code knows everything about the other, which is exactly how it should be.
To solve this problem - allowing components to care about what they know about
and ignore everything else - the fluid UI atoms introduce a concept known as a
-\e {focus realm}. For existing Qt users, a \e {focus realm} is like an
-automatic focus proxy. A \e {focus realm} is created using the \l FocusRealm
+\e {focus scope}. For existing Qt users, a \e {focus scope} is like an
+automatic focus proxy. A \e {focus scope} is created using the \l FocusScope
element.
-In the next example, a \l FocusRealm is added to the component, and the visual
+In the next example, a \l FocusScope is added to the component, and the visual
result shown.
\table
\row
\o \code
-FocusRealm {
+FocusScope {
width: 240; height: 25
Rect {
color: "lightsteelblue"; width: 240; height: 25
@@ -162,12 +162,12 @@ FocusRealm {
\o \image declarative-qmlfocus2.png
\endtable
-Conceptually \e {focus realms} are quite simple.
+Conceptually \e {focus scopes} are quite simple.
\list
-\o Within each \e {focus realm} one element may have \c {Item::focus} set to true. If more than one \l Item has the \c {Item::focus} property set, the first is selected and the others are unset, just like when there are no \e {focus realms}.
-\o When a \e {focus realm} receives \e {active focus}, the contained element with \c {Item::focus} set (if any) also gets \e {active focus}. If this element is
-also a \l FocusRealm, the proxying behaviour continues. Both the
-\e {focus realm} and the sub-focused item will have \c {Item::activeFocus} set.
+\o Within each \e {focus scope} one element may have \c {Item::focus} set to true. If more than one \l Item has the \c {Item::focus} property set, the first is selected and the others are unset, just like when there are no \e {focus scopes}.
+\o When a \e {focus scope} receives \e {active focus}, the contained element with \c {Item::focus} set (if any) also gets \e {active focus}. If this element is
+also a \l FocusScope, the proxying behaviour continues. Both the
+\e {focus scope} and the sub-focused item will have \c {Item::activeFocus} set.
\endlist
So far the example has the second component statically selected. It is trivial
@@ -185,7 +185,7 @@ Rect {
}
\endcode
\o \code
-FocusRealm {
+FocusScope {
id: Page; width: 240; height: 25
MyWidget { focus: true }
MouseRegion { anchors.fill: parent; onClicked: { Page.focus = true } }
@@ -200,14 +200,14 @@ When a fluid UI atom explicitly relinquishes focus (by setting its
does not automatically select another element to receive focus. That is, it
is possible for there to be no currently \e {active focus}.
-\section1 Advanced uses of Focus Realms
+\section1 Advanced uses of Focus Scopes
-Focus realms allow focus to allocation to be easily partitioned. Several
+Focus scopes allow focus to allocation to be easily partitioned. Several
fluid UI atoms use it to this effect.
-\l ListView, for example, is itself a focus realm. Generally this isn't
+\l ListView, for example, is itself a focus scope. Generally this isn't
noticable as \l ListView doesn't usually have manually added visual children.
-By being a focus realm, \l ListView can focus the current list item without
+By being a focus scope, \l ListView can focus the current list item without
worrying about how that will effect the rest of the application. This allows
the current item delegate to react to key presses.
@@ -227,7 +227,7 @@ Rect {
ListElement { name: "John" }
ListElement { name: "Michael" }
}
- delegate: FocusRealm {
+ delegate: FocusScope {
width: contents.width; height: contents.height
Text { text: name }
KeyActions { return: "print(name)"; focus: true }
@@ -240,10 +240,10 @@ Rect {
While the example is simple, there's a lot going on behind the scenes. Whenever
the current item changes, the \l ListView sets the delegate's \c {Item::focus}
-property. As the \l ListView is a \e {focus realm}, this doesn't effect the
+property. As the \l ListView is a \e {focus scope}, this doesn't effect the
rest of the application. However, if the \l ListView itself has
\e {active focus} this causes the delegate itself to receive \e {active focus}.
-In this example, the root element of the delegate is also a \e {focus realm},
+In this example, the root element of the delegate is also a \e {focus scope},
which in turn gives \e {active focus} to the \c {KeyActions} element that
actually performs the work of handling the \e {Return} key.
diff --git a/doc/src/tutorials/declarative.qdoc b/doc/src/tutorials/declarative.qdoc
index b7a4d7d..e848dfa 100644
--- a/doc/src/tutorials/declarative.qdoc
+++ b/doc/src/tutorials/declarative.qdoc
@@ -495,7 +495,7 @@
For an item to have key focus in QML it is required that:
\list
- \o If there is a FocusRealm ancestor of the component that it has focus as well.
+ \o If there is a FocusScope ancestor of the component that it has focus as well.
\o That it is the most recent component within the focus realms descendent's
to receive focus
\endlist
@@ -505,7 +505,7 @@
the components parent, which in turn will pass keys it doesn't handle up to its
own ancestors.
- Some components such as ListView components are also FocusRealm components, as they
+ Some components such as ListView components are also FocusScope components, as they
handle focus among the child list items.
At this stage of the tutorial it is sufficient to use the setting of 'focus'
diff --git a/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/GroupBox.qml b/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/GroupBox.qml
index d3f626f..c607e75 100644
--- a/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/GroupBox.qml
+++ b/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/GroupBox.qml
@@ -1,6 +1,6 @@
import Qt 4.6
-FocusRealm {
+FocusScope {
id: groupBox
width: Math.max(270, subItem.width+40)
height: Math.max(70, subItem.height+40)
diff --git a/examples/declarative/tutorials/contacts/2_Reuse/GroupBox.qml b/examples/declarative/tutorials/contacts/2_Reuse/GroupBox.qml
index d3f626f..c607e75 100644
--- a/examples/declarative/tutorials/contacts/2_Reuse/GroupBox.qml
+++ b/examples/declarative/tutorials/contacts/2_Reuse/GroupBox.qml
@@ -1,6 +1,6 @@
import Qt 4.6
-FocusRealm {
+FocusScope {
id: groupBox
width: Math.max(270, subItem.width+40)
height: Math.max(70, subItem.height+40)
diff --git a/examples/declarative/tutorials/contacts/3_Collections/GroupBox.qml b/examples/declarative/tutorials/contacts/3_Collections/GroupBox.qml
index d3f626f..c607e75 100644
--- a/examples/declarative/tutorials/contacts/3_Collections/GroupBox.qml
+++ b/examples/declarative/tutorials/contacts/3_Collections/GroupBox.qml
@@ -1,6 +1,6 @@
import Qt 4.6
-FocusRealm {
+FocusScope {
id: groupBox
width: Math.max(270, subItem.width+40)
height: Math.max(70, subItem.height+40)
diff --git a/src/declarative/fx/fx.pri b/src/declarative/fx/fx.pri
index 2c98dd3..bbb09fb 100644
--- a/src/declarative/fx/fx.pri
+++ b/src/declarative/fx/fx.pri
@@ -14,7 +14,7 @@ HEADERS += \
fx/qfximage_p.h \
fx/qfxitem.h \
fx/qfxitem_p.h \
- fx/qfxfocusrealm.h \
+ fx/qfxfocusscope.h \
fx/qfxkeyactions.h \
fx/qfxkeyproxy.h \
fx/qfxlayouts.h \
@@ -53,7 +53,7 @@ SOURCES += \
fx/qfximage.cpp \
fx/qfxpainteditem.cpp \
fx/qfxitem.cpp \
- fx/qfxfocusrealm.cpp \
+ fx/qfxfocusscope.cpp \
fx/qfxkeyactions.cpp \
fx/qfxkeyproxy.cpp \
fx/qfxlayouts.cpp \
diff --git a/src/declarative/fx/qfxfocusrealm.cpp b/src/declarative/fx/qfxfocusscope.cpp
index 4484378..8981256 100644
--- a/src/declarative/fx/qfxfocusrealm.cpp
+++ b/src/declarative/fx/qfxfocusscope.cpp
@@ -39,34 +39,34 @@
**
****************************************************************************/
-#include "qfxfocusrealm.h"
+#include "qfxfocusscope.h"
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,FocusRealm,QFxFocusRealm)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,FocusScope,QFxFocusScope)
/*!
- \qmlclass FocusRealm
- \brief The FocusRealm object explicitly creates a focus realm.
+ \qmlclass FocusScope
+ \brief The FocusScope object explicitly creates a focus scope.
\inherits Item
- Focus realms assist in keyboard focus handling when building reusable QML
- components. All the details are covered in the
+ Focus scopes assist in keyboard focus handling when building reusable QML
+ components. All the details are covered in the
\l {qmlfocus}{keyboard focus documentation}.
*/
/*!
\internal
- \class QFxFocusRealm
+ \class QFxFocusScope
*/
-QFxFocusRealm::QFxFocusRealm(QFxItem *parent) :
+QFxFocusScope::QFxFocusScope(QFxItem *parent) :
QFxItem(parent)
{
setFlag(QGraphicsItem::ItemAutoDetectsFocusProxy);
}
-QFxFocusRealm::~QFxFocusRealm()
+QFxFocusScope::~QFxFocusScope()
{
}
QT_END_NAMESPACE
diff --git a/src/declarative/fx/qfxfocusrealm.h b/src/declarative/fx/qfxfocusscope.h
index 20fc5ad..28a6e30 100644
--- a/src/declarative/fx/qfxfocusrealm.h
+++ b/src/declarative/fx/qfxfocusscope.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QFXFOCUSREALM_H
-#define QFXFOCUSREALM_H
+#ifndef QFXFOCUSSCOPE_H
+#define QFXFOCUSSCOPE_H
#include <QtDeclarative/qfxitem.h>
@@ -50,18 +50,18 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class Q_DECLARATIVE_EXPORT QFxFocusRealm : public QFxItem
+class Q_DECLARATIVE_EXPORT QFxFocusScope : public QFxItem
{
Q_OBJECT
public:
- QFxFocusRealm(QFxItem *parent=0);
- virtual ~QFxFocusRealm();
+ QFxFocusScope(QFxItem *parent=0);
+ virtual ~QFxFocusScope();
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxFocusRealm)
+QML_DECLARE_TYPE(QFxFocusScope)
QT_END_HEADER
-#endif // QFXFOCUSREALM_H
+#endif // QFXFOCUSSCOPE_H
diff --git a/tools/qmldebugger/canvasscene.cpp b/tools/qmldebugger/canvasscene.cpp
index 65db9da..6c349f3 100644
--- a/tools/qmldebugger/canvasscene.cpp
+++ b/tools/qmldebugger/canvasscene.cpp
@@ -104,7 +104,7 @@ void CanvasScene::clone(QTreeWidgetItem *item, QSimpleCanvasItem *me,
rect->setColor(QColor(0, 0, 0, 10));
else if(options & QSimpleCanvasItem::IsFocusPanel)
rect->setColor(QColor(0, 255, 0, 10));
- else if(options & QSimpleCanvasItem::IsFocusRealm)
+ else if(options & QSimpleCanvasItem::IsFocusScope)
rect->setColor(QColor(0, 0, 255, 10));
else
rect->setColor(QColor(255, 0, 0, 10));