aerothemeplasma/Plasma Widgets/org.kde.plasma.private.systemtray/contents/ui_old/items/ItemLoader.qml
2021-09-29 19:10:18 +02:00

23 lines
548 B
QML

/*
SPDX-FileCopyrightText: 2020 Konrad Materka <materka@gmail.com>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
import QtQuick 2.0
Loader {
id: itemLoader
property var itemModel: model
source: {
if (model.itemType === "Plasmoid" && model.hasApplet) {
return "PlasmoidItem.qml"
} else if (model.itemType === "StatusNotifier") {
return "StatusNotifierItem.qml"
}
console.warn("SystemTray ItemLoader: Invalid state, cannot determine source!")
return ""
}
}