[Marble-devel] Review Request: Add visibleRegionChanged signal in MarbleMap and MarbleWidget

Jens-Michael Hoffmann jensmh at gmx.de
Fri May 7 11:40:04 CEST 2010


> On 2010-05-06 18:00:29, Bastian Holst wrote:
> > /trunk/KDE/kdeedu/marble/src/lib/MarbleMap.cpp, line 793
> > <http://reviewboard.kde.org/r/3898/diff/1/?file=3D25731#file25731line79=
3>
> >
> >     Shouldn't this also emit the signal?

Yes, fixed in v2.


> On 2010-05-06 18:00:29, Bastian Holst wrote:
> > /trunk/KDE/kdeedu/marble/src/lib/MarbleMap.cpp, line 837
> > <http://reviewboard.kde.org/r/3898/diff/1/?file=3D25731#file25731line83=
7>
> >
> >     And this?

Fixed in v2.


- jmho


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3898/#review5465
-----------------------------------------------------------


On 2010-05-06 12:50:56, jmho wrote:
> =

> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/3898/
> -----------------------------------------------------------
> =

> (Updated 2010-05-06 12:50:56)
> =

> =

> Review request for marble.
> =

> =

> Summary
> -------
> =

> With this patch, MarbleMap emits a signal (visibleRegionChanged) when the=
 users moves the map or zooms.
> The signals's argument contains the new visible region as GeoDataLatLonAl=
tBox.
> The new signal is needed for a non-modal download region dialog.
> =

> =

> Diffs
> -----
> =

>   /trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.h 1123616 =

>   /trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.cpp 1123616 =

>   /trunk/KDE/kdeedu/marble/src/lib/MarbleMap.h 1123616 =

>   /trunk/KDE/kdeedu/marble/src/lib/MarbleMap.cpp 1123616 =

> =

> Diff: http://reviewboard.kde.org/r/3898/diff
> =

> =

> Testing
> -------
> =

> Using the patch below showed that the signal is emitted when browsing and=
 zooming around the map.
> =

> -------------------------- marble/src/marble_part.cpp -------------------=
-------
> index 5722b07..4601cae 100644
> @@ -150,6 +150,8 @@ void MarblePart::initObject()
>      setupStatusBar();
>      readSettings();
>      m_statusBarExtension->statusBar()->setUpdatesEnabled( true );
> +    connect( m_controlView->marbleWidget(), SIGNAL( visibleRegionChanged=
( GeoDataLatLonAltBox )),
> +             SLOT( debugVisibleRegion( GeoDataLatLonAltBox )));
>  }
>  =

>  ControlView* MarblePart::controlView() const
> @@ -1265,6 +1267,11 @@ void MarblePart::readPluginSettings()
>      }
>  }
>  =

> +void MarblePart::debugVisibleRegion( const GeoDataLatLonAltBox& region )
> +{
> +    kDebug() << "N/W/S/E:" << region.north() << region.west() << region.=
south() << region.east();
> +}
> +
>  void MarblePart::lockFloatItemPosition( bool enabled )
>  {
>      QList<AbstractFloatItem *> floatItemList =3D m_controlView->marbleWi=
dget()->floatItems();
> =

> --------------------------- marble/src/marble_part.h --------------------=
-------
> index 7328fde..f17c398 100644
> @@ -35,6 +35,7 @@ namespace Marble
>  {
>  =

>  class ControlView;
> +class GeoDataLatLonAltBox;
>  class SunControlWidget;
>  =

>  class MarblePart: public KParts::ReadOnlyPart
> @@ -147,6 +148,8 @@ class MarblePart: public KParts::ReadOnlyPart
>       */
>      void readPluginSettings();
>  =

> +    void debugVisibleRegion( const GeoDataLatLonAltBox& );
> +
>    private:
>      void  setupActions();
>      void  setupDownloadProgressBar();
> =

> =

> Thanks,
> =

> jmho
> =

>

-------------------------------------------------------------


More information about the Marble-devel mailing list