00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef SYSTEMTRAYICON_H
00019 #define SYSTEMTRAYICON_H
00020
00021
00022 #include <QIcon>
00023 #include <QPainter>
00024 #include <QColor>
00025 #include <QTimer>
00026 #include <QMenu>
00027
00028
00029 #include <KSystemTrayIcon>
00030 #include <KLocale>
00031 #include <KDebug>
00032 #include <KGlobalSettings>
00033 #include <kaction.h>
00034
00038 class SystemTrayIcon : public KSystemTrayIcon
00039 {
00040 Q_OBJECT
00041
00042 public:
00043
00050 SystemTrayIcon( QWidget* parent, QIcon trayIcon, KAction* actionRefresh );
00051
00057 void drawNumber( int n, const QColor& color );
00058
00062 void clear ();
00063
00067 void showLooking();
00068
00069 private:
00070
00074 QIcon _icon;
00075
00079 QTimer* flashingTimer;
00080
00085 bool flasherFlag;
00086
00087 protected:
00088
00092 void drawLooking();
00093
00094 protected slots:
00095
00101 void slotFlash();
00102 };
00103
00104 #endif // SYSTEMTRAYICON_H