Developer Documentation
Loading...
Searching...
No Matches
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.

Constructor & Destructor Documentation

◆ CursorPainter()

CursorPainter::CursorPainter ( QObject *  _parent = 0)
explicit

Constructor.

Definition at line 65 of file CursorPainter.cc.

◆ ~CursorPainter()

CursorPainter::~CursorPainter ( )

Destructor.

Definition at line 81 of file CursorPainter.cc.

Member Function Documentation

◆ cursorBoundingBox()

QRectF CursorPainter::cursorBoundingBox ( )

Bounding box of the cursor.

Definition at line 334 of file CursorPainter.cc.

◆ cursorPosition()

QPointF CursorPainter::cursorPosition ( )

Return the current cursor position.

Definition at line 212 of file CursorPainter.cc.

◆ cursorToCursor()

void CursorPainter::cursorToCursor ( )
private

Definition at line 359 of file CursorPainter.cc.

◆ 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.

◆ enabled()

bool CursorPainter::enabled ( )

Returns true if cursor painting is enabled and compatible cursor is set.

Definition at line 240 of file CursorPainter.cc.

◆ initializeGL()

void CursorPainter::initializeGL ( )

Needs to be called after the gl context has been set up to initialize internal values.

Definition at line 104 of file CursorPainter.cc.

◆ paintCursor()

void CursorPainter::paintCursor ( ACG::GLState _state)

Cursor painting function. The _state has to be setup that 0,0,0 is at the cursor position.

Definition at line 149 of file CursorPainter.cc.

◆ registerViewer()

void CursorPainter::registerViewer ( glViewer _viewer)

Add a glViewer that will use this CursorPainter.

Definition at line 141 of file CursorPainter.cc.

◆ setCursor()

void CursorPainter::setCursor ( const QCursor &  _cursor)

Sets the current used cursor.

Definition at line 91 of file CursorPainter.cc.

◆ setEnabled()

void CursorPainter::setEnabled ( bool  _enabled)

Enabled/Disables gl cursor painting.

Definition at line 219 of file CursorPainter.cc.

◆ setForceNative()

void CursorPainter::setForceNative ( bool  _enabled)

Enabled/Disables native cursors.

Definition at line 342 of file CursorPainter.cc.

◆ setMouseIn()

void CursorPainter::setMouseIn ( bool  _in)

Inform the cursor painter about mouse enter / leave.

Definition at line 327 of file CursorPainter.cc.

◆ updateCursorPosition()

void CursorPainter::updateCursorPosition ( QPointF  _scenePos)

Sets the current cursor position.

Definition at line 204 of file CursorPainter.cc.

Member Data Documentation

◆ cursor_

QCursor CursorPainter::cursor_
private

Definition at line 118 of file CursorPainter.hh.

◆ cursorPos_

QPointF CursorPainter::cursorPos_
private

Definition at line 120 of file CursorPainter.hh.

◆ enabled_

bool CursorPainter::enabled_
private

Definition at line 126 of file CursorPainter.hh.

◆ forceNative_

bool CursorPainter::forceNative_
private

Definition at line 128 of file CursorPainter.hh.

◆ hasCursor_

bool CursorPainter::hasCursor_
private

Definition at line 134 of file CursorPainter.hh.

◆ initialized_

bool CursorPainter::initialized_
private

Definition at line 122 of file CursorPainter.hh.

◆ mouseIn_

bool CursorPainter::mouseIn_
private

Definition at line 127 of file CursorPainter.hh.

◆ nativeCursor_

QCursor CursorPainter::nativeCursor_
private

Definition at line 119 of file CursorPainter.hh.

◆ texture_

GLuint CursorPainter::texture_
private

Definition at line 133 of file CursorPainter.hh.

◆ views_

QVector<glViewer *> CursorPainter::views_
private

Definition at line 124 of file CursorPainter.hh.

◆ xOff_

int CursorPainter::xOff_
private

Definition at line 131 of file CursorPainter.hh.

◆ yOff_

int CursorPainter::yOff_
private

Definition at line 132 of file CursorPainter.hh.


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