blob: a441b73785755b61f87f515267c5a72944a5fba2 [file] [log] [blame]
swissChili23958ca2022-02-21 19:23:34 -08001import QtQuick 2.0
2import QtQuick.Controls 2.15
3import QtQuick.Controls.Material 2.0
4import QtQuick.Layouts 1.0
5
6ColumnLayout {
7 id: root
8
swissChili4b3105a2022-02-22 16:34:39 -08009 required property string code
10 required property string result
11
swissChili23958ca2022-02-21 19:23:34 -080012 RowLayout {
13 Layout.fillWidth: true
14
15 Button {
16 Layout.alignment: Qt.AlignTop
17 icon.source: "qrc:///icons/play-circle.svg"
18 icon.color: Material.color(Material.Grey, Material.Shade600)
19 flat: true
20 }
21
22 ColumnLayout {
23 Layout.fillWidth: true
24 Layout.fillHeight: true
25
26 TextArea {
27 Layout.fillWidth: true
28 Layout.fillHeight: true
29 id: code
30 font.family: "monospace"
swissChili4b3105a2022-02-22 16:34:39 -080031 text: root.code
swissChili23958ca2022-02-21 19:23:34 -080032 selectByMouse: true
33 wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
swissChili4b3105a2022-02-22 16:34:39 -080034
35 Keys.onTabPressed: {
36 var pos = cursorPosition + 4
37 text += " ";
38 cursorPosition = pos
39 }
swissChili23958ca2022-02-21 19:23:34 -080040 }
41
42 Label {
43 Layout.fillWidth: true
44 font.family: "monospace"
swissChili4b3105a2022-02-22 16:34:39 -080045 text: root.result
swissChili23958ca2022-02-21 19:23:34 -080046 }
47 }
48 }
49
50 InsertRow {
51
52 }
53}