addurl into the scripting

svn path=/trunk/KDE/kdelibs/; revision=1217115
This commit is contained in:
Aaron J. Seigo 2011-01-25 20:41:50 +00:00
parent c158ebbaa4
commit c3c211f374
3 changed files with 17 additions and 1 deletions

View File

@ -116,6 +116,14 @@ void WallpaperScript::wheelEvent(QGraphicsSceneWheelEvent *event)
Q_UNUSED(event)
}
void WallpaperScript::addUrls(const KUrl::List urls)
{
//TODO KDE5 replace urlDropped with addUrls
foreach (const KUrl &url, urls) {
urlDropped(url);
}
}
bool WallpaperScript::isInitialized() const
{
if (d->wallpaper) {

View File

@ -137,6 +137,12 @@ public:
*/
virtual void wheelEvent(QGraphicsSceneWheelEvent *event);
/**
* Adds urls (e.g. from a drop)
* @since 4.7
*/
void addUrls(const KUrl::List urls);
protected:
/**
* @return absolute path to the main script file for this wallpaper

View File

@ -134,7 +134,9 @@ Wallpaper::~Wallpaper()
void Wallpaper::addUrls(const KUrl::List &urls)
{
Q_UNUSED(urls);
if (d->script) {
d->script->addUrls(urls);
}
}
void Wallpaper::setUrls(const KUrl::List &urls)