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
0eda1e5a
Commit
0eda1e5a
authored
Jan 22, 2018
by
Karel Slaný
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created AccessibleSpinBoxZeroMax component.
parent
be02e087
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
19 deletions
+74
-19
qml/components/AccessibleSpinBoxZeroMax.qml
qml/components/AccessibleSpinBoxZeroMax.qml
+56
-5
qml/pages/PageSettingsPin.qml
qml/pages/PageSettingsPin.qml
+6
-4
qml/pages/PageSettingsStorage.qml
qml/pages/PageSettingsStorage.qml
+10
-8
res/qml.qrc
res/qml.qrc
+1
-1
src/main.cpp
src/main.cpp
+1
-1
No files found.
qml/components/SpinBoxZeroMax.qml
→
qml/components/
Accessible
SpinBoxZeroMax.qml
View file @
0eda1e5a
...
...
@@ -23,8 +23,11 @@
import
QtQuick
2.7
import
QtQuick
.
Controls
2.2
import
cz
.
nic
.
mobileDatovka
1.0
AccessibleSpinBox
{
id
:
root
SpinBox
{
/* Must be a non-decreasing list ending with infinity. */
property
var
items
:
[
1
,
qsTr
(
"
max
"
)]
property
int
dfltIdx
:
0
...
...
@@ -75,8 +78,56 @@ SpinBox {
}
}
Accessible.role
:
Accessible
.
SpinBox
Accessible.description
:
""
/* Tell what the item does. */
Accessible.name
:
textFromValue
(
value
)
/* TODO -- Need to export buttons. */
MouseArea
{
anchors.fill
:
root
.
down
.
indicator
function
handleClick
()
{
root
.
decrease
()
root
.
valueModified
()
}
Accessible.role
:
Accessible
.
Button
Accessible.description
:
root
.
accessibleDescription
//Accessible.focusable: true
Accessible.name
:
qsTr
(
"
Decrease value '%1'.
"
).
arg
(
root
.
textFromValue
(
root
.
value
))
Accessible.onPressAction
:
{
handleClick
()
}
onClicked
:
{
handleClick
()
}
}
MouseArea
{
anchors.top
:
root
.
top
anchors.bottom
:
root
.
bottom
anchors.left
:
(
root
.
down
.
indicator
.
x
<
root
.
up
.
indicator
.
x
)
?
root
.
down
.
indicator
.
right
:
root
.
up
.
indicator
.
right
anchors.right
:
(
root
.
down
.
indicator
.
x
<
root
.
up
.
indicator
.
x
)
?
root
.
up
.
indicator
.
left
:
root
.
up
.
indicator
.
left
Accessible.role
:
root
.
editable
?
Accessible
.
EditableText
:
Accessible
.
StaticText
Accessible.description
:
root
.
accessibleDescription
Accessible.editable
:
root
.
editable
Accessible.focusable
:
true
Accessible.multiLine
:
false
Accessible.name
:
root
.
textFromValue
(
root
.
value
)
Accessible.readOnly
:
!
root
.
editable
}
MouseArea
{
anchors.fill
:
root
.
up
.
indicator
function
handleClick
()
{
root
.
increase
()
root
.
valueModified
()
}
Accessible.role
:
Accessible
.
Button
Accessible.description
:
root
.
accessibleDescription
//Accessible.focusable: true
Accessible.name
:
qsTr
(
"
Increase value '%1'.
"
).
arg
(
root
.
textFromValue
(
root
.
value
))
Accessible.onPressAction
:
{
handleClick
()
}
onClicked
:
{
handleClick
()
}
}
}
qml/pages/PageSettingsPin.qml
View file @
0eda1e5a
...
...
@@ -324,20 +324,22 @@ Item {
text
:
qsTr
(
"
Lock after seconds of inactivity
"
)
horizontalAlignment
:
Text
.
AlignHCenter
}
SpinBoxZeroMax
{
Accessible
SpinBoxZeroMax
{
/* Holds value in seconds. */
id
:
lockIntervalSpinBox
anchors.horizontalCenter
:
parent
.
horizontalCenter
height
:
inputItemHeight
font.pointSize
:
defaultTextFont
.
font
.
pointSize
/* Must be a non-decreasing list ending with infinity. */
items
:
[
15
,
30
,
60
,
90
,
120
,
150
,
180
,
qsTr
(
"
don't lock
"
)]
dfltIdx
:
0
accessibleDescription
:
qsTr
(
"
Select the number of seconds after which the application is going to be locked.
"
)
onValueModified
:
{
/* Enable accept button. Always visible? */
acceptElement
.
visible
=
val
()
!=
settings
.
inactivityInterval
()
}
Accessible.description
:
qsTr
(
"
Select the number of seconds after which the application is going to be locked.
"
)
}
}
// Column layout
}
// Pane
...
...
qml/pages/PageSettingsStorage.qml
View file @
0eda1e5a
...
...
@@ -84,16 +84,17 @@ Item {
color
:
datovkaPalette
.
text
text
:
qsTr
(
"
Number of days to keep messages
"
)
}
SpinBoxZeroMax
{
Accessible
SpinBoxZeroMax
{
/* Holds value in days. */
id
:
messageLifeSpinBox
height
:
inputItemHeight
font.pointSize
:
defaultTextFont
.
font
.
pointSize
/* Must be a non-decreasing list ending with infinity. */
items
:
[
90
,
95
,
100
,
105
,
110
,
115
,
120
,
125
,
130
,
135
,
140
,
145
,
150
,
155
,
160
,
165
,
170
,
175
,
180
,
qsTr
(
"
don't delete
"
)]
dfltIdx
:
0
accessibleDescription
:
qsTr
(
"
Select the number of days how long downloaded messages are kept in local storage after download.
"
)
onValueModified
:
settings
.
setMessageLifeDays
(
messageLifeSpinBox
.
val
())
Accessible.description
:
qsTr
(
"
Select the number of days how long downloaded messages are kept in local storage after download.
"
)
}
AccessibleText
{
color
:
datovkaPalette
.
mid
...
...
@@ -110,16 +111,17 @@ Item {
color
:
datovkaPalette
.
text
text
:
qsTr
(
"
Number of days to keep attachments
"
)
}
SpinBoxZeroMax
{
Accessible
SpinBoxZeroMax
{
/* Holds value in days. */
id
:
attachLifeSpinBox
height
:
inputItemHeight
font.pointSize
:
defaultTextFont
.
font
.
pointSize
/* Must be a non-decreasing list ending with infinity. */
items
:
[
5
,
10
,
15
,
20
,
25
,
30
,
35
,
40
,
45
,
50
,
55
,
60
,
65
,
70
,
75
,
80
,
85
,
qsTr
(
"
like messages
"
)]
dfltIdx
:
1
accessibleDescription
:
qsTr
(
"
Select the number of days how long message content is kept in local storage after download.
"
)
onValueModified
:
settings
.
setAttachmentLifeDays
(
attachLifeSpinBox
.
val
())
Accessible.description
:
qsTr
(
"
Select the number of days how long message content is kept in local storage after download.
"
)
}
AccessibleText
{
color
:
datovkaPalette
.
mid
...
...
res/qml.qrc
View file @
0eda1e5a
...
...
@@ -106,6 +106,7 @@
<file>../qml/components/AccessibleMenu.qml</file>
<file>../qml/components/AccessibleOverlaidImageButton.qml</file>
<file>../qml/components/AccessibleSpinBox.qml</file>
<file>../qml/components/AccessibleSpinBoxZeroMax.qml</file>
<file>../qml/components/AccessibleSwitch.qml</file>
<file>../qml/components/AccessibleText.qml</file>
<file>../qml/components/AccessibleTextButton.qml</file>
...
...
@@ -117,7 +118,6 @@
<file>../qml/components/OverlaidImage.qml</file>
<file>../qml/components/PageHeader.qml</file>
<file>../qml/components/ProgressBar.qml</file>
<file>../qml/components/SpinBoxZeroMax.qml</file>
<file>../qml/dialogues/InputDialogue.qml</file>
<file>../qml/dialogues/FileDialogue.qml</file>
<file>../qml/dialogues/MessageDialogue.qml</file>
...
...
src/main.cpp
View file @
0eda1e5a
...
...
@@ -129,6 +129,7 @@ const struct QmlTypeEntry qmlComponents[] = {
{
"AccessibleMenu"
,
1
,
0
},
{
"AccessibleOverlaidImageButton"
,
1
,
0
},
{
"AccessibleSpinBox"
,
1
,
0
},
{
"AccessibleSpinBoxZeroMax"
,
1
,
0
},
{
"AccessibleSwitch"
,
1
,
0
},
{
"AccessibleText"
,
1
,
0
},
{
"AccessibleTextButton"
,
1
,
0
},
...
...
@@ -140,7 +141,6 @@ const struct QmlTypeEntry qmlComponents[] = {
{
"OverlaidImage"
,
1
,
0
},
{
"PageHeader"
,
1
,
0
},
{
"ProgressBar"
,
1
,
0
},
{
"SpinBoxZeroMax"
,
1
,
0
},
{
NULL
,
0
,
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