TrayIconImpl Class Reference

#include <trayicon_mac.h>

Inheritance diagram for TrayIconImpl:

TrayIcon List of all members.

Protected Member Functions

 TrayIconImpl (const QString &iconFile, const QString &toolTip)
 ~TrayIconImpl ()
void show ()
void hide ()
void setIcon (const QString &iconFile)
void setToolTip (const QString &toolTip)
 TrayIconImpl (const QString &iconFile, const QString &toolTip)
void show ()
void hide ()
void setIcon (const QString &iconFile)
void setToolTip (const QString &toolTip)
 TrayIconImpl (const QString &iconFile, const QString &toolTip)
void show ()
void hide ()
void setIcon (const QString &iconFile)
void setToolTip (const QString &toolTip)
void enterEvent (QEvent *event)

Private Member Functions

CGImageRef createIconFromFile (FSSpec fileSpec)
CGImageRef createIcon (const QString &iconFile)
bool winEvent (MSG *message, long *result)
bool sendMouseEvent (QEvent::Type type, Qt::MouseButton button)
HICON createIcon (const int resourceId)
void updateTrayIcon (DWORD msg)

Static Private Member Functions

static void releaseCallback (void *info, const void *data, size_t size)

Private Attributes

CGImageRef _imageRef
bool _shown
HICON _icon
QString _toolTip

Detailed Description

Definition at line 37 of file trayicon_mac.h.


Constructor & Destructor Documentation

TrayIconImpl::TrayIconImpl ( const QString &  iconFile,
const QString &  toolTip 
) [protected]

Constructor

Definition at line 34 of file trayicon_mac.cpp.

References _imageRef, _shown, setIcon(), and setToolTip().

TrayIconImpl::~TrayIconImpl (  )  [protected]

Destructor

Definition at line 48 of file trayicon_mac.cpp.

References _imageRef, _shown, and hide().

TrayIconImpl::TrayIconImpl ( const QString &  iconFile,
const QString &  toolTip 
) [protected]

Constructor

TrayIconImpl::TrayIconImpl ( const QString &  iconFile,
const QString &  toolTip 
) [protected]

Constructor


Member Function Documentation

void TrayIconImpl::show (  )  [protected]

Show the tray icon.

Reimplemented in TrayIcon.

Definition at line 158 of file trayicon_mac.cpp.

References _imageRef, and _shown.

Referenced by setIcon(), and TrayIcon::show().

void TrayIconImpl::hide (  )  [protected]

Hide the tray icon.

Reimplemented in TrayIcon.

Definition at line 174 of file trayicon_mac.cpp.

References _shown.

Referenced by TrayIcon::hide(), and ~TrayIconImpl().

void TrayIconImpl::setIcon ( const QString &  iconFile  )  [protected]

Update the tray icon's image.

Reimplemented in TrayIcon.

Definition at line 196 of file trayicon_mac.cpp.

References _imageRef, _shown, createIcon(), and show().

Referenced by TrayIcon::setIcon(), and TrayIconImpl().

void TrayIconImpl::setToolTip ( const QString &  toolTip  )  [protected]

Update the tray icon's tooltip.

Reimplemented in TrayIcon.

Definition at line 188 of file trayicon_mac.cpp.

Referenced by TrayIcon::setToolTip(), and TrayIconImpl().

CGImageRef TrayIconImpl::createIconFromFile ( FSSpec  fileSpec  )  [private]

Load icon data from the given file and create a CGImageRef.

Definition at line 69 of file trayicon_mac.cpp.

References i(), and releaseCallback().

Referenced by createIcon().

CGImageRef TrayIconImpl::createIcon ( const QString &  iconFile  )  [private]

Create an icon from the given filename in the application bundle.

Definition at line 129 of file trayicon_mac.cpp.

References createIconFromFile().

Referenced by setIcon().

void TrayIconImpl::releaseCallback ( void *  info,
const void *  data,
size_t  size 
) [static, private]

Callback used by CGDataProviderCreateWithData().

Definition at line 60 of file trayicon_mac.cpp.

Referenced by createIconFromFile().

void TrayIconImpl::show (  )  [protected]

Show the tray icon.

Reimplemented in TrayIcon.

void TrayIconImpl::hide (  )  [protected]

Hide the tray icon.

Reimplemented in TrayIcon.

void TrayIconImpl::setIcon ( const QString &  iconFile  )  [protected]

Update the tray icon's image.

Reimplemented in TrayIcon.

void TrayIconImpl::setToolTip ( const QString &  toolTip  )  [protected]

Update the tray icon's tooltip.

Reimplemented in TrayIcon.

bool TrayIconImpl::winEvent ( MSG *  message,
long *  result 
) [private]

Catches native Windows event messages.

Definition at line 105 of file trayicon_win.cpp.

References sendMouseEvent(), updateTrayIcon(), WM_NOTIFYICON, and WM_TASKBARCREATED.

bool TrayIconImpl::sendMouseEvent ( QEvent::Type  type,
Qt::MouseButton  button 
) [private]

Sends a new Qt-based mouse event.

Definition at line 131 of file trayicon_win.cpp.

Referenced by winEvent().

HICON TrayIconImpl::createIcon ( const int  resourceId  )  [private]

Create an icon for the tray image from a given icon resource identifier.

Definition at line 140 of file trayicon_win.cpp.

void TrayIconImpl::updateTrayIcon ( DWORD  msg  )  [private]

Updates the tray icon.

Definition at line 74 of file trayicon_win.cpp.

References _icon, _toolTip, TRAY_ICON_ID, and WM_NOTIFYICON.

Referenced by winEvent().

void TrayIconImpl::show (  )  [protected]

Show the tray icon image.

Reimplemented in TrayIcon.

void TrayIconImpl::hide (  )  [protected]

Hide the tray icon image.

Reimplemented in TrayIcon.

void TrayIconImpl::setIcon ( const QString &  iconFile  )  [protected]

Modify the tray icon's image.

Reimplemented in TrayIcon.

void TrayIconImpl::setToolTip ( const QString &  toolTip  )  [protected]

Modify the tray icon's tooltip.

Reimplemented in TrayIcon.

void TrayIconImpl::enterEvent ( QEvent *  event  )  [protected]

Process events when the mouse enters the icon area.

Definition at line 119 of file trayicon_x11.cpp.


Member Data Documentation

CGImageRef TrayIconImpl::_imageRef [private]

Tray icon image.

Definition at line 62 of file trayicon_mac.h.

Referenced by setIcon(), show(), TrayIconImpl(), and ~TrayIconImpl().

bool TrayIconImpl::_shown [private]

True if the dock icon is to be displayed.

Definition at line 63 of file trayicon_mac.h.

Referenced by hide(), setIcon(), show(), TrayIconImpl(), and ~TrayIconImpl().

HICON TrayIconImpl::_icon [private]

The tray icon image.

Definition at line 64 of file trayicon_win.h.

Referenced by updateTrayIcon().

QString TrayIconImpl::_toolTip [private]

The tray icon's tooltip.

Definition at line 65 of file trayicon_win.h.

Referenced by updateTrayIcon().


The documentation for this class was generated from the following files:
Generated on Mon Oct 23 20:08:16 2006 for Vidalia by  doxygen 1.5.0