Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Education
Marble
Commits
8a0feb77
Commit
8a0feb77
authored
Jul 26, 2021
by
Torsten Rahn
Browse files
Trigger MarbleQuickItem::headingChanged() if the heading is changed via
RMB-rotation.
parent
f08f15fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib/marble/declarative/MarbleQuickItem.cpp
View file @
8a0feb77
...
...
@@ -256,6 +256,7 @@ namespace Marble
connect
(
&
d
->
m_map
,
&
MarbleMap
::
radiusChanged
,
this
,
&
MarbleQuickItem
::
zoomChanged
);
connect
(
&
d
->
m_reverseGeocoding
,
SIGNAL
(
reverseGeocodingFinished
(
GeoDataCoordinates
,
GeoDataPlacemark
)),
this
,
SLOT
(
handleReverseGeocoding
(
GeoDataCoordinates
,
GeoDataPlacemark
)));
connect
(
&
d
->
m_map
,
&
MarbleMap
::
visibleLatLonAltBoxChanged
,
this
,
&
MarbleQuickItem
::
handleVisibleLatLonAltBoxChanged
);
setAcceptedMouseButtons
(
Qt
::
AllButtons
);
installEventFilter
(
&
d
->
m_inputHandler
);
...
...
@@ -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
)
{
//TODO - much to be done here still, i.e paint !enabled version
QPaintDevice
*
paintDevice
=
painter
->
device
();
...
...
src/lib/marble/declarative/MarbleQuickItem.h
View file @
8a0feb77
...
...
@@ -286,6 +286,7 @@ namespace Marble
void
updateCurrentPosition
(
const
GeoDataCoordinates
&
coordinates
);
void
updatePlacemarks
();
void
handleReverseGeocoding
(
const
GeoDataCoordinates
&
coordinates
,
const
GeoDataPlacemark
&
placemark
);
void
handleVisibleLatLonAltBoxChanged
(
const
GeoDataLatLonAltBox
&
latLonAltBox
);
private:
using
MarbleQuickItemPrivatePtr
=
QSharedPointer
<
MarbleQuickItemPrivate
>
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment