File indexing completed on 2025-03-09 05:02:40

0001 /*
0002     SPDX-FileCopyrightText: 2023 Marco Martin <mart@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "appletcontext_p.h"
0008 
0009 #include <QJsonArray>
0010 #include <QQmlContext>
0011 #include <QQmlExpression>
0012 #include <QQmlProperty>
0013 #include <QQuickWindow>
0014 #include <QRandomGenerator>
0015 
0016 #include <QDebug>
0017 
0018 #include <KLocalizedString>
0019 
0020 #include <Plasma/Applet>
0021 #include <Plasma/Containment>
0022 #include <Plasma/Corona>
0023 
0024 #include <qloggingcategory.h>
0025 
0026 namespace PlasmaQuick
0027 {
0028 
0029 AppletContext::AppletContext(QQmlEngine *engine, Plasma::Applet *applet, SharedQmlEngine *parent)
0030     : QQmlContext(engine, applet)
0031     , m_applet(applet)
0032     , m_sharedEngine(parent)
0033 {
0034     setParent(parent);
0035 }
0036 
0037 AppletContext::~AppletContext()
0038 {
0039 }
0040 
0041 Plasma::Applet *AppletContext::applet() const
0042 {
0043     return m_applet;
0044 }
0045 
0046 SharedQmlEngine *AppletContext::sharedQmlEngine() const
0047 {
0048     return m_sharedEngine;
0049 }
0050 
0051 }
0052 
0053 #include "moc_appletcontext_p.cpp"