Warning, /plasma/kdeplasma-addons/applets/grouping/container/package/contents/ui/main.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  *   SPDX-FileCopyrightText: 2016 Marco Martin <mart@kde.org>
0003  *
0004  *   SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 
0007 import QtQuick 2.1
0008 import QtQuick.Layouts 1.1
0009 import org.kde.plasma.core as PlasmaCore
0010 import org.kde.plasma.plasmoid 2.0
0011 
0012 PlasmoidItem {
0013     id: root
0014 
0015     Layout.minimumWidth: internalContainmentItem ? internalContainmentItem.Layout.minimumWidth : 0
0016     Layout.minimumHeight: internalContainmentItem ? internalContainmentItem.Layout.minimumHeight : 0
0017     Layout.preferredHeight: Layout.minimumHeight
0018 
0019     preferredRepresentation: fullRepresentation
0020     Plasmoid.status: internalContainmentItem ? internalContainmentItem.status : PlasmaCore.Types.UnknownStatus
0021 
0022     property Item internalContainmentItem
0023 
0024     Component.onCompleted: {
0025         root.internalContainmentItem = plasmoid.internalContainmentItem;
0026 
0027         if (root.internalContainmentItem === null) {
0028             return;
0029         }
0030         root.internalContainmentItem.anchors.fill = undefined;
0031         root.internalContainmentItem.parent = root;
0032         root.internalContainmentItem.anchors.fill = root;
0033     }
0034 
0035     Connections {
0036         target: plasmoid
0037         function onInternalContainmentItemChanged() {
0038             root.internalContainmentItem = plasmoid.internalContainmentItem;
0039             root.internalContainmentItem.parent = root;
0040             root.internalContainmentItem.anchors.fill = root;
0041         }
0042     }
0043 }