1
import org.kde.plasma.components 0.1
2
import org.kde.qtextracomponents 0.1
3
import "navigation.js" as Navigation
9
width: parentItem.cellWidth
10
height: parentItem.cellHeight
11
property bool requireClick: false
17
property bool displayDescription: false
18
onPositionChanged: if(!delegateRoot.requireClick) timer.restart()
19
onExited: { if(!delegateRoot.requireClick) timer.stop(); displayDescription=false}
23
onTriggered: delegateArea.displayDescription=true
26
if(delegateRoot.requireClick && !displayDescription) {
27
displayDescription=true
29
Navigation.openApplication(application)
35
contentHeight: delegateRoot.height*2
37
Behavior on contentY { NumberAnimation { duration: 200; easing.type: Easing.InQuad } }
42
horizontalCenter: parent.horizontalCenter
46
fillMode: Image.PreserveAspectFit
47
source: model.application.thumbnailUrl
48
width: parent.width; height: delegateRoot.height*0.7
56
if(status==Image.Error) {
57
sourceSize.width = height
58
sourceSize.height = height
59
source="image://icon/"+model.application.icon
60
smallIcon.visible = false
71
icon: model.application.icon
72
Behavior on y { NumberAnimation { duration: 200; easing.type: Easing.InQuad } }
81
horizontalAlignment: Text.AlignHCenter
82
elide: Text.ElideRight
91
top: parent.verticalCenter
96
if(state=="description")
97
descriptionLoader.sourceComponent=extraInfoComponent
102
State { name: "screenshot"
103
when: !delegateArea.displayDescription
104
PropertyChanges { target: smallIcon; y: 5+screen.height-height }
105
PropertyChanges { target: delegateFlickable; contentY: 0 }
107
State { name: "description"
108
when: delegateArea.displayDescription
109
PropertyChanges { target: smallIcon; y: 5+delegateRoot.height }
110
PropertyChanges { target: delegateFlickable; contentY: delegateRoot.height }
116
id: extraInfoComponent
123
bottom: installButton.top
124
rightMargin: smallIcon.visible ? 48 : 0
127
verticalAlignment: Text.AlignVCenter
128
horizontalAlignment: Text.AlignHCenter
129
wrapMode: Text.WordWrap
130
text: model.application.comment
132
InstallApplicationButton {
134
width: parent.width/3
137
bottom: parent.bottom
143
application: model.application
144
preferUpgrade: page.preferUpgrade
149
left: installButton.right
150
verticalCenter: installButton.verticalCenter
154
height: Math.min(installButton.height, width/5)
158
visible: !model.application.canUpgrade && model.rating>=0
161
text: i18n("Upgrade")
162
visible: model.application.canUpgrade
b'\\ No newline at end of file'