From 12ef5a7344da486f1e4601bf7c917caa69667f7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 7 Oct 2020 15:02:18 +0200 Subject: doc: Add brief and group for native type conversions Change-Id: I74608619201bf77e487fb986bf213b349cc22f6a Reviewed-by: Paul Wicking --- src/gui/image/qimage_darwin.mm | 7 +++++-- src/gui/image/qpixmap_win.cpp | 23 +++++++++++++++++------ 2 files changed, 22 insertions(+), 8 deletions(-) (limited to 'src/gui') diff --git a/src/gui/image/qimage_darwin.mm b/src/gui/image/qimage_darwin.mm index 7ca1a0869a..83b6cef980 100644 --- a/src/gui/image/qimage_darwin.mm +++ b/src/gui/image/qimage_darwin.mm @@ -48,8 +48,9 @@ QT_BEGIN_NAMESPACE /*! - Creates a \c CGImage equivalent to this QImage. Returns a - \c CGImageRef handle. + \brief Creates a \c CGImage equivalent to this QImage. + + Returns a \c CGImageRef handle. The returned CGImageRef partakes in the QImage implicit sharing, and holds a reference to the QImage data. CGImage is immutable @@ -92,6 +93,8 @@ QT_BEGIN_NAMESPACE The CGImageRef color space is set to the sRGB color space. + \ingroup platform-type-conversions + \sa QtMac::toNSImage() */ CGImageRef QImage::toCGImage() const diff --git a/src/gui/image/qpixmap_win.cpp b/src/gui/image/qpixmap_win.cpp index cd7a8ca80e..aae4a1cbf4 100644 --- a/src/gui/image/qpixmap_win.cpp +++ b/src/gui/image/qpixmap_win.cpp @@ -352,8 +352,9 @@ Q_GUI_EXPORT HBITMAP qt_imageToWinHBITMAP(const QImage &imageIn, int hbitmapForm /*! \since 6.0 - Creates a \c HBITMAP equivalent of the QImage. Returns the \c HBITMAP - handle. + \brief Creates a \c HBITMAP equivalent of the QImage. + + Returns the \c HBITMAP handle. It is the caller's responsibility to free the \c HBITMAP data after use. @@ -368,6 +369,8 @@ Q_GUI_EXPORT HBITMAP qt_imageToWinHBITMAP(const QImage &imageIn, int hbitmapForm When using the resulting HBITMAP as application icon or a systray icon, the image should have the format QImage::Format_ARGB32. + \ingroup platform-type-conversions + \sa fromHBITMAP(), convertToFormat() */ HBITMAP QImage::toHBITMAP() const @@ -493,7 +496,7 @@ Q_GUI_EXPORT QImage qt_imageFromWinHBITMAP(HBITMAP bitmap, int hbitmapFormat = 0 /*! \since 6.0 - Returns a QImage that is equivalent to the given \a hbitmap. + \brief Returns a QImage that is equivalent to the given \a hbitmap. HBITMAP does not store information about the alpha channel. @@ -505,6 +508,8 @@ Q_GUI_EXPORT QImage qt_imageFromWinHBITMAP(HBITMAP bitmap, int hbitmapFormat = 0 \c reinterpretAsFormat(QImage::Format_ARGB32) should be called on the returned image to ensure the format is correct. + \ingroup platform-type-conversions + \sa toHBITMAP(), reinterpretAsFormat() */ QImage QImage::fromHBITMAP(HBITMAP hbitmap) @@ -520,12 +525,16 @@ Q_GUI_EXPORT QPixmap qt_pixmapFromWinHBITMAP(HBITMAP bitmap, int hbitmapFormat = /*! \since 6.0 - Creates a \c HICON equivalent of the QPixmap, applying the mask - \a mask. If \a mask is not null, it needs to be of format QImage::Format_Mono. + \brief Creates a \c HICON equivalent of the QPixmap, applying the mask + \a mask. + + If \a mask is not null, it needs to be of format QImage::Format_Mono. Returns the \c HICON handle. It is the caller's responsibility to free the \c HICON data after use. + \ingroup platform-type-conversions + \sa fromHICON() */ HICON QImage::toHICON(const QImage &mask) const @@ -609,7 +618,9 @@ static inline bool hasAlpha(const QImage &image) /*! \since 6.0 - Returns a QImage that is equivalent to the given \a icon. + \brief Returns a QImage that is equivalent to the given \a icon. + + \ingroup platform-type-conversions \sa toHICON() */ -- cgit v1.2.3