EventsPage.qml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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: page
  9. property string infoText: Constants.EMPTYCONTENT_INFOTEXT
  10. tools: toolBarBackAndInfo
  11. ListModel{
  12. id: outgoingEventsModel
  13. ListElement{title: "Outgoing event #1"}
  14. ListElement{title: "Outgoing event #2"}
  15. }
  16. Component {
  17. id: delegate
  18. ListItem {
  19. id: listItem
  20. platformInverted: window.platformInverted
  21. Column{
  22. anchors.left: parent.paddingItem.left
  23. anchors.right: parent.right
  24. anchors.verticalCenter: parent.verticalCenter
  25. ListItemText {
  26. id: titleLabel
  27. anchors.left: parent.left
  28. platformInverted: window.platformInverted
  29. role: "Title"
  30. text: title
  31. }
  32. }
  33. }
  34. }
  35. TabBarLayout{
  36. id: tabBar
  37. anchors.top: parent.top
  38. anchors.left: parent.left
  39. anchors.right: parent.right
  40. height: screen.width < screen.height ? privateStyle.tabBarHeightPortrait : privateStyle.tabBarHeightLandscape
  41. z: 10
  42. TabButton {
  43. tab: incomingEventsItem
  44. iconSource: "../Images/Icons/bookmark.svg"
  45. platformInverted: window.platformInverted;
  46. }
  47. TabButton {
  48. tab: outgoingEventsList
  49. iconSource: "../Images/Icons/map.svg"
  50. platformInverted: window.platformInverted;
  51. }
  52. }
  53. TabGroup{
  54. id: tabGroup
  55. anchors.top: tabBar.bottom
  56. anchors.left: parent.left
  57. anchors.right: parent.right
  58. anchors.bottom: parent.bottom
  59. Item{
  60. id: incomingEventsItem
  61. anchors.fill: parent
  62. Label{
  63. id: incomingEventsLabel
  64. anchors.verticalCenter: parent.verticalCenter
  65. width: parent.width
  66. platformInverted: window.platformInverted;
  67. font.pixelSize: 2 * platformStyle.fontSizeLarge
  68. wrapMode: Text.WordWrap
  69. horizontalAlignment: "AlignHCenter"
  70. text: "No incoming events"
  71. }
  72. }
  73. ListView {
  74. id: outgoingEventsList
  75. anchors.fill: parent
  76. clip: true
  77. model: outgoingEventsModel
  78. delegate: delegate
  79. }
  80. }
  81. }