GCompris-qt
29 property color borderColor
30 property int borderWidth
32 property bool isClickable:
true
35 function isVisible(index) {
36 var value = item.value
40 if(value >= 2) visible =
true
43 if(value >= 6) visible =
true
46 if(value >= 4) visible =
true
49 if(value >= 8) visible =
true
52 if(value == 1 || value == 3 || value == 5 ||
53 value == 7 || value == 9) visible =
true
56 if(value >= 8) visible =
true
59 if(value >= 4) visible =
true
62 if(value >= 6) visible =
true
65 if(value >= 2) visible =
true
74 anchors.horizontalCenter: parent.horizontalCenter
75 anchors.verticalCenter: parent.verticalCenter
76 horizontalItemAlignment: Grid.AlignHCenter
77 verticalItemAlignment: Grid.AlignVCenter
84 border.width: item.borderWidth
86 border.color: item.borderColor
88 opacity: isVisible(index)
90 Behavior on opacity { PropertyAnimation { duration: 200 } }
96 audioEffects.
play(
'qrc:/gcompris/src/core/resource/sounds/scroll.wav')
97 if(item.value == item.valueMax)
104 audioEffects.play(
'qrc:/gcompris/src/core/resource/sounds/scroll.wav')
106 item.value = item.valueMax
114 acceptedButtons: Qt.LeftButton | Qt.RightButton
116 if (mouse.button == Qt.LeftButton)
128 onTriggered: goUp ? up() : down()
135 maximumTouchPoints: 1
142 if(touchPoints.length) {
143 var touch = touchPoints[0]
144 if(touch.y < parent.y + parent.height)
150 onReleased: timer.stop()
A QML component for audio playback.
void play(string file)
When mute is changed we set the volume to 0 to mute a potential playing sound.
bool isMobile
Whether the application is currently running on a mobile platform.
A general purpose singleton that exposes miscellaneous native functions to the QML layer...
This file is part of the KDE documentation.
Documentation copyright © 1996-2015 The KDE developers.
Generated on Tue Jun 2 2015 21:47:47 by
doxygen 1.8.9.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.