Warning, /plasma/libksysguard/faces/facepackages/facegrid/contents/ui/FaceGrid.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2021 Arjen Hiemstra <ahiemstra@heimr.nl>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 
0007 import QtQuick
0008 import QtQuick.Controls
0009 import QtQuick.Layouts
0010 
0011 import org.kde.kirigami as Kirigami
0012 
0013 import org.kde.ksysguard.sensors as Sensors
0014 import org.kde.ksysguard.faces as Faces
0015 import org.kde.ksysguard.formatter as Formatter
0016 
0017 GridLayout {
0018     id: grid
0019 
0020     property int columnCount
0021     property int autoColumnCount
0022 
0023     readonly property real preferredWidth: titleMetrics.width
0024 
0025     columns: columnCount > 0 ? columnCount : autoColumnCount
0026 
0027     columnSpacing: Kirigami.Units.largeSpacing
0028     rowSpacing: Kirigami.Units.largeSpacing
0029 
0030     Kirigami.Heading {
0031         id: heading
0032         Layout.fillWidth: true
0033         Layout.columnSpan: parent.columns
0034 
0035         horizontalAlignment: Text.AlignHCenter
0036         elide: Text.ElideRight
0037         text: root.controller.title
0038         visible: root.controller.showTitle && text.length > 0
0039         level: 2
0040 
0041         TextMetrics {
0042             id: titleMetrics
0043             font: heading.font
0044             text: heading.text
0045         }
0046     }
0047 
0048     Repeater {
0049         id: gridRepeater
0050 
0051         model: root.controller.highPrioritySensorIds
0052 
0053         FaceControl {
0054             Layout.fillWidth: true
0055             Layout.fillHeight: true
0056             Layout.preferredWidth: 0
0057             Layout.preferredHeight: 0
0058 
0059             controller: root.controller
0060             sensors: [modelData]
0061             faceId: root.controller.faceConfiguration.faceId
0062         }
0063     }
0064 }