|
@ -5,50 +5,50 @@ import QtQuick.Controls.Styles 1.2 |
|
|
import CodeEditorExtensionManager 1.0 |
|
|
import CodeEditorExtensionManager 1.0 |
|
|
|
|
|
|
|
|
Rectangle { |
|
|
Rectangle { |
|
|
anchors.fill: parent |
|
|
anchors.fill: parent |
|
|
height: parent.height |
|
|
height: parent.height |
|
|
width: parent.width; |
|
|
width: parent.width; |
|
|
id:root |
|
|
id:root |
|
|
SplitView { |
|
|
SplitView { |
|
|
anchors.fill: parent |
|
|
anchors.fill: parent |
|
|
orientation: Qt.Vertical |
|
|
orientation: Qt.Vertical |
|
|
Rectangle { |
|
|
Rectangle { |
|
|
anchors.top: parent.top |
|
|
anchors.top: parent.top |
|
|
id: contentView |
|
|
id: contentView |
|
|
width: parent.width |
|
|
width: parent.width |
|
|
height: parent.height * 0.7 |
|
|
height: parent.height * 0.7 |
|
|
TextArea { |
|
|
TextArea { |
|
|
id: codeEditor |
|
|
id: codeEditor |
|
|
height: parent.height |
|
|
height: parent.height |
|
|
font.family: "Verdana" |
|
|
font.family: "Verdana" |
|
|
font.pointSize: 9 |
|
|
font.pointSize: 9 |
|
|
width: parent.width |
|
|
width: parent.width |
|
|
anchors.centerIn: parent |
|
|
anchors.centerIn: parent |
|
|
tabChangesFocus: false |
|
|
tabChangesFocus: false |
|
|
Keys.onPressed: { |
|
|
Keys.onPressed: { |
|
|
if (event.key === Qt.Key_Tab) { |
|
|
if (event.key === Qt.Key_Tab) { |
|
|
codeEditor.insert(codeEditor.cursorPosition, "\t"); |
|
|
codeEditor.insert(codeEditor.cursorPosition, "\t"); |
|
|
event.accepted = true; |
|
|
event.accepted = true; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
Rectangle { |
|
|
Rectangle { |
|
|
anchors.bottom: parent.bottom |
|
|
anchors.bottom: parent.bottom |
|
|
id: contextualView |
|
|
id: contextualView |
|
|
width: parent.width |
|
|
width: parent.width |
|
|
Layout.minimumHeight: 20 |
|
|
Layout.minimumHeight: 20 |
|
|
height: parent.height * 0.3 |
|
|
height: parent.height * 0.3 |
|
|
TabView { |
|
|
TabView { |
|
|
id: contextualTabs |
|
|
id: contextualTabs |
|
|
antialiasing: true |
|
|
antialiasing: true |
|
|
anchors.fill: parent |
|
|
anchors.fill: parent |
|
|
style: TabStyle{} |
|
|
style: TabStyle {} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
CodeEditorExtensionManager{ |
|
|
CodeEditorExtensionManager{ |
|
|
tabView: contextualTabs |
|
|
tabView: contextualTabs |
|
|
editor: codeEditor |
|
|
editor: codeEditor |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|