KMSystemTray Class Reference
KMSystemTray extends KSystemTray and handles system tray notification for KMail. More...
#include <kmsystemtray.h>
Public Types | |
enum | SystrayMode { AlwaysOn, OnNewMail } |
Public Methods | |
KMSystemTray (QWidget *parent=0, const char *name=0) | |
~KMSystemTray () | |
void | setMode (int mode) |
Protected Methods | |
void | mousePressEvent (QMouseEvent *) |
bool | mainWindowIsOnCurrentDesktop () |
void | showKMail () |
void | hideKMail () |
void | buildPopupMenu () |
void | updateCount () |
QString | prettyName (KMFolder *) |
KMMainWidget * | getKMMainWidget () |
Detailed Description
KMSystemTray extends KSystemTray and handles system tray notification for KMail.
Definition at line 39 of file kmsystemtray.h.
Constructor & Destructor Documentation
|
construtor. The KMSystemTray listens for updateNewMessageNotification events from each non-system KMFolder and maintains a store of all folders with unread messages. The KMSystemTray also provides a popup menu listing each folder with its count of unread messages, allowing the user to jump to the first unread message in each folder. Definition at line 56 of file kmsystemtray.cpp. References getKMMainWidget(), QWidget::pos(), QWidget::topLevelWidget(), and QWidget::winId(). |
|
destructor.
Definition at line 128 of file kmsystemtray.cpp. |
Member Function Documentation
|
On left mouse click, switch focus to the first KMMainWidget. On right click, bring up a list of all folders with a count of unread messages. Definition at line 277 of file kmsystemtray.cpp. References QMap< QGuardedPtr< KMFolder >, int >::begin(), buildPopupMenu(), QMouseEvent::button(), QPtrVector< KMFolder >::clear(), QMap< QGuardedPtr< KMFolder >, int >::count(), QMap< QGuardedPtr< KMFolder >, int >::end(), QMouseEvent::globalPos(), QPtrVector< KMFolder >::insert(), QString::number(), prettyName(), QPtrVector< KMFolder >::resize(), showKMail(), and QPtrVector< KMFolder >::size(). |
|
Shows and raises the first KMMainWidget and switches to the appropriate virtual desktop.
Definition at line 373 of file kmsystemtray.cpp. References getKMMainWidget(), QWidget::move(), QWidget::show(), QWidget::topLevelWidget(), and QWidget::winId(). Referenced by mousePressEvent(). |
|
Initiate connections between folders and this object.
Definition at line 101 of file kmsystemtray.cpp. References getKMMainWidget(). Referenced by mousePressEvent(). |
|
Update the count of unread messages. If there are unread messages, overlay the count on top of a transparent version of the KMail icon. If there is no unread mail, restore the normal KMail icon. Definition at line 163 of file kmsystemtray.cpp. References QPixmap::convertFromImage(), QPixmap::convertToImage(), QImage::copy(), QPixmap::createHeuristicMask(), QPainter::drawText(), QPixmap::fill(), QString::number(), QFont::pointSizeFloat(), QPixmap::rect(), QFont::setBold(), QPainter::setFont(), QPixmap::setMask(), QPainter::setPen(), QFont::setPointSizeFloat(), and QFontMetrics::width(). |
|
Return the name of the folder in which the mail is deposited, prepended with the account name if the folder is IMAP.
Definition at line 333 of file kmsystemtray.cpp. References KMFolder::folderType(), KMFolder::label(), and QObject::name(). Referenced by mousePressEvent(). |
|
Grab a pointer to the first KMMainWidget.
Definition at line 416 of file kmsystemtray.cpp. References QWidget::topLevelWidget(). Referenced by buildPopupMenu(), KMSystemTray(), and showKMail(). |
The documentation for this class was generated from the following files: