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)
26 color: Const.TRANSPARENT
27 height: label.height+4*Const.DEFAULT_MARGIN
36 color: Const.DEFAULT_DIALOG_FOREGROUND_COLOR
37 anchors.horizontalCenter: box.horizontalCenter
39 visible: mouseArea.pressed
43 width: box.width-2*Const.TEXT_MARGIN
44 anchors.bottom: boxShadow.bottom
45 anchors.horizontalCenter: box.horizontalCenter
53 x: Const.TEXT_MARGIN-5
54 source: root.isDirectory ? "../images/folder.png" :
55 root.isPhoto ? "../images/photo.png" :
56 root.isMusic ? "../images/music.png" :
57 root.isVideo ? "../images/video.png" : "../images/document.png"
58 sourceSize.width: width
59 sourceSize.height: height
60 anchors.verticalCenter: box.verticalCenter
65 x: Const.TEXT_MARGIN + icon.width + 2*Const.DEFAULT_MARGIN
67 color: Const.DEFAULT_FOREGROUND_COLOR
68 elide: Text.ElideRight
70 width: root.isPublic ?
71 root.width-x-Const.TEXT_MARGIN-3*Const.DEFAULT_MARGIN-arrow.width-publicIcon.width :
72 root.width-x-Const.TEXT_MARGIN-1*Const.DEFAULT_MARGIN-arrow.width
73 anchors.verticalCenter: box.verticalCenter
78 x: Const.TEXT_MARGIN + icon.width + 2*Const.DEFAULT_MARGIN
82 elide: Text.ElideRight
84 width: root.width-x-Const.TEXT_MARGIN-2*Const.DEFAULT_MARGIN-arrow.width
85 y: box.height-height+3
92 anchors.right: arrow.left
93 anchors.margins: Const.DEFAULT_MARGIN
94 source: "../images/internet.png"
95 sourceSize.width: width
96 sourceSize.height: height
97 anchors.verticalCenter: box.verticalCenter
98 visible: root.isPublic
105 anchors.right: box.right
106 anchors.margins: Const.DEFAULT_MARGIN
107 source: "../images/next.png"
108 sourceSize.width: width
109 sourceSize.height: height
110 anchors.verticalCenter: box.verticalCenter
118 root.clicked(root.properties);