summaryrefslogtreecommitdiff
path: root/kodereviewer/qml
diff options
context:
space:
mode:
Diffstat (limited to 'kodereviewer/qml')
-rw-r--r--kodereviewer/qml/KRContextDrawer.qml36
1 files changed, 36 insertions, 0 deletions
diff --git a/kodereviewer/qml/KRContextDrawer.qml b/kodereviewer/qml/KRContextDrawer.qml
new file mode 100644
index 0000000..c3923fa
--- /dev/null
+++ b/kodereviewer/qml/KRContextDrawer.qml
@@ -0,0 +1,36 @@
+import QtQuick
+import QtQuick.Controls as QQC2
+import org.kde.kirigami as Kirigami
+import org.kde.kirigamiaddons.delegates as Delegates
+import org.kde.kitemmodels
+
+import org.deprecated.kodereviewer 1.0
+
+
+Kirigami.ContextDrawer {
+ id: contextDrawer
+ // modal: false
+ handleVisible: false
+ property alias model: descendantsModel.model
+ contentItem: QQC2.ScrollView {
+ implicitWidth: Kirigami.Units.gridUnit * 20
+ ListView {
+ anchors.fill: parent
+ clip: true
+ id: menu
+ model: KDescendantsProxyModel {
+ id: descendantsModel
+ }
+
+ delegate: Delegates.RoundedTreeDelegate {
+ required property string filename
+ text: filename
+
+ highlighted: menu.currentItem ? menu.currentItem.filename == filename : false
+ onClicked: {
+ menu.currentIndex = index
+ }
+ }
+ }
+ }
+}