Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QtPropertyIconEngine Class Reference

#include <qtpropertybrowserutils_p.h>

Inheritance diagram for QtPropertyIconEngine:
Collaboration diagram for QtPropertyIconEngine:

Public Member Functions

QPixmap scaledPixmap (const QSize &size, QIcon::Mode mode, QIcon::State state, qreal scale) override
QPixmap drawPixmap (const QSize &size, qreal devicePixelRatio)
Public Member Functions inherited from QIconEngine
 QIconEngine ()
virtual ~QIconEngine ()
 Destroys the icon engine.
virtual void paint (QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state)=0
 Uses the given painter to paint the icon with the required mode and state into the rectangle rect.
virtual QSize actualSize (const QSize &size, QIcon::Mode mode, QIcon::State state)
 Returns the actual size of the icon the engine provides for the requested size, mode and state.
virtual QPixmap pixmap (const QSize &size, QIcon::Mode mode, QIcon::State state)
 Returns the icon as a pixmap with the required size, mode, and state.
virtual void addPixmap (const QPixmap &pixmap, QIcon::Mode mode, QIcon::State state)
 Called by QIcon::addPixmap().
virtual void addFile (const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state)
 Called by QIcon::addFile().
virtual QString key () const
 \variable QIconEngine::ScaledPixmapArgument::size
virtual QIconEngineclone () const =0
 Reimplement this method to return a clone of this icon engine.
virtual bool read (QDataStream &in)
 Reads icon engine contents from the QDataStream in.
virtual bool write (QDataStream &out) const
 Writes the contents of this engine to the QDataStream out.
virtual QList< QSizeavailableSizes (QIcon::Mode mode=QIcon::Normal, QIcon::State state=QIcon::Off)
 Returns sizes of all images that are contained in the engine for the specific mode and state.
virtual QString iconName ()
 Returns the name used to create the engine, if available.
virtual bool isNull ()
virtual void virtual_hook (int id, void *data)
 Additional method to allow extending QIconEngine without adding new virtual methods (and without breaking binary compatibility).

Static Public Member Functions

static QPixmap createEmptyPixmap (const QSize &size, qreal scale)

Protected Member Functions

 QtPropertyIconEngine ()
Protected Member Functions inherited from QIconEngine
 QIconEngine (const QIconEngine &other)

Additional Inherited Members

Public Types inherited from QIconEngine
enum  IconEngineHook { IsNullHook = 3 , ScaledPixmapHook }
 These enum values are used for virtual_hook() to allow additional queries to icon engine without breaking binary compatibility. More...

Detailed Description

Definition at line 101 of file qtpropertybrowserutils_p.h.

Constructor & Destructor Documentation

◆ QtPropertyIconEngine()

QtPropertyIconEngine::QtPropertyIconEngine ( )
protecteddefault

Member Function Documentation

◆ createEmptyPixmap()

QPixmap QtPropertyIconEngine::createEmptyPixmap ( const QSize & size,
qreal scale )
static

Definition at line 440 of file qtpropertybrowserutils.cpp.

◆ drawPixmap()

QPixmap QtPropertyIconEngine::drawPixmap ( const QSize & size,
qreal devicePixelRatio )

Definition at line 462 of file qtpropertybrowserutils.cpp.

◆ scaledPixmap()

QPixmap QtPropertyIconEngine::scaledPixmap ( const QSize & size,
QIcon::Mode mode,
QIcon::State state,
qreal scale )
overridevirtual
Since
5.9

Returns a pixmap for the given size, mode, state and scale.

The scale argument is typically equal to the \l {High DPI} {device pixel ratio} of the display. The size is given in device-independent pixels.

Note
Some engines may cast scale to an integer.
See also
ScaledPixmapArgument

Reimplemented from QIconEngine.

Definition at line 452 of file qtpropertybrowserutils.cpp.


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