Warning, /graphics/peruse/src/creator/qml/MessageBoxSheet.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2020 Dan Leinir Turthra Jensen <admin@leinir.dk> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 import QtQuick 2.12 0008 import QtQuick.Controls 2.12 as QtControls 0009 import QtQuick.Layouts 1.12 as QtLayouts 0010 0011 import org.kde.kirigami 2.13 as Kirigami 0012 0013 Kirigami.OverlaySheet { 0014 id: component 0015 0016 property alias title: headerLabel.text 0017 property alias text: messageLabel.text 0018 property list<QtObject> actions 0019 0020 showCloseButton: true 0021 header: Kirigami.Heading { 0022 id: headerLabel 0023 QtLayouts.Layout.fillWidth: true 0024 elide: Text.ElideRight 0025 } 0026 // This is a TextEdit rather than a label, because the QQC Label control 0027 // does not support text selection (and it's very useful to be able to 0028 // select error texts for searchy purposes) 0029 contentItem: TextEdit { 0030 id: messageLabel 0031 QtLayouts.Layout.preferredWidth: Kirigami.Units.gridUnit * 10 0032 QtLayouts.Layout.margins: Kirigami.Units.largeSpacing 0033 wrapMode: Text.Wrap 0034 readOnly: true 0035 selectByMouse: true 0036 color: Kirigami.Theme.textColor 0037 selectedTextColor: Kirigami.Theme.highlightedTextColor 0038 selectionColor: Kirigami.Theme.highlightColor 0039 } 0040 footer: QtLayouts.RowLayout { 0041 Item { QtLayouts.Layout.fillWidth: true } 0042 Repeater { 0043 model: component.actions; 0044 QtControls.Button { 0045 action: modelData 0046 Connections { 0047 target: action 0048 onTriggered: component.close() 0049 } 0050 } 0051 } 0052 } 0053 }