[Marble-commits] KDE/kdeedu/marble
Bernhard Beschow
bbeschow at cs.tu-berlin.de
Fri Mar 25 13:23:22 CET 2011
SVN commit 1225972 by beschow:
provide data via MarbleModel only; do not forward in MarbleWidget and MarbleMap (patch 4 of 5)
* Remove the following method from MarbleMap and MarbleWidget, use the respective method of
MarbleModel:
SunLocator* sunLocator();
M +6 -0 docs/release_notes/APIChanges-0.12.txt
M +5 -0 src/ControlView.cpp
M +2 -1 src/ControlView.h
M +1 -1 src/QtMainWindow.cpp
M +0 -5 src/lib/MarbleMap.cpp
M +0 -7 src/lib/MarbleMap.h
M +0 -5 src/lib/MarbleWidget.cpp
M +0 -3 src/lib/MarbleWidget.h
M +2 -2 src/marble_part.cpp
M +1 -1 src/plasmoid/worldclock.cpp
M +3 -2 src/plugins/render/stars/StarsPlugin.cpp
--- trunk/KDE/kdeedu/marble/docs/release_notes/APIChanges-0.12.txt #1225971:1225972
@@ -42,3 +42,9 @@
FileViewModel * fileViewModel() const;
QAbstractItemModel *placemarkModel() const;
QItemSelectionModel *placemarkSelectionModel() const;
+
+
+2011-03-25 Bernhard Beschow <bbeschow at cs.tu-berlin.de>
+
+* Remove the following method from MarbleMap and MarbleWidget, use the respective method of MarbleModel:
+ SunLocator* sunLocator();
--- trunk/KDE/kdeedu/marble/src/ControlView.cpp #1225971:1225972
@@ -554,6 +554,11 @@
m_marbleWidget->model()->addGeoDataFile( filename );
}
+SunLocator* ControlView::sunLocator()
+{
+ return m_marbleWidget->model()->sunLocator();
}
+}
+
#include "ControlView.moc"
--- trunk/KDE/kdeedu/marble/src/ControlView.h #1225971:1225972
@@ -33,6 +33,7 @@
{
class MapThemeManager;
+class SunLocator;
class ControlView : public QWidget
{
@@ -68,7 +69,7 @@
QPixmap mapScreenShot() { return m_marbleWidget->mapScreenShot(); }
- SunLocator* sunLocator() { return m_marbleWidget->sunLocator(); }
+ SunLocator* sunLocator();
/**
* Returns a default map theme: earth/srtm/srtm.dgml if installed,
--- trunk/KDE/kdeedu/marble/src/QtMainWindow.cpp #1225971:1225972
@@ -756,7 +756,7 @@
void MainWindow::showSun( bool active )
{
- m_controlView->marbleWidget()->sunLocator()->setShow( active );
+ m_controlView->sunLocator()->setShow( active );
}
void MainWindow::reload()
--- trunk/KDE/kdeedu/marble/src/lib/MarbleMap.cpp #1225971:1225972
@@ -1129,11 +1129,6 @@
}
}
-SunLocator* MarbleMap::sunLocator()
-{
- return d->m_model->sunLocator();
-}
-
QList<RenderPlugin *> MarbleMap::renderPlugins() const
{
return d->m_layerManager.renderPlugins();
--- trunk/KDE/kdeedu/marble/src/lib/MarbleMap.h #1225971:1225972
@@ -51,7 +51,6 @@
class GeoDataPlacemark;
class MarbleModel;
class ViewportParams;
-class SunLocator;
class GeoPainter;
class LayerInterface;
class RenderPlugin;
@@ -370,12 +369,6 @@
quint64 volatileTileCacheLimit() const;
/**
- * @brief Return the sun locator object.
- * @return the sun locator object
- */
- SunLocator* sunLocator();
-
- /**
* @brief Returns a list of all RenderPlugins in the model, this includes float items
* @return the list of RenderPlugins
*/
--- trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.cpp #1225971:1225972
@@ -1157,11 +1157,6 @@
}
}
-SunLocator* MarbleWidget::sunLocator()
-{
- return d->m_model->sunLocator();
-}
-
void MarbleWidget::setInputEnabled( bool enabled )
{
//if input is set as enabled
--- trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.h #1225971:1225972
@@ -50,7 +50,6 @@
class MeasureTool;
class RenderPlugin;
class RoutingLayer;
-class SunLocator;
class TextureLayer;
class TileCoordsPyramid;
class TileCreator;
@@ -197,8 +196,6 @@
*/
void setInputHandler( MarbleWidgetInputHandler *handler );
- SunLocator* sunLocator();
-
/**
* @brief Returns a list of all RenderPlugins on the widget, this includes float items
* @return the list of RenderPlugins
--- trunk/KDE/kdeedu/marble/src/marble_part.cpp #1225971:1225972
@@ -343,13 +343,13 @@
void MarblePart::showSun( bool active )
{
- m_controlView->marbleWidget()->sunLocator()->setShow( active );
+ m_controlView->sunLocator()->setShow( active );
m_sunControlDialog->setSunShading( active );
}
void MarblePart::showSunInZenith( bool active )
{
- m_controlView->marbleWidget()->sunLocator()->setCentered( active );
+ m_controlView->sunLocator()->setCentered( active );
}
void MarblePart::workOffline( bool offline )
--- trunk/KDE/kdeedu/marble/src/plasmoid/worldclock.cpp #1225971:1225972
@@ -98,7 +98,7 @@
item->setVisible( false );
//Set up the Sun to draw night/day shadow
- m_sun = m_map->sunLocator();
+ m_sun = m_map->model()->sunLocator();
m_sun->setShow(true);
m_sun->setCitylights(true);
if(cg.readEntry("centersun", false ))
--- trunk/KDE/kdeedu/marble/src/plugins/render/stars/StarsPlugin.cpp #1225971:1225972
@@ -20,6 +20,7 @@
#include "SunLocator.h"
#include "ViewportParams.h"
#include "MarbleWidget.h"
+#include "MarbleModel.h"
namespace Marble
{
@@ -227,9 +228,9 @@
if( renderPos == "ALWAYS_ON_TOP" )
{
m_marbleWidget = dynamic_cast<MarbleWidget*>( painter->device() );
- if( m_marbleWidget && m_marbleWidget->sunLocator()->getCentered() == true )
+ if( m_marbleWidget && m_marbleWidget->model()->sunLocator()->getCentered() == true )
{
- GeoDataCoordinates point( m_marbleWidget->sunLocator()->getLon(), m_marbleWidget->sunLocator()->getLat(), 0, GeoDataCoordinates::Degree );
+ GeoDataCoordinates point( m_marbleWidget->model()->sunLocator()->getLon(), m_marbleWidget->model()->sunLocator()->getLat(), 0, GeoDataCoordinates::Degree );
QImage image( MarbleDirs::path( "svg/sunshine.png" ) );
painter->drawImage( point, image.scaled( QSize( 30, 30 ) ) );
}
More information about the Marble-commits
mailing list