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
QPaintDevice Class Referenceabstract

#include <qpaintdevice.h>

Inheritance diagram for QPaintDevice:
Collaboration diagram for QPaintDevice:

Public Types

enum  PaintDeviceMetric {
  PdmWidth = 1 , PdmHeight , PdmWidthMM , PdmHeightMM ,
  PdmNumColors , PdmDepth , PdmDpiX , PdmDpiY ,
  PdmPhysicalDpiX , PdmPhysicalDpiY , PdmDevicePixelRatio , PdmDevicePixelRatioScaled ,
  PdmDevicePixelRatioF_EncodedA , PdmDevicePixelRatioF_EncodedB
}

Public Member Functions

virtual ~QPaintDevice ()
virtual int devType () const
bool paintingActive () const
virtual QPaintEnginepaintEngine () const =0
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

Static Public Member Functions

static qreal devicePixelRatioFScale ()
static int encodeMetricF (PaintDeviceMetric metric, double value)

Protected Member Functions

 QPaintDevice () noexcept
virtual int metric (PaintDeviceMetric metric) const
virtual void initPainter (QPainter *painter) const
virtual QPaintDeviceredirected (QPoint *offset) const
virtual QPaintersharedPainter () const
double getDecodedMetricF (PaintDeviceMetric metricA, PaintDeviceMetric metricB) const

Protected Attributes

ushort painters

Friends

class QPainter
class QPainterPrivate
class QFontEngineMac
class QX11PaintEngine
Q_GUI_EXPORT int qt_paint_device_metric (const QPaintDevice *device, QPaintDevice::PaintDeviceMetric metric)

Detailed Description

Definition at line 17 of file qpaintdevice.h.

Member Enumeration Documentation

◆ PaintDeviceMetric

Enumerator
PdmWidth 
PdmHeight 
PdmWidthMM 
PdmHeightMM 
PdmNumColors 
PdmDepth 
PdmDpiX 
PdmDpiY 
PdmPhysicalDpiX 
PdmPhysicalDpiY 
PdmDevicePixelRatio 
PdmDevicePixelRatioScaled 
PdmDevicePixelRatioF_EncodedA 
PdmDevicePixelRatioF_EncodedB 

Definition at line 20 of file qpaintdevice.h.

Constructor & Destructor Documentation

◆ ~QPaintDevice()

QPaintDevice::~QPaintDevice ( )
virtual

Definition at line 13 of file qpaintdevice.cpp.

◆ QPaintDevice()

QT_BEGIN_NAMESPACE QPaintDevice::QPaintDevice ( )
protectednoexcept

Definition at line 8 of file qpaintdevice.cpp.

Member Function Documentation

◆ colorCount()

int QPaintDevice::colorCount ( ) const
inline

Definition at line 53 of file qpaintdevice.h.

◆ depth()

int QPaintDevice::depth ( ) const
inline

Definition at line 54 of file qpaintdevice.h.

◆ devicePixelRatio()

qreal QPaintDevice::devicePixelRatio ( ) const

Definition at line 37 of file qpaintdevice.cpp.

◆ devicePixelRatioF()

qreal QPaintDevice::devicePixelRatioF ( ) const
inline

Definition at line 52 of file qpaintdevice.h.

◆ devicePixelRatioFScale()

qreal QPaintDevice::devicePixelRatioFScale ( )
inlinestatic

Definition at line 56 of file qpaintdevice.h.

◆ devType()

int QPaintDevice::devType ( ) const
inlinevirtual

Reimplemented in QImage, QOpenGLPaintDevice, QPicture, QPixmap, QPrinter, QWidget, and QWindowsDirect2DPaintDevice.

Definition at line 81 of file qpaintdevice.h.

◆ encodeMetricF()

int QPaintDevice::encodeMetricF ( PaintDeviceMetric metric,
double value )
inlinestatic

Definition at line 87 of file qpaintdevice.h.

◆ getDecodedMetricF()

double QPaintDevice::getDecodedMetricF ( PaintDeviceMetric metricA,
PaintDeviceMetric metricB ) const
protected

Definition at line 24 of file qpaintdevice.cpp.

◆ height()

int QPaintDevice::height ( ) const
inline

Definition at line 44 of file qpaintdevice.h.

◆ heightMM()

int QPaintDevice::heightMM ( ) const
inline

Definition at line 46 of file qpaintdevice.h.

◆ initPainter()

void QPaintDevice::initPainter ( QPainter * painter) const
protectedvirtual

Reimplemented in QSvgGenerator, and QWidget.

Definition at line 57 of file qpaintdevice.cpp.

◆ logicalDpiX()

int QPaintDevice::logicalDpiX ( ) const
inline

Definition at line 47 of file qpaintdevice.h.

◆ logicalDpiY()

int QPaintDevice::logicalDpiY ( ) const
inline

Definition at line 48 of file qpaintdevice.h.

◆ metric()

◆ paintEngine()

◆ paintingActive()

bool QPaintDevice::paintingActive ( ) const
inline

Definition at line 84 of file qpaintdevice.h.

◆ physicalDpiX()

int QPaintDevice::physicalDpiX ( ) const
inline

Definition at line 49 of file qpaintdevice.h.

◆ physicalDpiY()

int QPaintDevice::physicalDpiY ( ) const
inline

Definition at line 50 of file qpaintdevice.h.

◆ redirected()

QPaintDevice * QPaintDevice::redirected ( QPoint * offset) const
protectedvirtual

Reimplemented in QOpenGLWidget, QOpenGLWindow, QRasterWindow, and QWidget.

Definition at line 64 of file qpaintdevice.cpp.

◆ sharedPainter()

QPainter * QPaintDevice::sharedPainter ( ) const
protectedvirtual

Reimplemented in QWidget.

Definition at line 72 of file qpaintdevice.cpp.

◆ width()

int QPaintDevice::width ( ) const
inline

Definition at line 43 of file qpaintdevice.h.

◆ widthMM()

int QPaintDevice::widthMM ( ) const
inline

Definition at line 45 of file qpaintdevice.h.

◆ QFontEngineMac

friend class QFontEngineMac
friend

Definition at line 72 of file qpaintdevice.h.

◆ QPainter

friend class QPainter
friend

Definition at line 70 of file qpaintdevice.h.

◆ QPainterPrivate

friend class QPainterPrivate
friend

Definition at line 71 of file qpaintdevice.h.

◆ qt_paint_device_metric

Q_GUI_EXPORT int qt_paint_device_metric ( const QPaintDevice * device,
QPaintDevice::PaintDeviceMetric metric )
friend

Definition at line 77 of file qpaintdevice.cpp.

◆ QX11PaintEngine

friend class QX11PaintEngine
friend

Definition at line 73 of file qpaintdevice.h.

Member Data Documentation

◆ painters

ushort QPaintDevice::painters
protected

Definition at line 66 of file qpaintdevice.h.


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