Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
mobile Datovka
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Datovka projects
mobile Datovka
Commits
4b06ecab
Commit
4b06ecab
authored
Jan 19, 2018
by
Karel Slaný
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experimenting with AccessibleTextField component.
parent
50fd7f97
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
3 deletions
+52
-3
qml/components/AccessibleSwitch.qml
qml/components/AccessibleSwitch.qml
+1
-0
qml/components/AccessibleTextField.qml
qml/components/AccessibleTextField.qml
+46
-0
qml/pages/PageSettingsAccount.qml
qml/pages/PageSettingsAccount.qml
+3
-3
res/qml.qrc
res/qml.qrc
+1
-0
src/main.cpp
src/main.cpp
+1
-0
No files found.
qml/components/AccessibleSwitch.qml
View file @
4b06ecab
...
...
@@ -39,6 +39,7 @@ Switch {
Accessible.checkable
:
true
Accessible.checked
:
root
.
checked
Accessible.description
:
root
.
accessibleDescription
//Accessible.focusable: true
Accessible.name
:
(
root
.
accessibleName
!==
""
)
?
root
.
accessibleName
:
root
.
text
Accessible.onPressAction
:
{
root
.
toggle
()
...
...
qml/components/AccessibleTextField.qml
0 → 100644
View file @
4b06ecab
/*
* Copyright (C) 2014-2018 CZ.NIC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* In addition, as a special exception, the copyright holders give
* permission to link the code of portions of this program with the
* OpenSSL library under certain conditions as described in each
* individual source file, and distribute linked combinations including
* the two.
*/
import
QtQuick
2.7
import
QtQuick
.
Controls
2.2
/*
* Accessible text field component.
*/
TextField
{
id
:
root
/* These properties must be set by caller. */
property
string
accessibleDescription
:
""
Accessible.role
:
Accessible
.
EditableText
Accessible.description
:
(
root
.
accessibleDescription
!==
""
)
?
root
.
accessibleDescription
:
root
.
placeholderText
Accessible.editable
:
root
.
enabled
//Accessible.focusable: true
Accessible.multiLine
:
false
Accessible.name
:
root
.
text
Accessible.passwordEdit
:
(
root
.
echoMode
===
TextInput
.
Password
)
||
(
root
.
echoMode
===
TextInput
.
PasswordEchoOnEdit
)
Accessible.readOnly
:
root
.
readOnly
Accessible.searchEdit
:
false
Accessible.selectableText
:
true
}
qml/pages/PageSettingsAccount.qml
View file @
4b06ecab
...
...
@@ -224,7 +224,7 @@ Item {
color
:
datovkaPalette
.
text
text
:
qsTr
(
"
Account title
"
)
}
TextField
{
Accessible
TextField
{
id
:
accountNameTextField
width
:
parent
.
width
height
:
inputItemHeight
...
...
@@ -246,7 +246,7 @@ Item {
color
:
datovkaPalette
.
text
text
:
qsTr
(
"
Username
"
)
}
TextField
{
Accessible
TextField
{
id
:
userNameTextField
width
:
parent
.
width
height
:
inputItemHeight
...
...
@@ -269,7 +269,7 @@ Item {
color
:
datovkaPalette
.
text
text
:
qsTr
(
"
Password
"
)
}
TextField
{
Accessible
TextField
{
id
:
passwordTextField
width
:
parent
.
width
height
:
inputItemHeight
...
...
res/qml.qrc
View file @
4b06ecab
...
...
@@ -107,6 +107,7 @@
<file>../qml/components/AccessibleSwitch.qml</file>
<file>../qml/components/AccessibleText.qml</file>
<file>../qml/components/AccessibleTextButton.qml</file>
<file>../qml/components/AccessibleTextField.qml</file>
<file>../qml/components/DataboxList.qml</file>
<file>../qml/components/FilterBar.qml</file>
<file>../qml/components/InputLineMenu.qml</file>
...
...
src/main.cpp
View file @
4b06ecab
...
...
@@ -130,6 +130,7 @@ const struct QmlTypeEntry qmlComponents[] = {
{
"AccessibleSwitch"
,
1
,
0
},
{
"AccessibleText"
,
1
,
0
},
{
"AccessibleTextButton"
,
1
,
0
},
{
"AccessibleTextField"
,
1
,
0
},
{
"DataboxList"
,
1
,
0
},
{
"FilterBar"
,
1
,
0
},
{
"InputLineMenu"
,
1
,
0
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment