TrayIcon Class Reference

#include <trayicon.h>

Inheritance diagram for TrayIcon:
TrayIconImpl

List of all members.

Public Types

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

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 *  event  )  [protected]

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

Catches and handles mouse-related events.

Definition at line 35 of file trayicon.cpp.

References mouseButtonDblClick().

void TrayIcon::hide (  ) 

Hide the tray icon.

Call the platform's tray icon implementation to hide the tray icon.

Reimplemented from TrayIconImpl.

Definition at line 77 of file trayicon.cpp.

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.

Responds to a mouse button double-click. On all platforms, we just emit a signal and let the owner of the tray icon decide if they want to do anything.

Definition at line 53 of file trayicon.cpp.

References doubleClicked().

Referenced by event().

void TrayIcon::setContextMenu ( QMenu *  menu  ) 

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

Sets the context menu displayed when the tray icon is selected. On Mac, the context menu is displayed when the dock icon is clicked.

Definition at line 99 of file trayicon.cpp.

Referenced by MainWindow::createTrayIcon().

void TrayIcon::setIcon ( const QString &  iconFile  ) 

Update the tray icon's image.

Call the platform's tray icon implementation to update the icon image.

Reimplemented from TrayIconImpl.

Definition at line 91 of file trayicon.cpp.

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

void TrayIcon::setToolTip ( const QString &  toolTip  ) 

Update the tray icon's tooltip.

Call the platform's tray icon implementation to update the icon's tooltip.

Reimplemented from TrayIconImpl.

Definition at line 84 of file trayicon.cpp.

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

void TrayIcon::show (  ) 

Show the tray icon.

Call the platform's tray icon implementation to show the tray icon.

Reimplemented from TrayIconImpl.

Definition at line 70 of file trayicon.cpp.

Referenced by MainWindow::MainWindow().

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

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.

Update the tray icon's 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 Wed Dec 23 21:11:11 2009 for Vidalia by  doxygen 1.6.1