blob: 73a4581e371b8221cf3c0be0320d26bb1624a93b [file] [log] [blame]
swissChili23958ca2022-02-21 19:23:34 -08001import QtQuick 2.5
2import QtQuick.Controls 2.15
3import QtQuick.Controls.Material 2.0
4import QtQuick.Layouts 1.3
5
swissChili4b3105a2022-02-22 16:34:39 -08006import sh.swisschili.REFAL 1.0
7
swissChili23958ca2022-02-21 19:23:34 -08008ApplicationWindow {
9 id: root
10 width: 1080
11 height: 720
12 title: "Notebook"
13 visible: true
14
swissChili4b3105a2022-02-22 16:34:39 -080015 Material.theme: Material.Light
swissChili23958ca2022-02-21 19:23:34 -080016 Material.accent: Material.Orange
17
swissChili4b3105a2022-02-22 16:34:39 -080018 CellModel {
19 id: model
20 }
21
22 Component.onCompleted: {
23 model.addCell("Refal { = Hi!; }", "");
24 model.addCell("<Refal>", "Hi!");
25 model.addCell("Hello there", "Hello there");
26 }
27
swissChili23958ca2022-02-21 19:23:34 -080028 ColumnLayout {
29 id: column
30 anchors.fill: parent
31
32 TabBar {
33 id: bar
34
35 Layout.fillWidth: true
36
37 TabButton {
38 text: "Example Workspace"
39 }
40
41 TabButton {
42 text: "Another Workspace"
43 }
44
45 TabButton {
46 text: "Testing"
47 }
48 }
49
50 SplitView {
51 id: split
52 Layout.fillHeight: true
53 Layout.fillWidth: true
54 orientation: Qt.Horizontal
55
56 ListView {
57 id: codeEditor
58 SplitView.fillWidth: true
59 SplitView.minimumWidth: 400
swissChili4b3105a2022-02-22 16:34:39 -080060 model: model
swissChili23958ca2022-02-21 19:23:34 -080061 clip: true
62
swissChili4b3105a2022-02-22 16:34:39 -080063 delegate: NotebookCell {
swissChili23958ca2022-02-21 19:23:34 -080064 width: codeEditor.width - 5
65 }
66 }
67
68 Item {
69 id: variables
70 SplitView.minimumWidth: 240
71
72 Label {
73 anchors.centerIn: parent
74 text: "Vars"
75 }
76 }
77 }
78 }
79}