Review Request: add method addIconAction(QAction*, ActionCorner) to Plasma::IconWidget plus a bonus :)

Aaron Seigo aseigo at kde.org
Mon Feb 23 20:19:50 CET 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/14/#review245
-----------------------------------------------------------


so the reason i didn't expose the corner enum was so that we weren't stuck showing the icon in a specific location (e.g. the corner) of the icon. what if we wanted to show it in a circle around the icon, for instance? or on an overlay when you hover the icon (probably based on the form factor and size of the widget)? by exposing "this is the corner it will be in", we either lock ourselves into a single representation or set ourselves up for an API that doesn't really do what you tell it to but does "something else" with your input.

so ... what exactly is the use case you are after here? i know you said something about the device notifier, but what's the exact end result you are going for?


trunk/KDE/kdelibs/plasma/widgets/iconwidget.cpp
<http://reviewboard.kde.org/r/14/#comment137>

    if there is a public enum, then IconWidgetPrivate::ActionPosition should simply be removed and IconwWidget::ActionCorner be used.



trunk/KDE/kdelibs/plasma/widgets/iconwidget.cpp
<http://reviewboard.kde.org/r/14/#comment138>

    this foreach really ought to be re-written to use a QMutableMapIterator; rather more efficient than what this is.



trunk/KDE/kdelibs/plasma/widgets/iconwidget.cpp
<http://reviewboard.kde.org/r/14/#comment140>

    should be changed to use a QMapIterator


- Aaron


On 2009-02-04 10:26:49, Alessandro Diaferia wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/14/
> -----------------------------------------------------------
> 
> (Updated 2009-02-04 10:26:49)
> 
> 
> Review request for Plasma, Aaron Seigo and Marco Martin.
> 
> 
> Summary
> -------
> 
> This patch adds the chance to specify in which corner the action will be placed. Useful for me in the devicenotifier refactor. In addition to this i've fixed the fact that the action is painted on the *widget*'s corner and not on the *icon*'s corner. To achieve this i used a workaround, but i don't like it much even if it correctly does the trick.
> 
> I hope that everything is still BC.
> 
> Lemme know what you think about this.
> 
> Cheers :)
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdelibs/plasma/widgets/iconwidget.h 920669 
>   trunk/KDE/kdelibs/plasma/widgets/iconwidget.cpp 920669 
>   trunk/KDE/kdelibs/plasma/widgets/iconwidget_p.h 920669 
> 
> Diff: http://reviewboard.kde.org/r/14/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alessandro
> 
>



More information about the Plasma-devel mailing list