KNotify
notifybypopup.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef NOTIFYBYPOPUP_H
00023 #define NOTIFYBYPOPUP_H
00024
00025 #include "knotifyplugin.h"
00026 #include <QMap>
00027 #include <QHash>
00028
00029 class KPassivePopup;
00030
00031 class NotifyByPopup : public KNotifyPlugin
00032 { Q_OBJECT
00033 public:
00034 NotifyByPopup(QObject *parent=0l);
00035 virtual ~NotifyByPopup();
00036
00037 virtual QString optionName() { return "Popup"; }
00038 virtual void notify(int id , KNotifyConfig *config);
00039 virtual void close( int id );
00040 virtual void update(int id, KNotifyConfig *config);
00041 private:
00042 QMap<int, KPassivePopup * > m_popups;
00043
00044 int m_nextPosition;
00045 int m_animationTimer;
00046 void fillPopup(KPassivePopup *,int id,KNotifyConfig *config);
00054 void sendNotificationDBus(int id, int replacesId, KNotifyConfig* config);
00059 void closeNotificationDBus(int id);
00063 bool m_dbusServiceExists;
00064
00065 protected:
00066 void timerEvent(QTimerEvent *event);
00067
00068 private Q_SLOTS:
00069 void slotPopupDestroyed();
00070 void slotLinkClicked(const QString & );
00071
00072 void slotServiceOwnerChanged(const QString &, const QString &, const QString &);
00073
00074 void slotDBusNotificationActionInvoked(uint, const QString&);
00075
00076 void slotDBusNotificationClosed(uint, uint);
00077
00078 private:
00082 QHash<int,uint> m_idMap;
00083 };
00084
00085 #endif