Developer Documentation
CursorPainter Class Reference

#include <OpenFlipper/widgets/glWidget/CursorPainter.hh>

Inheritance diagram for CursorPainter:

Public Member Functions

 CursorPainter (QObject *_parent=0)
 Constructor.
 
 ~CursorPainter ()
 Destructor.
 
void setCursor (const QCursor &_cursor)
 Sets the current used cursor.
 
void initializeGL ()
 Needs to be called after the gl context has been set up to initialize internal values.
 
void registerViewer (glViewer *_viewer)
 Add a glViewer that will use this CursorPainter.
 
void paintCursor (ACG::GLState *_state)
 Cursor painting function. The _state has to be setup that 0,0,0 is at the cursor position.
 
void updateCursorPosition (QPointF _scenePos)
 Sets the current cursor position.
 
QPointF cursorPosition ()
 Return the current cursor position.
 
void setEnabled (bool _enabled)
 Enabled/Disables gl cursor painting.
 
void setForceNative (bool _enabled)
 Enabled/Disables native cursors.
 
bool enabled ()
 Returns true if cursor painting is enabled and compatible cursor is set.
 
void setMouseIn (bool _in)
 Inform the cursor painter about mouse enter / leave.
 
QRectF cursorBoundingBox ()
 Bounding box of the cursor.
 

Private Member Functions

void cursorToTexture ()
 
void cursorToCursor ()
 

Private Attributes

QCursor cursor_
 
QCursor nativeCursor_
 
QPointF cursorPos_
 
bool initialized_
 
QVector< glViewer * > views_
 
bool enabled_
 
bool mouseIn_
 
bool forceNative_
 
int xOff_
 
int yOff_
 
GLuint texture_
 
bool hasCursor_
 

Detailed Description

Class that paints the cursor using gl calls

Definition at line 68 of file CursorPainter.hh.

Member Function Documentation

◆ cursorToTexture()

void CursorPainter::cursorToTexture ( )
private
Todo:
Possibly switch all cursors to bitmap cursors and check there Hotspots!!

Definition at line 247 of file CursorPainter.cc.


The documentation for this class was generated from the following files: