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;
00067 void getAppCaptionAndIconName(KNotifyConfig *config, QString *appCaption, QString *iconName);
00068
00069 protected:
00070 void timerEvent(QTimerEvent *event);
00071
00072 private Q_SLOTS:
00073 void slotPopupDestroyed();
00074 void slotLinkClicked(const QString & );
00075
00076 void slotServiceOwnerChanged(const QString &, const QString &, const QString &);
00077
00078 void slotDBusNotificationActionInvoked(uint, const QString&);
00079
00080 void slotDBusNotificationClosed(uint, uint);
00081
00082 private:
00086 QHash<int,uint> m_idMap;
00087 };
00088
00089 #endif