2
* Copyright 2012 Viranch Mehta <viranch.mehta@gmail.com>
3
* Copyright 2012 Marco Martin <mart@kde.org>
4
* Copyright 2013 David Edmundson <davidedmundson@kde.org>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU Library General Public License as
8
* published by the Free Software Foundation; either version 2 or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU Library General Public License for more details
16
* You should have received a copy of the GNU Library General Public
17
* License along with this program; if not, write to the
18
* Free Software Foundation, Inc.,
19
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
import org.kde.plasma.calendar 2.0 as PlasmaCalendar
24
import QtQuick.Layouts 1.1
26
import org.kde.plasma.core 2.0 as PlasmaCore
30
property int value: 30
34
imagePath: "widgets/analog_meter"
39
anchors.centerIn: parent
40
width: Math.min(parent.width, parent.height)
41
height: width / (naturalSize.width / naturalSize.height)
43
elementId: "background"
49
elementId: "rotatecenter"
52
x: face.x + meterSvg.elementRect("rotatecenter").x * svgScale
53
y: face.y + meterSvg.elementRect("rotatecenter").y * svgScale
55
property real svgScale: face.width / face.naturalSize.width
56
width: naturalSize.width * svgScale
57
height: naturalSize.height * svgScale
62
anchors.horizontalCenter: parent.horizontalCenter
64
elementId: "pointer-shadow"
65
width: naturalSize.width * centerScrew.svgScale
66
height: naturalSize.height * centerScrew.svgScale
72
anchors.horizontalCenter: parent.horizontalCenter
75
width: naturalSize.width * centerScrew.svgScale
76
height: naturalSize.height * centerScrew.svgScale