aboutsummaryrefslogtreecommitdiffstats
path: root/src/macextras/qmacfunctions.h
diff options
context:
space:
mode:
authorSamuel Gaist <samuel.gaist@edeltech.ch>2013-10-31 23:04:32 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-01 22:06:27 +0100
commit279dd24f0b834b2f5e15aca2fd22bb952df30438 (patch)
treebd35e6c75696327cd80305b775d733099c648471 /src/macextras/qmacfunctions.h
parent36c12107171a57f1483602730fe797e5ed2ea5d6 (diff)
Add helper functions to set/retrieve the application badge
These helper functions wrapp the necessary objective-c calls to set or retrieve a text (OS X) or number (iOS) on the application icon, also known as badge. Change-Id: I34a82c5abc073b63442e12c49a864e65b5428d83 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/macextras/qmacfunctions.h')
-rw-r--r--src/macextras/qmacfunctions.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/macextras/qmacfunctions.h b/src/macextras/qmacfunctions.h
index 7ab0cdd..0afeb1c 100644
--- a/src/macextras/qmacfunctions.h
+++ b/src/macextras/qmacfunctions.h
@@ -74,14 +74,21 @@ Q_MACEXTRAS_EXPORT QPixmap fromCGImageRef(CGImageRef image);
Q_MACEXTRAS_EXPORT CGContextRef currentCGContext();
-#ifndef Q_OS_IOS
+#ifdef Q_OS_OSX
+Q_MACEXTRAS_EXPORT void setBadgeLabelText(const QString &text);
+Q_MACEXTRAS_EXPORT QString badgeLabelText();
+
Q_MACEXTRAS_EXPORT NSImage *toNSImage(const QPixmap &pixmap);
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
Q_MACEXTRAS_EXPORT bool isMainWindow(QWindow *window);
#endif
+#endif // Q_OS_OSX
-#endif
+#ifdef Q_OS_IOS
+Q_MACEXTRAS_EXPORT void setApplicationIconBadgeNumber(int number);
+Q_MACEXTRAS_EXPORT int applicationIconBadgeNumber();
+#endif // Q_OS_IOS
}
QT_END_NAMESPACE