Commit 8a0feb77 authored by Torsten Rahn's avatar Torsten Rahn
Browse files

Trigger MarbleQuickItem::headingChanged() if the heading is changed via

RMB-rotation.
parent f08f15fd
...@@ -256,6 +256,7 @@ namespace Marble ...@@ -256,6 +256,7 @@ namespace Marble
connect(&d->m_map, &MarbleMap::radiusChanged, this, &MarbleQuickItem::zoomChanged); connect(&d->m_map, &MarbleMap::radiusChanged, this, &MarbleQuickItem::zoomChanged);
connect(&d->m_reverseGeocoding, SIGNAL(reverseGeocodingFinished(GeoDataCoordinates,GeoDataPlacemark)), connect(&d->m_reverseGeocoding, SIGNAL(reverseGeocodingFinished(GeoDataCoordinates,GeoDataPlacemark)),
this, SLOT(handleReverseGeocoding(GeoDataCoordinates,GeoDataPlacemark))); this, SLOT(handleReverseGeocoding(GeoDataCoordinates,GeoDataPlacemark)));
connect(&d->m_map, &MarbleMap::visibleLatLonAltBoxChanged, this, &MarbleQuickItem::handleVisibleLatLonAltBoxChanged);
setAcceptedMouseButtons(Qt::AllButtons); setAcceptedMouseButtons(Qt::AllButtons);
installEventFilter(&d->m_inputHandler); installEventFilter(&d->m_inputHandler);
...@@ -340,6 +341,16 @@ namespace Marble ...@@ -340,6 +341,16 @@ namespace Marble
} }
} }
void MarbleQuickItem::handleVisibleLatLonAltBoxChanged(const GeoDataLatLonAltBox &latLonAltBox)
{
Q_UNUSED(latLonAltBox)
if (d->m_heading != d->m_map.heading()) {
d->m_heading = d->m_map.heading();
emit headingChanged(d->m_heading);
}
}
void MarbleQuickItem::paint(QPainter *painter) void MarbleQuickItem::paint(QPainter *painter)
{ //TODO - much to be done here still, i.e paint !enabled version { //TODO - much to be done here still, i.e paint !enabled version
QPaintDevice *paintDevice = painter->device(); QPaintDevice *paintDevice = painter->device();
......
...@@ -286,6 +286,7 @@ namespace Marble ...@@ -286,6 +286,7 @@ namespace Marble
void updateCurrentPosition(const GeoDataCoordinates & coordinates); void updateCurrentPosition(const GeoDataCoordinates & coordinates);
void updatePlacemarks(); void updatePlacemarks();
void handleReverseGeocoding(const GeoDataCoordinates &coordinates, const GeoDataPlacemark &placemark); void handleReverseGeocoding(const GeoDataCoordinates &coordinates, const GeoDataPlacemark &placemark);
void handleVisibleLatLonAltBoxChanged(const GeoDataLatLonAltBox& latLonAltBox);
private: private:
using MarbleQuickItemPrivatePtr = QSharedPointer<MarbleQuickItemPrivate>; using MarbleQuickItemPrivatePtr = QSharedPointer<MarbleQuickItemPrivate>;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment