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 isMusic: false
11 property bool isVideo: false
12 property bool isPublic: false
13 property variant properties: null
14 property string filename: ""
15 property int textMax: 27
17 state: mouseArea.pressed && !root.disabled ? "pressed" : "unpressed"
19 width: mainWindow.width
22 signal clicked(variant prop)
28 color: Const.SHADOW_COLOR;
30 x: Const.SHADOW_OFFSET;
31 y: Const.SHADOW_OFFSET;
36 color: Const.TRANSPARENT
37 height: label.height+4*Const.DEFAULT_MARGIN
42 color: Const.DEFAULT_FOREGROUND_COLOR
44 anchors.bottom: box.bottom;
45 anchors.left: box.left;
46 anchors.right: box.right;
51 //width: box.width-2*Const.TEXT_MARGIN+2*Const.DEFAULT_MARGIN
55 //color: root.isDirectory ? "white" : "black"
56 color: Const.DEFAULT_DIALOG_FOREGROUND_COLOR
57 //anchors.verticalCenter: box.verticalCenter
58 anchors.horizontalCenter: box.horizontalCenter
61 visible: mouseArea.pressed
65 width: box.width-2*Const.TEXT_MARGIN
66 anchors.bottom: boxShadow.bottom
67 anchors.horizontalCenter: box.horizontalCenter
75 x: Const.TEXT_MARGIN-5
76 source: root.isDirectory ? "../images/folder.png" :
77 root.isPhoto ? "../images/photo.png" :
78 root.isMusic ? "../images/music.png" :
79 root.isVideo ? "../images/video.png" : "../images/document.png"
80 sourceSize.width: width
81 sourceSize.height: height
82 anchors.verticalCenter: box.verticalCenter
87 x: Const.TEXT_MARGIN + icon.width + 2*Const.DEFAULT_MARGIN
89 color: Const.DEFAULT_FOREGROUND_COLOR
90 elide: Text.ElideRight
92 width: root.isPublic ?
93 root.width-x-Const.TEXT_MARGIN-3*Const.DEFAULT_MARGIN-arrow.width-publicIcon.width :
94 root.width-x-Const.TEXT_MARGIN-1*Const.DEFAULT_MARGIN-arrow.width
95 anchors.verticalCenter: box.verticalCenter
100 x: Const.TEXT_MARGIN + icon.width + 2*Const.DEFAULT_MARGIN
104 elide: Text.ElideRight
106 width: root.width-x-Const.TEXT_MARGIN-2*Const.DEFAULT_MARGIN-arrow.width
107 y: box.height-height+3
114 anchors.right: arrow.left
115 anchors.margins: Const.DEFAULT_MARGIN
116 source: "../images/internet.png"
117 sourceSize.width: width
118 sourceSize.height: height
119 anchors.verticalCenter: box.verticalCenter
120 visible: root.isPublic
127 anchors.right: box.right
128 anchors.margins: Const.DEFAULT_MARGIN
129 source: "../images/next.png"
130 sourceSize.width: width
131 sourceSize.height: height
132 anchors.verticalCenter: box.verticalCenter
140 root.clicked(root.properties);
147 PropertyChanges {target: shadow; x: Const.SHADOW_OFFSET}
148 PropertyChanges {target: shadow; y: Const.SHADOW_OFFSET}
149 PropertyChanges {target: box; x: 0}
150 PropertyChanges {target: box; y: 0}
154 PropertyChanges {target: shadow; x: Const.SHADOW_OFFSET}
155 PropertyChanges {target: shadow; y: Const.SHADOW_OFFSET}
156 PropertyChanges {target: box; x: Const.SHADOW_OFFSET}
157 PropertyChanges {target: box; y: Const.SHADOW_OFFSET}