Warning, /plasma/plasma-bigscreen/kcms/bigscreen-settings/ui/delegates/TimeDelegate.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2019 Aditya Mehra <aix.m@outlook.com>
0003     SPDX-FileCopyrightText: 2019 Marco Martin <mart@kde.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 import QtQuick 2.14
0009 import QtQuick.Layouts 1.14
0010 import QtQuick.Controls 2.14
0011 import org.kde.plasma.components 3.0 as PlasmaComponents
0012 import org.kde.kirigami 2.12 as Kirigami
0013 import org.kde.mycroft.bigscreen 1.0 as BigScreen
0014 import Qt5Compat.GraphicalEffects
0015 
0016 BigScreen.AbstractDelegate {
0017     id: delegate
0018     property alias name: labelItem.text
0019 
0020     highlighted: activeFocus
0021 
0022     Behavior on implicitWidth {
0023         NumberAnimation {
0024             duration: Kirigami.Units.longDuration
0025             easing.type: Easing.InOutQuad
0026         }
0027     }
0028 
0029     contentItem: Item {
0030         id: localItemLayout
0031 
0032         ColumnLayout {
0033             id: textLayout
0034             spacing: 0
0035 
0036             anchors {
0037                 fill: parent
0038             }
0039 
0040             Kirigami.Icon {
0041                 source: "preferences-system-time"
0042                 Layout.alignment: Qt.AlignHCenter
0043                 Layout.preferredWidth: parent.width - labelItem.contentWidth
0044                 Layout.preferredHeight: width
0045             }
0046 
0047             Label {
0048                 id: labelItem
0049                 Layout.alignment: Qt.AlignTop
0050                 Layout.fillWidth: true
0051                 horizontalAlignment: Text.AlignHCenter
0052             }
0053         }
0054     }
0055 
0056     Keys.onReturnPressed: clicked()
0057 
0058     onClicked: {
0059         deviceTimeSettingsArea.opened = true
0060         deviceTimeSettingsArea.forceActiveFocus()
0061     }
0062 }