Notification applet needs and questions

Dmitry Suzdalev dimsuzkde at gmail.com
Fri May 23 13:13:04 CEST 2008


Hello!

I have some questions about how I should implement certain things in notification 
applet.
Mainly the questions are about resizing.
The current state of things is that you say to Plasma: "hey, here's initial size I 
want for my applet" and then let Plasma manage further resizes - you just react on 
constraintsEvent() and you're done.

Well, Notify applet is a little different here, because it needs not only to set some 
initial size, but also expand/collapse itself as long as new notifications arrive or 
some existing ones vanish.

The question is: how well is plasma prepared for such behaving applets?

Until now I just called resize(newSize) in my applet when needed - that worked on 
desktop.

But now, as I'm diving into Containment and View land, things change.
Now main interface is a Containment that can be showed in a toplevel View.

Applet class (and thus Containment) has geometryChanged() signal, but it's emmitted 
only in Applet::setGeometry() which is marked as "should not be called by 
subclasses!". So 1) calling resize() isn't noticed by View 2) apparently - calling 
setGeometry() instead of resize() screws sizing for some reason.

Another big question is that when I show my notifications containment in a view and 
when it changes size, i obviously need View to change its size too. But no code for 
this exists in View. Should it be there? I don't know.

The bottom line is this:
- Notification applet definetely needs to be able to resize itself when it desires. 
How well this will work in plasma paradigm? Any unexpected things to expect? :)
- Notification applet needs Plasma::View that can resize itself (not scene inside it, 
but itself as a QWidget) when Containment's bounding rect changes.

I'd greatly appresiate some feedback on that :)

Plasmeers,
Dmitry.




More information about the Panel-devel mailing list