Obsolete Members for QtMac

The following members of class QtMac are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

Functions

(obsolete) int applicationIconBadgeNumber()
(obsolete) QString badgeLabelText()
(obsolete) CGContextRef currentCGContext()
(obsolete) QPixmap fromCGImageRef(CGImageRef image)
(obsolete) QByteArray fromNSData(const NSData *data)
(obsolete) bool isMainWindow(QWindow *window)
(obsolete) void setApplicationIconBadgeNumber(int number)
(obsolete) void setBadgeLabelText(const QString &text)
(obsolete) CGImageRef toCGImageRef(const QPixmap &pixmap)
(obsolete) NSData *toNSData(const QByteArray &data)
(obsolete) NSImage *toNSImage(const QPixmap &pixmap)

Function Documentation

int QtMac::applicationIconBadgeNumber()

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use UIApplication.sharedApplication.applicationIconBadgeNumber instead.

Returns the value of the application icon a.k.a badge.

See also setApplicationIconBadgeNumber() and badgeLabelText().

QString QtMac::badgeLabelText()

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use NSApp.dockTile.badgeLabel instead.

Returns the text of the application icon a.k.a badge.

See also setBadgeLabelText().

CGContextRef QtMac::currentCGContext()

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use UIGraphicsGetCurrentContext() or NSGraphicsContext.currentContext.CGContext instead.

Returns the current CoreGraphics context.

QPixmap QtMac::fromCGImageRef(CGImageRef image)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Returns a QPixmap that is equivalent to the given image.

This function is not available in Qt 5.x until 5.0.2 and will return a null pixmap in earlier versions.

See also toCGImageRef() and Pixmap Conversion.

QByteArray QtMac::fromNSData(const NSData *data)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use QByteArray::fromNSData() instead.

bool QtMac::isMainWindow(QWindow *window)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use QWindow::winId() and view.window.isMainWindow instead.

Returns whether the given QWindow window is the application's main window

void QtMac::setApplicationIconBadgeNumber(int number)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use UIApplication.sharedApplication.applicationIconBadgeNumber instead.

Sets the value shown on the application icon a.k.a badge to number.

Unlike its macOS counterpart, only numbers can be used.

See also applicationIconBadgeNumber() and setBadgeLabelText().

void QtMac::setBadgeLabelText(const QString &text)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use NSApp.dockTile.badgeLabel instead.

Sets the text shown on the application icon a.k.a badge.

This is generally used with numbers (e.g. number of unread emails); it can also show a string.

See also badgeLabelText().

CGImageRef QtMac::toCGImageRef(const QPixmap &pixmap)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use QPixmap::toImage() and QImage::toCGImage() instead.

Creates a CGImageRef equivalent to the QPixmap pixmap. Returns the CGImageRef handle.

It is the caller's responsibility to release the CGImageRef data after use.

This function is not available in Qt 5.x until 5.0.2 and will return NULL in earlier versions.

See also fromCGImageRef().

NSData *QtMac::toNSData(const QByteArray &data)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use QByteArray::toNSData() instead.

NSImage *QtMac::toNSImage(const QPixmap &pixmap)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use QPixmap::toImage and QImage::toCGImage instead.

Creates an NSImage equivalent to the QPixmap pixmap. Returns the NSImage handle.

It is the caller's responsibility to release the NSImage data after use.