2019-03-15 16:53:40 +00:00
|
|
|
import QtQuick 2.4
|
|
|
|
import Ubuntu.Components 1.3
|
|
|
|
|
|
|
|
PageHeader {
|
|
|
|
id: mainHeader
|
|
|
|
width: parent.width
|
|
|
|
height: units.gu(6)
|
|
|
|
title: i18n.tr("UTPass")
|
|
|
|
|
2019-03-16 09:08:41 +00:00
|
|
|
contents: Item {
|
2019-03-21 10:22:12 +00:00
|
|
|
height: parent.height
|
2019-03-16 09:08:41 +00:00
|
|
|
width: parent.width
|
|
|
|
Label {
|
2019-03-21 10:22:12 +00:00
|
|
|
id: labelTitle
|
2019-03-16 09:08:41 +00:00
|
|
|
text: mainHeader.title
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
visible: true
|
|
|
|
}
|
|
|
|
TextField {
|
|
|
|
id: searchBar
|
2019-03-21 10:22:12 +00:00
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.left: parent.left
|
2019-03-16 09:08:41 +00:00
|
|
|
placeholderText: i18n.tr("Search")
|
|
|
|
height: units.gu(4)
|
|
|
|
visible: false
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2019-03-21 10:22:12 +00:00
|
|
|
onFocusChanged: {
|
|
|
|
|
|
|
|
}
|
2019-03-16 09:08:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-15 16:53:40 +00:00
|
|
|
trailingActionBar.height: units.gu(4)
|
|
|
|
trailingActionBar.numberOfSlots: 2
|
|
|
|
trailingActionBar.actions: [
|
|
|
|
Action {
|
|
|
|
iconName: "search"
|
|
|
|
text: i18n.tr("Search")
|
2019-03-16 08:02:12 +00:00
|
|
|
onTriggered: {
|
2019-03-21 10:22:12 +00:00
|
|
|
searchBar.visible = !searchBar.visible
|
|
|
|
labelTitle.visible = !searchBar.visible
|
2019-03-16 15:18:05 +00:00
|
|
|
if (searchBar.visible === true) {
|
|
|
|
searchBar.focus = true
|
|
|
|
}
|
2019-03-16 08:02:12 +00:00
|
|
|
}
|
2019-03-15 16:53:40 +00:00
|
|
|
},
|
|
|
|
Action {
|
|
|
|
iconName: "settings"
|
|
|
|
text: i18n.tr("Settings")
|
|
|
|
onTriggered: {
|
|
|
|
pageStack.push(Qt.resolvedUrl("../Settings.qml"))
|
|
|
|
}
|
|
|
|
},
|
|
|
|
Action {
|
|
|
|
iconName: "info"
|
|
|
|
text: i18n.tr("Info")
|
|
|
|
onTriggered: {
|
|
|
|
pageStack.push(Qt.resolvedUrl("../Info.qml"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2019-03-21 10:22:12 +00:00
|
|
|
}
|