~saviq/ubuntu/saucy/qtdeclarative-opensource-src/add-qtquick-delegate-range

« back to all changes in this revision

Viewing changes to examples/quick/accessibility/accessibility.qml

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 14:17:19 UTC
  • Revision ID: package-import@ubuntu.com-20130205141719-qqeyml8wslpyez52
Tags: upstream-5.0.1
ImportĀ upstreamĀ versionĀ 5.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************
 
2
**
 
3
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
 
4
** Contact: http://www.qt-project.org/legal
 
5
**
 
6
** This file is part of the QtQml module of the Qt Toolkit.
 
7
**
 
8
** $QT_BEGIN_LICENSE:LGPL$
 
9
** Commercial License Usage
 
10
** Licensees holding valid commercial Qt licenses may use this file in
 
11
** accordance with the commercial license agreement provided with the
 
12
** Software or, alternatively, in accordance with the terms contained in
 
13
** a written agreement between you and Digia.  For licensing terms and
 
14
** conditions see http://qt.digia.com/licensing.  For further information
 
15
** use the contact form at http://qt.digia.com/contact-us.
 
16
**
 
17
** GNU Lesser General Public License Usage
 
18
** Alternatively, this file may be used under the terms of the GNU Lesser
 
19
** General Public License version 2.1 as published by the Free Software
 
20
** Foundation and appearing in the file LICENSE.LGPL included in the
 
21
** packaging of this file.  Please review the following information to
 
22
** ensure the GNU Lesser General Public License version 2.1 requirements
 
23
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 
24
**
 
25
** In addition, as a special exception, Digia gives you certain additional
 
26
** rights.  These rights are described in the Digia Qt LGPL Exception
 
27
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
 
28
**
 
29
** GNU General Public License Usage
 
30
** Alternatively, this file may be used under the terms of the GNU
 
31
** General Public License version 3.0 as published by the Free Software
 
32
** Foundation and appearing in the file LICENSE.GPL included in the
 
33
** packaging of this file.  Please review the following information to
 
34
** ensure the GNU General Public License version 3.0 requirements will be
 
35
** met: http://www.gnu.org/copyleft/gpl.html.
 
36
**
 
37
**
 
38
** $QT_END_LICENSE$
 
39
**
 
40
****************************************************************************/
 
41
 
 
42
import QtQuick 2.0
 
43
import "content"
 
44
 
 
45
 
 
46
Rectangle {
 
47
    id: window
 
48
 
 
49
    width: 320; height: 480
 
50
    color: "white"
 
51
 
 
52
    Column {
 
53
        id: column
 
54
        spacing: 6
 
55
        anchors.fill: parent
 
56
        anchors.margins: 10
 
57
        width: parent.width
 
58
 
 
59
 
 
60
        Row {
 
61
            spacing: 6
 
62
            width: column.width
 
63
            height: column.h
 
64
 
 
65
            Text {
 
66
                id: subjectLabel
 
67
                //! [text]
 
68
                Accessible.role: Accessible.StaticText
 
69
                Accessible.name: text
 
70
                //! [text]
 
71
                text: "Subject:"
 
72
                y: 3
 
73
            }
 
74
            Rectangle {
 
75
                id: subjectBorder
 
76
                Accessible.role: Accessible.EditableText
 
77
                Accessible.name: subjectEdit.text
 
78
                border.width: 1
 
79
                border.color: "black"
 
80
                height: subjectEdit.height + 6
 
81
                width: 240
 
82
                TextInput {
 
83
                    focus: true
 
84
                    y: 3
 
85
                    x: 3
 
86
                    width: parent.width - 6
 
87
                    id: subjectEdit
 
88
                    text: "Vacation plans"
 
89
                    KeyNavigation.tab: textEdit
 
90
                }
 
91
 
 
92
            }
 
93
 
 
94
        }
 
95
        Rectangle {
 
96
            id: textBorder
 
97
            Accessible.role: Accessible.EditableText
 
98
            property alias text : textEdit.text
 
99
            border.width: 1
 
100
            border.color: "black"
 
101
            width: parent.width - 2
 
102
 
 
103
            height: 200
 
104
            TextEdit {
 
105
                id: textEdit
 
106
                y: 3
 
107
                x: 3
 
108
                width: parent.width - 6
 
109
                height: parent.height - 6
 
110
                text: "Hi, we're going to the Dolomites this summer. Weren't you also going to northern Italy? \n\nBest wishes, your friend Luke"
 
111
                wrapMode: TextEdit.WordWrap
 
112
                KeyNavigation.tab: sendButton
 
113
                KeyNavigation.priority: KeyNavigation.BeforeItem
 
114
            }
 
115
        }
 
116
        Text {
 
117
            id : status
 
118
            width: column.width
 
119
        }
 
120
 
 
121
        Row {
 
122
            spacing: 6
 
123
            Button { id: sendButton; width: 100; height: column.h + 20; text: "Send";
 
124
                onClicked : { status.text = "Send" }
 
125
                KeyNavigation.tab: discardButton
 
126
            }
 
127
            Button { id: discardButton; width: 100; height: column.h + 20; text: "Discard";
 
128
                onClicked : { status.text = "Discard" }
 
129
                KeyNavigation.tab: checkBox
 
130
            }
 
131
        }
 
132
 
 
133
        Row {
 
134
            spacing: 6
 
135
            Checkbox {
 
136
                id: checkBox
 
137
                checked: false
 
138
                KeyNavigation.tab: slider
 
139
            }
 
140
            Slider {
 
141
                id: slider
 
142
                value: 10
 
143
                KeyNavigation.tab: subjectEdit
 
144
            }
 
145
        }
 
146
    }
 
147
}