[RFC] KInformationLabel

Michaël Larouche larouche at kde.org
Mon Mar 12 17:59:36 GMT 2007


Le March 12, 2007 04:15, Simon Hausmann a écrit :
> On Monday 12 March 2007 03:17:41 Michaël Larouche wrote:
> > Le March 3, 2007 12:56, Michaël Larouche a écrit :
> > > I have been working (slowy) on a new widget for kdelibs.
> > >
> > > It is a small label to display message in a dialog. The label is first
> > > hidden when instancied and only show up when a message is affected to
> > > the label. This is similiar to the ErrorNotifier control in Windows
> > > Forms. This widget will be useful to replace message box in dialog like
> > > Ask Password dialog and other non-modal dialogs.
> > >
> > > This is a work in progress of course and not all planned features are
> > > not implemented. I would like to add a autohide timeout to the widget.
> > > I tried to add FadeIn animation.
> > >
> > > I would like comments and suggestion about for this widget.
> >
> > Here a updated patch ready to be comitted on tomorrow (kdelibs breakage)
>
> Looks okay to me. Here's some more feedback on the API:
>
> * I suggest to replace setIconName(const QString &name) with just a second
> setIcon overload that takes a QIcon. It's nice if a property called "icon"
> also takes the native icon type :)
>
> * I also wouldn't make setIcon a slot. I've never seen a signal that emits
> an icon :)
>
> * I suggest to rename the timeout property (what's a timeout a label?) to
> autoHideTimeout (aha!).
>
> And of course the obligatory question for kdelibs inclusion at the end:
> Which applications are using this widget (either at the moment or in the
> near future)?
>
>
> Simon

New patch based on your suggestion Simon.

I'll try to make use of this widget where it is needed to replace modal 
message box used in wrong contextes. I needed that for a dialog in Kopete at 
least and kdesu will make good use of it :)

Just think every dialog that ask a password, it will be able to display the 
error meessage right in the dialog in a nice way.
-- 
Michaël Larouche
KDE developer working on Kopete, Gamefu(KDE), Solid...on dial-up :P
--------------------------------------
Website: http://www.tehbisnatch.org/
MSN: michael.larouche at kdemail.net
IRC: irc.freenode.org/DarkShock
Jabber/email: larouche at kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kinformationlabel_diff_v3.patch
Type: text/x-diff
Size: 19065 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070312/352696ce/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 309 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070312/352696ce/attachment.sig>


More information about the kde-core-devel mailing list