[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Adding "Set Wallpaper" Option In Frame Applet
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2011-01-18 21:14:50
Message-ID: 201101181314.55906.aseigo () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Tuesday, January 18, 2011, Sinny Kumari wrote:
> But, I don't know properly  what parameter should be passed to the
>  QMetaObject::invokeMethod().
> 
> need a little help here,

glad to see you're still working on it! :)

in Wallpaper::setWallpaper(const KUrl &url) do this:

	invokeMethod(this, SLOT(setImage(KUrl)), Q_ARG(url))

looking at the patch, it also occurs to me that the method namings aren't 
great. they sounded ok previously, but once i could actually see them in the 
code, i began to wonder ... how about:

public:
	void setUrls(const KUrl::List &urls)

protected Q_SLOT:
	void addUrls(const KUrl::List &urls);

and in setUrls, call:

	invokeMethod(this, SLOT(addUrls(KUrl::List)), Q_ARG(urls))

and leave it up to the wallpaper plugin to decide what to do in the case of 
multiple URLs. this would also help streamline the drag and drop case for 
wallpapers.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks

["signature.asc" (application/pgp-signature)]

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic