Warning, /plasma-mobile/mycroft-plasmoid-mobile/plasmoid/contents/ui/CustomIndicator.qml is written in an unsupported language. File is not indexed.
0001
0002 /* Copyright 2016 Aditya Mehra <aix.m@outlook.com>
0003
0004 This library is free software; you can redistribute it and/or
0005 modify it under the terms of the GNU Lesser General Public
0006 License as published by the Free Software Foundation; either
0007 version 2.1 of the License, or (at your option) version 3, or any
0008 later version accepted by the membership of KDE e.V. (or its
0009 successor approved by the membership of KDE e.V.), which shall
0010 act as a proxy defined in Section 6 of version 3 of the license.
0011
0012 This library is distributed in the hope that it will be useful,
0013 but WITHOUT ANY WARRANTY; without even the implied warranty of
0014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0015 Lesser General Public License for more details.
0016
0017 You should have received a copy of the GNU Lesser General Public
0018 License along with this library. If not, see <http://www.gnu.org/licenses/>.
0019 */
0020
0021 import QtQuick 2.9
0022 import QtQuick.Controls 2.2
0023 import QtQuick.Layouts 1.3
0024 import QtGraphicalEffects 1.0
0025
0026 Item{
0027 id: customIndicatorBusy
0028 anchors.centerIn: parent
0029 property alias cstanim: customIndicatorBusy
0030 property bool running: false
0031 visible: false
0032
0033 Item {
0034 implicitWidth: units.gridUnit * 3
0035 implicitHeight: units.gridUnit * 3
0036
0037 Rectangle {
0038 id: antiinnerCircleOutVert
0039 anchors.centerIn: parent
0040 color: "skyblue"
0041 radius: 8
0042 implicitWidth: units.gridUnit * 1.2
0043 implicitHeight: units.gridUnit * 1.2
0044 }
0045
0046 Rectangle {
0047 id: innerCircleOutHoriz
0048 anchors.centerIn: parent
0049 color: "steelblue"
0050 radius: 5
0051 implicitWidth: units.gridUnit * 2.2
0052 implicitHeight: units.gridUnit * 1.2
0053 }
0054
0055 Rectangle {
0056 id: innerCircleOutVert
0057 anchors.centerIn: parent
0058 color: "steelblue"
0059 radius: 5
0060 implicitWidth: units.gridUnit * 1.2
0061 implicitHeight: units.gridUnit * 2.2
0062 }
0063
0064 Rectangle {
0065 id: innerCircleIn
0066 anchors.centerIn: parent
0067 color: "lightblue"
0068 border.color: "steelblue"
0069 border.width: units.gridUnit * 0.2
0070 radius: 100
0071 implicitWidth: units.gridUnit * 1.7
0072 implicitHeight: units.gridUnit * 1.7
0073
0074 Image {
0075 id: innerPulser
0076 source: "../images/midanim.png"
0077 anchors.centerIn: parent
0078 height: units.gridUnit * 3.0
0079 width: units.gridUnit * 3.0
0080 }
0081
0082 ColorOverlay {
0083 anchors.fill: innerPulser
0084 source: innerPulser
0085 color: "steelblue"
0086 }
0087 }
0088
0089 RotationAnimator {
0090 target: innerCircleOutHoriz
0091 running: customIndicatorBusy.running
0092 from: 0
0093 to: 360
0094 loops: Animation.Infinite
0095 duration: 6000
0096 }
0097
0098 ScaleAnimator {
0099 target: innerCircleOutHoriz
0100 running: customIndicatorBusy.running
0101 from: 1.1
0102 to: 0.5
0103 duration: 1200
0104 loops: Animation.Infinite
0105 }
0106
0107 RotationAnimator {
0108 target: innerCircleOutVert
0109 running: customIndicatorBusy.running
0110 from: 0
0111 to: 360
0112 loops: Animation.Infinite
0113 duration: 6000
0114 }
0115
0116 RotationAnimator {
0117 target: antiinnerCircleOutVert
0118 running: customIndicatorBusy.running
0119 from: 360
0120 to: 0
0121 loops: Animation.Infinite
0122 duration: 6000
0123 }
0124
0125 ScaleAnimator {
0126 target: innerCircleOutVert
0127 running: customIndicatorBusy.running
0128 from: 1.1
0129 to: 0.5
0130 duration: 1200
0131 loops: Animation.Infinite
0132 }
0133
0134 ScaleAnimator {
0135 target: antiinnerCircleOutVert
0136 running: customIndicatorBusy.running
0137 from: 0.5
0138 to: 1.3
0139 duration: 1200
0140 loops: Animation.Infinite
0141 }
0142
0143 ScaleAnimator {
0144 target: innerCircleIn
0145 running: customIndicatorBusy.running
0146 from: 1
0147 to: 0.7
0148 duration: 1200
0149 loops: Animation.Infinite
0150 }
0151 }
0152 }