Warning, /libraries/kirigami-addons/src/dateandtime/private/Hand.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  *   SPDX-FileCopyrightText: 2012 Viranch Mehta <viranch.mehta@gmail.com>
0003  *   SPDX-FileCopyrightText: 2012 Marco Martin <mart@kde.org>
0004  *   SPDX-FileCopyrightText: 2013 David Edmundson <davidedmundson@kde.org>
0005  *
0006  *   SPDX-License-Identifier: LGPL-2.0-or-later
0007  */
0008 
0009 import QtQuick 2.0
0010 
0011 import org.kde.plasma.core 2.0 as PlasmaCore
0012 
0013 PlasmaCore.SvgItem {
0014     id: secondHand
0015 
0016     property alias rotation: rotation.angle
0017     property double svgScale
0018 
0019     width: Math.round(naturalSize.width * svgScale) + Math.round(naturalSize.width * svgScale) % 2
0020     height: Math.round(naturalSize.height * svgScale) + width % 2
0021     anchors {
0022         top: clock.verticalCenter
0023         topMargin: -width/2
0024         horizontalCenter: clock.horizontalCenter
0025     }
0026 
0027     svg: clockSvg
0028     smooth: !anim.running
0029     transform: Rotation {
0030         id: rotation
0031         angle: 0
0032         origin {
0033             x: secondHand.width/2
0034             y: secondHand.width/2
0035         }
0036         Behavior on angle {
0037             RotationAnimation {
0038                 id: anim
0039                 duration: 200
0040                 direction: RotationAnimation.Clockwise
0041                 easing.type: Easing.OutElastic
0042                 easing.overshoot: 0.5
0043             }
0044         }
0045     }
0046 }