ImFusion C++ SDK 4.5.0
ImFusion::GUI::QtDisplayWrapperBase Class Referenceabstract

#include <ImFusion/GUI/QtDisplayWrapperBase.h>

Abstract base interface for wrappers of a Display that embed them in a Qt-based GUI application. More...

Inheritance diagram for ImFusion::GUI::QtDisplayWrapperBase:

Detailed Description

Abstract base interface for wrappers of a Display that embed them in a Qt-based GUI application.

Public Member Functions

 QtDisplayWrapperBase (Display &display)
 Constructor will subscribe to the Display::signalUpdateRequested signal.
Displaydisplay ()
 Returns the Display shown by this widget.
QPointF mapFromOpenGL (const vec2 &point) const
 Converts point from ImFusion::GUI's bottom-left-origin coordinates to Qt's top-left-origin coordinates.
vec2 mapToOpenGL (const QPointF &point) const
 Converts point from Qt's top-left-origin coordinates to ImFusion::GUI's bottom-left-origin coordinates.
virtual QPointF mapToGlobal (const QPointF &pos) const =0
 Implementations shall forward to Qt's mapToGlobal() function of the wrapper class.
Public Member Functions inherited from ImFusion::SignalReceiver
 SignalReceiver ()=default
 Default constructor.
 SignalReceiver (const SignalReceiver &other)
 Copy constructor, does not copy any existing signal connections from other.
SignalReceiveroperator= (SignalReceiver rhs)
 Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs.
virtual ~SignalReceiver ()
 Virtual destructor disconnects from all connected signals.

Protected Member Functions

bool handleInputEvent (QEvent *event)
virtual void onDisplayUpdateRequested ()=0
 Implementations shall make Qt rerender the display.
virtual double getDevicePixelRatio () const =0
 Return the device pixel ratio of the screen the display is shown on.
virtual int getHeight () const =0
 Return the height of the display wrapper in pixels.
virtual void setCursor (const QCursor &cursor)=0
 Implementations shall forward to Qt's setCursor() function of the wrapper class.
Protected Member Functions inherited from ImFusion::SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.

Protected Attributes

Displaym_display

Member Function Documentation

◆ mapToGlobal()

virtual QPointF ImFusion::GUI::QtDisplayWrapperBase::mapToGlobal ( const QPointF & pos) const
pure virtual

Implementations shall forward to Qt's mapToGlobal() function of the wrapper class.

Implemented in ImFusion::GUI::QtDisplayWidget, and ImFusion::GUI::QtDisplayWindow.

◆ onDisplayUpdateRequested()

virtual void ImFusion::GUI::QtDisplayWrapperBase::onDisplayUpdateRequested ( )
protectedpure virtual

Implementations shall make Qt rerender the display.

Implemented in ImFusion::GUI::QtDisplayWidget, and ImFusion::GUI::QtDisplayWindow.

◆ getDevicePixelRatio()

virtual double ImFusion::GUI::QtDisplayWrapperBase::getDevicePixelRatio ( ) const
protectedpure virtual

Return the device pixel ratio of the screen the display is shown on.

Implemented in ImFusion::GUI::QtDisplayWidget, and ImFusion::GUI::QtDisplayWindow.

◆ getHeight()

virtual int ImFusion::GUI::QtDisplayWrapperBase::getHeight ( ) const
protectedpure virtual

Return the height of the display wrapper in pixels.

Implemented in ImFusion::GUI::QtDisplayWidget, and ImFusion::GUI::QtDisplayWindow.

◆ setCursor()

virtual void ImFusion::GUI::QtDisplayWrapperBase::setCursor ( const QCursor & cursor)
protectedpure virtual

Implementations shall forward to Qt's setCursor() function of the wrapper class.

Implemented in ImFusion::GUI::QtDisplayWidget, and ImFusion::GUI::QtDisplayWindow.


The documentation for this class was generated from the following file:
  • ImFusion/GUI/QtDisplayWrapperBase.h
Search Tab / S to search, Esc to close