Commit ec1f7f55 authored by Bernhard Beschow's avatar Bernhard Beschow

use dedicated type rather than low level types

parent 7f729155
......@@ -133,7 +133,7 @@ public:
void setInputEnabled (bool);
void centerOn (const Marble::GeoDataLatLonBox& box, bool animated = 0);
signals:
//ig void regionSelected (const QList<double>&);
//ig void regionSelected (const Marble::GeoDataLatLonBox &);
void pluginSettingsChanged ();
void renderPluginInitialized (Marble::RenderPlugin* renderPlugin);
protected:
......
......@@ -583,18 +583,9 @@ namespace Marble
mDebug() << "Selection region: (" << tl.x() << ", " << tl.y() << ") ("
<< br.x() << ", " << br.y() << ")" << endl;
GeoDataLatLonAltBox box = viewport()->latLonAltBox(region);
const GeoDataLatLonAltBox box = viewport()->latLonAltBox(region);
// NOTE: coordinates as lon1, lat1, lon2, lat2 (or West, North, East, South)
// as left/top, right/bottom rectangle.
QList<double> coordinates;
coordinates << box.west(GeoDataCoordinates::Degree) << box.north(GeoDataCoordinates::Degree)
<< box.east(GeoDataCoordinates::Degree) << box.south(GeoDataCoordinates::Degree);
mDebug() << "West: " << coordinates[0] << " North: " << coordinates[1]
<< " East: " << coordinates[2] << " South: " << coordinates[3] << endl;
emit regionSelected(coordinates);
emit regionSelected(box);
}
}
......
......@@ -36,11 +36,12 @@ class ViewportParams;
void zoomChanged(int zoom);
void distanceChanged(const QString& distanceString);
/** This signal is emitted when a new rectangle region is selected over the map
* The list of double values includes coordinates in degrees using the following:
* lon1, lat1, lon2, lat2 (or West, North, East, South) as left/top, right/bottom rectangle.
*/
void regionSelected(const QList<double>&);
/**
* This signal is emit when a new rectangle region is selected over the map.
*
* @param boundingBox The geographical coordinates of the selected region
*/
void regionSelected(const GeoDataLatLonBox &boundingBox);
public:
explicit MarbleAbstractPresenter(MarbleMap *map, QObject *parent = 0);
......
......@@ -185,7 +185,7 @@ void MarbleWidgetPrivate::construct()
m_map.setShowFrameRate( false ); // never let the map draw the frame rate,
// we do this differently here in the widget
m_widget->connect( &m_presenter, SIGNAL(regionSelected(QList<double>)), m_widget, SIGNAL(regionSelected(QList<double>)) );
m_widget->connect( &m_presenter, SIGNAL(regionSelected(GeoDataLatLonBox)), m_widget, SIGNAL(regionSelected(GeoDataLatLonBox)) );
m_widget->connect( &m_presenter, SIGNAL(zoomChanged(int)), m_widget, SIGNAL(zoomChanged(int)) );
m_widget->connect( &m_presenter, SIGNAL(distanceChanged(QString)), m_widget, SIGNAL(distanceChanged(QString)) );
......
......@@ -1087,11 +1087,12 @@ class MARBLE_EXPORT MarbleWidget : public QWidget
void framesPerSecond( qreal fps );
/** This signal is emit when a new rectangle region is selected over the map
* The list of double values include coordinates in degrees using this order:
* lon1, lat1, lon2, lat2 (or West, North, East, South) as left/top, right/bottom rectangle.
/**
* This signal is emit when a new rectangle region is selected over the map.
*
* @param boundingBox The geographical coordinates of the selected region
*/
void regionSelected( const QList<double>& );
void regionSelected(const GeoDataLatLonBox &boundingBox);
/**
* This signal is emit when the settings of a plugin changed.
......
Markdown is supported
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