Skip to content
Permalink
Browse files

remove deprecated methods from API

  • Loading branch information
alexbruy committed Dec 23, 2012
1 parent d56b1c8 commit 5e45a22d061942f9e4cdaf09416dd5f3ee659b13
Showing with 13 additions and 1,185 deletions.
  1. +1 −12 python/core/composer/qgscomposeritem.sip
  2. +0 −3 python/core/composer/qgscomposermap.sip
  3. +0 −1 python/core/composer/qgscomposermultiframe.sip
  4. +0 −6 python/core/qgis.sip
  5. +0 −8 python/core/qgsapplication.sip
  6. +0 −10 python/core/qgsattributeaction.sip
  7. +0 −23 python/core/qgscoordinatereferencesystem.sip
  8. +0 −6 python/core/qgsdistancearea.sip
  9. +0 −1 python/core/qgsgeometry.sip
  10. +0 −23 python/core/qgslabel.sip
  11. +0 −12 python/core/qgsmaplayer.sip
  12. +0 −27 python/core/qgsmaplayerregistry.sip
  13. +0 −15 python/core/qgsmaprenderer.sip
  14. +0 −11 python/core/qgsoverlayobject.sip
  15. +1 −3 python/core/qgsrectangle.sip
  16. +2 −22 python/core/qgsvectordataprovider.sip
  17. +0 −11 python/core/qgsvectorfilewriter.sip
  18. +0 −11 python/core/qgsvectorlayer.sip
  19. +0 −62 python/core/raster/qgsrasterlayer.sip
  20. +0 −30 python/gui/qgisinterface.sip
  21. +0 −5 python/gui/qgsgenericprojectionselector.sip
  22. +1 −5 python/gui/qgsmapcanvas.sip
  23. +6 −9 python/gui/qgsmapcanvasmap.sip
  24. +0 −8 python/gui/qgsprojectionselector.sip
  25. +0 −36 src/app/qgisappinterface.cpp
  26. +0 −27 src/app/qgisappinterface.h
  27. +1 −12 src/core/composer/qgscomposeritem.h
  28. +0 −5 src/core/composer/qgscomposermap.cpp
  29. +0 −3 src/core/composer/qgscomposermap.h
  30. +0 −3 src/core/composer/qgscomposermultiframe.h
  31. +0 −8 src/core/qgis.h
  32. +0 −14 src/core/qgsapplication.cpp
  33. +0 −8 src/core/qgsapplication.h
  34. +0 −28 src/core/qgsattributeaction.cpp
  35. +0 −11 src/core/qgsattributeaction.h
  36. +0 −20 src/core/qgscoordinatereferencesystem.cpp
  37. +1 −24 src/core/qgscoordinatereferencesystem.h
  38. +0 −7 src/core/qgsdistancearea.cpp
  39. +0 −6 src/core/qgsdistancearea.h
  40. +0 −1 src/core/qgsgeometry.h
  41. +0 −5 src/core/qgslabel.cpp
  42. +0 −33 src/core/qgslabel.h
  43. +0 −7 src/core/qgsmaplayer.cpp
  44. +0 −12 src/core/qgsmaplayer.h
  45. +0 −20 src/core/qgsmaplayerregistry.cpp
  46. +0 −27 src/core/qgsmaplayerregistry.h
  47. +0 −15 src/core/qgsmaprenderer.h
  48. +0 −10 src/core/qgsoverlayobject.cpp
  49. +0 −13 src/core/qgsoverlayobject.h
  50. +0 −2 src/core/qgsrectangle.h
  51. +0 −42 src/core/qgsvectordataprovider.cpp
  52. +0 −20 src/core/qgsvectordataprovider.h
  53. +0 −16 src/core/qgsvectorfilewriter.cpp
  54. +0 −12 src/core/qgsvectorfilewriter.h
  55. +0 −16 src/core/qgsvectorlayer.cpp
  56. +0 −11 src/core/qgsvectorlayer.h
  57. +0 −144 src/core/raster/qgsrasterlayer.cpp
  58. +0 −56 src/core/raster/qgsrasterlayer.h
  59. +0 −105 src/gui/qgisinterface.h
  60. +0 −20 src/gui/qgsgenericprojectionselector.cpp
  61. +0 −5 src/gui/qgsgenericprojectionselector.h
  62. +0 −25 src/gui/qgsmapcanvas.cpp
  63. +0 −4 src/gui/qgsmapcanvas.h
  64. +0 −3 src/gui/qgsmapcanvasmap.h
  65. +0 −17 src/gui/qgsprojectionselector.cpp
  66. +0 −8 src/gui/qgsprojectionselector.h
@@ -211,24 +211,13 @@ class QgsComposerItem: QObject, QGraphicsRectItem
/**Reads parameter that are not subclass specific in document. Usually called from readXML methods of subclasses*/
bool _readXML( const QDomElement& itemElem, const QDomDocument& doc );

/** Whether this item has a frame or not.
* @return boolean - true if there is a frame around this item, otherwise false.
* @note deprecated since 1.8 don't use!
* @see hasFrame
*/
bool frame() /Deprecated/;
/** Whether this item has a frame or not.
* @returns true if there is a frame around this item, otherwise false.
* @note introduced since 1.8
* @see hasFrame
*/
bool hasFrame();
/** Set whether this item has a frame drawn around it or not.
* @returns void
* @note deprecated since 1.8 don't use!
* @see setFrameEnabled
*/
void setFrame( bool drawFrame ) /Deprecated/;

/** Set whether this item has a frame drawn around it or not.
* @param drawFrame draw frame
* @returns nothing
@@ -70,9 +70,6 @@ class QgsComposerMap : QgsComposerItem
Top
};

/**This function is deprecated*/
void draw( QPainter *painter, const QgsRectangle& extent, const QSize& size, int dpi ) /Deprecated/;

/** \brief Draw to paint device
@param painter painter
@param extent map extent
@@ -43,7 +43,6 @@ class QgsComposerMultiFrame: QObject
/**Removes and deletes all frames from mComposition*/
void deleteFrames();

int nFrames() const /Deprecated/;
/** Return the number of frames associated with this multiframeset.
@note added in 2.0, replaces nFrames
**/
@@ -145,12 +145,6 @@ class QGis
*/
const QString GEOWKT;

/** Wkt string that represents a geographic coord sys
* @note deprecated in 1.8 due to violation of coding conventions (globals
* should be in all caps).
*/
const QString GEOWkt; /* /Deprecated/; */

const QString PROJECT_SCALES;

/** PROJ4 string that represents a geographic coord sys */
@@ -124,10 +124,6 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
*/
static const QString translatorsFilePath();

//! Returns the path to the developer image directory.
//! @deprecated images are not provided anymore :-P
static const QString developerPath() /Deprecated/;

//! Returns the path to the help application.
static const QString helpAppPath();

@@ -156,10 +152,6 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
//! @note added in 1.4
static const QStringList svgPaths();

//! Returns the paths to svg applications svg directory.
//! @deprecated since 1.4 - use svgPaths()
static const QString svgPath() /Deprecated/;

//! Returns the path to the application prefix directory.
static const QString prefixPath();

@@ -51,16 +51,6 @@ class QgsAttributeAction
// dialog box.
void addAction( QgsAction::ActionType type, QString name, QString action, bool capture = false );

/*! Does the action using the given values. defaultValueIndex is an
* index into values which indicates which value in the values vector
* is to be used if the action has a default placeholder.
* @note added to python API in 1.6 (without executePython parameter)
* @deprecated
*/
void doAction( int index,
const QMap<int, QVariant> &attributes,
int defaultValueIndex = 0 ) /Deprecated/;

/*! Does the given values. defaultValueIndex is the index of the
* field to be used if the action has a $currfield placeholder.
* @note added in 1.9
@@ -73,16 +73,6 @@ class QgsCoordinateReferenceSystem
*/
bool createFromWkt( const QString theWkt );

/*! Set up this srs by fetching the appropriate information from the
* sqlite backend. First the system level read only srs.db will be checked
* and then the users ~/.qgis/qgis.db database will be checked for a match.
* @note Any members will be overwritten during this process.
* @param theEpsg The EpsgCrsId for the desired spatial reference system.
* @return bool TRUE if success else false
* @deprecated use createFromOgcWmsCrs()
*/
bool createFromEpsg(const long theEpsg) /Deprecated/;

/*! Set up this srs by fetching the appropriate information from the
* sqlite backend. If the srsid is < 100000, only the system srs.db
* will be checked. If the srsid > 100000 the srs will be retrieved from
@@ -197,13 +187,6 @@ class QgsCoordinateReferenceSystem
* Returns opposite bool value to operator ==
*/
bool operator!=( const QgsCoordinateReferenceSystem &theSrs ) const;
/*! Overloaded == operator used to compare to CRS's.
* Internally it will use OGR isSameCRS() or isSameGeoCRS() methods as appropriate.
* Additionally logic may also be applied if the result from the OGR methods
* is inconclusive.
* @deprecated in 1.8 as the same proj.4 string not necessarily means the same CRS
*/
bool equals(QString theProj4String) /Deprecated/;

/*! Restores state from the given Dom node.
* @param theNode The node from which state will be restored
@@ -252,12 +235,6 @@ class QgsCoordinateReferenceSystem
*/
long postgisSrid() const;

/*! Get the EpsgCrsId identifier for this srs
* @return long theEpsg the EPSG identifier for this srs (defaults to 0)
* @deprecated there are other authorities - use authid()
*/
long epsg() const /Deprecated/;

/*! Get the authority identifier for this srs
* @return QString the Authority identifier for this srs
* @note added in 1.5
@@ -17,19 +17,13 @@ class QgsDistanceArea

//! sets whether coordinates must be projected to ellipsoid before measuring
void setEllipsoidalMode( bool flag );
void setProjectionsEnabled( bool flag ) /Deprecated/;

//! returns projections enabled flag
bool ellipsoidalEnabled() const;
bool hasCrsTransformEnabled() /Deprecated/;

//! sets source spatial reference system (by QGIS CRS)
void setSourceCrs( long srsid );

//! sets source spatial reference system (by EpsgCrsId)
// @deprecated use setSourceAuthid()
void setSourceEpsgCrsId( long epsgId ) /Deprecated/;

//! sets source spatial reference system by authid
void setSourceAuthId( QString authid );

@@ -218,7 +218,6 @@ class QgsGeometry
@return 0 in case of success, 1 if not a multipolygon, 2 if ring is not a valid geometry, 3 if new polygon ring
not disjoint with existing polygons of the feature*/
int addPart( const QList<QgsPoint> &points );
int addIsland( const QList<QgsPoint> &points ) /Deprecated/;

/**Translate this geometry by dx, dy
@return 0 in case of success*/
@@ -46,24 +46,6 @@ class QgsLabel
double angle;
};

/** \brief render label
* \param painter painter to render label in
* \param viewExtent extent to render labels in
* \param coordinateTransform coordinate transformation to use
* \param transform transformation from coordinate to canvas pixels
* \param feature feature to label
* \param selected feature is selected
* \param classAttributes attributes to create label from
* \param sizeScale scale
* \param rasterScaleFactor raster scale
* \deprecated
*/
void renderLabel( QPainter* painter, const QgsRectangle& viewExtent,
QgsCoordinateTransform* coordinateTransform,
const QgsMapToPixel *transform,
QgsFeature &feature, bool selected, QgsLabelAttributes *classAttributes = 0,
double sizeScale = 1.0, double rasterScaleFactor = 1.0 ) /Deprecated/;

/** \brief render label
* \param renderContext the render context
* \param feature feature to render the label for
@@ -90,11 +72,6 @@ class QgsLabel
//! Available vector fields
QMap<int, QgsField> & fields();

/** Pointer to default attributes.
* @deprecated in version 2 as it is badly named. Rather use attributes.
* @see labelAttributes method rather */
QgsLabelAttributes *layerAttributes() /Deprecated/;

/** Pointer to default attributes.
* @note this replaces the to-be-deprecated layerAttributes method.
* @note introduced in QGIS 1.4
@@ -63,11 +63,6 @@ class QgsMapLayer : QObject
*/
QString id() const;

/** Get this layer's unique ID, this ID is used to access this layer from map layer registry
* @deprecated use id()
*/
QString getLayerID() const /Deprecated/;

/** Set the display name of the layer
* @param name New name for the layer
*/
@@ -214,13 +209,6 @@ class QgsMapLayer : QObject
*/
const QgsCoordinateReferenceSystem& crs() const;

/** Returns layer's spatial reference system
@note This method is here for API compatibility
and will be deprecated in 2.0
@deprecated use crs()
*/
const QgsCoordinateReferenceSystem& srs() /Deprecated/;

/** Sets layer's spatial reference system
@note emitSignal added in 1.4 */
void setCrs( const QgsCoordinateReferenceSystem& srs, bool emitSignal = true );
@@ -25,21 +25,6 @@ class QgsMapLayerRegistry : QObject
//! Retrieve the mapLayers collection (mainly intended for use by projection)
QMap<QString, QgsMapLayer*> & mapLayers();

/** Add a layer to the map of loaded layers
@returns NULL if unable to add layer, otherwise pointer to newly added layer
@note

As a side-effect QgsProject is made dirty.

Emits signal that layer has been added only if theEmitSignal is true (by default).

Not emitting signal is useful when you want to use registry for layers
on a different canvas and don't want them added to the main canvas automatically.

@note This method is deprecated since QGIS 1.8, you should use addMapLayers rather.
*/
QgsMapLayer *addMapLayer( QgsMapLayer * theMapLayer /Transfer/, bool theEmitSignal = true ) /Deprecated/;

/** Add a list of layers to the map of loaded layers
@returns QList<QgsMapLayer *> - a list of the map layers that were added
successfully. If a layer is invalid, or already exists in the registry,
@@ -57,18 +42,6 @@ class QgsMapLayerRegistry : QObject
bool theEmitSignal = true );


/** Remove a layer from qgis
@note As a side-effect QgsProject is made dirty. Any canvases using that layer will need to remove it

If theEmitSignal is true (by default), a layerWillBeRemoved( QString theId )
signal will be emitted indicating to any listeners that the layer is being removed.

The layer being removed is deleted as well as the registry
table entry.
@note This method is deprecated since QGIS 1.8, you should use removeMapLayers rather.
*/
void removeMapLayer( QString theLayerId, bool theEmitSignal = true ) /Deprecated/;

/** Remove a set of layers from qgis
@note As a side-effect QgsProject is made dirty.
Any canvases using the affected layers will need to remove them
@@ -117,9 +117,6 @@ class QgsMapRenderer : QObject
//! Recalculate the map scale
void updateScale();

//! Return the measuring object
//! @deprecated
QgsDistanceArea* distanceArea() /Deprecated/;
QGis::UnitType mapUnits() const;
void setMapUnits( QGis::UnitType u );

@@ -156,18 +153,6 @@ class QgsMapRenderer : QObject
//! returns true if projections are enabled for this layer set
bool hasCrsTransformEnabled() const;

/** sets destination coordinate reference system
* @note deprecated by qgis 1.7
* @see setDestinationCrs
*/
void setDestinationSrs( const QgsCoordinateReferenceSystem& srs ) /Deprecated/;

/** returns CRS of destination coordinate reference system
* @note deprecated by qgis 1.7
* @see destinationCrs
*/
const QgsCoordinateReferenceSystem& destinationSrs() /Deprecated/;

//! sets destination coordinate reference system
void setDestinationCrs( const QgsCoordinateReferenceSystem& crs );

@@ -10,17 +10,6 @@ class QgsOverlayObject
//copy constructor and assignment operator necessary because of mGeometry
QgsOverlayObject( const QgsOverlayObject& other );


/**Returns the feature geometry in geos format. The calling function does _not_ take
* ownership of the generated object. The geometry is in map coordinates
* @deprecated Please use geometry() and QgsGeometry::asGeos instead
*/
// GEOSGeometry* getGeosGeometry() /Deprecated/;
/**Feature geometry is released when object is destructed so this function is empty.
* @deprecated nop
*/
// void releaseGeosGeometry( GEOSGeometry *the_geom ) /Deprecated/;

//getters
int width() const;
int height() const;
@@ -10,7 +10,7 @@ class QgsRectangle
%TypeHeaderCode
#include <qgsrectangle.h>
%End

public:
//! Constructor
QgsRectangle( double xmin = 0, double ymin = 0, double xmax = 0, double ymax = 0 );
@@ -59,8 +59,6 @@ class QgsRectangle
//! Scale the rectangle around its center point
void scale( double, const QgsPoint *c = 0 );
//! Expand the rectangle to support zoom out scaling
// @deprecated in 1.9 use scale instead
void expand( double, const QgsPoint *c = 0 ) /Deprecated/;
//! return the intersection with the given rectangle
QgsRectangle intersect( const QgsRectangle *rect ) const;
//! returns true when rectangle intersects with other rectangle
@@ -78,12 +78,6 @@ class QgsVectorDataProvider : QgsDataProvider
bool fetchGeometry = true,
bool useIntersect = false ) = 0;

/**
* This function does nothing useful, it's kept only for compatibility.
* @todo to be removed
*/
virtual long updateFeatureCount() /Deprecated/;

/**
* Gets the feature at the given feature ID.
* @param featureId id of the feature
@@ -198,14 +192,6 @@ class QgsVectorDataProvider : QgsDataProvider
*/
virtual bool addAttributes( const QList<QgsField> &attributes );

/**
* Add new attributes
* @param attributes map of attributes name as key and type as value
* @return true in case of success and false in case of failure
* @deprecated
*/
virtual bool addAttributes( const QMap<QString, QString> &attributes ) /Deprecated/;

/**
* Deletes existing attributes
* @param attributes a set containing indices of attributes
@@ -227,7 +213,7 @@ class QgsVectorDataProvider : QgsDataProvider

/**
* Changes geometries of existing features
* @param geometry_map A std::map containing the feature IDs to change the geometries of.
* @param geometry_map A std::map containing the feature IDs to change the geometries of.
* the second map parameter being the new geometries themselves
* @return true in case of success and false in case of failure
*/
@@ -291,7 +277,7 @@ class QgsVectorDataProvider : QgsDataProvider

struct NativeType
{
NativeType( QString typeDesc, QString typeName, QVariant::Type type, int minLen = 0, int maxLen = 0, int minPrec = 0, int maxPrec = 0 );
NativeType( QString typeDesc, QString typeName, QVariant::Type type, int minLen = 0, int maxLen = 0, int minPrec = 0, int maxPrec = 0 );
};

/**
@@ -300,12 +286,6 @@ class QgsVectorDataProvider : QgsDataProvider
*/
const QList< QgsVectorDataProvider::NativeType > &nativeTypes() const;

/**
* Returns the names of the supported types
* @deprecated use nativeTypes()
*/
const QMap<QString,QVariant::Type> &supportedNativeTypes() const /Deprecated/;

/** Returns true if the provider is strict about the type of inserted features
(e.g. no multipolygon in a polygon layer)
@note: added in version 1.4*/

0 comments on commit 5e45a22

Please sign in to comment.
You can’t perform that action at this time.