MapView Class Reference

Map view widget. More...

#include <mapview.h>

List of all members.

Public Slots

void centerToSceneCoordinates (QPoint sceneCoordinate)
 Slot for centering view to new location.
void setZoomLevel (int zoomLevel)
 Set zoom level of the view.

Signals

void viewResized (const QSize &size)
 Signal for view resize events.
void viewScrolled (QPoint sceneCoordinate)
 Signal for view scroll events.
void viewZoomFinished ()
 Signal for informing that zooming animation is finished.

Public Member Functions

 MapView (QWidget *parent=0)
 Constructor.

Protected Member Functions

void resizeEvent (QResizeEvent *event)
 Called when view is resized.

Properties

qreal viewScale
 View scaling.

Private Member Functions

void mouseMoveEvent (QMouseEvent *event)
 Event handler for mouse move events.
void mousePressEvent (QMouseEvent *event)
 Event handler for mouse press events.
void setViewScale (qreal viewScale)
 Set new view scale.
qreal viewScale ()
 Get current view scale.

Private Attributes

QPoint m_mousePosition
 Previous mouse event position.
QPoint m_scenePosition
 New center position.
QPropertyAnimation * m_zoomAnimation
 Zoom animation.

Detailed Description

Map view widget.

Author:
Sami Rämö - sami.ramo (at) ixonos.com
Pekka Nissinen - pekka.nissinen (at) ixonos.com

Constructor & Destructor Documentation

MapView::MapView ( QWidget *  parent = 0  ) 

Constructor.

Parameters:
parent Parent

Member Function Documentation

void MapView::centerToSceneCoordinates ( QPoint  sceneCoordinate  )  [slot]

Slot for centering view to new location.

Parameters:
sceneCoordinate Scene coordinates of the new center point
void MapView::mouseMoveEvent ( QMouseEvent *  event  )  [private]

Event handler for mouse move events.

Does calculate mouse movement delta from last event position and new view center based on that delta. Saves current event position for next round. Emits viewScrolled signal and doesn't actually scroll the view.

Parameters:
event Mouse event
void MapView::mousePressEvent ( QMouseEvent *  event  )  [private]

Event handler for mouse press events.

Saves inial values for mouse and scene location for dragging view.

Parameters:
event Mouse event
void MapView::resizeEvent ( QResizeEvent *  event  )  [protected]

Called when view is resized.

Parameters:
event resize event
void MapView::setViewScale ( qreal  viewScale  )  [private]

Set new view scale.

Parameters:
viewScale New scaling factor
void MapView::setZoomLevel ( int  zoomLevel  )  [slot]

Set zoom level of the view.

Parameters:
zoomLevel Zoom level
void MapView::viewResized ( const QSize &  size  )  [signal]

Signal for view resize events.

Signal is emitted when view has been resized.

Parameters:
size view size
qreal MapView::viewScale (  )  [private]

Get current view scale.

Returns:
Current view scaling factor
void MapView::viewScrolled ( QPoint  sceneCoordinate  )  [signal]

Signal for view scroll events.

Signal is emitted when view is scrolled.

Parameters:
sceneCoordinate Scene coordinates of the new center point of the view

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

Generated on Thu Jun 10 09:44:04 2010 for Situare client for Maemo by  doxygen 1.6.1