diff options
author | Matias Linares <matias.linares@comprandoengrupo.net> | 2024-10-03 10:49:18 -0300 |
---|---|---|
committer | Matias Linares <matias.linares@comprandoengrupo.net> | 2024-10-03 10:49:18 -0300 |
commit | 332828d03ae455c9a3ada0f57a08bf0942082824 (patch) | |
tree | c757472e22ec8c3bd3553288da8bc9554005e43d /kodereviewer/qml/FilesView.qml | |
parent | 440fd1dd8c194e4e02fc47725296812fba31df5d (diff) | |
download | kodereviewer-332828d03ae455c9a3ada0f57a08bf0942082824.tar.gz |
Add missing modules
Diffstat (limited to 'kodereviewer/qml/FilesView.qml')
-rw-r--r-- | kodereviewer/qml/FilesView.qml | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/kodereviewer/qml/FilesView.qml b/kodereviewer/qml/FilesView.qml new file mode 100644 index 0000000..299c353 --- /dev/null +++ b/kodereviewer/qml/FilesView.qml @@ -0,0 +1,61 @@ +pragma ComponentBehavior: Bound +import QtQuick +import QtCore +import QtQuick.Controls as QQC2 +import QtQuick.Layouts + +import org.kde.kirigami as Kirigami +import org.kde.kirigamiaddons.delegates as Delegates + +import org.deprecated.kodereviewer 1.0 + +QQC2.SplitView { + id: root + anchors.fill: parent + padding: 0 + spacing: 0 + ListModel { + id: fileModel + ListElement { + filename: "file1" + status: "added" + additions: 100 + deletions: 40 + patch: "@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test" + } + ListElement { + filename: "file2" + status: "added" + additions: 100 + deletions: 40 + patch: "@@ -1,9 +1,9 @@ def something @@ -1000,7 +1000,7 @@ module Test" + } + } + + + QQC2.ScrollView { + SplitView.preferredWidth: 200 + implicitWidth: 200 + SplitView.maximumWidth: 400 + ListView { + model: fileModel + delegate: Delegates.RoundedItemDelegate { + required property string filename + required property string patch + highlighted: ListView.isCurrentItem + text: filename + + onClicked: { + textArea.text = patch + textArea.file = filename + } + } + } + } + + Editor { + id: textArea + text: "" + file: "" + } +} |