#include <trayicon_mac.h>
Inheritance diagram for TrayIconImpl:
Protected Member Functions | |
TrayIconImpl (QWidget *parent=0) | |
~TrayIconImpl () | |
void | show () |
void | hide () |
void | setIcon (const QString &iconFile) |
void | setToolTip (const QString &toolTip) |
TrayIconImpl (QObject *parent=0) | |
void | setIcon (const QString &iconFile) |
Private Slots | |
void | onActivated (QSystemTrayIcon::ActivationReason reason) |
Private Member Functions | |
CGImageRef | createIconFromFile (FSSpec fileSpec) |
CGImageRef | createIcon (const QString &iconFile) |
Static Private Member Functions | |
static void | releaseCallback (void *info, const void *data, size_t size) |
Private Attributes | |
CGImageRef | _imageRef |
bool | _shown |
Definition at line 26 of file trayicon_mac.h.
TrayIconImpl::TrayIconImpl | ( | QWidget * | parent = 0 |
) | [protected] |
Default Constructor
Definition at line 23 of file trayicon_mac.cpp.
TrayIconImpl::~TrayIconImpl | ( | ) | [protected] |
Destructor
Definition at line 32 of file trayicon_mac.cpp.
TrayIconImpl::TrayIconImpl | ( | QObject * | parent = 0 |
) | [protected] |
CGImageRef TrayIconImpl::createIcon | ( | const QString & | iconFile | ) | [private] |
Create an icon from the given filename in the application bundle.
Definition at line 113 of file trayicon_mac.cpp.
References createIconFromFile().
Referenced by setIcon().
CGImageRef TrayIconImpl::createIconFromFile | ( | FSSpec | fileSpec | ) | [private] |
Load icon data from the given file and create a CGImageRef.
Definition at line 53 of file trayicon_mac.cpp.
References i(), and releaseCallback().
Referenced by createIcon().
void TrayIconImpl::hide | ( | ) | [protected] |
Hide the tray icon.
Reimplemented in TrayIcon.
Definition at line 164 of file trayicon_mac.cpp.
References _shown.
Referenced by TrayIcon::hide(), and ~TrayIconImpl().
void TrayIconImpl::onActivated | ( | QSystemTrayIcon::ActivationReason | reason | ) | [private, slot] |
Called when the user interacts with the tray icon and propagates double-click events to the parent object.
Definition at line 39 of file trayicon_qt.cpp.
Referenced by TrayIconImpl().
void TrayIconImpl::releaseCallback | ( | void * | info, | |
const void * | data, | |||
size_t | size | |||
) | [static, private] |
Callback used by CGDataProviderCreateWithData().
Definition at line 44 of file trayicon_mac.cpp.
Referenced by createIconFromFile().
void TrayIconImpl::setIcon | ( | const QString & | iconFile | ) | [protected] |
Modify the tray icon's image to iconFile.
Reimplemented in TrayIcon.
void TrayIconImpl::setIcon | ( | const QString & | iconFile | ) | [protected] |
Update the tray icon's image.
Reimplemented in TrayIcon.
Definition at line 186 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.
Reimplemented in TrayIcon.
Definition at line 178 of file trayicon_mac.cpp.
Referenced by TrayIcon::setToolTip().
void TrayIconImpl::show | ( | ) | [protected] |
Show the tray icon.
Reimplemented in TrayIcon.
Definition at line 148 of file trayicon_mac.cpp.
References _imageRef, and _shown.
Referenced by setIcon(), and TrayIcon::show().
CGImageRef TrayIconImpl::_imageRef [private] |
Tray icon image.
Definition at line 53 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 54 of file trayicon_mac.h.
Referenced by hide(), setIcon(), show(), TrayIconImpl(), and ~TrayIconImpl().