• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kde-runtime API Reference
  • KDE Home
  • Contact Us
 

PlasmaComponents

  • sources
  • kde-4.14
  • kde-runtime
  • plasma
  • declarativeimports
  • plasmacomponents
  • qml
BusyIndicator.qml
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2010 by Artur Duque de Souza <asouzakde.org>
3 * Copyright (C) 2011 by Daker Fernandes Pinheiro <dakerfp@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Library General Public License as
7 * published by the Free Software Foundation; either version 2, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details
14 *
15 * You should have received a copy of the GNU Library General Public
16 * License along with this program; if not, write to the
17 * Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20 
21 import QtQuick 1.1
22 import org.kde.plasma.core 0.1 as PlasmaCore
23 
29 Item {
30  id: busy
31 
37  property bool running: false
38 
39  // Plasma API
47  property bool smoothAnimation: true
48 
49  implicitWidth: 52
50  implicitHeight: 52
51 
52  // Should use animation's pause to keep the
53  // rotation smooth when running changes but
54  // it has lot's of side effects on
55  // initialization.
56  onRunningChanged: {
57  rotationAnimation.from = rotation;
58  rotationAnimation.to = rotation + 360;
59  }
60 
61  RotationAnimation on rotation {
62  id: rotationAnimation
63 
64  from: 0
65  to: 360
66  duration: 1500
67  running: busy.running
68  loops: Animation.Infinite
69  }
70 
71  PlasmaCore.SvgItem {
72  id: widget
73  svg: PlasmaCore.Svg { imagePath: "widgets/busywidget" }
74  elementId: "busywidget"
75 
76  anchors.centerIn: parent
77  width: Math.min(busy.width, busy.height)
78  height: width
79  smooth: !running || smoothAnimation
80  }
81 }
Item
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:08:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

PlasmaComponents

Skip menu "PlasmaComponents"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List

kde-runtime API Reference

Skip menu "kde-runtime API Reference"
  • KCMShell
  • KNotify
  • Plasma Runtime
  •     PlasmaCore
  •     DragAndDrop
  •     PlasmaComponents
  •     PlasmaExtraComponents
  •     QtExtraComponents

Search



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