Mapper  0.9.0
API documentation
Public Types | Public Member Functions | List of all members
OpenOrienteering::TouchCursor Class Reference

Handles drawing and controlling a helper cursor inside the map widget for the mobile UI. More...

#include <touch_cursor.h>

Public Types

enum  ControlID { LeftButton = 0, NoButton }
 List of IDs for controls attached to the cursor. More...
 

Public Member Functions

 TouchCursor (MapWidget *map_widget)
 Constructs a touch cursor for a map widget. More...
 
void mousePressEvent (QMouseEvent *event)
 Notifies the cursor of the event, possibly modifying it. More...
 
bool mouseMoveEvent (QMouseEvent *event)
 Notifies the cursor of the event, possibly modifying it. More...
 
bool mouseReleaseEvent (QMouseEvent *event)
 Notifies the cursor of the event, possibly modifying it. More...
 
bool mouseDoubleClickEvent (QMouseEvent *event)
 Notifies the cursor of the event, possibly modifying it. More...
 
void paint (QPainter *painter)
 Paints the cursor. More...
 
void updateMapWidget (bool delayed)
 Issues a (delayed) redraw of the cursor. More...
 

Detailed Description

Handles drawing and controlling a helper cursor inside the map widget for the mobile UI.

Member Enumeration Documentation

◆ ControlID

List of IDs for controls attached to the cursor.

Enumerator
LeftButton 
NoButton 

Constructor & Destructor Documentation

◆ TouchCursor()

OpenOrienteering::TouchCursor::TouchCursor ( MapWidget map_widget)

Constructs a touch cursor for a map widget.

Member Function Documentation

◆ mouseDoubleClickEvent()

bool OpenOrienteering::TouchCursor::mouseDoubleClickEvent ( QMouseEvent event)

Notifies the cursor of the event, possibly modifying it.

Returns true if the map widget should further process event.

◆ mouseMoveEvent()

bool OpenOrienteering::TouchCursor::mouseMoveEvent ( QMouseEvent event)

Notifies the cursor of the event, possibly modifying it.

Returns true if the map widget should further process event.

◆ mousePressEvent()

void OpenOrienteering::TouchCursor::mousePressEvent ( QMouseEvent event)

Notifies the cursor of the event, possibly modifying it.

Attention: the event type may be changed to a mouse move event.

◆ mouseReleaseEvent()

bool OpenOrienteering::TouchCursor::mouseReleaseEvent ( QMouseEvent event)

Notifies the cursor of the event, possibly modifying it.

Returns true if the map widget should further process event.

◆ paint()

void OpenOrienteering::TouchCursor::paint ( QPainter painter)

Paints the cursor.

◆ updateMapWidget()

void OpenOrienteering::TouchCursor::updateMapWidget ( bool  delayed)

Issues a (delayed) redraw of the cursor.


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