kmail
kmsystemtray.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef KMSYSTEMTRAY_H
00019 #define KMSYSTEMTRAY_H
00020
00021 #include <ksystemtray.h>
00022
00023 #include <tqmap.h>
00024 #include <tqguardedptr.h>
00025 #include <tqvaluevector.h>
00026 #include <tqpixmap.h>
00027 #include <tqimage.h>
00028
00029 #include <time.h>
00030
00031 class KMFolder;
00032 class KMMainWidget;
00033 class TQMouseEvent;
00034 class KPopupMenu;
00035 class TQPoint;
00036
00041 class KMSystemTray : public KSystemTray
00042 {
00043 Q_OBJECT
00044 public:
00046 KMSystemTray(TQWidget* parent=0, const char *name=0);
00048 ~KMSystemTray();
00049
00050 void setMode(int mode);
00051 int mode() const;
00052
00053 void hideKMail();
00054 bool hasUnreadMail() const;
00055
00056 public slots:
00057 void foldersChanged();
00058
00059 private slots:
00060 void updateNewMessageNotification(KMFolder * folder);
00061 void selectedAccount(int);
00062 void updateNewMessages();
00063 void tray_quit();
00064
00065 protected:
00066 void mousePressEvent(TQMouseEvent *);
00067 bool mainWindowIsOnCurrentDesktop();
00068 void showKMail();
00069 void buildPopupMenu();
00070 void updateCount();
00071
00072 TQString prettyName(KMFolder *);
00073
00074 private:
00075
00076 bool mParentVisible;
00077 TQPoint mPosOfMainWin;
00078 int mDesktopOfMainWin;
00079
00080 int mMode;
00081 int mCount;
00082 int mNewMessagePopupId;
00083
00084 KPopupMenu * mPopupMenu;
00085 TQPixmap mDefaultIcon;
00086 TQImage mLightIconImage;
00087
00088 TQValueVector<KMFolder*> mPopupFolders;
00089 TQMap<TQGuardedPtr<KMFolder>, int> mFoldersWithUnread;
00090 TQMap<TQGuardedPtr<KMFolder>, bool> mPendingUpdates;
00091 TQTimer *mUpdateTimer;
00092 time_t mLastUpdate;
00093 };
00094
00095 #endif
|