Smarter desktop applet placement

Aaron J. Seigo aseigo at kde.org
Sat Aug 2 04:12:14 CEST 2008


On Friday 01 August 2008, Ambroz Bizjak wrote:
> Aaron J. Seigo wrote:
> > this doesn't require a new virtual method in applet, atually; you can
> > just connect to the appletAdded signal =)
>
> I just can't get that signal to work. It keeps saying either "No such
> signal" or "No such slot". What is wrong?
> Patch attached.


+    connect(this, SIGNAL(appletAdded(Plasma::Applet *, const QPointF &)),
+            this, SLOT(onAppletAdded(Applet *, const QPointF &)));

should be:

+    connect(this, SIGNAL(appletAdded(Plasma::Applet *, const QPointF &)),
+            this, SLOT(onAppletAdded(Plasma::Applet *, const QPointF &)));


and of course the declaration in the desktop.h header must match 
(Plasma::Applet*). signals/slots are actually indexed by cstrings (that's what 
SIGNAL and SLOT do, in fact) and so it needs to be Plasma::Applet =)

> > for that is making a QGraphicsLayout subclass with this code in it, and
> > then
> > putting that class into libplasma.
>
> I'll try that too eventually, first got to read some docs on it.

np... as i said, i think we can put this version into svn with the 
understanding it'll migrate into a layout.

that way we can get your code into svn for others to test and so that it 
doesn't get lost if you or your computer does =)

-- 
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 Trolltech

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20080801/1647df1d/attachment.pgp 


More information about the Plasma-devel mailing list