Skip to content

Commit c942ee4

Browse files
committed
mark some methods as deprecated
1 parent 5f9956e commit c942ee4

File tree

3 files changed

+27
-9
lines changed

3 files changed

+27
-9
lines changed

python/core/qgsrasterlayer.sip

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,10 @@ public:
228228
/** \brief Accessor for transparent band name mapping */
229229
QString transparentBandName() const;
230230

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

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

378-
/** \brief [ data provider interface ] Which provider is being used for this Raster Layer? */
379-
QString providerKey() const;
380+
/** \brief [ data provider interface ] Which provider is being used for this Raster Layer?
381+
* @note added in 2.0
382+
*/
383+
QString providerType() const;
384+
385+
/** \brief [ data provider interface ] Which provider is being used for this Raster Layer?
386+
* @deprecated in 2.0
387+
*/
388+
QString providerKey() const /Deprecated/;
380389

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

src/core/raster/qgsrasterlayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1994,7 +1994,7 @@ void QgsRasterLayer::populateHistogram( int theBandNo, int theBinCount, bool the
19941994
mDataProvider->populateHistogram( theBandNo, myRasterBandStats, theBinCount, theIgnoreOutOfRangeFlag, theHistogramEstimatedFlag );
19951995
}
19961996

1997-
QString QgsRasterLayer::providerKey() const
1997+
QString QgsRasterLayer::providerType() const
19981998
{
19991999
if ( mProviderKey.isEmpty() )
20002000
{

src/core/raster/qgsrasterlayer.h

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,10 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
397397
/** \brief Accessor for transparent band name mapping */
398398
QString transparentBandName() const { return mTransparencyBandName; }
399399

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

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

549-
/** \brief [ data provider interface ] Which provider is being used for this Raster Layer? */
550-
QString providerKey() const;
551+
/** \brief [ data provider interface ] Which provider is being used for this Raster Layer?
552+
* @note added in 2.0
553+
*/
554+
QString providerType() const;
555+
556+
/** \brief [ data provider interface ] Which provider is being used for this Raster Layer?
557+
* @deprecated use providerType()
558+
*/
559+
Q_DECL_DEPRECATED QString providerKey() const { return providerType(); }
551560

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

0 commit comments

Comments
 (0)