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

Public Member Functions

 QOpenGLWindowPaintDevice (QOpenGLWindow *window)
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.
 QOpenGLWindowPaintDevice (QOpenGLWindow *window)
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

Public Attributes

QOpenGLWindowm_window

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 145 of file qopenglwindow.cpp.

Constructor & Destructor Documentation

◆ QOpenGLWindowPaintDevice() [1/2]

QOpenGLWindowPaintDevice::QOpenGLWindowPaintDevice ( QOpenGLWindow * window)
inline

Definition at line 148 of file qopenglwindow.cpp.

◆ QOpenGLWindowPaintDevice() [2/2]

QOpenGLWindowPaintDevice::QOpenGLWindowPaintDevice ( QOpenGLWindow * window)
inline

Definition at line 148 of file qopenglwindow.cpp.

Member Function Documentation

◆ ensureActiveTarget() [1/2]

void QOpenGLWindowPaintDevice::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 314 of file qopenglwindow.cpp.

◆ ensureActiveTarget() [2/2]

void QOpenGLWindowPaintDevice::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.

Member Data Documentation

◆ m_window

QOpenGLWindow * QOpenGLWindowPaintDevice::m_window

Definition at line 151 of file qopenglwindow.cpp.


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