mirror of
https://github.com/QRouland/UTPass.git
synced 2025-06-29 16:52:29 +00:00
Initial Commit : 0.0.1
This commit is contained in:
64
qml/pages/headers/MainHeader.qml
Normal file
64
qml/pages/headers/MainHeader.qml
Normal file
@ -0,0 +1,64 @@
|
||||
import QtQuick 2.4
|
||||
import Ubuntu.Components 1.3
|
||||
|
||||
PageHeader {
|
||||
id: mainHeader
|
||||
width: parent.width
|
||||
height: units.gu(6)
|
||||
title: i18n.tr("UTPass")
|
||||
|
||||
contents: Item {
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
Label {
|
||||
id: labelTitle
|
||||
text: mainHeader.title
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: true
|
||||
}
|
||||
TextField {
|
||||
id: searchBar
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
placeholderText: i18n.tr("Search")
|
||||
height: units.gu(4)
|
||||
visible: false
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onFocusChanged: {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
trailingActionBar.height: units.gu(4)
|
||||
trailingActionBar.numberOfSlots: 2
|
||||
trailingActionBar.actions: [
|
||||
|
||||
|
||||
/*Action { TODO
|
||||
iconName: "search"
|
||||
text: i18n.tr("Search")
|
||||
onTriggered: {
|
||||
searchBar.visible = !searchBar.visible
|
||||
labelTitle.visible = !searchBar.visible
|
||||
if (searchBar.visible === true) {
|
||||
searchBar.focus = true
|
||||
}
|
||||
}
|
||||
},*/
|
||||
Action {
|
||||
iconName: "settings"
|
||||
text: i18n.tr("Settings")
|
||||
onTriggered: {
|
||||
pageStack.push(Qt.resolvedUrl("../settings/Settings.qml"))
|
||||
}
|
||||
},
|
||||
Action {
|
||||
iconName: "info"
|
||||
text: i18n.tr("Info")
|
||||
onTriggered: {
|
||||
pageStack.push(Qt.resolvedUrl("../Info.qml"))
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
31
qml/pages/headers/StackHeader.qml
Normal file
31
qml/pages/headers/StackHeader.qml
Normal file
@ -0,0 +1,31 @@
|
||||
import QtQuick 2.4
|
||||
import Ubuntu.Components 1.3
|
||||
|
||||
PageHeader {
|
||||
id: stackHeader
|
||||
width: parent.width
|
||||
height: units.gu(6)
|
||||
title: i18n.tr("UTPass")
|
||||
|
||||
contents: Item {
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
Label {
|
||||
id: labelTitle
|
||||
text: stackHeader.title
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
|
||||
leadingActionBar.height: units.gu(4)
|
||||
leadingActionBar.actions: [
|
||||
Action {
|
||||
id: backAction
|
||||
iconName: "back"
|
||||
text: "Back"
|
||||
onTriggered: {
|
||||
pageStack.pop()
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user