Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::ApplicationCursor Class Reference

Allows to override the application's cursor. More...

#include <mitkApplicationCursor.h>

Public Member Functions

void PushCursor (const char *XPM[], int hotspotX=-1, int hotspotY=-1)
 Change the current application cursor. More...
 
void PushCursor (std::istream &, int hotspotX=-1, int hotspotY=-1)
 Change the current application cursor. More...
 
void PopCursor ()
 Restore the previous cursor. More...
 
const Point2I GetCursorPosition ()
 
void SetCursorPosition (const Point2I &)
 Set absolute mouse position on screen. More...
 

Static Public Member Functions

static ApplicationCursorGetInstance ()
 This class is a singleton. More...
 
static void RegisterImplementation (ApplicationCursorImplementation *implementation)
 To be called by a toolkit specific ApplicationCursorImplementation. More...
 

Protected Member Functions

 ApplicationCursor ()
 Purposely hidden - singleton. More...
 

Detailed Description

Allows to override the application's cursor.

Base class for classes that allow to override the applications cursor with context dependent cursors. Accepts cursors in the XPM format.

The behaviour is stack-like. You can push your cursor on top of the stack and later pop it to reset the cursor to its former state. This is mimicking Qt's Application::setOverrideCuror() behaviour, but should be ok for most cases where you want to switch a cursor.

Definition at line 65 of file mitkApplicationCursor.h.

Constructor & Destructor Documentation

mitk::ApplicationCursor::ApplicationCursor ( )
protected

Purposely hidden - singleton.

Definition at line 26 of file mitkApplicationCursor.cpp.

Referenced by GetInstance().

Member Function Documentation

const Point2I mitk::ApplicationCursor::GetCursorPosition ( )

Get absolute mouse position on screen

Returns
(-1, -1) if querying mouse position is not possible

Definition at line 82 of file mitkApplicationCursor.cpp.

References mitk::ApplicationCursorImplementation::GetCursorPosition(), and MITK_ERROR.

void mitk::ApplicationCursor::PushCursor ( const char *  XPM[],
int  hotspotX = -1,
int  hotspotY = -1 
)
void mitk::ApplicationCursor::PushCursor ( std::istream &  cursor,
int  hotspotX = -1,
int  hotspotY = -1 
)

Change the current application cursor.

Definition at line 43 of file mitkApplicationCursor.cpp.

References MITK_ERROR, and mitk::ApplicationCursorImplementation::PushCursor().

void mitk::ApplicationCursor::RegisterImplementation ( ApplicationCursorImplementation implementation)
static

To be called by a toolkit specific ApplicationCursorImplementation.

Definition at line 38 of file mitkApplicationCursor.cpp.

Referenced by QmitkApplicationCursor::QmitkApplicationCursor().

void mitk::ApplicationCursor::SetCursorPosition ( const Point2I p)

Set absolute mouse position on screen.

Definition at line 95 of file mitkApplicationCursor.cpp.

References MITK_ERROR, and mitk::ApplicationCursorImplementation::SetCursorPosition().


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