Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QPixmapCacheEntry Class Reference

#include <qpixmapcache_p.h>

+ Inheritance diagram for QPixmapCacheEntry:
+ Collaboration diagram for QPixmapCacheEntry:

Public Member Functions

 QPixmapCacheEntry (const QPixmapCache::Key &key, const QPixmap &pix)
 
 ~QPixmapCacheEntry ()
 
- Public Member Functions inherited from QPixmap
 QPixmap ()
 Constructs a null pixmap.
 
 QPixmap (QPlatformPixmap *data)
 
 QPixmap (int w, int h)
 Constructs a pixmap with the given width and height.
 
 QPixmap (const QSize &)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Constructs a pixmap of the given size.
 
 QPixmap (const QString &fileName, const char *format=nullptr, Qt::ImageConversionFlags flags=Qt::AutoColor)
 Constructs a pixmap from the file with the given fileName.
 
 QPixmap (const char *const xpm[])
 Constructs a pixmap from the given xpm data, which must be a valid XPM image.
 
 QPixmap (const QPixmap &)
 Constructs a pixmap that is a copy of the given pixmap.
 
 QPixmap (QPixmap &&other) noexcept
 Move-constructs a QPixmap instance from other.
 
 ~QPixmap ()
 Destroys the pixmap.
 
QPixmapoperator= (const QPixmap &)
 Assigns the given pixmap to this pixmap and returns a reference to this pixmap.
 
void swap (QPixmap &other) noexcept
 
bool operator== (const QPixmap &) const =delete
 
bool operator!= (const QPixmap &) const =delete
 
 operator QVariant () const
 Returns the pixmap as a QVariant.
 
bool isNull () const
 Returns true if this is a null pixmap; otherwise returns false.
 
int devType () const override
 
int width () const
 Returns the width of the pixmap.
 
int height () const
 Returns the height of the pixmap.
 
QSize size () const
 Returns the size of the pixmap.
 
QRect rect () const
 Returns the pixmap's enclosing rectangle.
 
int depth () const
 Returns the depth of the pixmap.
 
void fill (const QColor &fillColor=Qt::white)
 Fills the pixmap with the given color.
 
QBitmap mask () const
 Returns true if this pixmap has an alpha channel, or has a mask, otherwise returns false.
 
void setMask (const QBitmap &)
 Sets a mask bitmap.
 
qreal devicePixelRatio () const
 Returns the device pixel ratio for the pixmap.
 
void setDevicePixelRatio (qreal scaleFactor)
 Sets the device pixel ratio for the pixmap.
 
QSizeF deviceIndependentSize () const
 Returns the size of the pixmap in device independent pixels.
 
bool hasAlpha () const
 
bool hasAlphaChannel () const
 
QBitmap createHeuristicMask (bool clipTight=true) const
 Creates and returns a heuristic mask for this pixmap.
 
QBitmap createMaskFromColor (const QColor &maskColor, Qt::MaskMode mode=Qt::MaskInColor) const
 Creates and returns a mask for this pixmap based on the given maskColor.
 
QPixmap scaled (int w, int h, Qt::AspectRatioMode aspectMode=Qt::IgnoreAspectRatio, Qt::TransformationMode mode=Qt::FastTransformation) const
 
QPixmap scaled (const QSize &s, Qt::AspectRatioMode aspectMode=Qt::IgnoreAspectRatio, Qt::TransformationMode mode=Qt::FastTransformation) const
 
QPixmap scaledToWidth (int w, Qt::TransformationMode mode=Qt::FastTransformation) const
 Returns a scaled copy of the image.
 
QPixmap scaledToHeight (int h, Qt::TransformationMode mode=Qt::FastTransformation) const
 Returns a scaled copy of the image.
 
QPixmap transformed (const QTransform &, Qt::TransformationMode mode=Qt::FastTransformation) const
 
QImage toImage () const
 Converts the pixmap to a QImage.
 
bool load (const QString &fileName, const char *format=nullptr, Qt::ImageConversionFlags flags=Qt::AutoColor)
 Loads a pixmap from the file with the given fileName.
 
bool loadFromData (const uchar *buf, uint len, const char *format=nullptr, Qt::ImageConversionFlags flags=Qt::AutoColor)
 Loads a pixmap from the len first bytes of the given binary data.
 
bool loadFromData (const QByteArray &data, const char *format=nullptr, Qt::ImageConversionFlags flags=Qt::AutoColor)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Loads a pixmap from the binary data using the specified format and conversion flags.
 
bool save (const QString &fileName, const char *format=nullptr, int quality=-1) const
 Saves the pixmap to the file with the given fileName using the specified image file format and quality factor.
 
bool save (QIODevice *device, const char *format=nullptr, int quality=-1) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.This function writes a QPixmap to the given device using the specified image file format and quality factor.
 
bool convertFromImage (const QImage &img, Qt::ImageConversionFlags flags=Qt::AutoColor)
 Replaces this pixmap's data with the given image using the specified flags to control the conversion.
 
QPixmap copy (int x, int y, int width, int height) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a deep copy of the subset of the pixmap that is specified by the rectangle QRect( x, y, width, height).
 
QPixmap copy (const QRect &rect=QRect()) const
 Returns a deep copy of the subset of the pixmap that is specified by the given rectangle.
 
void scroll (int dx, int dy, int x, int y, int width, int height, QRegion *exposed=nullptr)
 
void scroll (int dx, int dy, const QRect &rect, QRegion *exposed=nullptr)
 
qint64 cacheKey () const
 Returns a number that identifies this QPixmap.
 
bool isDetached () const
 
void detach ()
 Detaches the pixmap from shared pixmap data.
 
bool isQBitmap () const
 Returns true if this is a QBitmap; otherwise returns false.
 
QPaintEnginepaintEngine () const override
 
bool operator! () const
 Returns true if this is a null pixmap; otherwise returns false.
 
QPlatformPixmaphandle () const
 
DataPtrdata_ptr ()
 
- Public Member Functions inherited from QPaintDevice
virtual ~QPaintDevice ()
 
bool paintingActive () const
 
int width () const
 
int height () const
 
int widthMM () const
 
int heightMM () const
 
int logicalDpiX () const
 
int logicalDpiY () const
 
int physicalDpiX () const
 
int physicalDpiY () const
 
qreal devicePixelRatio () const
 
qreal devicePixelRatioF () const
 
int colorCount () const
 
int depth () const
 

Public Attributes

QPixmapCache::Key key
 

Additional Inherited Members

- Public Types inherited from QPixmap
typedef QExplicitlySharedDataPointer< QPlatformPixmapDataPtr
 
- Public Types inherited from QPaintDevice
enum  PaintDeviceMetric {
  PdmWidth = 1 , PdmHeight , PdmWidthMM , PdmHeightMM ,
  PdmNumColors , PdmDepth , PdmDpiX , PdmDpiY ,
  PdmPhysicalDpiX , PdmPhysicalDpiY , PdmDevicePixelRatio , PdmDevicePixelRatioScaled
}
 
- Static Public Member Functions inherited from QPixmap
static int defaultDepth ()
 
static QTransform trueMatrix (const QTransform &m, int w, int h)
 Returns the actual matrix used for transforming a pixmap with the given width, height and matrix.
 
static QPixmap fromImage (const QImage &image, Qt::ImageConversionFlags flags=Qt::AutoColor)
 Converts the given image to a pixmap using the specified flags to control the conversion.
 
static QPixmap fromImageReader (QImageReader *imageReader, Qt::ImageConversionFlags flags=Qt::AutoColor)
 Create a QPixmap from an image read directly from an imageReader.
 
static QPixmap fromImage (QImage &&image, Qt::ImageConversionFlags flags=Qt::AutoColor)
 
- Static Public Member Functions inherited from QPaintDevice
static qreal devicePixelRatioFScale ()
 
- Protected Member Functions inherited from QPixmap
int metric (PaintDeviceMetric) const override
 
- Protected Member Functions inherited from QPaintDevice
 QPaintDevice () noexcept
 
virtual void initPainter (QPainter *painter) const
 
virtual QPaintDeviceredirected (QPoint *offset) const
 
virtual QPaintersharedPainter () const
 
- Static Protected Member Functions inherited from QPixmap
static QPixmap fromImageInPlace (QImage &image, Qt::ImageConversionFlags flags=Qt::AutoColor)
 
- Protected Attributes inherited from QPaintDevice
ushort painters
 

Detailed Description

Definition at line 41 of file qpixmapcache_p.h.

Constructor & Destructor Documentation

◆ QPixmapCacheEntry()

QPixmapCacheEntry::QPixmapCacheEntry ( const QPixmapCache::Key & key,
const QPixmap & pix )
inline

Definition at line 44 of file qpixmapcache_p.h.

References QPlatformPixmap::classId(), d, QPixmap::handle(), QRasterPlatformPixmap::image, QImageData::paintEngine, and QPlatformPixmap::RasterClass.

+ Here is the call graph for this function:

◆ ~QPixmapCacheEntry()

QPixmapCacheEntry::~QPixmapCacheEntry ( )

Definition at line 414 of file qpixmapcache.cpp.

Member Data Documentation

◆ key

QPixmapCache::Key QPixmapCacheEntry::key

Definition at line 58 of file qpixmapcache_p.h.


The documentation for this class was generated from the following files: