8pragma ComponentBehavior: Bound
11import QtQuick.Controls as QQC2
13import QtQuick.Templates as T
15import org.kde.kirigami as Kirigami
16import org.kde.kcmutils as KCMUtils
19Kirigami.CheckSubtitleDelegate {
25 required property var model
27 property list<T.Action> additionalActions
29 property alias leading: leadingProxy.target
31 readonly
property bool enabledByDefault: model?.enabledByDefault ??
false
32 readonly
property var metaData: model?.metaData
33 readonly
property bool configureVisible: model?.config.isValid ??
false
35 signal configTriggered()
38 width: ListView.view?.width
40 icon.name: model?.icon ?? ""
41 text: model?.name ?? ""
42 subtitle: model?.description ?? ""
43 checked: model?.enabled ?? false
46 onToggled: model.enabled = checked
48 contentItem: RowLayout {
52 readonly
property alias truncated: titleSubtitle.truncated
56 visible: target !== null
62 Layout.fillWidth:
true
63 Layout.maximumWidth: Math.ceil(implicitWidth)
65 icon: icon.fromControlsIcon(listItem.icon)
67 subtitle: listItem.subtitle
68 reserveSpaceForSubtitle:
true
72 Layout.fillWidth:
true
73 Layout.alignment:
Qt.AlignRight
74 alignment:
Qt.AlignRight
75 actions: [infoAction, configureAction, ...listItem.additionalActions]
79 KCMUtils.SettingHighlighter {
80 target: listItem.indicator
81 highlight: listItem.checked !== listItem.enabledByDefault
88 icon.name:
"help-about-symbolic"
89 text:
i18ndc(
"kcmutils6",
"@info:tooltip",
"About")
90 displayHint:
Kirigami.DisplayHint.IconOnly
92 const aboutDialog = (listItem.ListView.view ?? listItem.parent.ListView.view).__aboutDialog;
93 aboutDialog.metaDataInfo = listItem.metaData;
101 visible: listItem.configureVisible
102 enabled: listItem.checked
103 icon.name:
"configure-symbolic"
104 text:
i18ndc(
"kcmutils6",
"@info:tooltip",
"Configureā¦")
105 displayHint:
Kirigami.DisplayHint.IconOnly
106 onTriggered: listItem.configTriggered()
QString i18ndc(const char *domain, const char *context, const char *text, const TYPE &arg...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:02:19 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.