Warning, /education/kstars/kstars/kstarslite/qml/indi/modules/KSINDIText.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.Controls 2.0 0006 import QtQuick.Layouts 1.2 0007 import "../../constants" 1.0 0008 import "../../modules" 0009 0010 Column { 0011 id: columnTextProp 0012 Layout.fillHeight: true 0013 Layout.fillWidth: true 0014 spacing: 5 * Num.dp 0015 property string propLabel: "" 0016 0017 KSLabel { 0018 text: propLabel 0019 } 0020 0021 Rectangle { 0022 id: separator 0023 height: Num.dp 0024 color: Num.sysPalette.light 0025 width: parent.width 0026 } 0027 0028 function addField(isNumber, deviceName, propName, fieldName, propText, writable) { 0029 var textItem 0030 if(writable) { 0031 var textComp = Qt.createComponent("KSINDITextField.qml"); 0032 textItem = textComp.createObject(this) 0033 textItem.deviceName = deviceName 0034 textItem.propName = propName 0035 textItem.fieldName = fieldName 0036 textItem.textField.text = propText 0037 textItem.isNumber = isNumber 0038 } else { 0039 textItem = Qt.createQmlObject('import QtQuick 2.6 0040 import QtQuick.Layouts 1.2 0041 import "../../constants" 1.0 0042 import "../../modules" 0043 KSText { 0044 }', this) 0045 textItem.text = propText 0046 } 0047 //textItem.anchors.top = separator.bottom 0048 } 0049 }