diff options
author | Adrian Kummerlaender | 2015-07-26 20:54:57 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2015-07-26 20:54:57 +0200 |
commit | 3af7553b2e7cf4f301d61eeac563f07bd405c66c (patch) | |
tree | c85ad486864105d7da2214a5b560b4967de8f78d /qml/EmbeddedTerminal.qml | |
parent | 311dd6e4e885ff5833756fd9cfa6e8c9c4a8668a (diff) | |
download | MetaTerm-3af7553b2e7cf4f301d61eeac563f07bd405c66c.tar MetaTerm-3af7553b2e7cf4f301d61eeac563f07bd405c66c.tar.gz MetaTerm-3af7553b2e7cf4f301d61eeac563f07bd405c66c.tar.bz2 MetaTerm-3af7553b2e7cf4f301d61eeac563f07bd405c66c.tar.lz MetaTerm-3af7553b2e7cf4f301d61eeac563f07bd405c66c.tar.xz MetaTerm-3af7553b2e7cf4f301d61eeac563f07bd405c66c.tar.zst MetaTerm-3af7553b2e7cf4f301d61eeac563f07bd405c66c.zip |
Added support for permanently storing settings
Diffstat (limited to 'qml/EmbeddedTerminal.qml')
-rw-r--r-- | qml/EmbeddedTerminal.qml | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/qml/EmbeddedTerminal.qml b/qml/EmbeddedTerminal.qml index aa22328..ef53b12 100644 --- a/qml/EmbeddedTerminal.qml +++ b/qml/EmbeddedTerminal.qml @@ -1,18 +1,29 @@ import QtQuick 2.0 import QMLTermWidget 1.0 import QtQuick.Layouts 1.1 +import Qt.labs.settings 1.0 Item { id: item property string program property string workingDirectory - property int lines + + property int lines : 20 property int frameWidth : 10 height: terminal.height width: parent.width - frameWidth + Settings { + category: "terminal" + + property alias frameWidth : item.frameWidth + property alias colorScheme : terminal.colorScheme + property alias fontFamily : terminal.font.family + property alias fontSize : terminal.font.pointSize + } + function select() { highlighter.select() } function deselect() { highlighter.deselect() } @@ -36,10 +47,12 @@ Item { QMLTermWidget { id: terminal - font.family: "Monospace" - font.pointSize: 8 + font { + family: "Monospace" + pointSize: 8 + } - Layout.fillWidth: true + Layout.fillWidth: true Layout.preferredHeight: fontMetrics.height * item.lines colorScheme: "cool-retro-term" |