Warning, /plasma/xdg-desktop-portal-kde/src/AccessDialog.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  * SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleixpol@kde.org>
0003  */
0004 
0005 import QtQuick
0006 import QtQuick.Controls as QQC2
0007 import QtQuick.Layouts
0008 import org.kde.plasma.workspace.dialogs as PWD
0009 
0010 PWD.SystemDialog {
0011     id: root
0012 
0013     property alias body: bodyLabel.text
0014     property string acceptLabel
0015     property string rejectLabel
0016 
0017     QQC2.Label {
0018         id: bodyLabel
0019         Layout.fillWidth: true
0020         wrapMode: Text.WordWrap
0021     }
0022 
0023     standardButtons: QQC2.DialogButtonBox.Ok | QQC2.DialogButtonBox.Cancel
0024 
0025     Component.onCompleted: {
0026         if (root.acceptLabel.length > 0) {
0027             dialogButtonBox.button(QQC2.DialogButtonBox.Ok).text = Qt.binding(() => root.acceptLabel);
0028         }
0029         if (root.rejectLabel.length > 0) {
0030             dialogButtonBox.button(QQC2.DialogButtonBox.Cancel).text = Qt.binding(() => root.rejectLabel);
0031         }
0032     }
0033 }