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
~SoQtViewerProxyNode() override
void GLRender(SoGLRenderAction *action) override
Sets 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)
Compares cursor shapes.
static QPixmap getPixmap(int shapeID)
Returns the QPixmap associated with the given shapeID in 1x resolution.
bool isUserInterationEventInQueue() const override
Returns whether a user interaction event is the the GUI event queue.
bool getCurrentCursorPosition(int &x, int &y) override
virtual void resetCursor()
Resets the stored cursor shape. This must be called before event handling traversal.
static int getShapeID(const QCursor &cursor)
static QCursor getCursor(int shapeID)
Returns the QCursor associated with the given shapeID.
SoQtRenderArea * _renderArea
Pointer to the actual viewer.
static void resetCursorCB(void *userData, SoAction *action)
static void initializeDefaultCursors()
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
virtual bool actionMayChangeCursor(SoAction *action)
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
virtual void evaluateCursor()
Evaluates the set cursor shape. This must be called after event handling traversal.
static QPixmap getPixmap2x(int shapeID)
Returns the QPixmap associated with the given shapeID in 2x resolution.
static void evaluateCursorCB(void *userData, SoAction *action)
void setCursor(int shapeID) override
int _requestedShape
Currently requested cursor shape.
~SoQtViewerProxy() override
Destructor.
bool hasShape(int shapeID) override
Checks whether this shape has already been defined.
SoViewerProxy()
Protected constructor. Class must be derived to be adapted to actual viewer.
double getDevicePixelRatio() override