[Marble-commits] KDE/kdeedu/marble/src/lib
Bastian Holst
bastianholst at gmx.de
Tue Mar 30 16:28:34 CEST 2010
SVN commit 1109088 by bholst:
* Marble uses camelCase
* a space inside both opening and closing parenthesis
M +14 -14 MarbleMap.cpp
M +1 -1 MarbleMap.h
M +6 -6 MarbleWidget.cpp
M +3 -3 MarbleWidget.h
M +21 -18 MarbleWidgetInputHandler.cpp
--- trunk/KDE/kdeedu/marble/src/lib/MarbleMap.cpp #1109087:1109088
@@ -1294,39 +1294,39 @@
return d->m_model->floatItems();
}
-void MarbleMap::flyTo(const GeoDataLookAt &lookat)
+void MarbleMap::flyTo( const GeoDataLookAt &lookAt )
{
- int zoom = zoomFromDistance(lookat.range() * METER2KM );
- if (zoom < minimumZoom() || zoom > maximumZoom())
+ int zoom = zoomFromDistance( lookAt.range() * METER2KM );
+ if ( zoom < minimumZoom() || zoom > maximumZoom() )
return; // avoid moving when zooming is impossible
- setDistance(lookat.range() * METER2KM );
+ setDistance( lookAt.range() * METER2KM );
GeoDataCoordinates::Unit deg = GeoDataCoordinates::Degree;
- centerOn(lookat.longitude(deg), lookat.latitude(deg));
+ centerOn( lookAt.longitude(deg), lookAt.latitude(deg) );
}
GeoDataLookAt MarbleMap::lookAt() const
{
GeoDataLookAt result;
- qreal lon(0.0), lat(0.0);
+ qreal lon( 0.0 ), lat( 0.0 );
- d->m_viewParams.centerCoordinates(lon, lat);
- result.setLongitude(lon);
- result.setLatitude(lat);
- result.setAltitude(0.0);
+ d->m_viewParams.centerCoordinates( lon, lat );
+ result.setLongitude( lon );
+ result.setLatitude( lat );
+ result.setAltitude( 0.0 );
result.setRange( distance() * KM2METER );
return result;
}
-qreal MarbleMap::distanceFromZoom(qreal zoom) const
+qreal MarbleMap::distanceFromZoom( qreal zoom ) const
{
- return distanceFromRadius(d->radius(zoom));
+ return distanceFromRadius( d->radius( zoom ) );
}
-qreal MarbleMap::zoomFromDistance(qreal distance) const
+qreal MarbleMap::zoomFromDistance( qreal distance ) const
{
- return d->zoom(radiusFromDistance(distance));
+ return d->zoom( radiusFromDistance( distance ) );
}
--- trunk/KDE/kdeedu/marble/src/lib/MarbleMap.h #1109087:1109088
@@ -420,7 +420,7 @@
* @brief Move camera to the given position. This can change
* both the zoom value and the position
*/
- void flyTo(const GeoDataLookAt &lookat);
+ void flyTo( const GeoDataLookAt &lookAt );
/**
* @brief Return the current camera position
--- trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.cpp #1109087:1109088
@@ -1382,24 +1382,24 @@
QWidget::changeEvent(event);
}
-void MarbleWidget::flyTo(const GeoDataLookAt &lookat, FlyToMode mode)
+void MarbleWidget::flyTo( const GeoDataLookAt &lookAt, FlyToMode mode )
{
- if (!d->m_animationsEnabled || mode == Instant) {
- d->m_map->flyTo(lookat);
+ if ( !d->m_animationsEnabled || mode == Instant ) {
+ d->m_map->flyTo( lookAt );
d->repaint();
}
else {
GeoDataLookAt source = d->m_map->lookAt();
setViewContext( Marble::Animation );
ViewportParams *viewport = d->m_map->viewParams()->viewport();
- d->m_physics->flyTo(source, lookat, viewport, mode);
+ d->m_physics->flyTo( source, lookAt, viewport, mode );
}
}
-void MarbleWidget::updateAnimation(const GeoDataLookAt &lookat)
+void MarbleWidget::updateAnimation( const GeoDataLookAt &lookAt )
{
setViewContext( Marble::Animation );
- d->m_map->flyTo(lookat);
+ d->m_map->flyTo( lookAt );
d->repaint();
}
--- trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.h #1109087:1109088
@@ -932,7 +932,7 @@
/**
* @brief Change the camera position to the given position.
- * @param lookat New camera position. Changing the camera position means
+ * @param lookAt New camera position. Changing the camera position means
* that both the current center position as well as the zoom value may change
* @param mode Interpolation type for intermediate camera positions. Automatic
* (default) chooses a suitable interpolation among Instant, Lenar and Jump.
@@ -944,7 +944,7 @@
* towards the middle point of the intermediate positions. This appears
* like a jump of the camera.
*/
- void flyTo(const GeoDataLookAt &lookat, FlyToMode mode = Automatic);
+ void flyTo( const GeoDataLookAt &lookAt, FlyToMode mode = Automatic );
Q_SIGNALS:
/**
@@ -1027,7 +1027,7 @@
* @brief Updates zoom and position during animations
* @see flyTo
*/
- void updateAnimation(const GeoDataLookAt &lookat);
+ void updateAnimation(const GeoDataLookAt &lookAt);
private:
Q_DISABLE_COPY( MarbleWidget )
--- trunk/KDE/kdeedu/marble/src/lib/MarbleWidgetInputHandler.cpp #1109087:1109088
@@ -242,35 +242,38 @@
qreal centerLat = DEG2RAD * marbleWidget->centerLatitude();
qreal centerLon = DEG2RAD * marbleWidget->centerLongitude();
- qreal lon = destLon - (mouseLon - centerLon);
- qreal lat = destLat - (mouseLat - centerLat);
+ qreal lon = destLon - ( mouseLon - centerLon );
+ qreal lat = destLat - ( mouseLat - centerLat );
- GeoDataLookAt lookat;
- lookat.setLongitude(lon);
- lookat.setLatitude(lat);
- lookat.setAltitude(0.0);
- lookat.setRange(newDistance * KM2METER);
+ GeoDataLookAt lookAt;
+ lookAt.setLongitude( lon );
+ lookAt.setLatitude( lat );
+ lookAt.setAltitude( 0.0 );
+ lookAt.setRange( newDistance * KM2METER );
- marbleWidget->map()->viewParams()->viewport()->setFocusPoint(GeoDataCoordinates(destLon, destLat));
- marbleWidget->flyTo(lookat, Linear);
+ marbleWidget->map()->viewParams()->viewport()->setFocusPoint( GeoDataCoordinates( destLon,
+ destLat ) );
+ marbleWidget->flyTo( lookAt, Linear );
}
-void MarbleWidgetDefaultInputHandler::Private::MoveTo(MarbleWidget* marbleWidget, const QPoint &pos, qreal factor)
+void MarbleWidgetDefaultInputHandler::Private::MoveTo( MarbleWidget* marbleWidget,
+ const QPoint &pos,
+ qreal factor )
{
- Q_ASSERT(factor > 0.0);
+ Q_ASSERT( factor > 0.0 );
qreal destLat;
qreal destLon;
qreal distance = marbleWidget->map()->distance();
- marbleWidget->geoCoordinates(pos.x(), pos.y(), destLon, destLat, GeoDataCoordinates::Radian );
+ marbleWidget->geoCoordinates( pos.x(), pos.y(), destLon, destLat, GeoDataCoordinates::Radian );
- GeoDataLookAt lookat;
- lookat.setLongitude(destLon);
- lookat.setLatitude(destLat);
- lookat.setAltitude(0.0);
- lookat.setRange(distance * factor * KM2METER);
+ GeoDataLookAt lookAt;
+ lookAt.setLongitude( destLon );
+ lookAt.setLatitude( destLat );
+ lookAt.setAltitude( 0.0 );
+ lookAt.setRange( distance * factor * KM2METER );
- marbleWidget->flyTo(lookat);
+ marbleWidget->flyTo( lookAt );
}
MarbleWidgetDefaultInputHandler::MarbleWidgetDefaultInputHandler()
More information about the Marble-commits
mailing list