main.qml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. import "Wizard"
  8. PageStackWindow {
  9. id: window
  10. initialPage: MainPage {tools: toolBarLayout}
  11. showStatusBar: true
  12. showToolBar: true
  13. LayoutMirroring.childrenInherit: true
  14. function enableWizardPageIndicator(enabled) {
  15. wizardPageIndicator.visible = enabled;
  16. }
  17. function switchWizardIndicatorToNextPage() {
  18. wizardPageIndicator.switchToNextWizardPage();
  19. }
  20. function switchWizardIndicatorToPreviousPage() {
  21. wizardPageIndicator.switchToPreviousWizardPage();
  22. }
  23. function resetWizardIndicator() {
  24. wizardPageIndicator.reset();
  25. }
  26. onOrientationChangeFinished: {
  27. console.log("Orientation change finished")
  28. }
  29. StatusBar {
  30. id: statusBar
  31. anchors.top: parent.top
  32. }
  33. ToolBarLayout {
  34. id: toolBarBackAndInfo
  35. ToolButton {
  36. flat: true
  37. iconSource: "toolbar-back"
  38. platformInverted: window.platformInverted
  39. onClicked: window.pageStack.depth <= 1 ? Qt.quit() : window.pageStack.pop()
  40. }
  41. ToolButton {
  42. flat: true
  43. iconSource: platformInverted ? "Images/Icons/information_userguide_w.svg" : "Images/Icons/information_userguide.svg"
  44. platformInverted: window.platformInverted
  45. onClicked: window.pageStack.push(Qt.resolvedUrl("InfoPage.qml"), {text: window.pageStack.currentPage.infoText});
  46. }
  47. }
  48. ToolBarLayout {
  49. id: toolBarLayout
  50. ToolButton {
  51. flat: true
  52. iconSource: "toolbar-back"
  53. platformInverted: window.platformInverted
  54. onClicked: window.pageStack.depth <= 1 ? Qt.quit() : window.pageStack.pop()
  55. }
  56. ToolButton{
  57. flat: true
  58. checkable: true
  59. platformInverted: window.platformInverted
  60. iconSource: platformInverted ? "Images/Icons/toolbar_flip_w.svg" : "Images/Icons/toolbar_flip.svg"
  61. onClicked: window.LayoutMirroring.enabled = !window.LayoutMirroring.enabled
  62. }
  63. ToolButton{
  64. flat: true
  65. iconSource: platformInverted ? "Images/Icons/personalise_w.svg" : "Images/Icons/personalise.svg"
  66. checkable: true
  67. platformInverted: window.platformInverted
  68. onCheckedChanged: window.platformInverted = checked;
  69. }
  70. ToolButton {
  71. flat: true
  72. iconSource: platformInverted ? "Images/Icons/information_userguide_w.svg" : "Images/Icons/information_userguide.svg"
  73. platformInverted: window.platformInverted
  74. onClicked: window.pageStack.push(Qt.resolvedUrl("InfoPage.qml"), {text: Constants.START_VIEW_INFO_TEXT});
  75. }
  76. }
  77. WizardPageIndicator{
  78. id: wizardPageIndicator
  79. z: pageStack.depth + 1
  80. anchors.bottom: parent.bottom
  81. anchors.horizontalCenter: parent.horizontalCenter
  82. pageCount: 3
  83. activePageIndex: 0
  84. visible: false
  85. }
  86. }