Commit 0de8f967 authored by Juhapekka Piiroinen's avatar Juhapekka Piiroinen Committed by Alessandro Portale

Updated MeeGo 1.2 Harmattan QtQuick application template.

Includes an updated MeeGo/Harmattan application
template for QtQuick application wizard.

Change-Id: I746ccea7c0f680f5b4b177481b7eb18f861ad136
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@nokia.com>
parent 5623e520
......@@ -2,22 +2,65 @@ import QtQuick 1.1
import com.nokia.meego 1.0
Page {
id: page
tools: commonTools
Label {
id: label
anchors.centerIn: parent
text: qsTr("Hello world!")
visible: false
property string title : "Application Title"
Image {
id: pageHeader
anchors {
top: page.top
left: page.left
right: page.right
}
height: parent.width < parent.height ? 72 : 46
width: parent.width
source: "image://theme/meegotouch-view-header-fixed" + (theme.inverted ? "-inverted" : "")
z: 1
Label {
id: header
anchors {
verticalCenter: parent.verticalCenter
left: parent.left
leftMargin: 16
}
platformStyle: LabelStyle {
fontFamily: "Nokia Pure Text Light"
fontPixelSize: 32
}
text: page.title
}
}
Button{
Flickable {
id: pageFlickableContent
anchors {
horizontalCenter: parent.horizontalCenter
top: label.bottom
topMargin: 10
top: pageHeader.bottom
bottom: page.bottom
left: page.left
right: page.right
margins: 16
}
text: qsTr("Click here!")
onClicked: label.visible = true
contentHeight: pageContent.height
contentWidth: pageContent.width
flickableDirection: Flickable.VerticalFlick
Column {
id: pageContent
width: page.width - pageFlickableContent.anchors.margins * 2
spacing: 16
Button{
text: qsTr("Click here!")
onClicked: appWindow.showStatusBar = !appWindow.showStatusBar
}
}
}
ScrollDecorator {
flickableItem: pageFlickableContent
}
}
......@@ -12,19 +12,53 @@ PageStackWindow {
ToolBarLayout {
id: commonTools
visible: true
ToolIcon {
visible: pageStack.depth > 1
platformIconId: "toolbar-back"
onClicked: {
pageStack.pop();
}
}
ToolButton {
anchors.horizontalCenter: parent.horizontalCenter
text: theme.inverted ? "Inverted" : "Non-Inverted"
onClicked: {
theme.inverted = !theme.inverted;
}
}
ToolIcon {
platformIconId: "toolbar-view-menu"
anchors.right: (parent === undefined) ? undefined : parent.right
onClicked: (myMenu.status === DialogStatus.Closed) ? myMenu.open() : myMenu.close()
onClicked: {
appWindow.showToolBar = false;
myMenu.open();
}
}
}
QueryDialog {
id: aboutDialog
titleText: "Application Title"
message: "(C) [year] [your name]\n[version]"
}
Menu {
id: myMenu
visualParent: pageStack
MenuLayout {
MenuItem { text: qsTr("Sample menu item") }
MenuItem {
text: qsTr("About")
onClicked: {
aboutDialog.open();
}
}
}
onStatusChanged: {
if (status === DialogStatus.Closed) {
appWindow.showToolBar = true;
}
}
}
}
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