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
14
Issues
14
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
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
4c8205fa
Commit
4c8205fa
authored
Jan 22, 2018
by
Karel Slaný
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using AccessibleComboBox instead of plain ComboBox components.
parent
11e23813
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
112 deletions
+44
-112
qml/dialogues/FileDialogue.qml
qml/dialogues/FileDialogue.qml
+12
-12
qml/pages/PageDataboxSearch.qml
qml/pages/PageDataboxSearch.qml
+15
-45
qml/pages/PageMessageSearch.qml
qml/pages/PageMessageSearch.qml
+8
-24
qml/pages/PageSettingsGeneral.qml
qml/pages/PageSettingsGeneral.qml
+9
-31
No files found.
qml/dialogues/FileDialogue.qml
View file @
4c8205fa
...
...
@@ -97,33 +97,33 @@ Dialog {
contentItem
:
ColumnLayout
{
spacing
:
formItemVerticalSpacing
ComboBox
{
Accessible
ComboBox
{
anchors
{
left
:
parent
.
left
;
right
:
parent
.
right
;
}
textRole
:
"
label
"
accessibleDescription
:
qsTr
(
"
Select location type
"
)
model
:
ListModel
{
ListElement
{
label
:
qsTr
(
"
Desktop
"
);
value
:
"
desktop
"
}
ListElement
{
label
:
qsTr
(
"
Documents
"
);
value
:
"
document
"
}
ListElement
{
label
:
qsTr
(
"
Downloads
"
);
value
:
"
download
"
}
ListElement
{
label
:
qsTr
(
"
Pictures
"
);
value
:
"
picture
"
}
ListElement
{
label
:
qsTr
(
"
Temp
"
);
value
:
"
temp
"
}
ListElement
{
label
:
qsTr
(
"
Desktop
"
);
key
:
"
desktop
"
}
ListElement
{
label
:
qsTr
(
"
Documents
"
);
key
:
"
document
"
}
ListElement
{
label
:
qsTr
(
"
Downloads
"
);
key
:
"
download
"
}
ListElement
{
label
:
qsTr
(
"
Pictures
"
);
key
:
"
picture
"
}
ListElement
{
label
:
qsTr
(
"
Temp
"
);
key
:
"
temp
"
}
}
onActivated
:
{
var
location
=
InteractionFilesystem
.
DESKTOP_LOCATION
if
(
model
.
get
(
currentIndex
).
value
===
"
document
"
)
{
if
(
currentKey
()
===
"
document
"
)
{
location
=
InteractionFilesystem
.
DOCUMENTS_LOCATION
}
else
if
(
model
.
get
(
currentIndex
).
value
===
"
download
"
)
{
}
else
if
(
currentKey
()
===
"
download
"
)
{
location
=
InteractionFilesystem
.
DOWNLOAD_LOCATION
}
else
if
(
model
.
get
(
currentIndex
).
value
===
"
picture
"
)
{
}
else
if
(
currentKey
()
===
"
picture
"
)
{
location
=
InteractionFilesystem
.
PICTURE_LOCATION
}
else
if
(
model
.
get
(
currentIndex
).
value
===
"
temp
"
)
{
}
else
if
(
currentKey
()
===
"
temp
"
)
{
location
=
InteractionFilesystem
.
TEMP_LOCATION
}
folderModel
.
folder
=
standardLocationUrl
(
location
)
}
}
// ComboBox
}
RowLayout
{
anchors
{
left
:
parent
.
left
;
...
...
qml/pages/PageDataboxSearch.qml
View file @
4c8205fa
...
...
@@ -124,62 +124,32 @@ Item {
anchors.right
:
parent
.
right
anchors.left
:
parent
.
left
spacing
:
formItemVerticalSpacing
ComboBox
{
Accessible
ComboBox
{
id
:
searchScopeComboBox
currentIndex
:
0
width
:
parent
.
width
height
:
inputItemHeight
textRole
:
"
label
"
font.pointSize
:
defaultTextFont
.
font
.
pointSize
delegate
:
ItemDelegate
{
width
:
searchScopeComboBox
.
width
height
:
inputItemHeight
contentItem
:
Text
{
text
:
label
color
:
datovkaPalette
.
text
font.pointSize
:
defaultTextFont
.
font
.
pointSize
elide
:
Text
.
ElideRight
verticalAlignment
:
Text
.
AlignVCenter
}
highlighted
:
searchScopeComboBox
.
highlightedIndex
==
index
}
accessibleDescription
:
qsTr
(
"
Select type of sought data box
"
)
model
:
ListModel
{
id
:
searchScopeComboBoxModel
ListElement
{
label
:
qsTr
(
"
All databoxes
"
);
value
:
"
ALL
"
}
ListElement
{
label
:
qsTr
(
"
OVM
"
);
value
:
"
OVM
"
}
ListElement
{
label
:
qsTr
(
"
PO
"
);
value
:
"
PO
"
}
ListElement
{
label
:
qsTr
(
"
PFO
"
);
value
:
"
PFO
"
}
ListElement
{
label
:
qsTr
(
"
FO
"
);
value
:
"
FO
"
}
ListElement
{
label
:
qsTr
(
"
All databoxes
"
);
key
:
"
ALL
"
}
ListElement
{
label
:
qsTr
(
"
OVM
"
);
key
:
"
OVM
"
}
ListElement
{
label
:
qsTr
(
"
PO
"
);
key
:
"
PO
"
}
ListElement
{
label
:
qsTr
(
"
PFO
"
);
key
:
"
PFO
"
}
ListElement
{
label
:
qsTr
(
"
FO
"
);
key
:
"
FO
"
}
}
onCurrentIndexChanged
:
searchScope
=
searchScopeComboBoxModel
.
get
(
currentIndex
).
value
onCurrentIndexChanged
:
searchScope
=
currentKey
()
}
ComboBox
{
Accessible
ComboBox
{
id
:
searchTypeComboBox
currentIndex
:
0
width
:
parent
.
width
height
:
inputItemHeight
textRole
:
"
label
"
font.pointSize
:
defaultTextFont
.
font
.
pointSize
delegate
:
ItemDelegate
{
width
:
searchTypeComboBox
.
width
height
:
inputItemHeight
contentItem
:
Text
{
text
:
label
color
:
datovkaPalette
.
text
font.pointSize
:
defaultTextFont
.
font
.
pointSize
elide
:
Text
.
ElideRight
verticalAlignment
:
Text
.
AlignVCenter
}
highlighted
:
searchTypeComboBox
.
highlightedIndex
==
index
}
accessibleDescription
:
qsTr
(
"
Select entries to search in
"
)
model
:
ListModel
{
id
:
searchTypeComboBoxModel
ListElement
{
label
:
qsTr
(
"
All fields
"
);
value
:
"
GENERAL
"
}
ListElement
{
label
:
qsTr
(
"
Address
"
);
value
:
"
ADDRESS
"
}
ListElement
{
label
:
qsTr
(
"
IČ
"
);
value
:
"
ICO
"
}
ListElement
{
label
:
qsTr
(
"
Databox ID
"
);
value
:
"
DBID
"
}
ListElement
{
label
:
qsTr
(
"
All fields
"
);
key
:
"
GENERAL
"
}
ListElement
{
label
:
qsTr
(
"
Address
"
);
key
:
"
ADDRESS
"
}
ListElement
{
label
:
qsTr
(
"
IČ
"
);
key
:
"
ICO
"
}
ListElement
{
label
:
qsTr
(
"
Databox ID
"
);
key
:
"
DBID
"
}
}
onCurrentIndexChanged
:
searchType
=
searchTypeComboBoxModel
.
get
(
currentIndex
).
value
onCurrentIndexChanged
:
searchType
=
currentKey
()
}
AccessibleTextField
{
id
:
searchPhraseText
...
...
qml/pages/PageMessageSearch.qml
View file @
4c8205fa
...
...
@@ -92,38 +92,22 @@ Item {
anchors.right
:
parent
.
right
anchors.left
:
parent
.
left
spacing
:
formItemVerticalSpacing
ComboBox
{
Accessible
ComboBox
{
id
:
searchOptionComboBox
currentIndex
:
0
width
:
parent
.
width
height
:
inputItemHeight
textRole
:
"
label
"
font.pointSize
:
defaultTextFont
.
font
.
pointSize
delegate
:
ItemDelegate
{
width
:
searchOptionComboBox
.
width
height
:
inputItemHeight
contentItem
:
Text
{
text
:
label
color
:
datovkaPalette
.
text
font.pointSize
:
defaultTextFont
.
font
.
pointSize
elide
:
Text
.
ElideRight
verticalAlignment
:
Text
.
AlignVCenter
}
highlighted
:
searchOptionComboBox
.
highlightedIndex
==
index
}
accessibleDescription
:
qsTr
(
"
Select type of sought messages
"
)
model
:
ListModel
{
id
:
searchOptionComboBoxModel
// Don't change position of list elements and keys.
/* Cannot have an expression here becacuse QML complains that it cannot use script for property value. */
ListElement
{
label
:
qsTr
(
"
All messages
"
);
value
:
-
1
}
ListElement
{
label
:
qsTr
(
"
Received messages
"
);
value
:
MessageType
.
TYPE_RECEIVED
}
ListElement
{
label
:
qsTr
(
"
Sent messages
"
);
value
:
MessageType
.
TYPE_SENT
}
/* Cannot have an expression here because QML complains that it cannot use script for property key. */
ListElement
{
label
:
qsTr
(
"
All messages
"
);
key
:
-
1
}
ListElement
{
label
:
qsTr
(
"
Received messages
"
);
key
:
MessageType
.
TYPE_RECEIVED
}
ListElement
{
label
:
qsTr
(
"
Sent messages
"
);
key
:
MessageType
.
TYPE_SENT
}
}
onCurrentIndexChanged
:
{
if
(
searchOptionComboBoxModel
.
get
(
currentIndex
).
value
==
-
1
)
{
if
(
currentKey
()
==
-
1
)
{
soughtMsgType
=
MessageType
.
TYPE_RECEIVED
|
MessageType
.
TYPE_SENT
}
else
{
soughtMsgType
=
searchOptionComboBoxModel
.
get
(
currentIndex
).
value
soughtMsgType
=
currentKey
()
}
}
}
...
...
qml/pages/PageSettingsGeneral.qml
View file @
4c8205fa
...
...
@@ -35,14 +35,7 @@ Item {
property
var
accountModel
:
null
Component.onCompleted
:
{
var
lang
=
settings
.
language
()
var
langugeComboBoxIndex
=
0
;
if
(
lang
===
"
cs
"
)
{
langugeComboBoxIndex
=
1
;
}
else
if
(
lang
===
"
en
"
)
{
langugeComboBoxIndex
=
2
;
}
languageComboBoxId
.
currentIndex
=
langugeComboBoxIndex
languageComboBox
.
selectCurrentKey
(
settings
.
language
())
fontSizeSpinBox
.
setVal
(
settings
.
fontSize
())
}
...
...
@@ -77,33 +70,18 @@ Item {
color
:
datovkaPalette
.
text
text
:
qsTr
(
"
Language
"
)
}
ComboBox
{
id
:
languageComboBoxId
currentIndex
:
0
AccessibleComboBox
{
id
:
languageComboBox
width
:
parent
.
width
height
:
inputItemHeight
textRole
:
"
label
"
font.pointSize
:
defaultTextFont
.
font
.
pointSize
delegate
:
ItemDelegate
{
width
:
languageComboBoxId
.
width
height
:
inputItemHeight
contentItem
:
Text
{
text
:
label
color
:
datovkaPalette
.
text
font.pointSize
:
defaultTextFont
.
font
.
pointSize
elide
:
Text
.
ElideRight
verticalAlignment
:
Text
.
AlignVCenter
}
highlighted
:
languageComboBoxId
.
highlightedIndex
==
index
}
accessibleDescription
:
qsTr
(
"
Select language
"
)
model
:
ListModel
{
id
:
langMethodModel
/
/ Don't change position of list elements, keys and values.
ListElement
{
label
:
qsTr
(
"
System
"
);
value
:
"
system
"
}
ListElement
{
label
:
qsTr
(
"
Czech
"
);
value
:
"
cs
"
}
ListElement
{
label
:
qsTr
(
"
English
"
);
value
:
"
en
"
}
/
* Don't change keys and labels. */
ListElement
{
label
:
qsTr
(
"
System
"
);
key
:
"
system
"
}
ListElement
{
label
:
qsTr
(
"
Czech
"
);
key
:
"
cs
"
}
ListElement
{
label
:
qsTr
(
"
English
"
);
key
:
"
en
"
}
}
onCurrentIndexChanged
:
settings
.
setLanguage
(
langMethodModel
.
get
(
currentIndex
).
value
)
onCurrentIndexChanged
:
settings
.
setLanguage
(
currentKey
()
)
}
AccessibleText
{
color
:
datovkaPalette
.
mid
...
...
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