• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KNotify

KNotifyPlugin Class Reference

abstract class for KNotify actions More...

#include <knotifyplugin.h>

Inheritance diagram for KNotifyPlugin:

Inheritance graph
[legend]

List of all members.


Signals

void actionInvoked (int id, int action)
void finished (int id)

Public Member Functions

virtual void close (int id)
 KNotifyPlugin (QObject *parent=0l)
virtual void notify (int id, KNotifyConfig *config)=0
virtual QString optionName ()=0
virtual void update (int, KNotifyConfig *)
virtual ~KNotifyPlugin ()

Protected Member Functions

void finish (int id)

Detailed Description

abstract class for KNotify actions

A KNotifyPlugin is responsible of one presentation. You can subclass it to have your own knotify presentation.

You should reimplement the KNotifyPlugin::notify method to display the notification.

Dynamic plugin support is not yet implemented in KNotify. In order to load your plugin you need to add a line to KNotify::loadConfig() in knotify.cpp

Author:
Olivier Goffart <ogoffart at kde.org>

Definition at line 43 of file knotifyplugin.h.


Constructor & Destructor Documentation

KNotifyPlugin::KNotifyPlugin ( QObject *  parent = 0l  ) 

Definition at line 24 of file knotifyplugin.cpp.

KNotifyPlugin::~KNotifyPlugin (  )  [virtual]

Definition at line 29 of file knotifyplugin.cpp.


Member Function Documentation

void KNotifyPlugin::actionInvoked ( int  id,
int  action 
) [signal]

emit this signal if one action was invoked

Parameters:
id is the id of the notification
action is the action number. zero for the default action

virtual void KNotifyPlugin::close ( int  id  )  [inline, virtual]

This function is called when the notification has been closed.

Reimplemented in NotifyByPopup, and NotifyBySound.

Definition at line 76 of file knotifyplugin.h.

void KNotifyPlugin::finish ( int  id  )  [inline, protected]

emit the finished signal you MUST call this function for each call to notify(), even if you do nothing there

call it when the presentation is finished (because the user closed the popup or the sound is finished)

If your presentation is syncronious, you can even call this function from the notify() call itself

Definition at line 87 of file knotifyplugin.h.

void KNotifyPlugin::finished ( int  id  )  [signal]

the presentation is finished.

virtual void KNotifyPlugin::notify ( int  id,
KNotifyConfig *  config 
) [pure virtual]

This function is called when the notification is sent.

(or re-sent) You should implement this function to display a notification

for each call to this function (even for re-notification), you MUST call finish(int)

Parameters:
id is the notification id
config is the configuration of the notification

Implemented in NotifyByExecute, NotifyByKTTS, NotifyByLogfile, NotifyByPopup, NotifyBySound, and NotifyByTaskbar.

virtual QString KNotifyPlugin::optionName (  )  [pure virtual]

return the name of this plugin.

this is the name that should appears in the .knotifyrc file, in the field Action=... if a notification

Implemented in NotifyByExecute, NotifyByKTTS, NotifyByLogfile, NotifyByPopup, NotifyBySound, and NotifyByTaskbar.

virtual void KNotifyPlugin::update ( int  ,
KNotifyConfig *   
) [inline, virtual]

This function is called when the notification has changed (such as the text or the icon).

Reimplemented in NotifyByPopup.

Definition at line 71 of file knotifyplugin.h.


The documentation for this class was generated from the following files:
  • knotifyplugin.h
  • knotifyplugin.cpp

KNotify

Skip menu "KNotify"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KCMShell
  • KNotify
  • KStyles
  • Nepomuk Daemons
Generated for API Reference by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal