[Marble-commits] KDE/kdeedu/marble/src/plugins/render
Dennis Nienhüser
earthwings at gentoo.org
Mon Jan 10 19:42:17 CET 2011
SVN commit 1213524 by nienhueser:
Die, mutable, die!
M +1 -1 aprs/AprsPlugin.cpp
M +4 -4 aprs/AprsPlugin.h
M +1 -2 compass/CompassFloatItem.cpp
M +6 -7 compass/CompassFloatItem.h
M +1 -2 crosshairs/CrosshairsPlugin.cpp
M +6 -7 crosshairs/CrosshairsPlugin.h
M +1 -1 earthquake/EarthquakePlugin.cpp
M +4 -4 earthquake/EarthquakePlugin.h
M +1 -1 graticule/GraticulePlugin.cpp
M +5 -5 graticule/GraticulePlugin.h
M +1 -1 mapscale/MapScaleFloatItem.cpp
M +4 -4 mapscale/MapScaleFloatItem.h
M +5 -5 overviewmap/OverviewMap.cpp
M +12 -12 overviewmap/OverviewMap.h
M +1 -1 positionmarker/PositionMarker.cpp
M +5 -5 positionmarker/PositionMarker.h
M +1 -1 weather/WeatherPlugin.cpp
M +5 -5 weather/WeatherPlugin.h
M +1 -1 wikipedia/WikipediaPlugin.cpp
M +5 -5 wikipedia/WikipediaPlugin.h
--- trunk/KDE/kdeedu/marble/src/plugins/render/aprs/AprsPlugin.cpp #1213523:1213524
@@ -265,7 +265,7 @@
return m_configDialog;
}
-void AprsPlugin::readSettings() const
+void AprsPlugin::readSettings()
{
if ( !m_configDialog ) {
return;
--- trunk/KDE/kdeedu/marble/src/plugins/render/aprs/AprsPlugin.h #1213523:1213524
@@ -71,7 +71,7 @@
private Q_SLOTS:
- void readSettings() const;
+ void readSettings();
void writeSettings();
void updateVisibility( QString nameId, bool visible );
virtual RenderType renderType() const;
@@ -88,9 +88,9 @@
QString m_filter;
QAction *m_action;
- mutable PluginAboutDialog *m_aboutDialog;
- mutable QDialog *m_configDialog;
- mutable Ui::AprsConfigWidget *ui_configWidget;
+ PluginAboutDialog *m_aboutDialog;
+ QDialog *m_configDialog;
+ Ui::AprsConfigWidget *ui_configWidget;
QHash<QString,QVariant> m_settings;
};
--- trunk/KDE/kdeedu/marble/src/plugins/render/compass/CompassFloatItem.cpp #1213523:1213524
@@ -222,7 +222,7 @@
readSettings();
}
-void CompassFloatItem::readSettings() const
+void CompassFloatItem::readSettings()
{
int index = m_settings.value( "theme", 0 ).toInt();
if ( m_uiConfigWidget && index >= 0 && index < m_uiConfigWidget->m_themeList->count() ) {
@@ -243,7 +243,6 @@
}
delete m_svgobj;
- /** @todo FIXME we really need to change the configDialog() const API */
CompassFloatItem * me = const_cast<CompassFloatItem*>( this );
m_svgobj = new QSvgRenderer( theme, me );
m_compass = QPixmap();
--- trunk/KDE/kdeedu/marble/src/plugins/render/compass/CompassFloatItem.h #1213523:1213524
@@ -72,7 +72,7 @@
void setSettings( QHash<QString,QVariant> settings );
private Q_SLOTS:
- void readSettings() const;
+ void readSettings();
void writeSettings();
@@ -81,17 +81,16 @@
bool m_isInitialized;
- mutable PluginAboutDialog *m_aboutDialog;
- mutable QSvgRenderer *m_svgobj;
- mutable QPixmap m_compass;
+ PluginAboutDialog *m_aboutDialog;
+ QSvgRenderer *m_svgobj;
+ QPixmap m_compass;
/// allowed values: -1, 0, 1; default here: 0. FIXME: Declare enum
int m_polarity;
QHash<QString,QVariant> m_settings;
- /** @todo: Refactor plugin interface to have configDialog() non-const */
- mutable QDialog * m_configDialog;
- mutable Ui::CompassConfigWidget * m_uiConfigWidget;
+ QDialog * m_configDialog;
+ Ui::CompassConfigWidget * m_uiConfigWidget;
};
}
--- trunk/KDE/kdeedu/marble/src/plugins/render/crosshairs/CrosshairsPlugin.cpp #1213523:1213524
@@ -153,7 +153,7 @@
}
-void CrosshairsPlugin::readSettings() const
+void CrosshairsPlugin::readSettings()
{
int index = m_settings.value( "theme", 0 ).toInt();
if ( m_uiConfigWidget && index >= 0 && index < m_uiConfigWidget->m_themeList->count() ) {
@@ -177,7 +177,6 @@
}
delete m_svgobj;
- /** @todo FIXME we really need to change the configDialog() const API */
CrosshairsPlugin * me = const_cast<CrosshairsPlugin*>( this );
m_svgobj = new QSvgRenderer( theme, me );
m_crosshairs = QPixmap();
--- trunk/KDE/kdeedu/marble/src/plugins/render/crosshairs/CrosshairsPlugin.h #1213523:1213524
@@ -80,7 +80,7 @@
void setSettings( QHash<QString,QVariant> settings );
private Q_SLOTS:
- void readSettings() const;
+ void readSettings();
void writeSettings();
@@ -89,15 +89,14 @@
bool m_isInitialized;
- mutable PluginAboutDialog *m_aboutDialog;
+ PluginAboutDialog *m_aboutDialog;
- mutable QSvgRenderer *m_svgobj;
- mutable QPixmap m_crosshairs;
+ QSvgRenderer *m_svgobj;
+ QPixmap m_crosshairs;
QHash<QString,QVariant> m_settings;
- /** @todo: Refactor plugin interface to have configDialog() non-const */
- mutable QDialog * m_configDialog;
- mutable Ui::CrosshairsConfigWidget * m_uiConfigWidget;
+ QDialog * m_configDialog;
+ Ui::CrosshairsConfigWidget * m_uiConfigWidget;
};
}
--- trunk/KDE/kdeedu/marble/src/plugins/render/earthquake/EarthquakePlugin.cpp #1213523:1213524
@@ -143,7 +143,7 @@
emit settingsChanged( nameId() );
}
-void EarthquakePlugin::readSettings() const
+void EarthquakePlugin::readSettings()
{
if ( !m_configDialog )
return;
--- trunk/KDE/kdeedu/marble/src/plugins/render/earthquake/EarthquakePlugin.h #1213523:1213524
@@ -67,15 +67,15 @@
virtual void setSettings( QHash<QString,QVariant> settings );
public slots:
- void readSettings() const;
+ void readSettings();
void writeSettings();
void updateSettings();
private:
bool m_isInitialized;
- mutable PluginAboutDialog *m_aboutDialog;
- mutable Ui::EarthquakeConfigWidget *ui_configWidget;
- mutable QDialog *m_configDialog;
+ PluginAboutDialog *m_aboutDialog;
+ Ui::EarthquakeConfigWidget *ui_configWidget;
+ QDialog *m_configDialog;
QHash<QString,QVariant> m_settings;
private slots:
--- trunk/KDE/kdeedu/marble/src/plugins/render/graticule/GraticulePlugin.cpp #1213523:1213524
@@ -165,7 +165,7 @@
}
-void GraticulePlugin::readSettings() const
+void GraticulePlugin::readSettings()
{
if ( !m_configDialog )
return;
--- trunk/KDE/kdeedu/marble/src/plugins/render/graticule/GraticulePlugin.h #1213523:1213524
@@ -99,7 +99,7 @@
public Q_SLOTS:
- void readSettings() const;
+ void readSettings();
void writeSettings();
void gridGetColor();
@@ -200,11 +200,11 @@
QHash<QString,QVariant> m_settings;
- mutable QIcon m_icon;
- mutable PluginAboutDialog *m_aboutDialog;
+ QIcon m_icon;
+ PluginAboutDialog *m_aboutDialog;
- mutable Ui::GraticuleConfigWidget *ui_configWidget;
- mutable QDialog *m_configDialog;
+ Ui::GraticuleConfigWidget *ui_configWidget;
+ QDialog *m_configDialog;
private slots:
void evaluateClickedButton( QAbstractButton *button );
--- trunk/KDE/kdeedu/marble/src/plugins/render/mapscale/MapScaleFloatItem.cpp #1213523:1213524
@@ -363,7 +363,7 @@
QToolTip::showText( e->globalPos(), m_ratioString );
}
-void MapScaleFloatItem::readSettings() const
+void MapScaleFloatItem::readSettings()
{
if ( !m_configDialog )
return;
--- trunk/KDE/kdeedu/marble/src/plugins/render/mapscale/MapScaleFloatItem.h #1213523:1213524
@@ -73,7 +73,7 @@
virtual void toolTipEvent( QHelpEvent *e );
private Q_SLOTS:
- void readSettings() const;
+ void readSettings();
void writeSettings();
void toggleRatioScaleVisibility();
@@ -81,9 +81,9 @@
int invScale() const { return m_invScale; }
void setInvScale( int invScale ) { m_invScale = invScale; }
- mutable PluginAboutDialog *m_aboutDialog;
- mutable QDialog *m_configDialog;
- mutable Ui::MapScaleConfigWidget *ui_configWidget;
+ PluginAboutDialog *m_aboutDialog;
+ QDialog *m_configDialog;
+ Ui::MapScaleConfigWidget *ui_configWidget;
int m_radius;
int m_invScale;
--- trunk/KDE/kdeedu/marble/src/plugins/render/overviewmap/OverviewMap.cpp #1213523:1213524
@@ -313,7 +313,7 @@
emit settingsChanged( nameId() );
}
-void OverviewMap::readSettings() const
+void OverviewMap::readSettings()
{
if ( !m_configDialog ) {
return;
@@ -399,7 +399,7 @@
return AbstractFloatItem::eventFilter(object,e);
}
-void OverviewMap::changeBackground( const QString& target ) const
+void OverviewMap::changeBackground( const QString& target )
{
delete m_svgobj;
m_svgobj = new QSvgRenderer( m_svgPaths[target].toString() );
@@ -410,7 +410,7 @@
return m_svgWidgets[m_planetID[ui_configWidget->m_planetComboBox->currentIndex()]];
}
-void OverviewMap::setCurrentWidget( QSvgWidget *widget ) const
+void OverviewMap::setCurrentWidget( QSvgWidget *widget )
{
m_svgWidgets[m_planetID[ui_configWidget->m_planetComboBox->currentIndex()]] = widget;
m_mapChanged = true;
@@ -419,14 +419,14 @@
}
}
-void OverviewMap::loadPlanetMaps() const
+void OverviewMap::loadPlanetMaps()
{
foreach( const QString& planet, m_planetID ) {
m_svgWidgets[planet] = new QSvgWidget( m_svgPaths[planet].toString() );
}
}
-void OverviewMap::loadMapSuggestions() const
+void OverviewMap::loadMapSuggestions()
{
QStringList paths = QDir( MarbleDirs::pluginPath( "" ) ).entryList( QStringList( "*.svg" ), QDir::Files | QDir::NoDotAndDotDot );
for( int i = 0; i < paths.size(); ++i ) {
--- trunk/KDE/kdeedu/marble/src/plugins/render/overviewmap/OverviewMap.h #1213523:1213524
@@ -84,7 +84,7 @@
virtual void setSettings( QHash<QString,QVariant> settings );
public slots:
- void readSettings() const;
+ void readSettings();
void writeSettings();
void updateSettings();
@@ -92,29 +92,29 @@
bool eventFilter( QObject *object, QEvent *e );
private:
- void changeBackground( const QString& target ) const;
+ void changeBackground( const QString& target );
QSvgWidget *currentWidget() const;
- void setCurrentWidget( QSvgWidget *widget ) const;
- void loadPlanetMaps() const;
- void loadMapSuggestions() const;
+ void setCurrentWidget( QSvgWidget *widget );
+ void loadPlanetMaps();
+ void loadMapSuggestions();
QString m_target;
- mutable QSvgRenderer *m_svgobj;
- mutable QHash<QString, QSvgWidget *> m_svgWidgets;
- mutable QHash<QString, QVariant> m_svgPaths;
- mutable QStringList m_planetID;
+ QSvgRenderer *m_svgobj;
+ QHash<QString, QSvgWidget *> m_svgWidgets;
+ QHash<QString, QVariant> m_svgPaths;
+ QStringList m_planetID;
QPixmap m_worldmap;
QHash<QString,QVariant> m_settings;
QColor m_posColor;
QSizeF m_defaultSize;
- mutable Ui::OverviewMapConfigWidget *ui_configWidget;
- mutable QDialog *m_configDialog;
+ Ui::OverviewMapConfigWidget *ui_configWidget;
+ QDialog *m_configDialog;
GeoDataLatLonAltBox m_latLonAltBox;
qreal m_centerLat;
qreal m_centerLon;
- mutable bool m_mapChanged;
+ bool m_mapChanged;
private slots:
void chooseCustomMap();
--- trunk/KDE/kdeedu/marble/src/plugins/render/positionmarker/PositionMarker.cpp #1213523:1213524
@@ -303,7 +303,7 @@
emit settingsChanged( nameId() );
}
-void PositionMarker::readSettings() const
+void PositionMarker::readSettings()
{
if ( !m_configDialog ) {
return;
--- trunk/KDE/kdeedu/marble/src/plugins/render/positionmarker/PositionMarker.h #1213523:1213524
@@ -83,7 +83,7 @@
public slots:
- void readSettings() const;
+ void readSettings();
void writeSettings();
void updateSettings();
void setPosition( const GeoDataCoordinates &position );
@@ -102,10 +102,10 @@
GeoDataCoordinates m_currentPosition;
GeoDataCoordinates m_previousPosition;
- mutable Ui::PositionMarkerConfigWidget *ui_configWidget;
- mutable PluginAboutDialog *m_aboutDialog;
- mutable QDialog *m_configDialog;
- mutable QString m_cursorPath;
+ Ui::PositionMarkerConfigWidget *ui_configWidget;
+ PluginAboutDialog *m_aboutDialog;
+ QDialog *m_configDialog;
+ QString m_cursorPath;
QPolygonF m_arrow;
QPolygonF m_previousArrow;
--- trunk/KDE/kdeedu/marble/src/plugins/render/weather/WeatherPlugin.cpp #1213523:1213524
@@ -203,7 +203,7 @@
emit settingsChanged( nameId() );
}
-void WeatherPlugin::readSettings() const
+void WeatherPlugin::readSettings()
{
if ( !m_configDialog ) {
return;
--- trunk/KDE/kdeedu/marble/src/plugins/render/weather/WeatherPlugin.h #1213523:1213524
@@ -60,7 +60,7 @@
void setSettings( QHash<QString,QVariant> settings );
private Q_SLOTS:
- void readSettings() const;
+ void readSettings();
void writeSettings();
void updateItemSettings();
@@ -70,10 +70,10 @@
private:
bool m_isInitialized;
- mutable QIcon m_icon;
- mutable PluginAboutDialog *m_aboutDialog;
- mutable QDialog * m_configDialog;
- mutable Ui::WeatherConfigWidget * ui_configWidget;
+ QIcon m_icon;
+ PluginAboutDialog *m_aboutDialog;
+ QDialog * m_configDialog;
+ Ui::WeatherConfigWidget * ui_configWidget;
QHash<QString,QVariant> m_settings;
};
--- trunk/KDE/kdeedu/marble/src/plugins/render/wikipedia/WikipediaPlugin.cpp #1213523:1213524
@@ -158,7 +158,7 @@
emit settingsChanged( nameId() );
}
-void WikipediaPlugin::readSettings() const
+void WikipediaPlugin::readSettings()
{
if ( !m_configDialog )
return;
--- trunk/KDE/kdeedu/marble/src/plugins/render/wikipedia/WikipediaPlugin.h #1213523:1213524
@@ -65,7 +65,7 @@
virtual void setSettings( QHash<QString,QVariant> settings );
private Q_SLOTS:
- void readSettings() const;
+ void readSettings();
void writeSettings();
void updateSettings();
@@ -74,10 +74,10 @@
private:
bool m_isInitialized;
- mutable QIcon m_icon;
- mutable PluginAboutDialog *m_aboutDialog;
- mutable Ui::WikipediaConfigWidget *ui_configWidget;
- mutable QDialog *m_configDialog;
+ QIcon m_icon;
+ PluginAboutDialog *m_aboutDialog;
+ Ui::WikipediaConfigWidget *ui_configWidget;
+ QDialog *m_configDialog;
QHash<QString,QVariant> m_settings;
};
More information about the Marble-commits
mailing list