[Marble-commits] KDE/kdeedu/marble/src
Jens-Michael Hoffmann
jensmh at gmx.de
Fri Jul 31 18:34:51 CEST 2009
SVN commit 1005243 by jmhoffmann:
Declare more getters const.
M +1 -1 lib/geodata/graphicsitem/GeoPointGraphicsItem.cpp
M +1 -1 lib/geodata/graphicsitem/GeoPointGraphicsItem.h
M +2 -2 plugins/render/osmannotate/GeoWidgetBubble.cpp
M +2 -2 plugins/render/osmannotate/GeoWidgetBubble.h
M +4 -4 plugins/render/osmannotate/PlacemarkTextAnnotation.cpp
M +4 -4 plugins/render/osmannotate/PlacemarkTextAnnotation.h
M +1 -1 plugins/render/osmannotate/TextAnnotation.cpp
M +4 -4 plugins/render/osmannotate/TextAnnotation.h
M +2 -2 plugins/render/osmannotate/TextEditor.cpp
M +2 -2 plugins/render/osmannotate/TextEditor.h
M +2 -2 plugins/render/osmannotate/TmpGraphicsItem.cpp
M +2 -2 plugins/render/osmannotate/TmpGraphicsItem.h
--- trunk/KDE/kdeedu/marble/src/lib/geodata/graphicsitem/GeoPointGraphicsItem.cpp #1005242:1005243
@@ -25,7 +25,7 @@
m_point = point;
}
-GeoDataPoint GeoPointGraphicsItem::point()
+GeoDataPoint GeoPointGraphicsItem::point() const
{
return m_point;
}
--- trunk/KDE/kdeedu/marble/src/lib/geodata/graphicsitem/GeoPointGraphicsItem.h #1005242:1005243
@@ -24,7 +24,7 @@
GeoPointGraphicsItem();
void setPoint( const GeoDataPoint& point );
- GeoDataPoint point();
+ GeoDataPoint point() const;
virtual void paint( GeoPainter* painter, ViewportParams *viewport,
const QString &renderPos, GeoSceneLayer *layer );
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/GeoWidgetBubble.cpp #1005242:1005243
@@ -87,7 +87,7 @@
marbleWidgetInitalised = true;
}
-bool GeoWidgetBubble::marbleWidgetIsInitalised()
+bool GeoWidgetBubble::marbleWidgetIsInitalised() const
{
return marbleWidgetInitalised;
}
@@ -117,7 +117,7 @@
}
}
-bool GeoWidgetBubble::isHidden()
+bool GeoWidgetBubble::isHidden() const
{
return m_hidden;
}
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/GeoWidgetBubble.h #1005242:1005243
@@ -33,12 +33,12 @@
QWidget* getGeoWidget();
void initaliseMarbleWidget( QWidget* parent );
- bool marbleWidgetIsInitalised();
+ bool marbleWidgetIsInitalised() const;
void moveTo( QPoint screenPos );
void hide();
void setHidden( bool hide );
- bool isHidden();
+ bool isHidden() const;
private:
QWidget* m_widget;
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/PlacemarkTextAnnotation.cpp #1005242:1005243
@@ -39,7 +39,7 @@
bubble->setGeoWidget( m_textEditor );
}
-QRect PlacemarkTextAnnotation::screenBounding()
+QRect PlacemarkTextAnnotation::screenBounding() const
{
//FIXME the first 2 should actually offset it
return QRect(-5,-5,20,20);
@@ -124,17 +124,17 @@
return TmpGraphicsItem::itemChange( change, v );
}
-QString PlacemarkTextAnnotation::name()
+QString PlacemarkTextAnnotation::name() const
{
return m_textEditor->name();
}
-QString PlacemarkTextAnnotation::description()
+QString PlacemarkTextAnnotation::description() const
{
return m_textEditor->description();
}
-GeoDataGeometry PlacemarkTextAnnotation::geometry()
+GeoDataGeometry PlacemarkTextAnnotation::geometry() const
{
return GeoDataPoint( coordinate() );
}
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/PlacemarkTextAnnotation.h #1005242:1005243
@@ -27,15 +27,15 @@
PlacemarkTextAnnotation();
//GeoGraphicsItem
- virtual QRect screenBounding();
+ virtual QRect screenBounding() const;
virtual void paint( GeoPainter *painter, ViewportParams *viewport,
const QString& renderPos, GeoSceneLayer * layer = 0 );
virtual QVariant itemChange(GeoGraphicsItemChange c, QVariant v);
//TextAnnotation
- virtual QString name();
- virtual QString description();
- virtual GeoDataGeometry geometry();
+ virtual QString name() const;
+ virtual QString description() const;
+ virtual GeoDataGeometry geometry() const;
private:
GeoWidgetBubble* bubble;
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/TextAnnotation.cpp #1005242:1005243
@@ -23,7 +23,7 @@
{
}
-GeoDataPlacemark TextAnnotation::toGeoData()
+GeoDataPlacemark TextAnnotation::toGeoData() const
{
GeoDataPlacemark placemark;
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/TextAnnotation.h #1005242:1005243
@@ -25,11 +25,11 @@
TextAnnotation();
virtual ~TextAnnotation();
- virtual QString name() = 0 ;
- virtual QString description() = 0;
- virtual GeoDataGeometry geometry() = 0;
+ virtual QString name() const = 0 ;
+ virtual QString description() const = 0;
+ virtual GeoDataGeometry geometry() const = 0;
- GeoDataPlacemark toGeoData();
+ GeoDataPlacemark toGeoData() const;
};
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/TextEditor.cpp #1005242:1005243
@@ -82,12 +82,12 @@
}
-QString TextEditor::name()
+QString TextEditor::name() const
{
return m_name->text();
}
-QString TextEditor::description()
+QString TextEditor::description() const
{
return m_description->toHtml();
}
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/TextEditor.h #1005242:1005243
@@ -28,9 +28,9 @@
~TextEditor();
//return the plain text name
- QString name();
+ QString name() const;
//return the HTML description
- QString description();
+ QString description() const;
private:
QAction* m_boldAction;
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/TmpGraphicsItem.cpp #1005242:1005243
@@ -32,12 +32,12 @@
return QVariant();
}
-QList<QRegion> TmpGraphicsItem::regions()
+QList<QRegion> TmpGraphicsItem::regions() const
{
return QList<QRegion>( m_regions );
}
-QList<TmpGraphicsItem*> TmpGraphicsItem::children()
+QList<TmpGraphicsItem*> TmpGraphicsItem::children() const
{
return QList<TmpGraphicsItem*>(m_children);
}
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/TmpGraphicsItem.h #1005242:1005243
@@ -46,10 +46,10 @@
//Designed to recreated the QGraphicsItem::itemChange()
virtual QVariant itemChange( GeoGraphicsItemChange change, QVariant Value );
- QList<QRegion> regions();
+ QList<QRegion> regions() const;
- QList<TmpGraphicsItem*> children();
+ QList<TmpGraphicsItem*> children() const;
void addChild(TmpGraphicsItem* c);
TmpGraphicsItem* parent();
More information about the Marble-commits
mailing list