Warning, /frameworks/kirigami/src/controls/LoadingPlaceholder.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2022 Felipe Kinoshita <kinofhek@gmail.com> 0002 // SPDX-License-Identifier: GPL-2.0-or-later 0003 0004 import QtQuick 2.15 0005 import QtQuick.Controls 2.15 as QQC2 0006 import QtQuick.Layouts 1.15 0007 import org.kde.kirigami 2.19 as Kirigami 0008 0009 /** 0010 * @brief A placeholder for loading pages. 0011 * 0012 * Example usage: 0013 * @code{.qml} 0014 * Kirigami.Page { 0015 * Kirigami.LoadingPlaceholder { 0016 * anchors.centerIn: parent 0017 * } 0018 * } 0019 * @endcode 0020 * 0021 * @code{.qml} 0022 * Kirigami.Page { 0023 * Kirigami.LoadingPlaceholder { 0024 * anchors.centerIn: parent 0025 * determinate: true 0026 * progressBar.value: loadingValue 0027 * } 0028 * } 0029 * @endcode 0030 * @inherit kirigami::PlaceholderMessage 0031 */ 0032 Kirigami.PlaceholderMessage { 0033 id: loadingPlaceholder 0034 0035 /** 0036 * @brief This property holds whether the loading message shows a 0037 * determinate progress bar or not. 0038 * 0039 * This should be @c true if you want to display the actual 0040 * percentage when it's loading. 0041 * 0042 * default: ``false`` 0043 */ 0044 property bool determinate: false 0045 0046 /** 0047 * @brief This property holds a progress bar. 0048 * 0049 * This should be used to access the progress bar to change its value. 0050 * 0051 * @property QtQuick.Controls.ProgressBar _progressBar 0052 */ 0053 property alias progressBar: _progressBar 0054 0055 text: qsTr("Loading…") 0056 0057 QQC2.ProgressBar { 0058 id: _progressBar 0059 Layout.alignment: Qt.AlignHCenter 0060 Layout.fillWidth: true 0061 Layout.maximumWidth: Kirigami.Units.gridUnit * 20 0062 indeterminate: !determinate 0063 from: 0 0064 to: 100 0065 } 0066 }