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

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 ...@@ -2,22 +2,65 @@ import QtQuick 1.1
import com.nokia.meego 1.0 import com.nokia.meego 1.0
Page { Page {
id: page
tools: commonTools tools: commonTools
Label { property string title : "Application Title"
id: label
anchors.centerIn: parent Image {
text: qsTr("Hello world!") id: pageHeader
visible: false 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 { anchors {
horizontalCenter: parent.horizontalCenter top: pageHeader.bottom
top: label.bottom bottom: page.bottom
topMargin: 10 left: page.left
right: page.right
margins: 16
} }
text: qsTr("Click here!") contentHeight: pageContent.height
onClicked: label.visible = true 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 { ...@@ -12,19 +12,53 @@ PageStackWindow {
ToolBarLayout { ToolBarLayout {
id: commonTools 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 { ToolIcon {
platformIconId: "toolbar-view-menu" platformIconId: "toolbar-view-menu"
anchors.right: (parent === undefined) ? undefined : parent.right onClicked: {
onClicked: (myMenu.status === DialogStatus.Closed) ? myMenu.open() : myMenu.close() appWindow.showToolBar = false;
myMenu.open();
}
} }
} }
QueryDialog {
id: aboutDialog
titleText: "Application Title"
message: "(C) [year] [your name]\n[version]"
}
Menu { Menu {
id: myMenu id: myMenu
visualParent: pageStack visualParent: pageStack
MenuLayout { 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