This class is used to represent a window widget to which an image can be rendered by the Engine. For example, to render node or texture previews, frame sequences, etc.
More...
|
| RenderWindow (QWidget *parent=nullptr) |
|
| ~RenderWindow () override |
|
CallbackId | addUpdateCallback (Unigine::CallbackBase *update_func) |
| Adds a callback to be fired for the Render Window on Engine::update(). As an alternative you can inherit your class from the RenderWindow and override the onUpdate() method. More...
|
|
CallbackId | addRenderCallback (Unigine::CallbackBase *render_func) |
| Adds a callback to be fired for the Render Window on Engine::render(). As an alternative you can inherit your class from the RenderWindow and override the onRender() method. More...
|
|
CallbackId | addSwapCallback (Unigine::CallbackBase *swap_func) |
| Adds a callback to be fired for the Render Window on Engine::swap(). As an alternative you can inherit your class from the RenderWindow and override the onSwap() method. More...
|
|
CallbackId | addFocusChangedCallback (Unigine::CallbackBase *focus_changed_func) |
| Adds a callback to be fired when the focus of the Render Window changes. More...
|
|
CallbackId | addFocusInChangedCallback (Unigine::CallbackBase *focus_in_func) |
| Adds a callback to be fired when the focus of the Render Window becomes focused. As an alternative you can inherit your class from the RenderWindow and override the focusInEvent() method. More...
|
|
CallbackId | addFocusOutChangedCallback (Unigine::CallbackBase *focus_out_func) |
| Adds a callback to be fired when the Render Window loses focus. As an alternative you can inherit your class from the RenderWindow and override the focusOutEvent() method. More...
|
|
CallbackId | addDragEnterCallback (Unigine::CallbackBase1< QDragEnterEvent * > *drag_enter_func) |
| Adds a callback to be fired when something is dragged into the Render Window. The callback function receives a QDragEnterEvent instance. For more details please refer to Qt documentation. As an alternative you can inherit your class from the RenderWindow and override the dragEnterEvent() method. More...
|
|
CallbackId | addDragMoveCallback (Unigine::CallbackBase1< QDragMoveEvent * > *drag_move_func) |
| Adds a callback to be fired when something is dragged within the Render Window. The callback function receives a QDragMoveEvent instance. For more details please refer to Qt documentation. As an alternative you can inherit your class from the RenderWindow and override the dragMoveEvent() method. More...
|
|
CallbackId | addDragLeaveCallback (Unigine::CallbackBase1< QDragLeaveEvent * > *drag_leave_func) |
| Adds a callback to be fired when something is dragged out of the Render Window. The callback function receives a QDragLeaveEvent instance. For more details please refer to Qt documentation. As an alternative you can inherit your class from the RenderWindow and override the dragLeaveEvent() method. More...
|
|
CallbackId | addDropCallback (Unigine::CallbackBase1< QDropEvent * > *drop_func) |
| Adds a callback to be fired when the user drops something within the Render Window. The callback function receives a QDropEvent instance, that contains a proposed action, available from proposedAction(), for the widget to either accept or ignore. If the action can be handled by the widget, you should call the acceptProposedAction() function. Since the proposed action can be a combination of Qt::DropAction values, it may be useful to either select one of these values as a default action or ask the user to select their preferred action. If the proposed drop action is not suitable, perhaps because your custom widget does not support that action, you can replace it with any of the possible drop actions by calling setDropAction() with your preferred action. If you set a value that is not present in the bitwise OR combination of values returned by possibleActions(), the default copy action will be used. Once a replacement drop action has been set, call accept() instead of acceptProposedAction() to complete the drop operation. For more details please refer to Qt documentation. As an alternative you can inherit your class from the RenderWindow and override the dropEvent() method. More...
|
|
bool | removeCallback (CallbackId callback_id) |
| Removes a callback with the specified ID. More...
|
|
void | clearCallbacks () |
| Removes all callbacks. More...
|
|
void | setRenderingPolicy (RENDERING_POLICY rendering_policy) |
| Sets rendering policy for the Render Window. This policy defines when the window should be rendered depending on its visibility and focus status. More...
|
|
RENDERING_POLICY | getRenderingPolicy () const |
| Returns the current rendering policy for the Render Window. This policy defines when the window should be rendered depending on its visibility and focus status (See RENDERING_POLICY). More...
|
|
QPaintEngine * | paintEngine () const final override |
|
|
virtual void | onUpdate () |
| You can inherit your class from RenderWindow and override this method to define your custom actions to be performed on Engine::update(). As an alternative to overriding this method you can use the Update callback (addUpdateCallback). More...
|
|
virtual void | onRender () |
| You can inherit your class from RenderWindow and override this method to define your custom actions to be performed on Engine::render(). As an alternative to overriding this method you can use the Render callback (addRenderCallback). More...
|
|
virtual void | onSwap () |
| You can inherit your class from RenderWindow and override this method to define your custom actions to be performed on Engine::swap(). As an alternative to overriding this method you can use the Swap callback (addSwapCallback). More...
|
|
bool | event (QEvent *event) override |
| You can inherit your class from RenderWindow and override this method to define your custom actions to be performed on receiving various events (QEvent). As an alternative to overriding this method you can use the Update callback (addUpdateCallback). More...
|
|
void | paintEvent (QPaintEvent *) final override |
|
void | resizeEvent (QResizeEvent *event) override |
| You can inherit your class from RenderWindow and override this method to define actions to be performed on receiving a resize event (QResizeEvent). Resize events are sent to widgets that have been resized. For more details please refer to Qt documentation. As an alternative to overriding this method you can use the Update callback (addUpdateCallback). More...
|
|
void | focusInEvent (QFocusEvent *event) override |
| You can inherit your class from RenderWindow and override this method to define actions to be performed on getting focus, i.e., receiving the corresponding focus event (QFocusEvent). Focus events are sent to widgets when the keyboard input focus changes. Focus events occur due to mouse actions, key presses (such as Tab or Backtab), the window system, popup menus, keyboard shortcuts, or other application-specific reasons. The reason for a particular focus event is returned by reason() in the appropriate event handler. For more details please refer to Qt documentation. As an alternative to overriding this method you can use the FocusIn callback (addFocusInChangedCallback). More...
|
|
void | focusOutEvent (QFocusEvent *event) override |
| You can inherit your class from RenderWindow and override this method to define actions to be performed on losing focus, i.e., receiving the corresponding focus event (QFocusEvent). Focus events are sent to widgets when the keyboard input focus changes. Focus events occur due to mouse actions, key presses (such as Tab or Backtab), the window system, popup menus, keyboard shortcuts, or other application-specific reasons. The reason for a particular focus event is returned by reason() in the appropriate event handler. For more details please refer to Qt documentation. As an alternative to overriding this method you can use the FocusOut callback (addFocusOutChangedCallback). More...
|
|
void | dragEnterEvent (QDragEnterEvent *event) override |
| You can inherit your class from RenderWindow and override this method to define actions to be performed when a drag-and-drop action enters the Render Window (QDragEnterEvent). The drag enter event is always immediately followed by a drag move event. For more details please refer to Qt documentation. As an alternative to overriding this method you can use the addDragEnterCallback callback. More...
|
|
void | dragMoveEvent (QDragMoveEvent *event) override |
| You can inherit your class from RenderWindow and override this method to define actions to be performed when a drag-and-drop action is in progress (QDragMoveEvent). The drag move event always immediately follows a drag enter event. For more details please refer to Qt documentation. As an alternative to overriding this method you can use the addDragMoveCallback callback. More...
|
|
void | dragLeaveEvent (QDragLeaveEvent *event) override |
| You can inherit your class from RenderWindow and override this method to define actions to be performed when a drag-and-drop action leaves the Render Window (QDragLeaveEvent). For more details please refer to Qt documentation. As an alternative to overriding this method you can use the addDragLeaveCallback callback. More...
|
|
void | dropEvent (QDropEvent *event) override |
| You can inherit your class from RenderWindow and override this method to define actions to be performed when a drag-and-drop action is completed (QDropEvent). For more details please refer to Qt documentation. As an alternative to overriding this method you can use the addDropCallback callback. More...
|
|
This class is used to represent a window widget to which an image can be rendered by the Engine. For example, to render node or texture previews, frame sequences, etc.
CallbackId Editor::RenderWindow::addDropCallback |
( |
Unigine::CallbackBase1< QDropEvent * > * |
drop_func | ) |
|
Adds a callback to be fired when the user drops something within the Render Window. The callback function receives a QDropEvent instance, that contains a proposed action, available from proposedAction(), for the widget to either accept or ignore. If the action can be handled by the widget, you should call the acceptProposedAction() function. Since the proposed action can be a combination of Qt::DropAction values, it may be useful to either select one of these values as a default action or ask the user to select their preferred action. If the proposed drop action is not suitable, perhaps because your custom widget does not support that action, you can replace it with any of the possible drop actions by calling setDropAction() with your preferred action. If you set a value that is not present in the bitwise OR combination of values returned by possibleActions(), the default copy action will be used. Once a replacement drop action has been set, call accept() instead of acceptProposedAction() to complete the drop operation. For more details please refer to Qt documentation. As an alternative you can inherit your class from the RenderWindow and override the dropEvent() method.
- Parameters
-
drop_func | Callback function. |
void Editor::RenderWindow::focusInEvent |
( |
QFocusEvent * |
event | ) |
|
|
overrideprotected |
You can inherit your class from RenderWindow and override this method to define actions to be performed on getting focus, i.e., receiving the corresponding focus event (QFocusEvent). Focus events are sent to widgets when the keyboard input focus changes. Focus events occur due to mouse actions, key presses (such as Tab or Backtab), the window system, popup menus, keyboard shortcuts, or other application-specific reasons. The reason for a particular focus event is returned by reason() in the appropriate event handler. For more details please refer to Qt documentation. As an alternative to overriding this method you can use the FocusIn callback (addFocusInChangedCallback).
void Editor::RenderWindow::focusOutEvent |
( |
QFocusEvent * |
event | ) |
|
|
overrideprotected |
You can inherit your class from RenderWindow and override this method to define actions to be performed on losing focus, i.e., receiving the corresponding focus event (QFocusEvent). Focus events are sent to widgets when the keyboard input focus changes. Focus events occur due to mouse actions, key presses (such as Tab or Backtab), the window system, popup menus, keyboard shortcuts, or other application-specific reasons. The reason for a particular focus event is returned by reason() in the appropriate event handler. For more details please refer to Qt documentation. As an alternative to overriding this method you can use the FocusOut callback (addFocusOutChangedCallback).