Warning, /plasma/print-manager/src/kcm/ui/BaseDevice.qml is written in an unsupported language. File is not indexed.

0001 /**
0002  SPDX-FileCopyrightText: 2023 Mike Noe <noeerover@gmail.com>
0003  SPDX-License-Identifier: GPL-2.0-or-later
0004  */
0005 
0006 import QtQuick
0007 import QtQuick.Layouts
0008 import QtQuick.Controls as QQC2
0009 import org.kde.kirigami as Kirigami
0010 
0011 ColumnLayout {
0012     id: root
0013     spacing: Kirigami.Units.largeSpacing*2
0014 
0015     Layout.fillWidth: true
0016     Layout.fillHeight: true
0017 
0018     property alias title: heading.title
0019     property alias subtitle: heading.subtitle
0020     property alias icon: heading.icon
0021     property alias helpText: helpLabel.text
0022 
0023     property list<Kirigami.Action> actions: []
0024 
0025     Component.onDestruction: {
0026         kcm.clearRecommendedDrivers()
0027         kcm.clearRemotePrinters()
0028     }
0029 
0030     Kirigami.IconTitleSubtitle {
0031         id: heading
0032 
0033         font.pointSize: Kirigami.Theme.defaultFont.pointSize * 1.15
0034         subtitleFont.pointSize: Kirigami.Theme.defaultFont.pointSize
0035 
0036         elide: Text.ElideRight
0037 
0038         icon.source: "printer"
0039         icon.width: Kirigami.Units.iconSizes.huge
0040         icon.height: Kirigami.Units.iconSizes.huge
0041 
0042         Layout.alignment: Qt.AlignHCenter
0043         Layout.bottomMargin: Kirigami.Units.largeSpacing
0044     }
0045 
0046     Kirigami.Heading {
0047         id: helpLabel
0048         level: 4
0049         visible: text.length > 0
0050         horizontalAlignment: Qt.AlignHCenter
0051         Layout.fillWidth: true
0052     }
0053 
0054     RowLayout {
0055         visible: actions.length > 0
0056         Layout.alignment: Qt.AlignHCenter
0057         Repeater {
0058             model: actions
0059             QQC2.Button {
0060                 action: modelData
0061                 visible: modelData.visible
0062                 enabled: modelData.enabled
0063             }
0064         }
0065     }
0066 }