Revert "remove dataengine stuff"

This reverts commit 0b57f5164da376afbb86b9ac915960ee7dc5693a.

svn path=/trunk/KDE/kdelibs/; revision=1012646
This commit is contained in:
Chani Armitage 2009-08-17 22:31:23 +00:00
parent ae2378a8da
commit 7674aacb5d
2 changed files with 27 additions and 0 deletions

View File

@ -20,6 +20,7 @@
#include "contextaction.h"
#include "containment.h"
#include "private/dataengineconsumer_p.h"
#include "private/packages_p.h"
#include "private/contextaction_p.h"
#include "private/containment_p.h"
@ -206,6 +207,11 @@ QList<QAction*> ContextAction::contextualActions()
return QList<QAction*>();
}
DataEngine *ContextAction::dataEngine(const QString &name) const
{
return d->dataEngine(name);
}
bool ContextAction::configurationRequired() const
{
return d->needsConfig;

View File

@ -33,6 +33,7 @@ class QAction;
namespace Plasma
{
class DataEngine;
class Containment;
class ContextActionPrivate;
@ -171,6 +172,26 @@ class PLASMA_EXPORT ContextAction : public QObject
*/
virtual QList<QAction*> contextualActions();
/**
* Loads the given DataEngine
*
* Tries to load the data engine given by @p name. Each engine is
* only loaded once, and that instance is re-used on all subsequent
* requests.
*
* If the data engine was not found, an invalid data engine is returned
* (see DataEngine::isValid()).
*
* Note that you should <em>not</em> delete the returned engine.
*
* @param name Name of the data engine to load
* @return pointer to the data engine if it was loaded,
* or an invalid data engine if the requested engine
* could not be loaded
*
*/
Q_INVOKABLE DataEngine *dataEngine(const QString &name) const;
/**
* @return true if the contextaction currently needs to be configured,
* otherwise, false