kmail

#include <kmsystemtray.h>

Inherits KSystemTray.

Public Slots

void foldersChanged ()
 

Public Member Functions

 KMSystemTray (TQWidget *parent=0, const char *name=0)
 
 ~KMSystemTray ()
 
void setMode (int mode)
 
int mode () const
 
void hideKMail ()
 
bool hasUnreadMail () const
 

Protected Member Functions

void mousePressEvent (TQMouseEvent *)
 
bool mainWindowIsOnCurrentDesktop ()
 
void showKMail ()
 
void buildPopupMenu ()
 
void updateCount ()
 
void resizeEvent (TQResizeEvent *)
 
TQString prettyName (KMFolder *)
 

Detailed Description

KMSystemTray extends KSystemTray and handles system tray notification for KMail.

Definition at line 41 of file kmsystemtray.h.

Constructor & Destructor Documentation

◆ KMSystemTray()

KMSystemTray::KMSystemTray ( TQWidget *  parent = 0,
const char *  name = 0 
)

construtor

Construct a KSystemTray icon to be displayed when new mail has arrived in a non-system folder.

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.

Initiate connections between folders and this object

Definition at line 59 of file kmsystemtray.cpp.

◆ ~KMSystemTray()

KMSystemTray::~KMSystemTray ( )

destructor

Definition at line 144 of file kmsystemtray.cpp.

Member Function Documentation

◆ foldersChanged

void KMSystemTray::foldersChanged ( )
slot

Refreshes the list of folders we are monitoring.

This is called on startup and is also connected to the 'changed' signal on the KMFolderMgr.

Hide and remove all unread mappings to cover the case where the only unread message was in a folder that was just removed.

Disconnect all previous connections

If this is a new folder, start listening for messages

Check all new folders to see if we started with any new messages

Definition at line 264 of file kmsystemtray.cpp.

◆ mousePressEvent()

void KMSystemTray::mousePressEvent ( TQMouseEvent *  e)
protected

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 316 of file kmsystemtray.cpp.

◆ prettyName()

TQString KMSystemTray::prettyName ( KMFolder fldr)
protected

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 371 of file kmsystemtray.cpp.

◆ showKMail()

void KMSystemTray::showKMail ( )
protected

Shows and raises the first KMMainWidget and switches to the appropriate virtual desktop.

Definition at line 411 of file kmsystemtray.cpp.

◆ updateCount()

void KMSystemTray::updateCount ( )
protected

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 191 of file kmsystemtray.cpp.


The documentation for this class was generated from the following files: