1 import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
2 import "../UIConstants.js" as Const
6 property alias name: label.text
7 property alias description: details.text
8 property bool isDirectory: false
9 property bool isPhoto: false
10 property variant properties: null
11 property string filename: ""
12 property int textMax: 27
14 state: mouseArea.pressed && !root.disabled ? "pressed" : "unpressed"
19 signal clicked(variant prop)
25 color: Const.SHADOW_COLOR;
27 x: Const.SHADOW_OFFSET;
28 y: Const.SHADOW_OFFSET;
33 color: Const.TRANSPARENT
34 height: label.height+5*Const.DEFAULT_MARGIN
39 color: Const.DEFAULT_FOREGROUND_COLOR
41 anchors.bottom: box.bottom;
42 anchors.left: box.left;
43 anchors.right: box.right;
48 width: box.width-2*Const.TEXT_MARGIN+2*Const.DEFAULT_MARGIN
51 //color: root.isDirectory ? "white" : "black"
52 color: Const.DEFAULT_DIALOG_FOREGROUND_COLOR
53 //anchors.verticalCenter: box.verticalCenter
54 anchors.horizontalCenter: box.horizontalCenter
57 visible: mouseArea.pressed
60 width: boxShadow.width
61 anchors.bottom: boxShadow.bottom
62 anchors.horizontalCenter: box.horizontalCenter
70 x: Const.TEXT_MARGIN-5
71 source: root.isDirectory ? "../images/folder.png" : root.isPhoto ? "../images/photo.png" : "../images/document.png"
72 sourceSize.width: width
73 sourceSize.height: height
74 anchors.verticalCenter: box.verticalCenter
79 x: Const.TEXT_MARGIN + icon.width + 2*Const.DEFAULT_MARGIN
81 color: Const.DEFAULT_FOREGROUND_COLOR
82 elide: Text.ElideRight
84 width: root.width-x-Const.TEXT_MARGIN-2*Const.DEFAULT_MARGIN-arrow.width
85 anchors.verticalCenter: box.verticalCenter
90 x: Const.TEXT_MARGIN + icon.width + 2*Const.DEFAULT_MARGIN
94 elide: Text.ElideRight
96 width: root.width-x-Const.TEXT_MARGIN-2*Const.DEFAULT_MARGIN-arrow.width
97 //anchors.bottom: boxShadow.bottom
105 anchors.right: box.right
106 anchors.margins: Const.TEXT_MARGIN
107 source: "../images/next.png"
108 sourceSize.width: width
109 sourceSize.height: height
110 anchors.verticalCenter: box.verticalCenter
118 root.clicked(root.properties);
125 PropertyChanges {target: shadow; x: Const.SHADOW_OFFSET}
126 PropertyChanges {target: shadow; y: Const.SHADOW_OFFSET}
127 PropertyChanges {target: box; x: 0}
128 PropertyChanges {target: box; y: 0}
132 PropertyChanges {target: shadow; x: Const.SHADOW_OFFSET}
133 PropertyChanges {target: shadow; y: Const.SHADOW_OFFSET}
134 PropertyChanges {target: box; x: Const.SHADOW_OFFSET}
135 PropertyChanges {target: box; y: Const.SHADOW_OFFSET}