Commit e389188c authored by Martin Straka's avatar Martin Straka

Updated zfo import page for accessibility

parent 84119585
......@@ -75,6 +75,37 @@ Component {
pageView.pop(StackView.Immediate)
}
}
/* Object (associative array) holding functions. */
property var funcs: {
"zfoFile": function callZfoFile() {
clearInfo()
fileDialogue.raise(qsTr("Select ZFO files"), "*.zfo", true)
},
"zfoDir": function callZfoDir() {
clearInfo()
fileDialogue.raise(qsTr("Select import folder"), "*.*", false)
}
}
ListModel {
id: importMenuListModel
ListElement {
image: "qrc:/ui/datovka-file-zfo.svg"
showEntry: true
showNext: true
name: qsTr("Import selected ZFO files")
funcName: "zfoFile"
}
ListElement {
image: "qrc:/ui/datovka-folder-open.svg"
showEntry: true
showNext: true
name: qsTr("Import ZFO files from folder")
funcName: "zfoDir"
}
}
Flickable {
id: flickable
z: 0
......@@ -89,7 +120,7 @@ Component {
Column {
anchors.right: parent.right
anchors.left: parent.left
spacing: 1
spacing: formItemVerticalSpacing
Text {
text: " "
}
......@@ -109,109 +140,15 @@ Component {
font.pointSize: defaultTextFont.font.pointSize
checked: false
}
Rectangle {
color: datovkaPalette.base
height: headerHeight
width: parent.width
Image {
id: menuImage
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: defaultMargin
sourceSize.height: imgHeight
source: "qrc:/ui/datovka-file-zfo.svg"
}
ColorOverlay {
anchors.fill: menuImage
source: menuImage
color: datovkaPalette.text
}
AccessibleText {
anchors.verticalCenter: parent.verticalCenter
anchors.left: menuImage.right
anchors.leftMargin: defaultMargin
color: datovkaPalette.text
text: qsTr("Import selected ZFO files")
}
Rectangle {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
height: parent.height
width: parent.width * 0.07
color: parent.color
Image {
id: nextImage
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: defaultMargin
sourceSize.height: navImgHeight
source: "qrc:/ui/next.svg"
}
ColorOverlay {
anchors.fill: nextImage
source: nextImage
color: datovkaPalette.text
}
}
MouseArea {
anchors.fill: parent
onClicked: {
clearInfo()
fileDialogue.raise(qsTr("Select ZFO files"), "*.zfo", true)
}
}
}
Rectangle {
color: datovkaPalette.base
height: headerHeight
AccessibleMenu {
id: importMenuList
height: 2 * delegateHeight
width: parent.width
Image {
id: menuImage2
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: defaultMargin
sourceSize.height: imgHeight
source: "qrc:/ui/datovka-folder-open.svg"
}
ColorOverlay {
anchors.fill: menuImage2
source: menuImage2
color: datovkaPalette.text
}
AccessibleText {
anchors.verticalCenter: parent.verticalCenter
anchors.left: menuImage2.right
anchors.leftMargin: defaultMargin
color: datovkaPalette.text
text: qsTr("Import ZFO files from folder")
}
Rectangle {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
height: parent.height
width: parent.width * 0.07
color: parent.color
Image {
id: nextImage2
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: defaultMargin
sourceSize.height: navImgHeight
source: "qrc:/ui/next.svg"
}
ColorOverlay {
anchors.fill: nextImage2
source: nextImage2
color: datovkaPalette.text
}
}
MouseArea {
anchors.fill: parent
onClicked: {
clearInfo()
fileDialogue.raise(qsTr("Select import folder"), "*.*", false)
}
}
clip: true
spacing: 1
opacity: 1
funcArr: funcs
model: importMenuListModel
}
Text {
text: " "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment