knotificationitem: api prettiness
Aaron J. Seigo
aseigo at kde.org
Tue May 26 23:46:43 CEST 2009
On Tuesday 26 May 2009, Marco Martin wrote:
> Hi all,
> was talking with richmoore about the api of libknotificationitem, wat did
> emerged is a thing i wasn't happy about but couldn't quite quantify before:
> 1) we have two way to set icons: by name and by pixmap, right now by name
> is setIcon()
> by pixmap is setImage()
> (that should reflect in dbus too)
> that looks a bit weird, would be better maybe setIconName() and setIcon()?
setIcon in the rest of our API tends to take a QIcon ... but that's not doable
here... setIconName is ok though not much more satisfying than setIcon tbh. it
is at least more descriptive as to what it's doing and doesn't interfere with
the setIcon(QIcon) pattern in the rest of Qt/KDE API
i don't like the idea of setIcon(QPixmap) though, as it's not an icon that is
being set, but rather an image.
> 2) void showMessage(const QString &title, const QString &message, const
> QString &icon, int timeout = 10000);
> should become
> void showMessage(const QString &message, const QString &title = QString(),
> const QString &icon = QString(), int timeout = 10000);
looks fine though we'll have to hunt through all uses as the compiler won't
help us here i don't think.
> aaand, can quite big changes like the icon methods still be done?
> and when? now? after 4.3?
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090526/cfece9ea/attachment.sig
More information about the Plasma-devel