Warning, /pim/kube/framework/qml/LeftSidebar.qml is written in an unsupported language. File is not indexed.

0001 /*
0002   Copyright (C) 2021 Christian Mollekopf, <christian@mkpf.ch>
0003 
0004   This program is free software; you can redistribute it and/or modify
0005   it under the terms of the GNU General Public License as published by
0006   the Free Software Foundation; either version 2 of the License, or
0007   (at your option) any later version.
0008 
0009   This program is distributed in the hope that it will be useful,
0010   but WITHOUT ANY WARRANTY; without even the implied warranty of
0011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0012   GNU General Public License for more details.
0013 
0014   You should have received a copy of the GNU General Public License along
0015   with this program; if not, write to the Free Software Foundation, Inc.,
0016   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0017 */
0018 
0019 import QtQuick 2.9
0020 import QtQuick.Controls 2.0
0021 import QtQuick.Layouts 1.1
0022 
0023 import org.kube.framework 1.0 as Kube
0024 
0025 Rectangle {
0026     id: root
0027 
0028     property Component statusDelegate: Kube.StatusBar {
0029                                            accountId: Kube.Context.currentAccountId
0030                                        }
0031 
0032     property alias buttons: topLayout.children
0033     default property alias _contentChildren: mainLayout.children
0034 
0035     width: Kube.Units.gridUnit * 10
0036     color: Kube.Colors.darkBackgroundColor
0037 
0038     ColumnLayout {
0039         id: topLayout
0040         anchors {
0041             top: parent.top
0042             left: parent.left
0043             right: parent.right
0044             margins: Kube.Units.largeSpacing
0045         }
0046         spacing: Kube.Units.largeSpacing
0047     }
0048 
0049     ColumnLayout {
0050         id: mainLayout
0051         anchors {
0052             top: topLayout.bottom
0053             topMargin: Kube.Units.largeSpacing
0054             bottom: statusBarContainer.top
0055             left: parent.left
0056             leftMargin: Kube.Units.largeSpacing
0057             right: parent.right
0058             rightMargin: Kube.Units.largeSpacing
0059         }
0060     }
0061 
0062     Item {
0063         id: statusBarContainer
0064         anchors {
0065             topMargin: Kube.Units.smallSpacing
0066             bottom: parent.bottom
0067             left: parent.left
0068             right: parent.right
0069         }
0070         height: childrenRect.height
0071 
0072         Rectangle {
0073             id: border
0074             visible: statusBarLoader.item.visible
0075             anchors {
0076                 right: parent.right
0077                 left: parent.left
0078                 margins: Kube.Units.smallSpacing
0079             }
0080             height: 1
0081             color: Kube.Colors.viewBackgroundColor
0082             opacity: 0.3
0083         }
0084 
0085         Loader {
0086             id: statusBarLoader
0087             height: Kube.Units.gridUnit * 2
0088             anchors {
0089                 top: border.bottom
0090                 left: statusBarContainer.left
0091                 right: statusBarContainer.right
0092             }
0093             sourceComponent: root.statusDelegate
0094         }
0095     }
0096 }