Skip to content

Commit

Permalink
remove deprecated methods from API
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Dec 23, 2012
1 parent d56b1c8 commit 5e45a22
Show file tree
Hide file tree
Showing 66 changed files with 13 additions and 1,185 deletions.
13 changes: 1 addition & 12 deletions python/core/composer/qgscomposeritem.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions python/core/composer/qgscomposermap.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion python/core/composer/qgscomposermultiframe.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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
**/
Expand Down
6 changes: 0 additions & 6 deletions python/core/qgis.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
8 changes: 0 additions & 8 deletions python/core/qgsapplication.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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();

Expand Down
10 changes: 0 additions & 10 deletions python/core/qgsattributeaction.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 0 additions & 23 deletions python/core/qgscoordinatereferencesystem.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions python/core/qgsdistancearea.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down
1 change: 0 additions & 1 deletion python/core/qgsgeometry.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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*/
Expand Down
23 changes: 0 additions & 23 deletions python/core/qgslabel.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 0 additions & 12 deletions python/core/qgsmaplayer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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 );
Expand Down
27 changes: 0 additions & 27 deletions python/core/qgsmaplayerregistry.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
15 changes: 0 additions & 15 deletions python/core/qgsmaprenderer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down Expand Up @@ -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 );

Expand Down
11 changes: 0 additions & 11 deletions python/core/qgsoverlayobject.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 1 addition & 3 deletions python/core/qgsrectangle.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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
Expand Down
24 changes: 2 additions & 22 deletions python/core/qgsvectordataprovider.sip
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
*/
Expand Down Expand Up @@ -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 );
};

/**
Expand All @@ -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*/
Expand Down
Loading

0 comments on commit 5e45a22

Please sign in to comment.