From d8431223d34476a17835a05d9508e92447f22479 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sat, 15 Aug 2015 16:06:00 +0200 Subject: Restructure QML and JS sources `list` holds the components of the central list UI element. `command` holds the UI and implementation parts of the command mode. `widget` holds more or less general purpose elements that may also be of use in other circumstances. --- src/main.qml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/main.qml (limited to 'src/main.qml') diff --git a/src/main.qml b/src/main.qml new file mode 100644 index 0000000..f7673dc --- /dev/null +++ b/src/main.qml @@ -0,0 +1,53 @@ +import QtQuick 2.0 +import QtQuick.Window 2.0 +import QtQuick.Controls 1.2 +import QtQuick.Layouts 1.1 +import Qt.labs.settings 1.0 + +ApplicationWindow { + id: root + + visible: true + + Settings { + id: settings + category: "window" + + property string background : "#161616" + } + + color: settings.background + + Component.onCompleted: { + terminalList.createItem(); + terminalList.focusCurrent(); + } + + ColumnLayout { + anchors.fill: parent + + TerminalList { + id: terminalList + + state: state + + Layout.fillHeight: true + Layout.fillWidth: true + } + + CommandInput { + id: command + + Layout.fillWidth: true + + onExecuted: state.enterNormalMode() + } + } + + StateHandler { + id: state + + terminalList: terminalList + commandInput: command + } +} -- cgit v1.2.3