plasma apps and screen information
Guillaume Pothier
gpothier at gmail.com
Mon Oct 27 15:34:52 CET 2008
2008/10/27 Aaron J. Seigo <aseigo at kde.org>:
>> - 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:
>
ok
>
>> The latter should probably return a QRegion instead, according to what
>> you said about toolbox placement.
>
> yes, it should be a QRegion.
ok, I'll use QRegion in the API, but for now the region will be
rectangular and the toolbox positioning code will rely on the region's
bounding box. Later I'll see how to improve that. Is that ok?
>> - Added Corona* parameter to Plasma::popupPosition
>
> if it relies on Corona, perhaps it should move *to* corona?
Ok I'll move it.
>
>> - 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.
ok
>
>> - 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.
Any idea how the ToolTipManager could get access to the corona?
>
>> - 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 =)
I think plasmoidviewer needs its own corona anyway so as to report the
actual window size instead of a meaningless value?
Thanks for the comments!
Cheers,
g
>
> --
> 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
>
>
>
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>
>
More information about the Plasma-devel
mailing list