[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: plasma apps and screen information
From: "Aaron J. Seigo" <aseigo () kde ! org>
Date: 2008-10-27 5:56:55
Message-ID: 200810262356.55817.aseigo () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Friday 24 October 2008, Guillaume Pothier wrote:
> 2008/10/23 Aaron J. Seigo <aseigo@kde.org>:
> > On Wednesday 22 October 2008, Guillaume Pothier wrote:
> >> Just tell me if you want me to go ahead.
> >
> > please do =)
>
> Ok, here comes the patch. In summary:
> - Added three methods to Corona:
> int numScreens()
> QRect screenGeometry(int)
> QRect availableScreenGeometry(int)
these shouldn't be pure virtual. they can return silly values like by default,
of course:
int numScreens() { return 1; }
QRect screenGeometry(int) { return sceneRect(); }
etc...
> The latter should probably return a QRegion instead, according to what
> you said about toolbox placement.
yes, it should be a QRegion.
> - QDesktopWidget is not used anymore in libplasma, entirely replaced
> by calls to the new Corona methods.
great.
> - Added Corona* parameter to Plasma::popupPosition
if it relies on Corona, perhaps it should move *to* corona?
> - Added a corona() method to Plasma::Applet. This is needed for calls
> to Plasma::popupPosition.
applet->containment()->corona();
yes, it's one more hoop to jump through but it:
* keeps Applet API clean
* discourages use of corona() from Applets
* makes it clear what the object hierarchy is (Corona -> Containments ->
Applets)
> - Also added a corona() method to Plasma::View for consistency's sake.
containment()->corona().
littering the API with every conceivable convenience method is nonsensical and
destroys the ability to glean the design by reading the API.
> - Corona is friends with ToolTipManager, as ToolTipManager needs to
> call Plasma::popupPosition and thus needs a Corona. Thus, Corona
> registers itself with the ToolTipManager. I think this is the ugliest
> part of the patch, please tell me if there is a better solution.
yes, this is amazingly ugly indeed.
> - Added a ViewerCorona class to plasmoidviewer, as Plasma::Corona is
> now has pure virtual methods.
shouldn't be necessary if they aren't pure virtual. that you had to do this
work was probably a good hint something could be better =)
--
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 Software
["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