KarmaFact.qml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. import QtQuick 1.1
  2. import "../js/UIConstants.js" as Ui
  3. import "../parts"
  4. KPage {
  5. id: root
  6. property string karmaId
  7. property alias karmaTitle: titleText.text
  8. property alias karmaName: nameText.text
  9. property alias karmaPoints: karmaPoints.text
  10. property alias karmaDescription: txtDescription.text
  11. Row {
  12. id: row
  13. spacing: 10
  14. anchors.left: parent.left
  15. anchors.right: parent.right
  16. anchors.top: titlebar.bottom
  17. anchors.margins:10
  18. height:70
  19. Item{
  20. width: 70
  21. height: parent.height
  22. Image{
  23. id: personImage
  24. height: 70
  25. width:70
  26. anchors.centerIn: parent
  27. source: "qrc:/violet/face"
  28. }
  29. }
  30. Column{
  31. height: root.height
  32. width: parent.width-personImage.width-karmaPoints.width-2*row.spacing
  33. Text {
  34. id: nameText
  35. width: parent.width
  36. font.pixelSize: Ui.FONT_LARGE
  37. verticalAlignment: Text.AlignVCenter
  38. text: "Name"
  39. }
  40. Text {
  41. id: titleText
  42. width: parent.width
  43. font.pixelSize: Ui.FONT_SMALL
  44. verticalAlignment: Text.AlignVCenter
  45. text: karmaTitle
  46. }
  47. Text {
  48. id: proposerText
  49. width: parent.width
  50. font.pixelSize: Ui.FONT_DEFAULT
  51. verticalAlignment: Text.AlignVCenter
  52. text: "Proposed by: Name"
  53. }
  54. }
  55. Text {
  56. id: karmaPoints;
  57. height: 70
  58. font.pixelSize: Ui.FONT_XLARGE
  59. font.bold: true
  60. width: 100
  61. verticalAlignment: Text.AlignVCenter
  62. horizontalAlignment: Text.AlignRight
  63. text: root.karmaPoints
  64. }
  65. }
  66. Text{
  67. id:txtDescription;
  68. anchors.left:parent.left
  69. anchors.right: parent.right
  70. anchors.top:row.bottom
  71. anchors.bottom: toolbar.top
  72. anchors.margins: 20
  73. text: karmaDescription
  74. }
  75. //Page layout is divided in 3
  76. TitleBar{
  77. id: titlebar
  78. }
  79. KToolBar{
  80. id: toolbar
  81. KButton{
  82. text:qsTr("Cancel")
  83. onClicked: pageStack.pop();
  84. }
  85. }
  86. }