[Marble-commits] KDE/kdeedu/marble
Bernhard Beschow
bbeschow at cs.tu-berlin.de
Mon Mar 28 16:34:44 CEST 2011
SVN commit 1226291 by beschow:
remove MarbleWidget::map()
* there should be forwarders in MarbleWidget for all relevant methods of MarbleMap
M +7 -0 docs/release_notes/APIChanges-0.12.txt
M +16 -21 src/lib/MarbleWidget.cpp
M +0 -6 src/lib/MarbleWidget.h
--- trunk/KDE/kdeedu/marble/docs/release_notes/APIChanges-0.12.txt #1226290:1226291
@@ -78,3 +78,10 @@
* Remove MarbleWidget::MarbleWidget( MarbleMap *, ... ).
This constructor does not work on a conceptual level (MarbleMap being tightly associated with e.g. MarbleWidget's size).
Thus, there shouldn't be any code using it.
+
+
+2011-03-28 Bernhard Beschow <bbeschow at cs.tu-berlin.de>
+
+* Remove from MarbleWidget:
+ MarbleMap *map();
+ Use the respective methods of MarbleWidget directly.
--- trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.cpp #1226290:1226291
@@ -263,11 +263,6 @@
// ----------------------------------------------------------------
-MarbleMap *MarbleWidget::map() const
-{
- return d->m_map;
-}
-
MarbleModel *MarbleWidget::model() const
{
return d->m_model;
@@ -729,7 +724,7 @@
{
// If the globe covers fully the screen then we can use the faster
// RGB32 as there are no translucent areas involved.
- QImage::Format imageFormat = ( map()->mapCoversViewport() )
+ QImage::Format imageFormat = ( d->m_map->mapCoversViewport() )
? QImage::Format_RGB32
: QImage::Format_ARGB32_Premultiplied;
// Paint to an intermediate image
@@ -739,8 +734,8 @@
}
// Create a painter that will do the painting.
- GeoPainter painter( paintDevice, map()->viewport(),
- map()->mapQuality(), doClip );
+ GeoPainter painter( paintDevice, d->m_map->viewport(),
+ d->m_map->mapQuality(), doClip );
QRect dirtyRect = evt->rect();
// Draws the map like MarbleMap::paint does, but adds our customPaint in between
@@ -758,8 +753,8 @@
*pixel = qRgb( gray, gray, gray );
}
- GeoPainter widgetPainter( this, map()->viewport(),
- map()->mapQuality(), doClip );
+ GeoPainter widgetPainter( this, d->m_map->viewport(),
+ d->m_map->mapQuality(), doClip );
widgetPainter.drawImage( rect(), image );
}
@@ -1044,11 +1039,11 @@
}
if ( viewContext() == Still ) {
- map()->setMapQuality( d->m_stillQuality );
+ d->m_map->setMapQuality( d->m_stillQuality );
}
else if ( viewContext() == Animation )
{
- map()->setMapQuality( d->m_animationQuality );
+ d->m_map->setMapQuality( d->m_animationQuality );
}
if ( mapQuality( viewContext() ) != oldQuality )
@@ -1068,9 +1063,9 @@
d->m_viewContext = viewContext;
if ( viewContext == Still )
- map()->setMapQuality( d->m_stillQuality );
+ d->m_map->setMapQuality( d->m_stillQuality );
if ( viewContext == Animation )
- map()->setMapQuality( d->m_animationQuality );
+ d->m_map->setMapQuality( d->m_animationQuality );
if ( mapQuality( viewContext ) != mapQuality( Animation ) )
d->repaint();
@@ -1088,22 +1083,22 @@
AngleUnit MarbleWidget::defaultAngleUnit() const
{
- return map()->defaultAngleUnit();
+ return d->m_map->defaultAngleUnit();
}
void MarbleWidget::setDefaultAngleUnit( AngleUnit angleUnit )
{
- map()->setDefaultAngleUnit( angleUnit );
+ d->m_map->setDefaultAngleUnit( angleUnit );
}
QFont MarbleWidget::defaultFont() const
{
- return map()->defaultFont();
+ return d->m_map->defaultFont();
}
void MarbleWidget::setDefaultFont( const QFont& font )
{
- map()->setDefaultFont( font );
+ d->m_map->setDefaultFont( font );
}
void MarbleWidget::setSelection( const QRect& region )
@@ -1130,17 +1125,17 @@
qreal MarbleWidget::distance() const
{
- return map()->distance();
+ return d->m_map->distance();
}
void MarbleWidget::setDistance( qreal distance )
{
- map()->setDistance( distance );
+ d->m_map->setDistance( distance );
}
QString MarbleWidget::distanceString() const
{
- return map()->distanceString();
+ return d->m_map->distanceString();
}
void MarbleWidget::setInputEnabled( bool enabled )
--- trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.h #1226290:1226291
@@ -43,7 +43,6 @@
class GeoDataLatLonBox;
class GeoPainter;
class GeoSceneDocument;
-class MarbleMap;
class MarbleModel;
class MarbleWidgetInputHandler;
class MarbleWidgetPrivate;
@@ -163,11 +162,6 @@
//@{
/**
- * @brief Return the map that this view shows.
- */
- MarbleMap *map() const;
-
- /**
* @brief Return the model that this view shows.
*/
MarbleModel *model() const;
More information about the Marble-commits
mailing list