WizardMainPage.qml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /**
  2. * Copyright (c) 2012 Nokia Corporation.
  3. */
  4. import QtQuick 1.1
  5. import com.nokia.symbian 1.1
  6. import "../Constants.js" as Constants
  7. Page {
  8. id: wizardMainPage
  9. property string uid: "wizardMainPage"
  10. tools: mainWizardPageToolBar
  11. ToolBar{
  12. id: mainWizardPageToolBar
  13. platformInverted: window.platformInverted
  14. ToolButton {
  15. flat: true
  16. platformInverted: window.platformInverted
  17. anchors.left: parent.left
  18. anchors.leftMargin: screen.width < screen.height ? 0 : 2 * platformStyle.paddingLarge
  19. anchors.verticalCenter: parent.verticalCenter
  20. iconSource: "toolbar-back"
  21. onClicked: pageStack.depth <= 1 ? window.pageStack.pop() : window.pageStack.pop()
  22. }
  23. ToolButton {
  24. platformInverted: window.platformInverted
  25. anchors.centerIn: parent
  26. width: parent.width / 2
  27. text: "Wizard"
  28. onClicked: {
  29. pageStack.push(Qt.resolvedUrl("InitialWizardPage.qml"))
  30. window.enableWizardPageIndicator(true);
  31. }
  32. }
  33. ToolButton{
  34. flat: true
  35. platformInverted: window.platformInverted
  36. anchors.right: parent.right
  37. anchors.rightMargin: screen.width < screen.height ? 0 : 2 * platformStyle.paddingLarge
  38. anchors.verticalCenter: parent.verticalCenter
  39. iconSource: platformInverted ? "../Images/Icons/information_userguide_w.svg" : "../Images/Icons/information_userguide.svg"
  40. onClicked: window.pageStack.push(Qt.resolvedUrl("../InfoPage.qml"), {text: Constants.WIZARD_INFOTEXT});
  41. }
  42. }
  43. Label{
  44. anchors.centerIn: parent
  45. platformInverted: window.platformInverted
  46. text: "Main page"
  47. }
  48. onStatusChanged: {
  49. if (status === PageStatus.Activating) {
  50. window.resetWizardIndicator();
  51. window.enableWizardPageIndicator(false);
  52. }
  53. }
  54. }