[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.1/kdeedu/marble
From: Inge Wallin <inge () lysator ! liu ! se>
Date: 2008-07-19 15:40:02
Message-ID: 1216482002.219862.15806.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 834763 by ingwa:
Make d pointer be named d
M +8 -0 ChangeLog
M +41 -41 src/lib/geodata/data/GeoDataCoordinates.cpp
M +2 -2 src/lib/geodata/data/GeoDataCoordinates.h
M +19 -17 src/lib/geodata/data/GeoDataGeometry.cpp
M +2 -1 src/lib/geodata/data/GeoDataGeometry.h
M +14 -13 src/lib/geodata/data/GeoDataHotSpot.cpp
M +2 -1 src/lib/geodata/data/GeoDataHotSpot.h
M +19 -18 src/lib/geodata/data/GeoDataPolygon.cpp
M +2 -1 src/lib/geodata/data/GeoDataPolygon.h
--- branches/KDE/4.1/kdeedu/marble/ChangeLog #834762:834763
@@ -1,3 +1,11 @@
+2008-07-19 Inge Wallin <inge@lysator.liu.se>
+
+ Cleanup: Make the d pointer actually be named d.
+ * src/lib/geodata/data/GeoDataPolygon.{h,cpp},
+ * src/lib/geodata/data/GeoDataGeometry.{h,cpp},
+ * src/lib/geodata/data/GeoDataCoordinates.{h,cpp},
+ * src/lib/geodata/data/GeoDataHotSpot.{h,cpp}: rename the d pointer.
+
2008-07-18 Jens-Michael Hoffmann <jensmh@gmx.de>
* src/lib/geodata/handlers/dgml/DgmlDownloadUrlTagHandler.cpp:
--- branches/KDE/4.1/kdeedu/marble/src/lib/geodata/data/GeoDataCoordinates.cpp \
#834762:834763 @@ -6,7 +6,7 @@
// the source code.
//
// Copyright 2004-2007 Torsten Rahn <tackat@kde.org>"
-// Copyright 2007 Inge Wallin <ingwa@kde.org>"
+// Copyright 2007-2008 Inge Wallin <ingwa@kde.org>"
// Copyright 2008 Patrick Spendrin <ps_ml@gmx.de>"
//
@@ -23,37 +23,37 @@
GeoDataCoordinates::Notation GeoDataCoordinates::s_notation = \
GeoDataCoordinates::DMS;
GeoDataCoordinates::GeoDataCoordinates( double _lon, double _lat, double _alt, \
GeoDataCoordinates::Unit unit, int _detail )
- : d_ptr( new GeoDataCoordinatesPrivate() )
+ : d( new GeoDataCoordinatesPrivate() )
{
- d_ptr->m_altitude = _alt;
- d_ptr->m_detail = _detail;
+ d->m_altitude = _alt;
+ d->m_detail = _detail;
switch( unit ){
case Radian:
- d_ptr->m_q = Quaternion( _lon, _lat );
- d_ptr->m_lon = _lon;
- d_ptr->m_lat = _lat;
+ d->m_q = Quaternion( _lon, _lat );
+ d->m_lon = _lon;
+ d->m_lat = _lat;
break;
case Degree:
- d_ptr->m_q = Quaternion( _lon * DEG2RAD , _lat * DEG2RAD );
- d_ptr->m_lon = _lon * DEG2RAD;
- d_ptr->m_lat = _lat * DEG2RAD;
+ d->m_q = Quaternion( _lon * DEG2RAD , _lat * DEG2RAD );
+ d->m_lon = _lon * DEG2RAD;
+ d->m_lat = _lat * DEG2RAD;
break;
}
}
GeoDataCoordinates::GeoDataCoordinates( const GeoDataCoordinates& other )
- : d_ptr( new GeoDataCoordinatesPrivate( *other.d_ptr ) )
+ : d( new GeoDataCoordinatesPrivate( *other.d ) )
{
}
GeoDataCoordinates::GeoDataCoordinates()
- : d_ptr( new GeoDataCoordinatesPrivate() )
+ : d( new GeoDataCoordinatesPrivate() )
{
}
GeoDataCoordinates::~GeoDataCoordinates()
{
- delete d_ptr;
+ delete d;
#if DEBUG_GEODATA
// qDebug() << "delete coordinates";
#endif
@@ -61,17 +61,17 @@
void GeoDataCoordinates::set( double _lon, double _lat, double _alt, \
GeoDataCoordinates::Unit unit ) {
- d_ptr->m_altitude = _alt;
+ d->m_altitude = _alt;
switch( unit ){
case Radian:
- d_ptr->m_q = Quaternion( _lon, _lat );
- d_ptr->m_lon = _lon;
- d_ptr->m_lat = _lat;
+ d->m_q = Quaternion( _lon, _lat );
+ d->m_lon = _lon;
+ d->m_lat = _lat;
break;
case Degree:
- d_ptr->m_q = Quaternion( _lon * DEG2RAD , _lat * DEG2RAD );
- d_ptr->m_lon = _lon * DEG2RAD;
- d_ptr->m_lat = _lat * DEG2RAD;
+ d->m_q = Quaternion( _lon * DEG2RAD , _lat * DEG2RAD );
+ d->m_lon = _lon * DEG2RAD;
+ d->m_lat = _lat * DEG2RAD;
break;
}
}
@@ -82,12 +82,12 @@
switch ( unit )
{
case Radian:
- lon = d_ptr->m_lon;
- lat = d_ptr->m_lat;
+ lon = d->m_lon;
+ lat = d->m_lat;
break;
case Degree:
- lon = d_ptr->m_lon * RAD2DEG;
- lat = d_ptr->m_lat * RAD2DEG;
+ lon = d->m_lon * RAD2DEG;
+ lat = d->m_lat * RAD2DEG;
break;
}
}
@@ -109,12 +109,12 @@
QString GeoDataCoordinates::toString( GeoDataCoordinates::Notation notation )
{
- QString nsstring = ( d_ptr->m_lat > 0 ) ? QCoreApplication::tr("N") : \
QCoreApplication::tr("S");
- QString westring = ( d_ptr->m_lon < 0 ) ? QCoreApplication::tr("W") : \
QCoreApplication::tr("E"); + QString nsstring = ( d->m_lat > 0 ) ? \
QCoreApplication::tr("N") : QCoreApplication::tr("S"); + QString westring = ( \
d->m_lon < 0 ) ? QCoreApplication::tr("W") : QCoreApplication::tr("E");
double lat, lon;
- lon = fabs( d_ptr->m_lon * RAD2DEG );
- lat = fabs( d_ptr->m_lat * RAD2DEG );
+ lon = fabs( d->m_lon * RAD2DEG );
+ lat = fabs( d->m_lat * RAD2DEG );
if ( notation == GeoDataCoordinates::DMS )
{
@@ -161,47 +161,47 @@
void GeoDataCoordinates::setAltitude( const double altitude )
{
- d_ptr->m_altitude = altitude;
+ d->m_altitude = altitude;
}
double GeoDataCoordinates::altitude() const
{
- return d_ptr->m_altitude;
+ return d->m_altitude;
}
int GeoDataCoordinates::detail() const
{
- return d_ptr->m_detail;
+ return d->m_detail;
}
void GeoDataCoordinates::setDetail( const int det )
{
- d_ptr->m_detail = det;
+ d->m_detail = det;
}
const Quaternion& GeoDataCoordinates::quaternion() const
{
- return d_ptr->m_q;
+ return d->m_q;
}
GeoDataCoordinates& GeoDataCoordinates::operator=( const GeoDataCoordinates &other )
{
- *d_ptr = *other.d_ptr;
+ *d = *other.d;
return *this;
}
void GeoDataCoordinates::pack( QDataStream& stream ) const
{
- stream << d_ptr->m_lon;
- stream << d_ptr->m_lat;
- stream << d_ptr->m_altitude;
+ stream << d->m_lon;
+ stream << d->m_lat;
+ stream << d->m_altitude;
}
void GeoDataCoordinates::unpack( QDataStream& stream )
{
- stream >> d_ptr->m_lon;
- stream >> d_ptr->m_lat;
- stream >> d_ptr->m_altitude;
+ stream >> d->m_lon;
+ stream >> d->m_lat;
+ stream >> d->m_altitude;
- d_ptr->m_q.set( d_ptr->m_lon, d_ptr->m_lat );
+ d->m_q.set( d->m_lon, d->m_lat );
}
--- branches/KDE/4.1/kdeedu/marble/src/lib/geodata/data/GeoDataCoordinates.h \
#834762:834763 @@ -6,7 +6,7 @@
// the source code.
//
// Copyright 2006-2007 Torsten Rahn <tackat@kde.org>"
-// Copyright 2007 Inge Wallin <ingwa@kde.org>"
+// Copyright 2007-2008 Inge Wallin <ingwa@kde.org>"
// Copyright 2008 Patrick Spendrin <ps_ml@gmx.de>"
//
@@ -113,7 +113,7 @@
virtual void unpack( QDataStream& stream );
protected:
- GeoDataCoordinatesPrivate* const d_ptr;
+ GeoDataCoordinatesPrivate* const d;
private:
static GeoDataCoordinates::Notation s_notation;
--- branches/KDE/4.1/kdeedu/marble/src/lib/geodata/data/GeoDataGeometry.cpp \
#834762:834763 @@ -7,6 +7,7 @@
//
// Copyright 2008 Torsten Rahn <rahn@kde.org>
// Copyright 2008 Patrick Spendrin <ps_ml@gmx.de>"
+// Copyright 2008 Inge Wallin <inge@lysator.liu.se>"
//
@@ -31,63 +32,64 @@
bool GeoDataGeometry::extrude() const
{
- return d_geom->m_extrude;
+ return d->m_extrude;
}
void GeoDataGeometry::setExtrude( bool extrude )
{
- d_geom->m_extrude = extrude;
+ d->m_extrude = extrude;
}
bool GeoDataGeometry::tessellate() const
{
- return d_geom->m_tessellate;
+ return d->m_tessellate;
}
void GeoDataGeometry::setTessellate( bool tessellate )
{
- d_geom->m_tessellate = tessellate;
+ d->m_tessellate = tessellate;
}
AltitudeMode GeoDataGeometry::altitudeMode() const
{
- return d_geom->m_altitudeMode;
+ return d->m_altitudeMode;
}
void GeoDataGeometry::setAltitudeMode( const AltitudeMode altitudeMode )
{
- d_geom->m_altitudeMode = altitudeMode;
+ d->m_altitudeMode = altitudeMode;
}
-GeoDataGeometry::GeoDataGeometry() : d_geom( new GeoDataGeometryPrivate() )
+GeoDataGeometry::GeoDataGeometry()
+ : d( new GeoDataGeometryPrivate() )
{
}
GeoDataGeometry::GeoDataGeometry( const GeoDataGeometry& other )
- : d_geom( new GeoDataGeometryPrivate() )
+ : d( new GeoDataGeometryPrivate() )
{
- *d_geom = *other.d_geom;
+ *d = *other.d;
}
GeoDataGeometry& GeoDataGeometry::operator=( const GeoDataGeometry& other )
{
- *d_geom = *other.d_geom;
+ *d = *other.d;
return *this;
}
GeoDataGeometry::~GeoDataGeometry()
{
- delete d_geom;
+ delete d;
}
void GeoDataGeometry::pack( QDataStream& stream ) const
{
GeoDataObject::pack( stream );
- stream << d_geom->m_extrude;
- stream << d_geom->m_tessellate;
- stream << d_geom->m_altitudeMode;
+ stream << d->m_extrude;
+ stream << d->m_tessellate;
+ stream << d->m_altitudeMode;
}
void GeoDataGeometry::unpack( QDataStream& stream )
@@ -95,8 +97,8 @@
GeoDataObject::unpack( stream );
int am;
- stream >> d_geom->m_extrude;
- stream >> d_geom->m_tessellate;
+ stream >> d->m_extrude;
+ stream >> d->m_tessellate;
stream >> am;
- d_geom->m_altitudeMode;
+ d->m_altitudeMode;
}
--- branches/KDE/4.1/kdeedu/marble/src/lib/geodata/data/GeoDataGeometry.h \
#834762:834763 @@ -7,6 +7,7 @@
//
// Copyright 2008 Torsten Rahn <rahn@kde.org>
// Copyright 2008 Patrick Spendrin <ps_ml@gmx.de>"
+// Copyright 2008 Inge Wallin <inge@lysator.liu.se>"
//
@@ -61,7 +62,7 @@
virtual void unpack( QDataStream& stream );
protected:
- GeoDataGeometryPrivate* const d_geom;
+ GeoDataGeometryPrivate* const d;
};
#endif // GEODATAGEOMETRY_H
--- branches/KDE/4.1/kdeedu/marble/src/lib/geodata/data/GeoDataHotSpot.cpp \
#834762:834763 @@ -6,6 +6,7 @@
// the source code.
//
// Copyright 2007 Murad Tagirov <tmurad@gmail.com>
+// Copyright 2008 Inge Wallin <inge@lysator.liu.se>"
//
@@ -37,37 +38,37 @@
};
GeoDataHotSpot::GeoDataHotSpot( const QPointF& hotSpot, Units xunits, Units yunits ) \
- : d_hot( new GeoDataHotSpotPrivate( hotSpot, xunits, yunits ) )
+ : d( new GeoDataHotSpotPrivate( hotSpot, xunits, yunits ) )
{
}
GeoDataHotSpot::~GeoDataHotSpot()
{
- delete d_hot;
+ delete d;
}
const QPointF& GeoDataHotSpot::hotSpot( Units &xunits, Units &yunits ) const
{
- xunits = d_hot->m_xunits;
- yunits = d_hot->m_yunits;
+ xunits = d->m_xunits;
+ yunits = d->m_yunits;
- return d_hot->m_hotSpot;
+ return d->m_hotSpot;
}
void GeoDataHotSpot::setHotSpot( const QPointF& hotSpot, Units xunits, Units yunits \
) {
- d_hot->m_hotSpot = hotSpot;
- d_hot->m_xunits = xunits;
- d_hot->m_yunits = yunits;
+ d->m_hotSpot = hotSpot;
+ d->m_xunits = xunits;
+ d->m_yunits = yunits;
}
void GeoDataHotSpot::pack( QDataStream& stream ) const
{
GeoDataObject::pack( stream );
- stream << d_hot->m_xunits << d_hot->m_yunits;
- stream << d_hot->m_hotSpot;
+ stream << d->m_xunits << d->m_yunits;
+ stream << d->m_hotSpot;
}
void GeoDataHotSpot::unpack( QDataStream& stream )
@@ -75,8 +76,8 @@
GeoDataObject::unpack( stream );
int xu, yu;
stream >> xu >> yu;
- d_hot->m_xunits = static_cast<Units>(xu);
- d_hot->m_yunits = static_cast<Units>(yu);
- stream >> d_hot->m_hotSpot;
+ d->m_xunits = static_cast<Units>(xu);
+ d->m_yunits = static_cast<Units>(yu);
+ stream >> d->m_hotSpot;
}
--- branches/KDE/4.1/kdeedu/marble/src/lib/geodata/data/GeoDataHotSpot.h \
#834762:834763 @@ -6,6 +6,7 @@
// the source code.
//
// Copyright 2007 Torsten Rahn <rahn@kde.org>
+// Copyright 2008 Inge Wallin <inge@lysator.liu.se>"
//
@@ -40,7 +41,7 @@
private:
Q_DISABLE_COPY( GeoDataHotSpot )
- GeoDataHotSpotPrivate * const d_hot;
+ GeoDataHotSpotPrivate * const d;
};
#endif // GEODATAHOTSPOT_H
--- branches/KDE/4.1/kdeedu/marble/src/lib/geodata/data/GeoDataPolygon.cpp \
#834762:834763 @@ -6,6 +6,7 @@
// the source code.
//
// Copyright 2008 Patrick Spendrin <ps_ml@gmx.de>"
+// Copyright 2008 Inge Wallin <inge@lysator.liu.se>"
//
@@ -43,19 +44,19 @@
GeoDataPolygon::GeoDataPolygon()
: GeoDataGeometry(),
- d_polyg( new GeoDataPolygonPrivate() )
+ d( new GeoDataPolygonPrivate() )
{
}
GeoDataPolygon::GeoDataPolygon( const GeoDataPolygon & other )
: GeoDataGeometry( other ),
- d_polyg( new GeoDataPolygonPrivate( *other.d_polyg ) )
+ d( new GeoDataPolygonPrivate( *other.d ) )
{
}
GeoDataPolygon& GeoDataPolygon::operator=( const GeoDataPolygon & other )
{
- *d_polyg = *other.d_polyg;
+ *d = *other.d;
return *this;
}
@@ -64,53 +65,53 @@
#if DEBUG_GEODATA
qDebug() << "delete polygon";
#endif
- delete d_polyg;
+ delete d;
}
GeoDataLatLonAltBox GeoDataPolygon::latLonAltBox() const
{
- if (d_polyg->m_dirtyBox) {
+ if (d->m_dirtyBox) {
// calulate LatLonAltBox
}
- d_polyg->m_dirtyBox = false;
+ d->m_dirtyBox = false;
return GeoDataLatLonAltBox();
}
GeoDataLinearRing& GeoDataPolygon::outerBoundary() const
{
- return *(d_polyg->outer);
+ return *(d->outer);
}
void GeoDataPolygon::setOuterBoundary( GeoDataLinearRing* boundary )
{
- delete d_polyg->outer;
- d_polyg->outer = boundary;
+ delete d->outer;
+ d->outer = boundary;
}
QVector<GeoDataLinearRing*> GeoDataPolygon::innerBoundaries() const
{
- return d_polyg->inner;
+ return d->inner;
}
void GeoDataPolygon::appendInnerBoundary( GeoDataLinearRing* boundary )
{
- d_polyg->inner.append( boundary );
+ d->inner.append( boundary );
}
void GeoDataPolygon::pack( QDataStream& stream ) const
{
GeoDataObject::pack( stream );
- d_polyg->outer->pack( stream );
+ d->outer->pack( stream );
- stream << d_polyg->inner.size();
+ stream << d->inner.size();
for( QVector<GeoDataLinearRing*>::const_iterator iterator
- = d_polyg->inner.constBegin();
- iterator != d_polyg->inner.constEnd();
+ = d->inner.constBegin();
+ iterator != d->inner.constEnd();
++iterator ) {
- qDebug() << "innerRing: size" << d_polyg->inner.size();
+ qDebug() << "innerRing: size" << d->inner.size();
GeoDataLinearRing* linearRing = ( *iterator );
linearRing->pack( stream );
}
@@ -120,13 +121,13 @@
{
GeoDataObject::unpack( stream );
- d_polyg->outer->unpack( stream );
+ d->outer->unpack( stream );
int size;
stream >> size;
for(int i = 0; i < size; i++ ) {
GeoDataLinearRing* linearRing = new GeoDataLinearRing();
linearRing->unpack( stream );
- d_polyg->inner.append( linearRing );
+ d->inner.append( linearRing );
}
}
--- branches/KDE/4.1/kdeedu/marble/src/lib/geodata/data/GeoDataPolygon.h \
#834762:834763 @@ -6,6 +6,7 @@
// the source code.
//
// Copyright 2008 Patrick Spendrin <ps_ml@gmx.de>"
+// Copyright 2008 Inge Wallin <inge@lysator.liu.se>"
//
@@ -64,7 +65,7 @@
virtual EnumGeometryId geometryId() const { return GeoDataPolygonId; };
protected:
- GeoDataPolygonPrivate * const d_polyg;
+ GeoDataPolygonPrivate * const d;
};
class GEODATA_EXPORT GeoDataOuterBoundary : public GeoDataPolygon {};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic