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
QOpenGLWidgetPaintDevice Class Reference
Inheritance diagram for QOpenGLWidgetPaintDevice:
Collaboration diagram for QOpenGLWidgetPaintDevice:

Public Member Functions

 QOpenGLWidgetPaintDevice (QOpenGLWidget *widget)
void ensureActiveTarget () override
 This virtual method is provided as a callback to allow re-binding a target frame buffer object or context when different QOpenGLPaintDevice instances are issuing draw calls alternately.
 QOpenGLWidgetPaintDevice (QOpenGLWidget *widget)
void ensureActiveTarget () override
 This virtual method is provided as a callback to allow re-binding a target frame buffer object or context when different QOpenGLPaintDevice instances are issuing draw calls alternately.
Public Member Functions inherited from QOpenGLPaintDevice
 QOpenGLPaintDevice ()
 Constructs a QOpenGLPaintDevice.
 QOpenGLPaintDevice (const QSize &size)
 Constructs a QOpenGLPaintDevice with the given size.
 QOpenGLPaintDevice (int width, int height)
 Constructs a QOpenGLPaintDevice with the given width and height.
 ~QOpenGLPaintDevice ()
 Destroys the QOpenGLPaintDevice.
int devType () const override
QPaintEnginepaintEngine () const override
 \reimp
QOpenGLContextcontext () const
 Returns the OpenGL context associated with the paint device.
QSize size () const
 Returns the pixel size of the paint device.
void setSize (const QSize &size)
 Sets the pixel size of the paint device to size.
void setDevicePixelRatio (qreal devicePixelRatio)
 Sets the device pixel ratio for the paint device to devicePixelRatio.
qreal dotsPerMeterX () const
 Returns the number of pixels per meter horizontally.
qreal dotsPerMeterY () const
 Returns the number of pixels per meter vertically.
void setDotsPerMeterX (qreal)
 Sets the number of pixels per meter horizontally to dpmx.
void setDotsPerMeterY (qreal)
 Sets the number of pixels per meter vertically to dpmy.
void setPaintFlipped (bool flipped)
 Sets whether painting should be flipped around the Y-axis or not to flipped.
bool paintFlipped () const
 Returns true if painting is flipped around the Y-axis.
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

Additional Inherited Members

Public Types inherited from QPaintDevice
enum  PaintDeviceMetric {
  PdmWidth = 1 , PdmHeight , PdmWidthMM , PdmHeightMM ,
  PdmNumColors , PdmDepth , PdmDpiX , PdmDpiY ,
  PdmPhysicalDpiX , PdmPhysicalDpiY , PdmDevicePixelRatio , PdmDevicePixelRatioScaled ,
  PdmDevicePixelRatioF_EncodedA , PdmDevicePixelRatioF_EncodedB
}
Static Public Member Functions inherited from QPaintDevice
static qreal devicePixelRatioFScale ()
static int encodeMetricF (PaintDeviceMetric metric, double value)
Protected Member Functions inherited from QOpenGLPaintDevice
 QOpenGLPaintDevice (QOpenGLPaintDevicePrivate &dd)
int metric (QPaintDevice::PaintDeviceMetric metric) const override
 \reimp
Protected Member Functions inherited from QPaintDevice
 QPaintDevice () noexcept
virtual void initPainter (QPainter *painter) const
virtual QPaintDeviceredirected (QPoint *offset) const
virtual QPaintersharedPainter () const
double getDecodedMetricF (PaintDeviceMetric metricA, PaintDeviceMetric metricB) const
Protected Attributes inherited from QOpenGLPaintDevice
QScopedPointer< QOpenGLPaintDevicePrivated_ptr
Protected Attributes inherited from QPaintDevice
ushort painters

Detailed Description

Definition at line 529 of file qopenglwidget.cpp.

Constructor & Destructor Documentation

◆ QOpenGLWidgetPaintDevice() [1/2]

QOpenGLWidgetPaintDevice::QOpenGLWidgetPaintDevice ( QOpenGLWidget * widget)
inlineexplicit

Definition at line 532 of file qopenglwidget.cpp.

References QOpenGLWidgetPaintDevice().

Referenced by QOpenGLWidgetPaintDevice().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QOpenGLWidgetPaintDevice() [2/2]

QOpenGLWidgetPaintDevice::QOpenGLWidgetPaintDevice ( QOpenGLWidget * widget)
inlineexplicit

Definition at line 532 of file qopenglwidget.cpp.

Member Function Documentation

◆ ensureActiveTarget() [1/2]

void QOpenGLWidgetPaintDevice::ensureActiveTarget ( )
overridevirtual

This virtual method is provided as a callback to allow re-binding a target frame buffer object or context when different QOpenGLPaintDevice instances are issuing draw calls alternately.

\l{QPainter::beginNativePainting()}{beginNativePainting()} will also trigger this method.

The default implementation does nothing.

Reimplemented from QOpenGLPaintDevice.

Definition at line 629 of file qopenglwidget.cpp.

References QOpenGLWidgetPrivate::flushPending, and QOpenGLWidgetPrivate::initialized.

◆ ensureActiveTarget() [2/2]

void QOpenGLWidgetPaintDevice::ensureActiveTarget ( )
overridevirtual

This virtual method is provided as a callback to allow re-binding a target frame buffer object or context when different QOpenGLPaintDevice instances are issuing draw calls alternately.

\l{QPainter::beginNativePainting()}{beginNativePainting()} will also trigger this method.

The default implementation does nothing.

Reimplemented from QOpenGLPaintDevice.


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