1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- import QtQuick 1.1
- import "../js/UIConstants.js" as Ui
- Item {
- id: root
- property alias name: nameText.text
- property alias title: titleText.text
- property alias proposer: proposerText.text
- property alias points: karmaPoints.text
- property alias image: personImage.source
- property int marging: 20
- signal clicked
- height: 80
- //width: 500
- anchors.left: parent.left
- anchors.right: parent.right
- visible: (searchText.text.length==0 || nameText.text.toLocaleLowerCase().indexOf(searchText.text.toLowerCase())>=0 )
- Row {
- id: row
- spacing: 10
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins:10
- Item{
- width: 70
- height: root.height
- Image{
- id: personImage
- height: 70
- width:70
- anchors.centerIn: parent
- }
- }
- Column{
- height: root.height
- width: parent.width-personImage.width-karmaPoints.width-2*row.spacing
- Text {
- id: nameText
- width: parent.width
- font.pixelSize: Ui.FONT_LARGE
- verticalAlignment: Text.AlignVCenter
- }
- Text {
- id: titleText
- width: parent.width
- font.pixelSize: Ui.FONT_SMALL
- verticalAlignment: Text.AlignVCenter
- }
- Text {
- id: proposerText
- width: parent.width
- font.pixelSize: Ui.FONT_DEFAULT
- verticalAlignment: Text.AlignVCenter
- }
- }
- Text {
- id: karmaPoints;
- height: 70
- font.pixelSize: Ui.FONT_XLARGE
- font.bold: true
- width: 100
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignRight
- }
- }
- Rectangle{
- anchors.top: parent.bottom
- color: "#8f00ff"
- height: 2
- width: parent.width
- }
- MouseArea {
- id: mouseArea
- anchors.fill: row
- onClicked:{
- root.clicked();
- }
- }
- }
|