summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@digia.com>2013-02-21 11:38:10 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-19 14:00:49 +0100
commit023f4ec1a135d1a3bd9ce659b095bd4ed2e8b806 (patch)
treecee58db4b1ae560ba19fecffce715c8eedfd569c /src
parent483c11418e27433308e7d127c865efb105868650 (diff)
downloadqtquickcontrols-023f4ec1a135d1a3bd9ce659b095bd4ed2e8b806.tar.gz
Support QQuickItem.activeFocusOnTab in QtQuick.Controls
Change-Id: Ie23b504f590e6c4e7f2a1a9090c2dd8671389937 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/controls/Button.qml2
-rw-r--r--src/controls/CheckBox.qml2
-rw-r--r--src/controls/ComboBox.qml2
-rw-r--r--src/controls/GroupBox.qml2
-rw-r--r--src/controls/Label.qml1
-rw-r--r--src/controls/ProgressBar.qml2
-rw-r--r--src/controls/RadioButton.qml2
-rw-r--r--src/controls/ScrollView.qml2
-rw-r--r--src/controls/Slider.qml2
-rw-r--r--src/controls/SpinBox.qml2
-rw-r--r--src/controls/StatusBar.qml1
-rw-r--r--src/controls/Tab.qml2
-rw-r--r--src/controls/TabView.qml2
-rw-r--r--src/controls/TextArea.qml2
-rw-r--r--src/controls/TextField.qml2
-rw-r--r--src/controls/ToolBar.qml1
-rw-r--r--src/controls/ToolButton.qml2
-rw-r--r--src/private/AbstractCheckable.qml2
-rw-r--r--src/private/BasicButton.qml2
-rw-r--r--src/private/Control.qml2
-rw-r--r--src/private/ScrollBar.qml2
-rw-r--r--src/private/TabBar.qml2
22 files changed, 41 insertions, 0 deletions
diff --git a/src/controls/Button.qml b/src/controls/Button.qml
index 5317e614..6872a143 100644
--- a/src/controls/Button.qml
+++ b/src/controls/Button.qml
@@ -83,6 +83,8 @@ BasicButton {
*/
property url iconSource
+ activeFocusOnTab: true
+
Accessible.name: text
style: Qt.createComponent(Settings.THEME_PATH + "/ButtonStyle.qml", button)
diff --git a/src/controls/CheckBox.qml b/src/controls/CheckBox.qml
index c459e812..16357533 100644
--- a/src/controls/CheckBox.qml
+++ b/src/controls/CheckBox.qml
@@ -132,6 +132,8 @@ AbstractCheckable {
style: Qt.createComponent(Settings.THEME_PATH + "/CheckBoxStyle.qml", checkBox)
+ activeFocusOnTab: true
+
Accessible.role: Accessible.CheckBox
Accessible.name: text
diff --git a/src/controls/ComboBox.qml b/src/controls/ComboBox.qml
index 8942683e..47efb700 100644
--- a/src/controls/ComboBox.qml
+++ b/src/controls/ComboBox.qml
@@ -93,6 +93,8 @@ Control {
style: Qt.createComponent(Settings.THEME_PATH + "/ComboBoxStyle.qml", comboBox)
+ activeFocusOnTab: true
+
Accessible.role: Accessible.ComboBox
MouseArea {
diff --git a/src/controls/GroupBox.qml b/src/controls/GroupBox.qml
index 0571d1fb..16c40d92 100644
--- a/src/controls/GroupBox.qml
+++ b/src/controls/GroupBox.qml
@@ -151,6 +151,8 @@ Item {
Accessible.role: Accessible.Grouping
Accessible.name: title
+ activeFocusOnTab: false
+
Loader {
id: loader
property alias control: groupbox
diff --git a/src/controls/Label.qml b/src/controls/Label.qml
index e983ecc7..db6de97f 100644
--- a/src/controls/Label.qml
+++ b/src/controls/Label.qml
@@ -81,6 +81,7 @@ Text {
id: label
color: pal.text
+ activeFocusOnTab: false
renderType: Text.NativeRendering
SystemPalette {
id: pal
diff --git a/src/controls/ProgressBar.qml b/src/controls/ProgressBar.qml
index e49ae8be..38193654 100644
--- a/src/controls/ProgressBar.qml
+++ b/src/controls/ProgressBar.qml
@@ -112,6 +112,8 @@ Control {
setValue(value)
}
+ activeFocusOnTab: false
+
Accessible.role: Accessible.ProgressBar
Accessible.name: value
diff --git a/src/controls/RadioButton.qml b/src/controls/RadioButton.qml
index bfb37a60..87f57257 100644
--- a/src/controls/RadioButton.qml
+++ b/src/controls/RadioButton.qml
@@ -77,6 +77,8 @@ import "Styles/Settings.js" as Settings
AbstractCheckable {
id: radioButton
+ activeFocusOnTab: true
+
Accessible.role: Accessible.RadioButton
/*!
diff --git a/src/controls/ScrollView.qml b/src/controls/ScrollView.qml
index 8cf5b48a..6bdc7c2a 100644
--- a/src/controls/ScrollView.qml
+++ b/src/controls/ScrollView.qml
@@ -138,6 +138,8 @@ FocusScope {
/*! \internal */
property alias verticalScrollBar: scroller.verticalScrollBar
+ activeFocusOnTab: true
+
/*! \internal */
onContentItemChanged: {
diff --git a/src/controls/Slider.qml b/src/controls/Slider.qml
index 7f7231ac..bb2102ff 100644
--- a/src/controls/Slider.qml
+++ b/src/controls/Slider.qml
@@ -167,6 +167,8 @@ Control {
/*! \internal */
property bool __horizontal: orientation === Qt.Horizontal
+ activeFocusOnTab: true
+
Accessible.role: Accessible.Slider
Accessible.name: value
diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml
index 576a13c1..de836b24 100644
--- a/src/controls/SpinBox.qml
+++ b/src/controls/SpinBox.qml
@@ -206,6 +206,8 @@ Control {
/*! \internal */
onValueChanged: if (__initialized) input.setValue(value)
+ activeFocusOnTab: true
+
Accessible.name: input.text
Accessible.role: Accessible.SpinBox
diff --git a/src/controls/StatusBar.qml b/src/controls/StatusBar.qml
index f0a6011f..b3987cb4 100644
--- a/src/controls/StatusBar.qml
+++ b/src/controls/StatusBar.qml
@@ -69,6 +69,7 @@ Item {
id: statusbar
implicitHeight: 20
implicitWidth: parent ? parent.width : style.implicitWidth
+ activeFocusOnTab: false
StyleItem {
id: style
anchors.fill: parent
diff --git a/src/controls/Tab.qml b/src/controls/Tab.qml
index b7d4fb7f..3c86cc3c 100644
--- a/src/controls/Tab.qml
+++ b/src/controls/Tab.qml
@@ -60,6 +60,8 @@ Loader {
active: false
visible: false
+ activeFocusOnTab: false
+
/*! \internal */
onVisibleChanged: if (visible) active = true
diff --git a/src/controls/TabView.qml b/src/controls/TabView.qml
index 2248c856..d24e677c 100644
--- a/src/controls/TabView.qml
+++ b/src/controls/TabView.qml
@@ -141,6 +141,8 @@ FocusScope {
count = __tabs.length
}
+ activeFocusOnTab: false
+
Component {
id: tabcomp
Tab {}
diff --git a/src/controls/TextArea.qml b/src/controls/TextArea.qml
index 47401147..c34315c3 100644
--- a/src/controls/TextArea.qml
+++ b/src/controls/TextArea.qml
@@ -616,6 +616,8 @@ ScrollView {
flickableItem.contentWidth: edit.paintedWidth + (2 * documentMargins)
frameVisible: true
+ activeFocusOnTab: true
+
Accessible.role: Accessible.EditableText
/*!
diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml
index 8a9173a9..8fd9353b 100644
--- a/src/controls/TextField.qml
+++ b/src/controls/TextField.qml
@@ -539,6 +539,8 @@ Control {
textInput.forceActiveFocus();
}
+ activeFocusOnTab: true
+
Accessible.name: text
Accessible.role: Accessible.EditableText
Accessible.description: placeholderText
diff --git a/src/controls/ToolBar.qml b/src/controls/ToolBar.qml
index fd2924ac..0c555cb5 100644
--- a/src/controls/ToolBar.qml
+++ b/src/controls/ToolBar.qml
@@ -71,6 +71,7 @@ import QtQuick.Controls.Private 1.0
Item {
implicitHeight: toolbar.implicitHeight
implicitWidth: parent ? parent.width : toolbar.implicitWidth
+ activeFocusOnTab: false
Accessible.role: Accessible.ToolBar
StyleItem {
id: toolbar
diff --git a/src/controls/ToolButton.qml b/src/controls/ToolButton.qml
index 007bbec7..445ab96b 100644
--- a/src/controls/ToolButton.qml
+++ b/src/controls/ToolButton.qml
@@ -74,6 +74,8 @@ BasicButton {
/*! The label text. */
property string text
+ activeFocusOnTab: true
+
Accessible.name: text
style: Qt.createComponent(Settings.THEME_PATH + "/ToolButtonStyle.qml", button)
diff --git a/src/private/AbstractCheckable.qml b/src/private/AbstractCheckable.qml
index f0acf48f..905d4b65 100644
--- a/src/private/AbstractCheckable.qml
+++ b/src/private/AbstractCheckable.qml
@@ -106,6 +106,8 @@ Control {
*/
readonly property alias __containsMouse: mouseArea.containsMouse
+ activeFocusOnTab: true
+
MouseArea {
id: mouseArea
focus: true
diff --git a/src/private/BasicButton.qml b/src/private/BasicButton.qml
index 412028a0..f0d2a9ec 100644
--- a/src/private/BasicButton.qml
+++ b/src/private/BasicButton.qml
@@ -122,6 +122,8 @@ Control {
onTriggered: button.clicked()
}
+ activeFocusOnTab: true
+
Keys.onPressed: {
if (event.key === Qt.Key_Space && !event.isAutoRepeat && !behavior.pressed)
behavior.keyPressed = true;
diff --git a/src/private/Control.qml b/src/private/Control.qml
index e18e83f3..06bcdce6 100644
--- a/src/private/Control.qml
+++ b/src/private/Control.qml
@@ -65,6 +65,8 @@ FocusScope {
/* \internal */
implicitHeight: __panel ? __panel.implicitHeight: 0
+ activeFocusOnTab: false
+
Loader {
id: panelLoader
anchors.fill: parent
diff --git a/src/private/ScrollBar.qml b/src/private/ScrollBar.qml
index a81414e2..d11fcef6 100644
--- a/src/private/ScrollBar.qml
+++ b/src/private/ScrollBar.qml
@@ -59,6 +59,8 @@ Item {
property Component style: Qt.createComponent("../" + Settings.THEME_PATH + "/ScrollBarStyle.qml", scrollbar)
property alias styleItem: loader.item
+ activeFocusOnTab: false
+
Accessible.role: Accessible.ScrollBar
implicitWidth: loader.implicitWidth
implicitHeight: loader.implicitHeight
diff --git a/src/private/TabBar.qml b/src/private/TabBar.qml
index a96ee100..266d20e1 100644
--- a/src/private/TabBar.qml
+++ b/src/private/TabBar.qml
@@ -51,6 +51,8 @@ FocusScope {
height: tabrow.height
width: tabrow.width
+ activeFocusOnTab: true
+
Keys.onRightPressed: {
if (tabView && tabView.currentIndex < tabView.count - 1)
tabView.currentIndex = tabView.currentIndex + 1