diff options
author | Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> | 2012-05-11 14:35:49 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-03 16:48:33 +0200 |
commit | f4dd0828dcc39946835dad6ce416a65d911e2cd5 (patch) | |
tree | aa75013565a29f0b66445918b0b8810a4a71b505 /src/plugins/platforms/cocoa/qcocoahelpers.h | |
parent | acf92203743321f49ec010fa3775adeb152f071e (diff) |
Platform-plugin support for QSystemTrayIcon.
Implement QPlatformSystemTrayIcon providing QPA-plugin-support for
system tray icons. Make QSystemTrayIcon use this as new backend.
Ported over qsystemtrayicon_mac.mm to qcocoasystemtrayicon.mm to provide
Cocoa support for the new interface. It had to be changed to match the
interface, especially for icon and menu handling.
This interface is made to not use QStyle or QMenu which are related
classes of QSystemTrayIcon. It's therefore not introducing QtWidget
dependency into the platform plugin.
Task-number: QTBUG-20978
Change-Id: I0d0a73835698b3b4f97219d4f5bbcfa2af57dbe2
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoahelpers.h')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoahelpers.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.h b/src/plugins/platforms/cocoa/qcocoahelpers.h index f8032603e5..dac7118731 100644 --- a/src/plugins/platforms/cocoa/qcocoahelpers.h +++ b/src/plugins/platforms/cocoa/qcocoahelpers.h @@ -115,6 +115,12 @@ inline NSPoint qt_mac_flipPoint(const QPointF &p) NSRect qt_mac_flipRect(const QRect &rect, QWindow *window); +Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); + +bool qt_mac_execute_apple_script(const char *script, long script_len, AEDesc *ret); +bool qt_mac_execute_apple_script(const char *script, AEDesc *ret); +bool qt_mac_execute_apple_script(const QString &script, AEDesc *ret); + // strip out '&' characters, and convert "&&" to a single '&', in menu // text - since menu text is sometimes decorated with these for Windows // accelerators. |