1 import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
2 import "../UIConstants.js" as Const
7 property alias name: label.text
8 property bool isDirectory: false
9 property variant properties: null
10 property string filename: ""
11 property int textMax: 27
13 state: mouseArea.pressed && !root.disabled ? "pressed" : "unpressed"
18 signal clicked(variant prop)
24 color: Const.SHADOW_COLOR;
26 x: Const.SHADOW_OFFSET;
27 y: Const.SHADOW_OFFSET;
32 color: root.isDirectory ? "black" : "white"
33 height: label.height+20
34 width: label.width<=100 ? 120 : label.width+20
43 color: root.isDirectory ? "white" : "black"
46 visible: mouseArea.pressed
54 color: root.isDirectory ? "white" : "black"
59 if(text.length>root.textMax)
60 root.name = text.substring(0,root.textMax-3)+"...";
69 root.clicked(root.properties);
76 PropertyChanges {target: shadow; x: Const.SHADOW_OFFSET}
77 PropertyChanges {target: shadow; y: Const.SHADOW_OFFSET}
78 PropertyChanges {target: box; x: 0}
79 PropertyChanges {target: box; y: 0}
83 PropertyChanges {target: shadow; x: Const.SHADOW_OFFSET}
84 PropertyChanges {target: shadow; y: Const.SHADOW_OFFSET}
85 PropertyChanges {target: box; x: Const.SHADOW_OFFSET}
86 PropertyChanges {target: box; y: Const.SHADOW_OFFSET}