• Skip to content
  • Skip to link menu
KDE API Documentation - GCButtonCancel.qml Source File (GCompris-qt)
  • KDE Home
  • Contact Us
 

GCompris-qt

  • src
  • core
GCButtonCancel.qml
1 /* GCompris - GCButtonCancel.qml
2  *
3  * Copyright (C) 2015 Bruno Coudoin <bruno.coudoin@gcompris.net>
4  *
5  * Authors:
6  * Bruno Coudoin <bruno.coudoin@gcompris.net>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, see <http://www.gnu.org/licenses/>.
20  */
21 import QtQuick 2.2
22 import QtQuick.Controls 1.0
23 import GCompris 1.0
24 
31 Image {
32  id: cancel
33  source: "qrc:/gcompris/src/core/resource/cancel.svg";
34  anchors.right: parent.right
35  anchors.top: parent.top
36  smooth: true
37  sourceSize.width: 60 * ApplicationInfo.ratio
38  anchors.margins: 10
39 
40  signal close
41 
42  SequentialAnimation {
43  id: anim
44  running: true
45  loops: Animation.Infinite
46  NumberAnimation {
47  target: cancel
48  property: "rotation"
49  from: -10; to: 10
50  duration: 500
51  easing.type: Easing.InOutQuad
52  }
53  NumberAnimation {
54  target: cancel
55  property: "rotation"
56  from: 10; to: -10
57  duration: 500
58  easing.type: Easing.InOutQuad }
59  }
60  MouseArea {
61  anchors.fill: parent
62  onClicked: close()
63  }
64 }
QtQuick
GCompris
ApplicationInfo
A general purpose singleton that exposes miscellaneous native functions to the QML layer...
Definition: ApplicationInfo.h:43
ApplicationInfo::ratio
qreal ratio
Ratio factor used for scaling of sizes on high-dpi devices.
Definition: ApplicationInfo.h:91
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.

GCompris-qt

Skip menu "GCompris-qt"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • File List
  • Modules

Class Picker

Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal