13#ifndef SO_QT_VIEWER_PROXY_H
14#define SO_QT_VIEWER_PROXY_H
22#include <Inventor/nodes/SoSubNode.h>
23#include <Inventor/nodes/SoGroup.h>
85 int defineCursor (
const char* cursorImgFileName,
int hotSpotX = -1,
int hotSpotY = -1,
86 int id = -1)
override;
89 static bool forceDefineCursor (
int id,
const char* cursorImgFileName,
int hotSpotX = -1,
int hotSpotY = -1);
#define INVENTORGUIWRAPPER_API
Library initialization interface of the inventor GUI wrapper.
SoQtViewerProxyNode will put a SoViewerElement with the given SoQtViewerProxy into the scene and also...
~SoQtViewerProxyNode() override
void GLRender(SoGLRenderAction *action) override
set SoQtViewerProxy before scene traversal
SoQtViewerProxyNode(SoQtViewerProxy *proxy=nullptr)
Constructor.
static void initClass()
Initializes this class.
void handleEvent(SoHandleEventAction *action) override
bool isInitialRendering() const override
returns true if the viewer does the initial rendering after it became visible
int getCursor()
Returns the requested cursor shape.
static bool isSameCursor(const QCursor &a, const QCursor &b)
Compare cursor shapes:
static QPixmap getPixmap(int shapeID)
Get the QPixmap associated with the given shapeID in 1x resolution.
bool isUserInterationEventInQueue() const override
returns if a user interaction event is the the GUI event queue
bool getCurrentCursorPosition(int &x, int &y) override
Get current cursor position relative to the viewing window.
virtual void resetCursor()
reset stored cursor shape (must be called before event handling traversal)
static int getShapeID(const QCursor &cursor)
Get the shape ID associated with the given cursor.
static QCursor getCursor(int shapeID)
Get the QCursor associated with the given shapeID.
SoQtRenderArea * _renderArea
pointer to the actual viewer:
static void resetCursorCB(void *userData, SoAction *action)
This callback can be used together with a SoCallback node, userData must be set to the pointer to thi...
static void initializeDefaultCursors()
On some platforms it may not be possible to initialize the default cursors at any time,...
static bool forceDefineCursor(int id, const char *cursorImgFileName, int hotSpotX=-1, int hotSpotY=-1)
defineCursor simply calls this method, which will overwrite previous shapes
void setForceCursor(int shapeID) override
Enforce setting the cursor, even from mouseOverUpdates.
virtual bool actionMayChangeCursor(SoAction *action)
Returns if the given action may change the cursor, this is typically the case for SoHandleEvent actio...
SoQtViewerProxy(SoQtRenderArea *renderArea=nullptr)
This class implements access to the state of the SoQtMeVis viewer.
bool _cursorEnforced
cursor setting was enforced
int defineCursor(const char *cursorImgFileName, int hotSpotX=-1, int hotSpotY=-1, int id=-1) override
Define new cursor shape - successful operation is only guaranteed with PNG-Images with size 32x32,...
virtual void evaluateCursor()
evaluate set cursor shape (must be called after event handling traversal)
static QPixmap getPixmap2x(int shapeID)
Get the QPixmap associated with the given shapeID in 2x resolution.
static void evaluateCursorCB(void *userData, SoAction *action)
This callback can be used together with a SoCallback node, userData must be set to the pointer to thi...
void setCursor(int shapeID) override
Set cursor of viewer to pre- or user-defined shape, invalid positive values will set cursor to defaul...
int _requestedShape
currently requested cursor shape
~SoQtViewerProxy() override
Destructor.
bool hasShape(int shapeID) override
Check if this shape has already been defined.
This class gives access to state of a viewer during scene graph traversal.
double getDevicePixelRatio() override
Returns the ratio between physical pixels and device-independent pixels for the viewer.