TrayIcon Class Reference

#include <trayicon.h>

Inheritance diagram for TrayIcon:

TrayIconImpl List of all members.

Public Types

 NoIcon = 0
 Information
 Warning
 Critical
enum  BalloonMessageIcon { NoIcon = 0, Information, Warning, Critical }

Signals

void doubleClicked ()

Public Member Functions

 TrayIcon (QWidget *parent=0)
void show ()
void hide ()
void update (const QString &iconFile, const QString &toolTip)
void setToolTip (const QString &toolTip)
void setIcon (const QString &iconFile)
void setContextMenu (QMenu *contextMenu)
void showBalloonMessage (const QString &title, const QString &message, BalloonMessageIcon icon)

Static Public Member Functions

static bool isTrayIconSupported ()
static bool supportsBalloonMessages ()

Protected Member Functions

bool event (QEvent *)
void mouseButtonDblClick (QMouseEvent *event)

Detailed Description

Definition at line 34 of file trayicon.h.


Member Enumeration Documentation

enum TrayIcon::BalloonMessageIcon

Balloon message status icons.

Enumerator:
NoIcon 
Information 
Warning 
Critical 

Definition at line 40 of file trayicon.h.


Constructor & Destructor Documentation

TrayIcon::TrayIcon ( QWidget *  parent = 0  ) 

Default constructor.

Definition at line 28 of file trayicon.cpp.


Member Function Documentation

void TrayIcon::doubleClicked (  )  [signal]

Emitted when the user double-clicks on the tray icon.

Referenced by mouseButtonDblClick().

bool TrayIcon::event ( QEvent *   )  [protected]

Override's QObject' event() method to catch mouse-related events.

Definition at line 35 of file trayicon.cpp.

References mouseButtonDblClick().

void TrayIcon::hide (  ) 

Hide the tray icon.

Reimplemented from TrayIconImpl.

Definition at line 77 of file trayicon.cpp.

References TrayIconImpl::hide().

Referenced by MainWindow::~MainWindow().

bool TrayIcon::isTrayIconSupported (  )  [static]

Returns true if the current platform and tray icon implementation supports tray icons.

Definition at line 132 of file trayicon.cpp.

Referenced by MainWindow::setVisible().

void TrayIcon::mouseButtonDblClick ( QMouseEvent *  event  )  [protected]

Respond to a mouse button being double-clicked.

Definition at line 53 of file trayicon.cpp.

References doubleClicked().

Referenced by event().

void TrayIcon::setContextMenu ( QMenu *  contextMenu  ) 

Sets the context menu displayed when the tray icon is selected.

Definition at line 99 of file trayicon.cpp.

Referenced by MainWindow::createTrayIcon().

void TrayIcon::setIcon ( const QString &  iconFile  ) 

Update the tray icon's image.

Reimplemented from TrayIconImpl.

Definition at line 91 of file trayicon.cpp.

References TrayIconImpl::setIcon().

Referenced by update(), and MainWindow::updateTorStatus().

void TrayIcon::setToolTip ( const QString &  toolTip  ) 

Update the tray icon's tooltip.

Reimplemented from TrayIconImpl.

Definition at line 84 of file trayicon.cpp.

References TrayIconImpl::setToolTip().

Referenced by MainWindow::setStartupProgress(), update(), and MainWindow::updateTorStatus().

void TrayIcon::show (  ) 

Show the tray icon.

Reimplemented from TrayIconImpl.

Definition at line 70 of file trayicon.cpp.

References TrayIconImpl::show().

Referenced by MainWindow::MainWindow().

void TrayIcon::showBalloonMessage ( const QString &  title,
const QString &  message,
BalloonMessageIcon  icon 
)

Displays a balloon message next to the tray icon.

Definition at line 110 of file trayicon.cpp.

References Critical, NoIcon, and Warning.

Referenced by MainWindow::newIdentity().

bool TrayIcon::supportsBalloonMessages (  )  [static]

Returns true if the current platform and tray icon implementation supports tray icon balloon messages.

Definition at line 146 of file trayicon.cpp.

Referenced by MainWindow::newIdentity().

void TrayIcon::update ( const QString &  iconFile,
const QString &  toolTip 
)

Updates the icon image and tooltip.

Definition at line 62 of file trayicon.cpp.

References setIcon(), and setToolTip().


The documentation for this class was generated from the following files:
Generated on Tue Jul 7 17:00:57 2009 for Vidalia by  doxygen 1.4.7