diff options
author | Bramastyo Harimukti <bramastyo.harimukti.santoso@pelagicore.com> | 2018-01-24 17:21:28 +0100 |
---|---|---|
committer | Daniel d'Andrada <daniel.dandrada@luxoft.com> | 2018-02-28 15:58:33 +0100 |
commit | 8a105072e5e0d88eed28d0b1b1e31c78d0305cc9 (patch) | |
tree | 71de5634f35d259473d0f0364d0fd84e398924f3 /dev/apps/com.pelagicore.sheets | |
parent | db5f75e767e676a6273d7f797f58b0a3a4f60433 (diff) |
[Sheets App] Initial commit of Sheets App for Triton-UI
Sheets app created as a reference for Developers to use controls
within Triton-UI. This commit contains the baseline of the sheets app.
Diffstat (limited to 'dev/apps/com.pelagicore.sheets')
-rw-r--r-- | dev/apps/com.pelagicore.sheets/Main.qml | 46 | ||||
-rw-r--r-- | dev/apps/com.pelagicore.sheets/SheetsContent.qml | 117 | ||||
-rw-r--r-- | dev/apps/com.pelagicore.sheets/icon.png | 3 | ||||
-rw-r--r-- | dev/apps/com.pelagicore.sheets/info.yaml | 17 |
4 files changed, 183 insertions, 0 deletions
diff --git a/dev/apps/com.pelagicore.sheets/Main.qml b/dev/apps/com.pelagicore.sheets/Main.qml new file mode 100644 index 00000000..1ca08bd7 --- /dev/null +++ b/dev/apps/com.pelagicore.sheets/Main.qml @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2018 Pelagicore AG +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Triton IVI UI. +** +** $QT_BEGIN_LICENSE:GPL-QTAS$ +** Commercial License Usage +** Licensees holding valid commercial Qt Automotive Suite licenses may use +** this file in accordance with the commercial license agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and The Qt Company. For +** licensing terms and conditions see https://www.qt.io/terms-conditions. +** For further information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 or (at your option) any later version +** approved by the KDE Free Qt Foundation. The licenses are as published by +** the Free Software Foundation and appearing in the file LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +** SPDX-License-Identifier: GPL-3.0 +** +****************************************************************************/ + +import QtQuick 2.8 +import utils 1.0 + +AppUIScreen { + id: root + + SheetsContent { + x: root.exposedRect.x + y: root.exposedRect.y + width: root.exposedRect.width + height: root.exposedRect.height + state: root.tritonState + } +} + diff --git a/dev/apps/com.pelagicore.sheets/SheetsContent.qml b/dev/apps/com.pelagicore.sheets/SheetsContent.qml new file mode 100644 index 00000000..8abfaddb --- /dev/null +++ b/dev/apps/com.pelagicore.sheets/SheetsContent.qml @@ -0,0 +1,117 @@ +/**************************************************************************** +** +** Copyright (C) 2018 Pelagicore AG +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Triton IVI UI. +** +** $QT_BEGIN_LICENSE:GPL-QTAS$ +** Commercial License Usage +** Licensees holding valid commercial Qt Automotive Suite licenses may use +** this file in accordance with the commercial license agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and The Qt Company. For +** licensing terms and conditions see https://www.qt.io/terms-conditions. +** For further information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 or (at your option) any later version +** approved by the KDE Free Qt Foundation. The licenses are as published by +** the Free Software Foundation and appearing in the file LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +** SPDX-License-Identifier: GPL-3.0 +** +****************************************************************************/ + +import QtQuick 2.8 +import Qt.labs.folderlistmodel 2.2 +import QtQuick.Controls 2.3 +import QtQuick.Layouts 1.3 +import controls 1.0 +import utils 1.0 + +import com.pelagicore.styles.triton 1.0 + +Item { + id: root + + ListView { + id: componentListView + width: parent.width + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.topMargin: Style.vspan(4) + visible: !stack.currentItem + + model: FolderListModel{ + showDirs: false + showDotAndDotDot: false + folder: "./components" + nameFilters: [ "*Panel.qml" ] + } + + delegate: Item { + width: componentListView.width + height: Style.vspan(0.8) + + Label { + anchors.fill: parent + anchors.margins: Style.hspan(1) + text: fileName.substring(0, fileName.length - 9); + } + + Image { + width: parent.width + height: 5 + anchors.bottom: parent.bottom + source: Style.gfx2("divider", TritonStyle.theme) + } + + MouseArea{ + anchors.fill: parent + onClicked: { + componentListView.currentIndex = index + stack.push(Qt.resolvedUrl("./components/" + fileName), StackView.PushTransition) + } + } + } + } + + Row { + width: parent.width + height: parent.height * 0.1 + anchors.bottom: stack.top + anchors.left: parent.left + anchors.leftMargin: Style.hspan(0.8) + visible: stack.currentItem + spacing: Style.hspan(0.2) + + Image { + id: icon + source: Style.symbol("ic-update") + anchors.verticalCenter: parent.verticalCenter + } + + Tool { + anchors.verticalCenter: parent.verticalCenter + baselineOffset: 0 + text: qsTr("Back") + font.pixelSize: Style.fontSizeS + onClicked: stack.clear(StackView.PopTransition) + } + } + + StackView { + id: stack + width: parent.width + height: parent.height * 0.9 + anchors.bottom: parent.bottom + } +} + diff --git a/dev/apps/com.pelagicore.sheets/icon.png b/dev/apps/com.pelagicore.sheets/icon.png new file mode 100644 index 00000000..d0971a71 --- /dev/null +++ b/dev/apps/com.pelagicore.sheets/icon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92e7161fde97cb2116f4e0ba6175cbbb4451e0e630f7cbf1c48dc578eddad3fb +size 487 diff --git a/dev/apps/com.pelagicore.sheets/info.yaml b/dev/apps/com.pelagicore.sheets/info.yaml new file mode 100644 index 00000000..3308a54d --- /dev/null +++ b/dev/apps/com.pelagicore.sheets/info.yaml @@ -0,0 +1,17 @@ +formatVersion: 1 +formatType: am-application +--- +id: 'com.pelagicore.sheets' +icon: 'icon.png' +code: 'Main.qml' +runtime: 'qml' +name: + en: 'Sheets' + de: 'Sheets' + cs: 'Sheets' + ru: 'Sheets' + zh: 'Sheets' + ja: 'Sheets' + ko: 'Sheets' + +categories: [ 'dev' ] |