![]() |
NDEVR
API Documentation
|
A QPaintDevice that 'paints' the widgets by turning them into 3D Model objects inside a model hierarchy. More...
Public Member Functions | |
| ScenePaintDevice (Model &model) | |
| Constructs a scene paint device rooted at the given model. | |
| void | drawWidget (QWidget *widget, QPainter &painter, QPoint offset, uint04 depth) |
| Draws a QWidget into the 3D scene hierarchy. | |
| ScenePaintEngine * | scenePaintEngine () |
| Retrieves the underlying scene paint engine. | |
| void | setDevicePixelRatio (int ratio) |
| Sets the device pixel ratio. | |
| void | setDevicePixelRatioScaled (int ratio) |
| Sets the scaled device pixel ratio. | |
| void | setDPI (int dpi) |
| Sets the DPI for both axes. | |
| void | setDPIX (int dpi) |
| Sets the horizontal DPI. | |
| void | setDPIY (int dpi) |
| Sets the vertical DPI. | |
| void | setPhysicalDPI (int dpi_x, int dpi_y) |
| Sets the physical DPI for the paint device. | |
| void | setRoot (Model &model) |
| Sets the root model for painting. | |
Protected Attributes | |
| int | m_device_pixel_ratio = 1 |
| The device pixel ratio. | |
| int | m_device_pixel_ratio_scaled = 1 |
| The scaled device pixel ratio. | |
| Vector< 2, int > | m_dpi = {1024, 1024} |
| Logical DPI for both axes. | |
| Time | m_last_update_update |
| Timestamp of the last update. | |
| ScenePaintEngine * | m_paint_engine |
| The underlying paint engine. | |
| Vector< 2, int > | m_physical_dpi = { 1024, 1024 } |
| Physical DPI for both axes. | |
| QWidget * | m_widget = nullptr |
| The widget being painted. | |
A QPaintDevice that 'paints' the widgets by turning them into 3D Model objects inside a model hierarchy.
Definition at line 23 of file ScenePaintEngine.h.
| ScenePaintDevice::ScenePaintDevice | ( | Model & | model | ) |
Constructs a scene paint device rooted at the given model.
| [in] | model | The root model to paint into. |
| void ScenePaintDevice::drawWidget | ( | QWidget * | widget, |
| QPainter & | painter, | ||
| QPoint | offset, | ||
| uint04 | depth ) |
Draws a QWidget into the 3D scene hierarchy.
| [in] | widget | The widget to draw. |
| [in] | painter | The painter used for rendering. |
| [in] | offset | The position offset for the widget. |
| [in] | depth | The depth level of the widget in the hierarchy. |
|
inline |
Retrieves the underlying scene paint engine.
Definition at line 73 of file ScenePaintEngine.h.
References m_paint_engine.
|
inline |
Sets the device pixel ratio.
| [in] | ratio | The pixel ratio. |
Definition at line 48 of file ScenePaintEngine.h.
References m_device_pixel_ratio.
|
inline |
Sets the scaled device pixel ratio.
| [in] | ratio | The scaled pixel ratio. |
Definition at line 53 of file ScenePaintEngine.h.
References m_device_pixel_ratio_scaled.
|
inline |
Sets the DPI for both axes.
| [in] | dpi | The DPI value. |
Definition at line 58 of file ScenePaintEngine.h.
References m_dpi.
|
inline |
Sets the horizontal DPI.
| [in] | dpi | The horizontal DPI value. |
Definition at line 63 of file ScenePaintEngine.h.
References m_dpi.
|
inline |
Sets the vertical DPI.
| [in] | dpi | The vertical DPI value. |
Definition at line 68 of file ScenePaintEngine.h.
References m_dpi.
|
inline |
Sets the physical DPI for the paint device.
| [in] | dpi_x | Horizontal DPI. |
| [in] | dpi_y | Vertical DPI. |
Definition at line 43 of file ScenePaintEngine.h.
References m_physical_dpi.
| void ScenePaintDevice::setRoot | ( | Model & | model | ) |
Sets the root model for painting.
| [in] | model | The new root model. |