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

KNotify

notifybypopup.h

Go to the documentation of this file.
00001 /*
00002    Copyright (C) 2005-2006 by Olivier Goffart <ogoffart at kde.org>
00003    Copyright (C) 2008 by Dmitry Suzdalev <dimsuz@gmail.com>
00004 
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 2, or (at your option)
00009    any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program; if not, write to the Free Software
00018    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
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         // the y coordinate of the next position popup should appears
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         // slot to catch appearance or dissapearance of Notifications DBus service
00076         void slotServiceOwnerChanged(const QString &, const QString &, const QString &);
00077         // slot which gets called when DBus signals that some notification action was invoked
00078         void slotDBusNotificationActionInvoked(uint, const QString&);
00079         // slot which gets called when DBus signals that some notification was closed
00080         void slotDBusNotificationClosed(uint, uint);
00081 
00082         private:
00086         QHash<int,uint> m_idMap;
00087 };
00088 
00089 #endif

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