A Widget wrapper around a QTGraphicsWindow that allows it to be used inside the UI framework.
More...
|
| | QTGraphicsWidget (QTGraphicsWindow *window, QWidget *parent=nullptr) |
| | Constructs the widget wrapper around a graphics window.
|
|
virtual | ~QTGraphicsWidget () |
| | Destructor.
|
| bool | eventCallback (QEvent *event) |
| | Handles events forwarded from the widget.
|
| bool | eventFilter (QObject *watched, QEvent *e) override |
| | Event filter for forwarding events to the graphics window.
|
| QTGraphicsWindow * | graphicsWindow () |
| | Returns the contained graphics window.
|
| void | mouseInScreenSignal (bool mouse_in_screen) |
| | Emitted when the mouse enters or leaves the widget.
|
| void | setCamera (const DynamicPointer< Camera > &camera) |
| | Sets the camera for the contained graphics window.
|
| void | setModelManager (QTModelManager *manager) |
| | Sets the model manager for the contained window.
|
|
void | updateBackgroundColor () |
| | Updates the widget background from the camera settings.
|
|
void | updateSize () override |
| | Updates the widget and window size.
|
| | WindowContainer (QWidget *parent=nullptr) |
| | Constructs a WindowContainer with an optional parent.
|
|
bool | event (QEvent *event) override |
| | Handles show/hide events and forwards all events to the optional event forwarder.
|
|
void | paintEvent (QPaintEvent *event) override |
| | Handles paint events, updating the embedded window size on non-special-window platforms.
|
| void | setEventForwarder (const std::function< bool(QEvent *event)> &forwarder) |
| | Sets a callback function that receives all events for custom processing.
|
| void | setWidget (QWidget *window) |
| | Sets a QWidget as the contained child widget.
|
| void | setWindow (QWindow *window) |
| | Sets a QWindow as the contained window, wrapping it in a QWidget container.
|
|
void | visibleHack () |
| | Workaround to force proper visibility of the embedded window on some platforms.
|
| QPoint | windowOffset () const |
| | Returns the global position offset for the embedded window.
|
|
|
RGBColor | m_background_color = Constant<RGBColor>::Invalid |
| | Cached background color.
|
|
QTimer * | m_check_visibility_timer |
| | Timer for checking visibility changes.
|
|
QTGraphicsWindow * | m_window |
| | The contained graphics window.
|
|
QWidget * | m_container |
| | The QWidget wrapping the embedded window or set directly via setWidget().
|
|
std::function< bool(QEvent *event)> | m_event_forwarder |
| | Optional callback that receives all events for custom handling.
|
|
QSize | m_last_paint_size |
| | The size at the last paint event, used for incremental repainting.
|
|
QTimer * | m_location_timer |
| | Timer used on some platforms to poll and update window position.
|
|
QWindow * | m_window |
| | The embedded QWindow, if set via setWindow().
|
|
| static Qt::WindowFlags | windowFlags () |
| | Returns the platform-specific window flags for the embedded window.
|
A Widget wrapper around a QTGraphicsWindow that allows it to be used inside the UI framework.
Definition at line 183 of file QtGraphicsWindow.h.
◆ QTGraphicsWidget()
| QTGraphicsWidget::QTGraphicsWidget |
( |
QTGraphicsWindow * | window, |
|
|
QWidget * | parent = nullptr ) |
Constructs the widget wrapper around a graphics window.
- Parameters
-
| [in] | window | The graphics window. |
| [in] | parent | Optional parent widget. |
◆ eventCallback()
| bool QTGraphicsWidget::eventCallback |
( |
QEvent * | event | ) |
|
◆ eventFilter()
| bool QTGraphicsWidget::eventFilter |
( |
QObject * | watched, |
|
|
QEvent * | e ) |
|
override |
Event filter for forwarding events to the graphics window.
- Parameters
-
| [in] | watched | The watched object. |
| [in] | e | The event. |
- Returns
- True if filtered.
◆ graphicsWindow()
Returns the contained graphics window.
- Returns
- The graphics window pointer.
Definition at line 214 of file QtGraphicsWindow.h.
References m_window.
◆ mouseInScreenSignal()
| void QTGraphicsWidget::mouseInScreenSignal |
( |
bool | mouse_in_screen | ) |
|
Emitted when the mouse enters or leaves the widget.
- Parameters
-
| [in] | mouse_in_screen | Whether the mouse is in the widget. |
◆ setCamera()
Sets the camera for the contained graphics window.
- Parameters
-
| [in] | camera | The camera pointer. |
◆ setModelManager()
Sets the model manager for the contained window.
- Parameters
-
| [in] | manager | The model manager. |
The documentation for this class was generated from the following file: