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

Alessandro Diaferia alediaferia at gmail.com
Sat Feb 28 10:52:39 CET 2009


Sorry for the late reply.. i think i'll remove this patch from reviewboard..
Anyway i'd like to know a method to put the action at a specified corner
since youu suggested me to put the action of the devicenotifier refactoring
at the topright corner instead of the top left one.. Since trying to pass an
ampty action doesn't work i thought this patch would have been fine, but
didn't think about what you have just noriced :). So pleas, suggest me a way
or a workaround to put the action at the corner i choose..

2009/2/23 Aaron Seigo <aseigo at kde.org>

>
> -----------------------------------------------------------
> 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
> >
> >
>
>


-- 
Alessandro Diaferia
KDE Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20090228/753e36e8/attachment.htm 


More information about the Plasma-devel mailing list