get rid of abstractjsappletscript.h
This commit is contained in:
parent
53957252a5
commit
df6d918dec
@ -20,7 +20,6 @@ set(declarative_appletscript_SRCS
|
|||||||
declarative/packageaccessmanager.cpp
|
declarative/packageaccessmanager.cpp
|
||||||
declarative/packageaccessmanagerfactory.cpp
|
declarative/packageaccessmanagerfactory.cpp
|
||||||
declarative/qmlobject.cpp
|
declarative/qmlobject.cpp
|
||||||
plasmoid/abstractjsappletscript.cpp
|
|
||||||
plasmoid/appletauthorization.cpp
|
plasmoid/appletauthorization.cpp
|
||||||
plasmoid/appletinterface.cpp
|
plasmoid/appletinterface.cpp
|
||||||
plasmoid/declarativeappletscript.cpp
|
plasmoid/declarativeappletscript.cpp
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010 Marco Martin <mart@kde.org>
|
|
||||||
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Library General Public License as
|
|
||||||
* published by the Free Software Foundation; either version 2, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Library General Public
|
|
||||||
* License along with this program; if not, write to the
|
|
||||||
* Free Software Foundation, Inc.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "plasmoid/abstractjsappletscript.h"
|
|
||||||
|
|
||||||
|
|
||||||
AbstractJsAppletScript::AbstractJsAppletScript(QObject *parent, const QVariantList &args)
|
|
||||||
: Plasma::AppletScript(parent)
|
|
||||||
{
|
|
||||||
Q_UNUSED(args);
|
|
||||||
}
|
|
||||||
|
|
||||||
AbstractJsAppletScript::~AbstractJsAppletScript()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010 Marco Martin <mart@kde.org>
|
|
||||||
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Library General Public License as
|
|
||||||
* published by the Free Software Foundation; either version 2, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Library General Public
|
|
||||||
* License along with this program; if not, write to the
|
|
||||||
* Free Software Foundation, Inc.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef ABSTRACTJS_APPLETSCRIPT_H
|
|
||||||
#define ABSTRACTJS_APPLETSCRIPT_H
|
|
||||||
|
|
||||||
#include <QQmlEngine>
|
|
||||||
|
|
||||||
#include <Plasma/AppletScript>
|
|
||||||
|
|
||||||
class AbstractJsAppletScript : public Plasma::AppletScript
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
AbstractJsAppletScript(QObject *parent, const QVariantList &args = QVariantList());
|
|
||||||
~AbstractJsAppletScript();
|
|
||||||
|
|
||||||
virtual QQmlEngine *engine() const = 0;
|
|
||||||
virtual bool include(const QString &path) = 0;
|
|
||||||
virtual QString filePath(const QString &type, const QString &file) const = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
Q_DECLARE_METATYPE(AppletInterface*)
|
Q_DECLARE_METATYPE(AppletInterface*)
|
||||||
|
|
||||||
AppletInterface::AppletInterface(AbstractJsAppletScript *parent)
|
AppletInterface::AppletInterface(DeclarativeAppletScript *parent)
|
||||||
: QObject(parent),
|
: QObject(parent),
|
||||||
m_appletScriptEngine(parent),
|
m_appletScriptEngine(parent),
|
||||||
m_actionSignals(0)
|
m_actionSignals(0)
|
||||||
@ -387,7 +387,7 @@ void AppletInterface::gc()
|
|||||||
|
|
||||||
///////////// ContainmentInterface
|
///////////// ContainmentInterface
|
||||||
|
|
||||||
ContainmentInterface::ContainmentInterface(AbstractJsAppletScript *parent)
|
ContainmentInterface::ContainmentInterface(DeclarativeAppletScript *parent)
|
||||||
: APPLETSUPERCLASS(parent),
|
: APPLETSUPERCLASS(parent),
|
||||||
m_movableApplets(true)
|
m_movableApplets(true)
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include <Plasma/DataEngine>
|
#include <Plasma/DataEngine>
|
||||||
#include <Plasma/Theme>
|
#include <Plasma/Theme>
|
||||||
|
|
||||||
#include "abstractjsappletscript.h"
|
#include "declarativeappletscript.h"
|
||||||
|
|
||||||
class QAction;
|
class QAction;
|
||||||
class QmlAppletScript;
|
class QmlAppletScript;
|
||||||
@ -76,7 +76,7 @@ class AppletInterface : public QObject
|
|||||||
Q_PROPERTY(QString associatedApplication WRITE setAssociatedApplication READ associatedApplication)
|
Q_PROPERTY(QString associatedApplication WRITE setAssociatedApplication READ associatedApplication)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AppletInterface(AbstractJsAppletScript *parent);
|
AppletInterface(DeclarativeAppletScript *parent);
|
||||||
~AppletInterface();
|
~AppletInterface();
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
@ -292,7 +292,7 @@ Q_SIGNALS:
|
|||||||
void statusChanged();
|
void statusChanged();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AbstractJsAppletScript *m_appletScriptEngine;
|
DeclarativeAppletScript *m_appletScriptEngine;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QStringList m_actions;
|
QStringList m_actions;
|
||||||
@ -307,7 +307,7 @@ class JsAppletInterface : public AppletInterface
|
|||||||
Q_PROPERTY(QObject *sender READ sender)
|
Q_PROPERTY(QObject *sender READ sender)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
JsAppletInterface(AbstractJsAppletScript *parent)
|
JsAppletInterface(DeclarativeAppletScript *parent)
|
||||||
: AppletInterface(parent)
|
: AppletInterface(parent)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -339,7 +339,7 @@ public:
|
|||||||
but something application specific */
|
but something application specific */
|
||||||
CustomPanelContainment = 128 /**< A customized desktop panel */
|
CustomPanelContainment = 128 /**< A customized desktop panel */
|
||||||
};
|
};
|
||||||
ContainmentInterface(AbstractJsAppletScript *parent);
|
ContainmentInterface(DeclarativeAppletScript *parent);
|
||||||
|
|
||||||
inline Plasma::Containment *containment() const { return static_cast<Plasma::Containment *>(m_appletScriptEngine->applet()); }
|
inline Plasma::Containment *containment() const { return static_cast<Plasma::Containment *>(m_appletScriptEngine->applet()); }
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ QScriptValue constructKUrlClass(QScriptEngine *engine);
|
|||||||
QScriptValue constructQPointClass(QScriptEngine *engine);
|
QScriptValue constructQPointClass(QScriptEngine *engine);
|
||||||
void registerSimpleAppletMetaTypes(QScriptEngine *engine);
|
void registerSimpleAppletMetaTypes(QScriptEngine *engine);
|
||||||
DeclarativeAppletScript::DeclarativeAppletScript(QObject *parent, const QVariantList &args)
|
DeclarativeAppletScript::DeclarativeAppletScript(QObject *parent, const QVariantList &args)
|
||||||
: AbstractJsAppletScript(parent, args),
|
: Plasma::AppletScript(parent),
|
||||||
m_qmlObject(0),
|
m_qmlObject(0),
|
||||||
m_toolBoxObject(0),
|
m_toolBoxObject(0),
|
||||||
m_interface(0),
|
m_interface(0),
|
||||||
|
@ -23,7 +23,9 @@
|
|||||||
|
|
||||||
#include <kdemacros.h>
|
#include <kdemacros.h>
|
||||||
|
|
||||||
#include "abstractjsappletscript.h"
|
#include <QQmlEngine>
|
||||||
|
|
||||||
|
#include <Plasma/AppletScript>
|
||||||
#include "plasmoid/appletauthorization.h"
|
#include "plasmoid/appletauthorization.h"
|
||||||
#include <Plasma/DataEngine>
|
#include <Plasma/DataEngine>
|
||||||
|
|
||||||
@ -33,7 +35,7 @@ class QmlObject;
|
|||||||
class ScriptEnv;
|
class ScriptEnv;
|
||||||
class EngineAccess;
|
class EngineAccess;
|
||||||
|
|
||||||
class DeclarativeAppletScript : public AbstractJsAppletScript
|
class DeclarativeAppletScript : public Plasma::AppletScript
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user