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 bool isPublic: false
11 property variant properties: null
12 property string filename: ""
13 property int textMax: 27
15 state: mouseArea.pressed && !root.disabled ? "pressed" : "unpressed"
20 signal clicked(variant prop)
26 color: Const.SHADOW_COLOR;
28 x: Const.SHADOW_OFFSET;
29 y: Const.SHADOW_OFFSET;
34 color: Const.TRANSPARENT
35 height: label.height+4*Const.DEFAULT_MARGIN
40 color: Const.DEFAULT_FOREGROUND_COLOR
42 anchors.bottom: box.bottom;
43 anchors.left: box.left;
44 anchors.right: box.right;
49 //width: box.width-2*Const.TEXT_MARGIN+2*Const.DEFAULT_MARGIN
53 //color: root.isDirectory ? "white" : "black"
54 color: Const.DEFAULT_DIALOG_FOREGROUND_COLOR
55 //anchors.verticalCenter: box.verticalCenter
56 anchors.horizontalCenter: box.horizontalCenter
59 visible: mouseArea.pressed
63 width: box.width-2*Const.TEXT_MARGIN
64 anchors.bottom: boxShadow.bottom
65 anchors.horizontalCenter: box.horizontalCenter
73 x: Const.TEXT_MARGIN-5
74 source: root.isDirectory ? "../images/folder.png" :
75 root.isPhoto ? "../images/photo.png" :
76 "../images/document.png"
77 sourceSize.width: width
78 sourceSize.height: height
79 anchors.verticalCenter: box.verticalCenter
84 x: Const.TEXT_MARGIN + icon.width + 2*Const.DEFAULT_MARGIN
86 color: Const.DEFAULT_FOREGROUND_COLOR
87 elide: Text.ElideRight
89 width: root.isPublic ?
90 root.width-x-Const.TEXT_MARGIN-3*Const.DEFAULT_MARGIN-arrow.width-publicIcon.width :
91 root.width-x-Const.TEXT_MARGIN-1*Const.DEFAULT_MARGIN-arrow.width
92 anchors.verticalCenter: box.verticalCenter
97 x: Const.TEXT_MARGIN + icon.width + 2*Const.DEFAULT_MARGIN
101 elide: Text.ElideRight
103 width: root.width-x-Const.TEXT_MARGIN-2*Const.DEFAULT_MARGIN-arrow.width
104 y: box.height-height+3
111 anchors.right: arrow.left
112 anchors.margins: Const.DEFAULT_MARGIN
113 source: "../images/internet.png"
114 sourceSize.width: width
115 sourceSize.height: height
116 anchors.verticalCenter: box.verticalCenter
117 visible: root.isPublic
124 anchors.right: box.right
125 anchors.margins: Const.TEXT_MARGIN
126 source: "../images/next.png"
127 sourceSize.width: width
128 sourceSize.height: height
129 anchors.verticalCenter: box.verticalCenter
137 root.clicked(root.properties);
144 PropertyChanges {target: shadow; x: Const.SHADOW_OFFSET}
145 PropertyChanges {target: shadow; y: Const.SHADOW_OFFSET}
146 PropertyChanges {target: box; x: 0}
147 PropertyChanges {target: box; y: 0}
151 PropertyChanges {target: shadow; x: Const.SHADOW_OFFSET}
152 PropertyChanges {target: shadow; y: Const.SHADOW_OFFSET}
153 PropertyChanges {target: box; x: Const.SHADOW_OFFSET}
154 PropertyChanges {target: box; y: Const.SHADOW_OFFSET}