add in two missing methods
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=879693
This commit is contained in:
parent
ba4ce5716b
commit
5f04141dd2
@ -51,6 +51,11 @@ DataEngine *DataEngineScript::dataEngine() const
|
|||||||
return d->dataEngine;
|
return d->dataEngine;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QStringList DataEngineScript::sources() const
|
||||||
|
{
|
||||||
|
return d->dataEngine->sources();
|
||||||
|
}
|
||||||
|
|
||||||
bool DataEngineScript::sourceRequestEvent(const QString &name)
|
bool DataEngineScript::sourceRequestEvent(const QString &name)
|
||||||
{
|
{
|
||||||
Q_UNUSED(name);
|
Q_UNUSED(name);
|
||||||
@ -63,6 +68,11 @@ bool DataEngineScript::updateSourceEvent(const QString &source)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Service *DataEngineScript::serviceForSource(const QString &source)
|
||||||
|
{
|
||||||
|
return d->dataEngine->serviceForSource(source);
|
||||||
|
}
|
||||||
|
|
||||||
void DataEngineScript::setData(const QString &source, const QString &key,
|
void DataEngineScript::setData(const QString &source, const QString &key,
|
||||||
const QVariant &value)
|
const QVariant &value)
|
||||||
{
|
{
|
||||||
|
@ -30,6 +30,7 @@ namespace Plasma
|
|||||||
|
|
||||||
class DataEngine;
|
class DataEngine;
|
||||||
class DataEngineScriptPrivate;
|
class DataEngineScriptPrivate;
|
||||||
|
class Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class DataEngineScript plasma/scripting/dataenginescript.h <Plasma/Scripting/DataEngineScript>
|
* @class DataEngineScript plasma/scripting/dataenginescript.h <Plasma/Scripting/DataEngineScript>
|
||||||
@ -61,6 +62,14 @@ public:
|
|||||||
*/
|
*/
|
||||||
DataEngine *dataEngine() const;
|
DataEngine *dataEngine() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a list of all the data sources available via this DataEngine
|
||||||
|
* Whether these sources are currently available (which is what
|
||||||
|
* the default implementation provides) or not is up to the
|
||||||
|
* DataEngine to decide. By default, this returns dataEngine()->sources()
|
||||||
|
*/
|
||||||
|
virtual QStringList sources() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the script should create a source that does not currently
|
* Called when the script should create a source that does not currently
|
||||||
* exist.
|
* exist.
|
||||||
@ -80,6 +89,14 @@ public:
|
|||||||
**/
|
**/
|
||||||
virtual bool updateSourceEvent(const QString &source);
|
virtual bool updateSourceEvent(const QString &source);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param source the source to targe the Service at
|
||||||
|
* @return a Service that has the source as a destination. The service
|
||||||
|
* is parented to the DataEngine, but may be deleted by the
|
||||||
|
* caller when finished with it
|
||||||
|
*/
|
||||||
|
virtual Service *serviceForSource(const QString &source);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void setData(const QString &source, const QString &key,
|
void setData(const QString &source, const QString &key,
|
||||||
const QVariant &value);
|
const QVariant &value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user