Warning, /plasma/libplasma/examples/containments/testcontainment/contents/ui/main.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2013 Marco Martin <mart@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 import QtQuick 0008 0009 import org.kde.plasma.components as PlasmaComponents 0010 import org.kde.plasma.plasmoid 0011 0012 Item { 0013 id: root 0014 width: 640 0015 height: 480 0016 0017 property Item toolBox 0018 0019 function addApplet(applet, x, y) { 0020 var component = Qt.createComponent("PlasmoidContainer.qml") 0021 var plasmoidContainer = component.createObject(root, {"x": x, "y": y}); 0022 0023 plasmoidContainer.parent = root; 0024 plasmoidContainer.applet = applet 0025 applet.parent = plasmoidContainer 0026 applet.anchors.fill = plasmoidContainer 0027 applet.visible = true 0028 plasmoidContainer.visible = true 0029 0030 } 0031 0032 Containment.onAppletAdded: { 0033 addApplet(applet, x, y); 0034 } 0035 0036 Component.onCompleted: { 0037 print("Test Containment loaded") 0038 print(plasmoid) 0039 } 0040 }