KMessage/KMessageHandler: a core/ui seperation for displaying message.
Michaël Larouche
michael.larouche at kdemail.net
Sat Jun 3 20:22:55 BST 2006
Le May 28, 2006 13:06, Michaël Larouche a écrit :
> I rencently wanted to make a notification framework for Kopete4 to replace
> all the KMessageBox in the code. Then Olivier Goffart remembered me of the
> thread "core/ui separation".
>
> So I've made the required classes to separate the message display.
>
> kdecore: KMessage and KMessageHandler
> KMessage is the "frontend" API static class developers use the display a
> message. You must supply a KMessageHandler to work properly.
>
> KMessageHandler is the abstract class for the message handle.
>
> kdeui: KMessageBoxMessageHandler and KPassivePopupMessageHandler
> Those are obvious, there are KMessageHandler implementation that developers
> can use right away.
>
> So it is used like
>
> KMessage::setMessageHandler( new KMessageBoxHandler(this) );
> KMessage::message( KMessage::Information, i18n("Information"),
> i18n("Caption") );
>
> Applications can develop custom KMessageHandler for fine grained control in
> their application, like amaroK could use it with their KDE::StatusBar
> class.
>
> The patch include:
> -KMessage,KMessageHandler,KMessageBoxMessageHandler,KPassivePopupMessageHan
>dler -KMessage_Test in kdeui/tets
Here is an updated patch according to feedback I got.
I removed shortMessage() from API.
Please tell me what you would want that I add to KMessage API.
--
Michaël Larouche
KDE developer working on Kopete, Kamefu, Solid...on dial-up :P
--------------------------------------
Website: http://www.tehbisnatch.org/
MSN/Email: michael.larouche at kdemail.net
IRC: irc.freenode.org/DarkShock on #kopete,#solid,#kamefu,#plasma
Jabber: darkshock at myjabber.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kmessage_v2.patch.gz
Type: application/x-gzip
Size: 4480 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060603/b21433d6/attachment.bin>
More information about the kde-core-devel
mailing list