|
libosmscout
1.1.1
|
#include <libosmscout-client-qt/include/osmscout/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") |
| bool | toggleDebug () |
| bool | toggleInfo () |
| void | setVehicleScaleFactor (float factor) |
Signals | |
| void | viewChanged () |
| void | lockToPossitionChanged () |
| void | followVehicleChanged () |
| 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 | 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) |
| 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) |
| double | GetLat () const |
| double | GetLon () 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) |
| 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 |
| int | zoomLevel |
| QString | zoomLevelName |
| double | pixelSize |
| bool | databaseLoaded |
| bool | finished {false} |
| bool | showCurrentPosition {false} |
| bool | lockToPosition |
| bool | followVehicle |
| QString | stylesheetFilename |
| QString | renderingType |
| bool | preventMouseStealing {false} |
| bool | stylesheetHasErrors |
| int | stylesheetErrorLine |
| int | stylesheetErrorColumn |
| QString | stylesheetErrorDescription |
| QString | vehicleStandardIconFile |
| QString | vehicleNoGpsSignalIconFile |
| QString | vehicleInTunnelIconFile |
| double | vehicleIconSize |
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.
|
slot |
|
slot |
|
slot |
|
slot |
|
signal |
|
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 |
| QString osmscout::MapWidget::GetRenderingType | ( | ) | const |
|
inline |
| QString osmscout::MapWidget::GetStylesheetFilename | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| QString osmscout::MapWidget::GetZoomLevelName | ( | ) | const |
|
override |
| bool osmscout::MapWidget::isDatabaseLoaded | ( | ) |
|
inline |
|
inline |
| Q_INVOKABLE bool osmscout::MapWidget::isInDatabaseBoundingBox | ( | double | lat, |
| double | lon | ||
| ) |
|
inline |
|
inline |
|
slot |
|
static |
Helper for loading SVG graphics
|
slot |
|
signal |
|
signal |
|
signal |
|
override |
|
override |
|
override |
|
slot |
|
override |
|
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::setLockToPosition | ( | bool | ) |
|
inline |
|
inline |
| void osmscout::MapWidget::SetRenderingType | ( | QString | type | ) |
|
inline |
|
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 |
|
override |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
read |
|
read |
|
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 |
|
read |
|
read |
1.8.14