KarmaPendingVotingDelegate.qml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. import QtQuick 1.1
  2. import "../js/UIConstants.js" as Ui
  3. Item {
  4. id: root
  5. property alias name: nameText.text
  6. property alias title: titleText.text
  7. property alias proposer: proposerText.text
  8. property alias points: karmaPoints.text
  9. property alias image: personImage.source
  10. property int marging: 20
  11. signal clicked
  12. height: 80
  13. //width: 500
  14. anchors.left: parent.left
  15. anchors.right: parent.right
  16. visible: (searchText.text.length==0 || nameText.text.toLocaleLowerCase().indexOf(searchText.text.toLowerCase())>=0 )
  17. Row {
  18. id: row
  19. spacing: 10
  20. anchors.left: parent.left
  21. anchors.right: parent.right
  22. anchors.margins:10
  23. Item{
  24. width: 70
  25. height: root.height
  26. Image{
  27. id: personImage
  28. height: 70
  29. width:70
  30. anchors.centerIn: parent
  31. }
  32. }
  33. Column{
  34. height: root.height
  35. width: parent.width-personImage.width-karmaPoints.width-2*row.spacing
  36. Text {
  37. id: nameText
  38. width: parent.width
  39. font.pixelSize: Ui.FONT_LARGE
  40. verticalAlignment: Text.AlignVCenter
  41. }
  42. Text {
  43. id: titleText
  44. width: parent.width
  45. font.pixelSize: Ui.FONT_SMALL
  46. verticalAlignment: Text.AlignVCenter
  47. }
  48. Text {
  49. id: proposerText
  50. width: parent.width
  51. font.pixelSize: Ui.FONT_DEFAULT
  52. verticalAlignment: Text.AlignVCenter
  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. }
  64. }
  65. Rectangle{
  66. anchors.top: parent.bottom
  67. color: "#8f00ff"
  68. height: 2
  69. width: parent.width
  70. }
  71. MouseArea {
  72. id: mouseArea
  73. anchors.fill: row
  74. onClicked:{
  75. root.clicked();
  76. }
  77. }
  78. }