[Kde-pim] Notifications on KMail

Ingo Klöcker kloecker at kde.org
Wed Jul 14 20:37:45 BST 2010


On Wednesday 14 July 2010, Artur Souza (MoRpHeUz) wrote:
> Hello!
> 
> So, I changed the messagecomposer/composerviewbase.cpp code in order
> to not show KMessageBox'es anymore. As it's a class that should not
> deal with the UI ideally it just emits signals whenever something
> wrong or right happened.
> 
> For Kmail-mobile I'm using that signal with KNotify in order to get
> notifications on the mobile environment and my question is: for the
> desktop version, should we use KMessageBox'es or switch to KNotify?

I would prefer callbacks over signals because callbacks would also allow 
the UI components to return something to the composer.

Alternatively, do it more C++-like and pass a NotificationInterface (or 
UserInteractionInterface?) to the composer and write two different 
implementations, one for KMail-mobile and one for KMail desktop. This 
interface would provide all needed methods, e.g. void showWarning( const 
QString& message ), AnswerType question( const QString& question, const 
QString& button1, const QString& button2 ), etc. Use a factory for the 
instantiation of the correct implementation.


Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100714/63128463/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list