kimitake

PageStackWindow

Aug 7th, 2011
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. import QtQuick 1.0
  2. import com.nokia.meego 1.0
  3.  
  4. PageStackWindow {
  5. id: rootWindow
  6.  
  7. initialPage: Main { id: mainPage }
  8. Tweet { id: tweetPage }
  9. Preferences { id: preferencesPage }
  10. About { id: aboutPage }
  11.  
  12. Menu {
  13. id: myMenu
  14.  
  15. MenuLayout {
  16. MenuItem { text: "Exit"; onClicked: Qt.quit() }
  17. MenuItem { text: "About"; onClicked: aboutPage.open() }
  18. MenuItem { text: "Tweet"; onClicked: pageStack.push(tweetPage) }
  19. MenuItem { text: "Preferences";
  20. onClicked: {
  21. pageStack.push(preferencesPage)
  22. preferencesPage.showMain();
  23. }
  24. }
  25. }
  26. }
  27.  
  28. ToolBarLayout {
  29. id: commonTools
  30. visible: false
  31. ToolIcon {
  32. iconId: "toolbar-back"
  33. onClicked: pageStack.pop()
  34. visible: { pageStack.depth<=1 ? false : true }
  35. }
  36. ToolIcon {
  37. iconId: "toolbar-view-menu"
  38. anchors.right: parent.right
  39. onClicked: myMenu.open()
  40. }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment