[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    KMessage/KMessageHandler: a core/ui seperation for displaying message.
From:       Michaël_Larouche <michael.larouche () kdemail ! net>
Date:       2006-05-28 17:06:47
Message-ID: 200605281306.48063.michael.larouche () kdemail ! net
[Download RAW message or body]


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,KPassivePopupMessageHandler
-KMessage_Test in kdeui/tets
-- 
Michaël Larouche
KDE developer working on Kopete, Kamefu, Solid...on dial-up :P
--------------------------------------
Website: http://www.tehbisnatch.org/
MSN/Email: michael.larouche@kdemail.net
IRC: irc.freenode.org/DarkShock on #kopete,#solid,#kamefu,#plasma
Jabber: darkshock@myjabber.net

["kmessage.patch.gz" (application/x-gzip)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic