-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathImgcodec.qml
55 lines (47 loc) · 1.05 KB
/
Imgcodec.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import QtQuick 1.0
Item
{
id: imgrect
width: 140; height: width+20
//source:"images/cellbg.png"
property variant group
property alias path2: imgsel.source
property alias path: imgcodec.source
property alias name: codecText.text
property alias idcell: imgcodec
signal imgClick()
Text{
id: codecText
color: "white"
anchors.horizontalCenter: parent.horizontalCenter
}
Image{
id:imgsel
anchors.topMargin: 20
anchors.fill: parent
source: parent.path2
opacity: 0
}
Image{
id: imgcodec
anchors.topMargin: 20
anchors.fill: parent
source: parent.path
MouseArea {
anchors.fill: parent
onClicked: {imgClick() }
}
states: State{
name: "selected"
when: group.selected == imgcodec
PropertyChanges {target: imgcodec; opacity: 0}
PropertyChanges {target: imgsel; opacity: 1}
}
transitions: Transition {
from: ""
to: "selected"
PropertyAnimation { properties: "opacity"; duration: 300}
reversible: true
}
}
}