#include <trayicon_mac.h>
Protected Member Functions | |
TrayIconImpl () | |
~TrayIconImpl () | |
void | show () |
void | hide () |
void | setIcon (const QString &iconFile) |
void | setToolTip (const QString &toolTip) |
TrayIconImpl () | |
void | show () |
void | hide () |
void | setIcon (const QString &iconFile) |
void | setToolTip (const QString &toolTip) |
TrayIconImpl () | |
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) |
void | addToTray () |
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 |
Definition at line 37 of file trayicon_mac.h.
TrayIconImpl::TrayIconImpl | ( | ) | [protected] |
Default Constructor
Default constructor
Default constructor.
Definition at line 34 of file trayicon_mac.cpp.
TrayIconImpl::~TrayIconImpl | ( | ) | [protected] |
Destructor
Definition at line 42 of file trayicon_mac.cpp.
TrayIconImpl::TrayIconImpl | ( | ) | [protected] |
Default constructor.
TrayIconImpl::TrayIconImpl | ( | ) | [protected] |
Default constructor.
void TrayIconImpl::show | ( | ) | [protected] |
Show the tray icon.
Show the tray icon image.
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.
Hide the tray icon image.
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.
Set 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().
void TrayIconImpl::setToolTip | ( | const QString & | toolTip | ) | [protected] |
Update the tray icon's tooltip.
Set the tray icon's tooltip.
Reimplemented in TrayIcon.
Definition at line 188 of file trayicon_mac.cpp.
Referenced by TrayIcon::setToolTip().
CGImageRef TrayIconImpl::createIconFromFile | ( | FSSpec | fileSpec | ) | [private] |
Load icon data from the given file and create a CGImageRef.
Definition at line 63 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 123 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 54 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 * | msg, | |
long * | result | |||
) | [private] |
Catches native Windows event messages.
Catches and handles mouse-related native Windows event messages.
Definition at line 99 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.
Sends a mouse-related event to the main TrayIcon class.
Definition at line 125 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.
Create an icon for the tray image from a resource identifier.
Definition at line 134 of file trayicon_win.cpp.
void TrayIconImpl::updateTrayIcon | ( | DWORD | msg | ) | [private] |
Updates the tray icon.
Definition at line 68 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 124 of file trayicon_x11.cpp.
void TrayIconImpl::addToTray | ( | ) | [private] |
Adds this widget to the system notification area.
Definition at line 73 of file trayicon_x11.cpp.
References SYSTEM_TRAY_REQUEST_DOCK.
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] |
QString TrayIconImpl::_toolTip [private] |
The tray icon's tooltip.
Definition at line 65 of file trayicon_win.h.
Referenced by updateTrayIcon().