summaryrefslogtreecommitdiffstats
path: root/kmail/kmsystemtray.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch)
tree67208f7c145782a7e90b123b982ca78d88cc2c87 /kmail/kmsystemtray.h
downloadtdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz
tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/kmsystemtray.h')
-rw-r--r--kmail/kmsystemtray.h91
1 files changed, 91 insertions, 0 deletions
diff --git a/kmail/kmsystemtray.h b/kmail/kmsystemtray.h
new file mode 100644
index 000000000..2d2e2bf61
--- /dev/null
+++ b/kmail/kmsystemtray.h
@@ -0,0 +1,91 @@
+/***************************************************************************
+ kmsystemtray.h - description
+ -------------------
+ begin : Fri Aug 31 22:38:44 EDT 2001
+ copyright : (C) 2001 by Ryan Breen
+ email : ryan@porivo.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef KMSYSTEMTRAY_H
+#define KMSYSTEMTRAY_H
+
+#include <ksystemtray.h>
+
+#include <qmap.h>
+#include <qguardedptr.h>
+#include <qvaluevector.h>
+#include <qpixmap.h>
+#include <qimage.h>
+
+#include <time.h>
+
+class KMFolder;
+class KMMainWidget;
+class QMouseEvent;
+class KPopupMenu;
+class QPoint;
+
+/**
+ * KMSystemTray extends KSystemTray and handles system
+ * tray notification for KMail
+ */
+class KMSystemTray : public KSystemTray
+{
+ Q_OBJECT
+public:
+ /** construtor */
+ KMSystemTray(QWidget* parent=0, const char *name=0);
+ /** destructor */
+ ~KMSystemTray();
+
+ void setMode(int mode);
+ int mode() const;
+
+ void hideKMail();
+
+private slots:
+ void updateNewMessageNotification(KMFolder * folder);
+ void foldersChanged();
+ void selectedAccount(int);
+ void updateNewMessages();
+
+protected:
+ void mousePressEvent(QMouseEvent *);
+ bool mainWindowIsOnCurrentDesktop();
+ void showKMail();
+ void buildPopupMenu();
+ void updateCount();
+
+ QString prettyName(KMFolder *);
+
+private:
+
+ bool mParentVisible;
+ QPoint mPosOfMainWin;
+ int mDesktopOfMainWin;
+
+ int mMode;
+ int mCount;
+ int mNewMessagePopupId;
+
+ KPopupMenu * mPopupMenu;
+ QPixmap mDefaultIcon;
+ QImage mLightIconImage;
+
+ QValueVector<KMFolder*> mPopupFolders;
+ QMap<QGuardedPtr<KMFolder>, int> mFoldersWithUnread;
+ QMap<QGuardedPtr<KMFolder>, bool> mPendingUpdates;
+ QTimer *mUpdateTimer;
+ time_t mLastUpdate;
+};
+
+#endif