Warning, /maui/mauikit/src/style.5/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.15 0024 import org.mauikit.controls 1.3 as Maui 0025 0026 import QtQuick.Templates 2.15 as T 0027 0028 T.BusyIndicator 0029 { 0030 id: controlRoot 0031 0032 implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding 0033 implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding 0034 0035 padding: Maui.Style.defaultPadding 0036 spacing: Maui.Style.defaultSpacing 0037 0038 hoverEnabled: true 0039 0040 contentItem: Maui.Icon 0041 { 0042 source: "view-refresh" 0043 opacity: controlRoot.running ? 1 : 0 0044 color: Maui.Theme.textColor 0045 // appearing/fading opacity change 0046 Behavior on opacity 0047 { 0048 OpacityAnimator { duration: 250 } 0049 } 0050 0051 // rotating loading icon 0052 RotationAnimator 0053 { 0054 target: controlRoot 0055 running: controlRoot.visible && controlRoot.running 0056 from: 0 0057 to: 360 0058 loops: Animation.Infinite 0059 duration: 1000 0060 } 0061 } 0062 }