Changeset View
Changeset View
Standalone View
Standalone View
applets/systemtray/package/contents/ui/items/ItemLoader.qml
Show All 16 Lines | |||||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | import QtQuick 2.0 | 20 | import QtQuick 2.0 | ||
21 | 21 | | |||
22 | Loader { | 22 | Loader { | ||
23 | id: itemLoader | 23 | id: itemLoader | ||
24 | 24 | | |||
25 | Component.onCompleted: { | 25 | property var itemModel: model | ||
26 | | ||||
27 | source: { | ||||
26 | if (model.itemType === "Plasmoid" && model.hasApplet) { | 28 | if (model.itemType === "Plasmoid" && model.hasApplet) { | ||
27 | itemLoader.setSource("PlasmoidItem.qml", { | 29 | return "PlasmoidItem.qml" | ||
28 | "applet": model.applet, | | |||
29 | "effectiveStatus": model.effectiveStatus | | |||
30 | }) | | |||
31 | } else if (model.itemType === "StatusNotifier") { | 30 | } else if (model.itemType === "StatusNotifier") { | ||
32 | itemLoader.setSource("StatusNotifierItem.qml", { | 31 | return "StatusNotifierItem.qml" | ||
33 | "model": model, | | |||
34 | "effectiveStatus": model.effectiveStatus | | |||
35 | }) | | |||
36 | } | 32 | } | ||
37 | } | 33 | } | ||
38 | } | 34 | } |