![]() |
ImFusion SDK 4.3
|
Wrappers for usage in Qt-based Applications. More...
Wrappers for usage in Qt-based Applications.
Classes | |
class | QtDisplayWidget |
Specialization of a QOpenGLWidget that allows for rendering the contents of a Display into a QtWidget-based application. More... | |
class | QtDisplayWindow |
Specialization of a QWindow that allows for rendering the contents of a Display directly into the window framebuffer. More... | |
class | QtDisplayWrapperBase |
Abstract base interface for wrappers of a Display that embed them in a Qt-based GUI application. More... | |
Functions | |
MouseCursorShape | convertFromQtCursorShape (int qtCursorShape) |
Converts a Qt::CursorShape to an ImFusion::MouseCursorShape. | |
int | convertToQtCursorShape (MouseCursorShape shape) |
Converts an ImFusion::MouseCursorShape to a Qt::CursorShape. | |
std::unique_ptr< InputEvent > | convertFromQEvent (const QEvent *source, const DisplayWidget &display, bool flipY) |
Converts a QEvent to a corresponding ImFusion::InputEvent where applicable. | |
std::unique_ptr< QEvent > | convertToQEvent (const InputEvent &source) |
Converts an InputEvent to a corresponding QEvent. | |
EventResult | forwardAsQEventTo (const InputEvent &event, std::function< bool(QEvent *)> qEventHandler) |
Transforms event into a corresponding QEvent and forwards it to qEventHandler. | |
bool | handleWithQt (const EventResult &result, const void *handlerInstance) |
std::unique_ptr< QMenu > | createQMenu (const Menu &menu) |
Creates a new QMenu with the same structure as menu. | |
MouseCursorShape convertFromQtCursorShape | ( | int | qtCursorShape | ) |
#include <ImFusion/GUI/InputEventHelpers.h>
Converts a Qt::CursorShape to an ImFusion::MouseCursorShape.
std::unique_ptr< InputEvent > convertFromQEvent | ( | const QEvent * | source, |
const DisplayWidget & | display, | ||
bool | flipY ) |
#include <ImFusion/GUI/InputEventHelpers.h>
Converts a QEvent to a corresponding ImFusion::InputEvent where applicable.
source | Qt event to convert to an ImFusion::InputEvent |
display | Parent DisplayWidget used to compute the InputEvent::LocalToGlobalCoordMapping function. |
flipY | Flag whether to flip the Y coordinate to convert from Qt viewport coordinates to OpenGL coordinates. |
std::unique_ptr< QEvent > convertToQEvent | ( | const InputEvent & | source | ) |
#include <ImFusion/GUI/InputEventHelpers.h>
Converts an InputEvent to a corresponding QEvent.
Note that the returned QEvent will only carry those information which is present in source and its other settings are empty/set to their default value.
EventResult forwardAsQEventTo | ( | const InputEvent & | event, |
std::function< bool(QEvent *)> | qEventHandler ) |
#include <ImFusion/GUI/InputEventHelpers.h>
Transforms event into a corresponding QEvent and forwards it to qEventHandler.
The return value of the function as well as the QEvent's accepted state and the QApplication::overrideCursor are eventually converted to an ImFusion::EventResult. This function is intended to be used for deprecation layers and should not be used for new code.