|
libosmscout 1.1.1
|
#include <libosmscout-client-qt/include/osmscoutclientqt/MapWidget.h>


Public Slots | |
| void | changeView (const MapView &view) |
| void | redraw () |
| void | recenter () |
| void | zoom (double zoomFactor) |
| void | zoomIn (double zoomFactor) |
| void | zoomOut (double zoomFactor) |
| void | zoom (double zoomFactor, const QPoint widgetPosition) |
| void | zoomIn (double zoomFactor, const QPoint widgetPosition) |
| void | zoomOut (double zoomFactor, const QPoint widgetPosition) |
| void | move (QVector2D vector) |
| void | left () |
| void | right () |
| void | up () |
| void | down () |
| void | rotateTo (double angle) |
| void | rotateLeft () |
| void | rotateRight () |
| void | toggleDaylight () |
| void | reloadStyle () |
| void | reloadTmpStyle () |
| void | showCoordinates (osmscout::GeoCoord coord, osmscout::Magnification magnification) |
| void | showCoordinates (double lat, double lon) |
| void | showCoordinatesInstantly (osmscout::GeoCoord coord, osmscout::Magnification magnification) |
| void | showCoordinatesInstantly (double lat, double lon) |
| void | showLocation (LocationEntry *location) |
| void | locationChanged (bool locationValid, double lat, double lon, bool horizontalAccuracyValid=false, double horizontalAccuracy=0, const QDateTime &lastUpdate=QDateTime::currentDateTime()) |
| void | addPositionMark (int id, double lat, double lon) |
| void | removePositionMark (int id) |
| void | addOverlayObject (int id, QObject *o) |
| void | removeOverlayObject (int id) |
| void | removeAllOverlayObjects () |
| OverlayWay * | createOverlayWay (QString type="_route") |
| OverlayArea * | createOverlayArea (QString type="_highlighted") |
| OverlayNode * | createOverlayNode (QString type="_highlighted") |
| void | deactivateIcons () |
| bool | toggleDebug () |
| bool | toggleInfo () |
| void | setVehicleScaleFactor (float factor) |
| void | onIconFound (QPoint lookupCoord, MapIcon icon) |
Signals | |
| void | viewChanged () |
| void | latChanged () |
| void | lonChanged () |
| void | angleChanged () |
| void | magLevelChanged () |
| void | pixelSizeChanged () |
| void | lockToPositionChanged () |
| void | followVehicleChanged () |
| void | vehicleAutoRotateMapChanged () |
| void | finishedChanged (bool finished) |
| void | mouseMove (const int screenX, const int screenY, const double lat, const double lon, const Qt::KeyboardModifiers modifiers) |
| void | tap (const int screenX, const int screenY, const double lat, const double lon) |
| void | doubleTap (const int screenX, const int screenY, const double lat, const double lon) |
| void | longTap (const int screenX, const int screenY, const double lat, const double lon) |
| void | tapLongTap (const int screenX, const int screenY, const double lat, const double lon) |
| void | iconTapped (QPoint screenCoord, double lat, double lon, QString databasePath, QString objectType, quint64 objectId, int poiId, QString type, QString name, QString altName, QString ref, QString operatorName, QString phone, QString website, QString openingHours) |
| void | stylesheetFilenameChanged () |
| void | styleErrorsChanged () |
| void | databaseLoaded (osmscout::GeoBox) |
| void | renderingTypeChanged (QString type) |
Public Member Functions | |
| MapWidget (QQuickItem *parent=nullptr) | |
| ~MapWidget () override | |
| MapView * | GetView () const |
| void | SetMapView (QObject *o) |
| MapViewStruct | GetViewStruct () const |
| VehiclePosition * | GetVehiclePosition () const |
| void | SetVehiclePosition (QObject *o) |
| QString | getVehicleStandardIconFile () const |
| void | setVehicleStandardIconFile (const QString &file) |
| QString | getVehicleNoGpsSignalIconFile () const |
| void | setVehicleNoGpsSignalIconFile (const QString &file) |
| QString | getVehicleInTunnelIconFile () const |
| void | setVehicleInTunnelIconFile (const QString &file) |
| double | getVehicleIconSize () const |
| void | setVehicleIconSize (double value) |
| bool | hasInteractiveIcons () const |
| void | setInteractiveIcons (bool b) |
| double | GetLat () const |
| double | GetLon () const |
| double | GetAngle () const |
| osmscout::GeoCoord | GetCenter () const |
| QString | GetStylesheetFilename () const |
| QString | GetZoomLevelName () const |
| int | GetMagLevel () const |
| double | GetPixelSize () const |
| bool | IsFinished () const |
| bool | getShowCurrentPosition () const |
| void | setShowCurrentPosition (bool b) |
| bool | isLockedToPosition () const |
| void | setLockToPosition (bool) |
| bool | isFollowVehicle () const |
| void | setFollowVehicle (bool) |
| bool | isVehicleAutoRotateMap () const |
| void | setVehicleAutoRotateMap (bool) |
| osmscout::MercatorProjection | getProjection () const |
| void | wheelEvent (QWheelEvent *event) override |
| void | touchEvent (QTouchEvent *event) override |
| void | focusOutEvent (QFocusEvent *event) override |
| void | translateToTouch (QMouseEvent *event, Qt::TouchPointStates states) |
| void | mousePressEvent (QMouseEvent *event) override |
| void | mouseMoveEvent (QMouseEvent *event) override |
| void | mouseReleaseEvent (QMouseEvent *event) override |
| void | hoverMoveEvent (QHoverEvent *event) override |
| void | paint (QPainter *painter) override |
| bool | stylesheetHasErrors () const |
| int | firstStylesheetErrorLine () const |
| int | firstStylesheetErrorColumn () const |
| QString | firstStylesheetErrorDescription () const |
| bool | isDatabaseLoaded () |
| Q_INVOKABLE bool | isInDatabaseBoundingBox (double lat, double lon) |
| Q_INVOKABLE QPointF | screenPosition (double lat, double lon) |
| QString | GetRenderingType () const |
| void | SetRenderingType (QString type) |
| bool | isPreventMouseStealing () const |
| void | setPreventMouseStealing (bool b) |
Static Public Member Functions | |
| static QImage | loadSVGIcon (const QString &directory, const QString fileName, double iconPixelSize) |
Properties | |
| QObject * | view |
| QObject * | vehiclePosition |
| double | lat |
| double | lon |
| double | angle |
| int | zoomLevel |
| QString | zoomLevelName |
| double | pixelSize |
| bool | databaseLoaded |
| bool | finished {false} |
| bool | showCurrentPosition {false} |
| bool | lockToPosition |
| bool | followVehicle |
| bool | vehicleAutoRotateMap |
| QString | stylesheetFilename |
| QString | renderingType |
| bool | preventMouseStealing {false} |
| bool | stylesheetHasErrors |
| int | stylesheetErrorLine |
| int | stylesheetErrorColumn |
| QString | stylesheetErrorDescription |
| QString | vehicleStandardIconFile |
| QString | vehicleNoGpsSignalIconFile |
| QString | vehicleInTunnelIconFile |
| double | vehicleIconSize |
| bool | interactiveIcons |
Qt Quick widget for displaying map.
Type should to be registered by qmlRegisterType method and DBThread instance should be initialized before first usage.
| osmscout::MapWidget::MapWidget | ( | QQuickItem * | parent = nullptr | ) |
|
override |
|
slot |
Method for registering map overlay objects. Usage from QML:
var way=map.createOverlayWay(); way.addPoint(50.09180646851823, 14.498789861494872); way.addPoint(50.09180646851823, 14.60); map.addOverlayObject(0,way);
| id | |
| o |
|
slot |
Add "mark" (small red circle) on top of map. It will be rendered in UI thread, count of marks should be limited.
|
signal |
|
slot |
|
slot |
|
slot |
|
slot |
|
signal |
|
slot |
|
signal |
|
slot |
|
signal |
| int osmscout::MapWidget::firstStylesheetErrorColumn | ( | ) | const |
| QString osmscout::MapWidget::firstStylesheetErrorDescription | ( | ) | const |
| int osmscout::MapWidget::firstStylesheetErrorLine | ( | ) | const |
|
override |
|
signal |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| QString osmscout::MapWidget::GetRenderingType | ( | ) | const |
|
inline |
| QString osmscout::MapWidget::GetStylesheetFilename | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| MapViewStruct osmscout::MapWidget::GetViewStruct | ( | ) | const |
| QString osmscout::MapWidget::GetZoomLevelName | ( | ) | const |
|
inline |
|
override |
|
signal |
| bool osmscout::MapWidget::isDatabaseLoaded | ( | ) |
|
inline |
|
inline |
| Q_INVOKABLE bool osmscout::MapWidget::isInDatabaseBoundingBox | ( | double | lat, |
| double | lon ) |
|
inline |
|
inline |
|
inline |
|
signal |
|
slot |
|
static |
Helper for loading SVG graphics
|
slot |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
override |
|
override |
|
override |
|
slot |
|
slot |
|
override |
|
signal |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
signal |
|
slot |
|
slot |
|
slot |
|
slot |
Rotate view to specified angle [radians; [0 ~ 2*PI) ]
| angle |
| Q_INVOKABLE QPointF osmscout::MapWidget::screenPosition | ( | double | lat, |
| double | lon ) |
| void osmscout::MapWidget::setFollowVehicle | ( | bool | ) |
| void osmscout::MapWidget::setInteractiveIcons | ( | bool | b | ) |
| void osmscout::MapWidget::setLockToPosition | ( | bool | ) |
|
inline |
|
inline |
| void osmscout::MapWidget::SetRenderingType | ( | QString | type | ) |
|
inline |
| void osmscout::MapWidget::setVehicleAutoRotateMap | ( | bool | ) |
|
inline |
|
inline |
|
inline |
| void osmscout::MapWidget::SetVehiclePosition | ( | QObject * | o | ) |
|
slot |
Method for configuring the aspect ratio of painted items. Default value is 1.0. Using HiDPI it is required to set the value according with the scale factor.
| ratio |
|
inline |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
signal |
|
signal |
| bool osmscout::MapWidget::stylesheetHasErrors | ( | ) | const |
|
signal |
|
signal |
|
slot |
|
slot |
|
slot |
|
override |
| void osmscout::MapWidget::translateToTouch | ( | QMouseEvent * | event, |
| Qt::TouchPointStates | states ) |
|
slot |
|
signal |
|
signal |
|
override |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
read |
|
read |
|
read |
|
readwrite |
|
readwrite |
|
read |
|
readwrite |
|
read |
|
read |
|
readwrite |
This property holds whether the mouse events may be stolen from this Widget. By default this property is false. see https://doc.qt.io/qt-5/qml-qtquick-mousearea.html#preventStealing-prop
|
readwrite |
|
readwrite |
|
read |
|
read |
|
read |
|
read |
|
read |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |
|
read |
|
read |