main.qml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import QtQuick 1.1
  2. import com.meego 1.0
  3. //import "mainapp.js" as Logic
  4. PageStackWindow {
  5. id: appWindow
  6. initialPage: mainPage
  7. MainPage{id: mainPage}
  8. // Preferences{id:preferencesPage}
  9. ToolBarLayout {
  10. id: commonTools
  11. visible: true
  12. ToolIcon {
  13. platformIconId: "toolbar-volume-off"
  14. anchors.left: parent.left
  15. onClicked: (myMenu.status == DialogStatus.Closed) ? myMenu.open() : myMenu.close()
  16. }
  17. ToolIcon {
  18. platformIconId: "toolbar-add"
  19. anchors.centerIn: parent
  20. //onClicked: initialPage = preferencesPage
  21. }
  22. ToolIcon {
  23. platformIconId: "toolbar-view-menu";
  24. anchors.right: parent===undefined ? undefined : parent.right
  25. onClicked: (myMenu.status == DialogStatus.Closed) ? myMenu.open() : myMenu.close()
  26. }
  27. }
  28. Menu {
  29. id: menu2
  30. visualParent: pageStack
  31. MenuLayout {
  32. MenuItem {
  33. text: "close this stuff"
  34. onClicked: menu2.close()
  35. }
  36. }
  37. }
  38. Menu {
  39. id: myMenu
  40. visualParent: pageStack
  41. MenuLayout {
  42. MenuItem { text: "Sample menu item"
  43. onClicked: menu2.open()
  44. }
  45. MenuItem { text: "Another Option" }
  46. }
  47. }
  48. }