libosmscout
0.1
|
#include <InputHandler.h>
Signals | |
void | viewChanged (const MapView &view) |
Public Member Functions | |
virtual bool | animationInProgress () |
virtual bool | currentPosition (bool locationValid, osmscout::GeoCoord currentPosition) |
virtual bool | focusOutEvent (QFocusEvent *event) |
InputHandler (const MapView &view) | |
virtual bool | isFollowVehicle () |
virtual bool | isLockedToPosition () |
virtual bool | move (const QVector2D &vector) |
virtual void | painted () |
virtual bool | pivotBy (double angleChange) |
virtual bool | rotateBy (double angleChange) |
virtual bool | rotateTo (double angle) |
virtual bool | showCoordinates (const osmscout::GeoCoord &coord, const osmscout::Magnification &magnification, const osmscout::Bearing &bearing) |
virtual bool | touch (const QTouchEvent &event) |
virtual bool | vehiclePosition (const VehiclePosition &vehiclePosition, bool autoRotateMap) |
virtual void | widgetResized (const QSizeF &widgetSize) |
virtual bool | zoom (double zoomFactor, const QPoint &widgetPosition, const QRect &widgetDimension) |
~InputHandler () override=default | |
Protected Attributes | |
MapView | view |
Input handler retrieve all inputs from user and may change MapView (emits viewChange signal). If handler don't accept specific action, returns false. In such case, default handler for this action should be activated.
Input handlers is application of behaviour pattern. It solves problems like:
Qt provides api for register custom gesture recognizers, but it is not available in QML world and its api don't fit to Map application requierements.
Handler also controls map animations.
|
explicit |
|
overridedefault |
|
virtual |
Reimplemented in osmscout::MultitouchHandler, osmscout::DragHandler, osmscout::JumpHandler, and osmscout::MoveHandler.
Referenced by osmscout::MapWidget::changeView(), and osmscout::MapWidget::paint().
|
virtual |
Reimplemented in osmscout::LockHandler.
Referenced by osmscout::MapWidget::locationChanged(), and osmscout::MapWidget::setLockToPosition().
|
virtual |
Reimplemented in osmscout::LockHandler.
Referenced by osmscout::MapWidget::focusOutEvent().
|
virtual |
Reimplemented in osmscout::VehicleFollowHandler.
Referenced by osmscout::MapWidget::setFollowVehicle(), osmscout::MapWidget::setVehicleAutoRotateMap(), and osmscout::MapWidget::SetVehiclePosition().
|
virtual |
Reimplemented in osmscout::VehicleFollowHandler, and osmscout::LockHandler.
|
virtual |
Reimplemented in osmscout::MultitouchHandler, osmscout::DragHandler, and osmscout::MoveHandler.
Referenced by osmscout::MapWidget::move().
|
virtual |
|
virtual |
Reimplemented in osmscout::MoveHandler.
Referenced by osmscout::MapWidget::pivotBy().
|
virtual |
Reimplemented in osmscout::MultitouchHandler, osmscout::DragHandler, and osmscout::MoveHandler.
Referenced by osmscout::MapWidget::rotateLeft(), and osmscout::MapWidget::rotateRight().
|
virtual |
Reimplemented in osmscout::MoveHandler.
Referenced by osmscout::MapWidget::rotateTo().
|
virtual |
Reimplemented in osmscout::LockHandler, and osmscout::JumpHandler.
Referenced by osmscout::MapWidget::showCoordinates().
|
virtual |
Reimplemented in osmscout::MultitouchHandler, osmscout::DragHandler, osmscout::ZoomGestureHandler, and osmscout::MoveHandler.
Referenced by osmscout::MapWidget::touchEvent().
|
virtual |
Reimplemented in osmscout::VehicleFollowHandler.
Referenced by osmscout::MapWidget::setVehicleAutoRotateMap(), and osmscout::MapWidget::SetVehiclePosition().
|
signal |
|
virtual |
Reimplemented in osmscout::VehicleFollowHandler, and osmscout::LockHandler.
|
virtual |
Reimplemented in osmscout::MultitouchHandler, osmscout::DragHandler, and osmscout::MoveHandler.
Referenced by osmscout::ZoomGestureHandler::touch(), and osmscout::MapWidget::zoom().
|
protected |
Referenced by osmscout::LockHandler::currentPosition(), osmscout::MoveHandler::move(), osmscout::MoveHandler::moveNow(), osmscout::MoveHandler::pivotBy(), osmscout::MoveHandler::rotateBy(), osmscout::MoveHandler::rotateTo(), osmscout::JumpHandler::showCoordinates(), osmscout::ZoomGestureHandler::touch(), osmscout::DragHandler::touch(), osmscout::MultitouchHandler::touch(), osmscout::VehicleFollowHandler::vehiclePosition(), and osmscout::MoveHandler::zoom().