[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: kpanelapplet.h
From: m_elter () t-online ! de (Matthias Elter)
Date: 2000-03-29 5:56:25
[Download RAW message or body]
Matthias Ettrich wrote:
>
> Hi,
>
> I don't understand the kpanelapplet API. It's supposed to replace kapplet, but
> I can't see how and why.
>
> Missing things:
>
> - slots for remove- or move-requests. They are needed in order to allow
> the applet to tell the panel that it should be moved or removed. Try
> 'exampleapplet' and use the RMB menu.
Not needed. Moving and removing are ciritical actions. I don't think we
can trust in
every applet author to implement a RMB menu for these. Even if every
author would do so, every applets RMB menu would look different..so much
for consistency. I have a better solution for this. Wait and see. :)
> - a virtual setupGeometry function or at least a setup() handler. This is
> needed to notify the applet when the geometry of the panel changes.
> Run 'exampleapplet' in a horizontal panel and then move the panel to
> the left: the applet automatically adjusts itself to be a vertical
> applet. The new class kpannelapplet cannot do that.
No setup() handler needed. Just reimplement the resize() event. This
works because of heightForWidth() and widthForHeight(). Trust me I have
a working kicker + applets on my HD. :)
> Bad things:
>
> - orientation() and position() are probably queried quite often ( for
> example in paint event handling). Having them doing synchonous dcop
> calls is too slow. Rather cache these values in the applet and
> implement a callback were the panel informs the applets about position
> or orientation changes. But again, the old class did that.
Yes that true. I already noticed this myself but was to busy with other
things to change it. This will be fixed in the final API.
> The only benefit I see are the heightForWidth() and widthForHeight() functions.
> What's the purpose of KPanelApplet? Or better: what's wrong with KApplet that
> can't be fixed?
Simplified API plus a KApplet never knows what size it actually will be
granted, a KPanelApplet does.
--
Matthias Elter
elter@kde.org
me@caldera.de
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic