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 TQ_OBJECT
00045 public:
00047 KMSystemTray(TQWidget* parent=0, const char *name=0);
00049 ~KMSystemTray();
00050
00051 void setMode(int mode);
00052 int mode() const;
00053
00054 void hideKMail();
00055 bool hasUnreadMail() const;
00056
00057 public slots:
00058 void foldersChanged();
00059
00060 private slots:
00061 void updateNewMessageNotification(KMFolder * folder);
00062 void selectedAccount(int);
00063 void updateNewMessages();
00064 void tray_quit();
00065
00066 protected:
00067 void mousePressEvent(TQMouseEvent *);
00068 bool mainWindowIsOnCurrentDesktop();
00069 void showKMail();
00070 void buildPopupMenu();
00071 void updateCount();
00072
00073 TQString prettyName(KMFolder *);
00074
00075 private:
00076
00077 bool mParentVisible;
00078 TQPoint mPosOfMainWin;
00079 int mDesktopOfMainWin;
00080
00081 int mMode;
00082 int mCount;
00083 int mNewMessagePopupId;
00084
00085 KPopupMenu * mPopupMenu;
00086 TQPixmap mDefaultIcon;
00087 TQImage mLightIconImage;
00088
00089 TQValueVector<KMFolder*> mPopupFolders;
00090 TQMap<TQGuardedPtr<KMFolder>, int> mFoldersWithUnread;
00091 TQMap<TQGuardedPtr<KMFolder>, bool> mPendingUpdates;
00092 TQTimer *mUpdateTimer;
00093 time_t mLastUpdate;
00094 };
00095
00096 #endif
|