Warning, /education/kstars/kstars/kstarslite/qml/modules/KSTab.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
0002 // SPDX-License-Identifier: GPL-2.0-or-later
0003
0004 import QtQuick 2.6
0005 import QtQuick.Layouts 1.2
0006 import QtQuick.Controls 2.0
0007 import "../constants" 1.0
0008
0009 Pane {
0010 id: tab
0011 property string title: ""
0012 clip: true
0013 property Item flickableItem: flickable
0014 padding: 0
0015
0016 background: Rectangle {
0017 color: Num.sysPalette.base
0018 }
0019
0020 //contentItem is already used by Pane so be it rootItem
0021 property Item rootItem
0022
0023 onRootItemChanged: {
0024 if(rootItem.parent != flickable.contentItem) rootItem.parent = flickable.contentItem
0025 }
0026
0027 Flickable {
0028 id: flickable
0029 anchors{
0030 fill: parent
0031 margins: Num.marginsKStab
0032 }
0033 ScrollBar.vertical: ScrollBar { id: scrollBar }
0034 flickableDirection: Flickable.VerticalFlick
0035 contentWidth: rootItem != undefined ? rootItem.width : 0
0036 contentHeight: rootItem != undefined ? rootItem.height : 0
0037 flickableChildren: rootItem
0038 }
0039 }