2 import QtQuick.Controls 2.0
3 import QtGraphicalEffects 1.0
9 property string icon: model.icon
21 anchors.top: parent.top
23 anchors.horizontalCenter: parent.horizontalCenter
26 source: './images/%1_%2.svg'.arg(model.icon).arg(loc.pressed && (loc.index === model.index || loc.currentId === model.id) ? 'active' : 'inactive')
27 antialiasing: item.state !== ''
29 property string initial: model.name.substring(0,1).toUpperCase()
35 anchors.centerIn: parent
42 anchors.centerIn: parent
43 anchors.horizontalCenterOffset: model.index / 3 - 1
44 anchors.verticalCenterOffset: model.index % 3 - 1
47 model: main.icon === 'blank' ? 9 : 0
50 layer.effect: LinearGradient {
52 GradientStop { position: -0.5; color: "#6BFBFF" }
53 GradientStop { position: +1.5; color: "#00ADDC" }
60 anchors.top: item.bottom
61 anchors.left: parent.left
62 anchors.right: parent.right
66 wrapMode: Text.WordWrap
67 horizontalAlignment: Text.AlignHCenter
69 text: qsTr(model.name.toUpperCase())
72 Behavior on x { enabled: item.state !== 'active'; NumberAnimation { duration: 400; easing.type: Easing.OutCubic } }
73 Behavior on y { enabled: item.state !== 'active'; NumberAnimation { duration: 400; easing.type: Easing.OutCubic } }
74 SequentialAnimation on rotation {
75 NumberAnimation { to: 5; duration: 100 }
76 NumberAnimation { to: -5; duration: 200 }
77 NumberAnimation { to: 0; duration: 100 }
78 running: loc.currentId !== '' && item.state !== 'active'
79 loops: Animation.Infinite; alwaysRunToEnd: true
84 when: loc.currentId === model.id
87 x: loc.mouseX - width/2
88 y: loc.mouseY - height/2
94 when: loc.currentId !== ''
102 transitions: Transition { NumberAnimation { properties: 'scale, opacity, x, y'; duration: 150; easing.type: Easing.OutCubic} }