Skip to content

Commit

Permalink
mark some methods as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
brushtyler committed Sep 15, 2011
1 parent 5f9956e commit c942ee4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
17 changes: 13 additions & 4 deletions python/core/qgsrasterlayer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,10 @@ public:
/** \brief Accessor for transparent band name mapping */
QString transparentBandName() const;

/** \brief [ data provider interface ] Does this layer use a provider for setting/retrieving data? */
bool usesProvider();
/** \brief [ data provider interface ] Does this layer use a provider for setting/retrieving data?
* @deprecated in 2.0
*/
bool usesProvider() /Deprecated/;

/** \brief Accessor that returns the width of the (unclipped) raster */
int width();
Expand Down Expand Up @@ -375,8 +377,15 @@ public:
/** \brief Get an 100x100 pixmap of the color palette. If the layer has no palette a white pixmap will be returned */
QPixmap paletteAsPixmap( int theBand = 1 );

/** \brief [ data provider interface ] Which provider is being used for this Raster Layer? */
QString providerKey() const;
/** \brief [ data provider interface ] Which provider is being used for this Raster Layer?
* @note added in 2.0
*/
QString providerType() const;

/** \brief [ data provider interface ] Which provider is being used for this Raster Layer?
* @deprecated in 2.0
*/
QString providerKey() const /Deprecated/;

/** \brief Returns the number of raster units per each raster pixel. In a world file, this is normally the first row (without the sign) */
double rasterUnitsPerPixel();
Expand Down
2 changes: 1 addition & 1 deletion src/core/raster/qgsrasterlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1994,7 +1994,7 @@ void QgsRasterLayer::populateHistogram( int theBandNo, int theBinCount, bool the
mDataProvider->populateHistogram( theBandNo, myRasterBandStats, theBinCount, theIgnoreOutOfRangeFlag, theHistogramEstimatedFlag );
}

QString QgsRasterLayer::providerKey() const
QString QgsRasterLayer::providerType() const
{
if ( mProviderKey.isEmpty() )
{
Expand Down
17 changes: 13 additions & 4 deletions src/core/raster/qgsrasterlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,10 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
/** \brief Accessor for transparent band name mapping */
QString transparentBandName() const { return mTransparencyBandName; }

/** \brief [ data provider interface ] Does this layer use a provider for setting/retrieving data? */
bool usesProvider();
/** \brief [ data provider interface ] Does this layer use a provider for setting/retrieving data?
* @deprecated in 2.0
*/
Q_DECL_DEPRECATED bool usesProvider();

/** \brief Accessor that returns the width of the (unclipped) raster */
int width() { return mWidth; }
Expand Down Expand Up @@ -546,8 +548,15 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
/** \brief Get an 100x100 pixmap of the color palette. If the layer has no palette a white pixmap will be returned */
QPixmap paletteAsPixmap( int theBandNumber = 1 );

/** \brief [ data provider interface ] Which provider is being used for this Raster Layer? */
QString providerKey() const;
/** \brief [ data provider interface ] Which provider is being used for this Raster Layer?
* @note added in 2.0
*/
QString providerType() const;

/** \brief [ data provider interface ] Which provider is being used for this Raster Layer?
* @deprecated use providerType()
*/
Q_DECL_DEPRECATED QString providerKey() const { return providerType(); }

/** \brief Returns the number of raster units per each raster pixel. In a world file, this is normally the first row (without the sign) */
double rasterUnitsPerPixel();
Expand Down

0 comments on commit c942ee4

Please sign in to comment.