diff options
Diffstat (limited to 'src/gui/image/qbitmap.cpp')
-rw-r--r-- | src/gui/image/qbitmap.cpp | 94 |
1 files changed, 2 insertions, 92 deletions
diff --git a/src/gui/image/qbitmap.cpp b/src/gui/image/qbitmap.cpp index 260b397140..6cd8363374 100644 --- a/src/gui/image/qbitmap.cpp +++ b/src/gui/image/qbitmap.cpp @@ -44,8 +44,7 @@ #include "qimage.h" #include "qvariant.h" #include <qpainter.h> -#include <private/qgraphicssystem_p.h> -#include <private/qapplication_p.h> +#include <private/qguiapplication_p.h> QT_BEGIN_NAMESPACE @@ -205,20 +204,6 @@ QBitmap &QBitmap::operator=(const QPixmap &pixmap) return *this; } - -#ifdef QT3_SUPPORT -QBitmap::QBitmap(int w, int h, const uchar *bits, bool isXbitmap) -{ - *this = fromData(QSize(w, h), bits, isXbitmap ? QImage::Format_MonoLSB : QImage::Format_Mono); -} - - -QBitmap::QBitmap(const QSize &size, const uchar *bits, bool isXbitmap) -{ - *this = fromData(size, bits, isXbitmap ? QImage::Format_MonoLSB : QImage::Format_Mono); -} -#endif - /*! Destroys the bitmap. */ @@ -275,9 +260,7 @@ QBitmap QBitmap::fromImage(const QImage &image, Qt::ImageConversionFlags flags) img.setColor(1, c0); } - QGraphicsSystem* gs = QApplicationPrivate::graphicsSystem(); - QScopedPointer<QPixmapData> data(gs ? gs->createPixmapData(QPixmapData::BitmapType) - : QGraphicsSystem::createDefaultPixmapData(QPixmapData::BitmapType)); + QScopedPointer<QPixmapData> data(QGuiApplicationPrivate::platformIntegration()->createPixmapData(QPixmapData::BitmapType)); data->fromImage(img, flags | Qt::MonoOnly); return QPixmap(data.take()); @@ -335,77 +318,4 @@ QBitmap QBitmap::transformed(const QMatrix &matrix) const return transformed(QTransform(matrix)); } -#ifdef QT3_SUPPORT -/*! - \fn QBitmap QBitmap::xForm(const QMatrix &matrix) const - - Returns a copy of this bitmap, transformed according to the given - \a matrix. - - Use transformed() instead. -*/ - -/*! - \fn QBitmap::QBitmap(const QSize &size, bool clear) - - Constructs a bitmap with the given \a size. If \a clear is true, - the bits are initialized to Qt::color0. - - Use the corresponding QBitmap() constructor instead, and then call - the clear() function if the \a clear parameter is true. -*/ - -/*! - \fn QBitmap::QBitmap(int width, int height, bool clear) - - Constructs a bitmap with the given \a width and \a height. If \a - clear is true, the bits are initialized to Qt::color0. - - Use the corresponding QBitmap() constructor instead, and then call - the clear() function if the \a clear parameter is true. -*/ - -/*! - \fn QBitmap::QBitmap(int width, int height, const uchar *bits, bool isXbitmap) - - Constructs a bitmap with the given \a width and \a height, and - sets the contents to the \a bits supplied. The \a isXbitmap flag - should be true if \a bits was generated by the X11 bitmap - program. - - Use the static fromData() function instead. If \a isXbitmap is - true, use the default bit order(QImage_FormatMonoLSB) otherwise - use QImage::Format_Mono. - - \omit - The X bitmap bit order is little endian. The QImage - documentation discusses bit order of monochrome images. Opposed to - QImage, the data has to be byte aligned. - - Example (creates an arrow bitmap): - \snippet doc/src/snippets/code/src_gui_image_qbitmap.cpp 0 - \endomit -*/ - - -/*! - \fn QBitmap::QBitmap(const QSize &size, const uchar *bits, bool isXbitmap) - - \overload - - Constructs a bitmap with the given \a size, and sets the contents - to the \a bits supplied. The \a isXbitmap flag should be true if - \a bits was generated by the X11 bitmap program. - - \omit - The X bitmap bit order is little endian. The QImage documentation - discusses bit order of monochrome images. - \endomit - - Use the static fromData() function instead. If \a isXbitmap is - true, use the default bit order(QImage_FormatMonoLSB) otherwise - use QImage::Format_Mono. -*/ -#endif - QT_END_NAMESPACE |