Warning, /maui/nomad-style/BusyIndicator.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  * Copyright 2018 Oleg Chernovskiy <adonai@xaker.ru>
0003  * Copyright 2018 The Qt Company Ltd.
0004  *
0005  * GNU Lesser General Public License Usage
0006  * Alternatively, this file may be used under the terms of the GNU Lesser
0007  * General Public License version 3 as published by the Free Software
0008  * Foundation and appearing in the file LICENSE.LGPLv3 included in the
0009  * packaging of this file. Please review the following information to
0010  * ensure the GNU Lesser General Public License version 3 requirements
0011  * will be met: https://www.gnu.org/licenses/lgpl.html.
0012  *
0013  * GNU General Public License Usage
0014  * Alternatively, this file may be used under the terms of the GNU
0015  * General Public License version 2.0 or later as published by the Free
0016  * Software Foundation and appearing in the file LICENSE.GPL included in
0017  * the packaging of this file. Please review the following information to
0018  * ensure the GNU General Public License version 2.0 requirements will be
0019  * met: http://www.gnu.org/licenses/gpl-2.0.html.
0020  */
0021 
0022 
0023 import QtQuick 2.6
0024 import org.kde.kirigami 2.2 as Kirigami
0025 import QtQuick.Templates 2.3 as T
0026 
0027 T.BusyIndicator {
0028     id: controlRoot
0029 
0030     implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding
0031     implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding
0032 
0033     padding: 6
0034     spacing: Kirigami.Units.smallSpacing
0035 
0036     hoverEnabled: true
0037 
0038     contentItem: Kirigami.Icon {
0039         source: "view-refresh"
0040         opacity: controlRoot.running ? 1 : 0
0041 
0042         // appearing/fading opacity change
0043         Behavior on opacity {
0044             OpacityAnimator { duration: 250 }
0045         }
0046 
0047         // rotating loading icon
0048         RotationAnimator {
0049             target: controlRoot
0050             running: controlRoot.visible && controlRoot.running
0051             from: 360
0052             to: 0
0053             loops: Animation.Infinite
0054             duration: 1000
0055         }
0056     }
0057 }