8import QtQuick.Layouts 1.4
9import QtQuick.Controls 2.2 as QQC2
10import QtQuick.Templates 2.2 as T2
11import org.kde.kitemmodels 1.0
12import org.kde.kirigami 2.14 as Kirigami
27 required property T2.ItemDelegate parentDelegate
33 required property KDescendantsProxyModel model
38 property color decorationHighlightColor
45 required property int index
52 required property int kDescendantLevel
59 required property var kDescendantHasSiblings
66 required property bool kDescendantExpandable
73 required property bool kDescendantExpanded
75 Layout.topMargin: -parentDelegate.topPadding
76 Layout.bottomMargin: -parentDelegate.bottomPadding
78 model: kDescendantLevel - 1
80 Layout.preferredWidth: controlRoot.width
81 Layout.fillHeight: true
85 horizontalCenter: parent.horizontalCenter
89 visible: kDescendantHasSiblings[modelData]
90 color: Kirigami.Theme.textColor
98 Layout.preferredWidth: Kirigami.Units.gridUnit
99 Layout.fillHeight: true
100 enabled: kDescendantExpandable
101 onClicked: model.toggleChildren(parentDelegate.index)
104 implicitWidth: Kirigami.Units.gridUnit
107 horizontalCenter: parent.horizontalCenter
109 bottom: expander.visible ? expander.top : parent.verticalCenter
111 color: Kirigami.Theme.textColor
117 anchors.centerIn: parent
118 width: Kirigami.Units.iconSizes.small
120 source: kDescendantExpanded ? "go-down-symbolic" : (
Qt.application.layoutDirection ==
Qt.RightToLeft ?
"go-previous-symbolic" :
"go-next-symbolic")
122 color: controlRoot.hovered ? decorationLayout.decorationHighlightColor ? decorationLayout.decorationHighlightColor :
Kirigami.Theme.highlightColor :
Kirigami.Theme.textColor
124 Behavior on color { ColorAnimation { duration:
Kirigami.
Units.shortDuration; easing.type: Easing.InOutQuad } }
125 visible: kDescendantExpandable
129 horizontalCenter: parent.horizontalCenter
130 top: expander.visible ? expander.bottom : parent.verticalCenter
131 bottom: parent.bottom
133 visible: kDescendantHasSiblings[kDescendantHasSiblings.length - 1]
140 verticalCenter: parent.verticalCenter
141 left: expander.visible ? expander.right : parent.horizontalCenter
QTextStream & left(QTextStream &stream)
QTextStream & right(QTextStream &stream)