Skip to content
Permalink
Browse files

Deprecate QgsRasterLayer::setDrawingStyle() (fixes #12635)

  • Loading branch information
wonder-sk committed Jun 18, 2015
1 parent 646b445 commit 40acaa051a7b3d03bcce4a183d9039c27efed81b
Showing with 5 additions and 23 deletions.
  1. +1 −1 python/core/raster/qgsrasterlayer.sip
  2. +4 −22 src/core/raster/qgsrasterlayer.h
@@ -170,7 +170,7 @@ class QgsRasterLayer : QgsMapLayer
void setDefaultContrastEnhancement();

/** \brief Overloaded version of the above function for convenience when restoring from xml */
void setDrawingStyle( const QString & theDrawingStyleQString );
void setDrawingStyle( const QString & theDrawingStyleQString ) /Deprecated/;

/** \brief [ data provider interface ] A wrapper function to emit a progress update signal */
void showProgress( int theValue );
@@ -127,24 +127,6 @@ typedef QList < QPair< QString, QColor > > QgsLegendColorList;
* }
* \endcode
*
* You can combine layer type detection with the setDrawingStyle method to override the default drawing style assigned
* when a layer is loaded:
*
* \code
* if (rasterLayer->rasterType()==QgsRasterLayer::Multiband)
* {
* myRasterLayer->setDrawingStyle(QgsRasterLayer::MultiBandSingleBandPseudoColor);
* }
* else if (rasterLayer->rasterType()==QgsRasterLayer::Palette)
* {
* myRasterLayer->setDrawingStyle(QgsRasterLayer::PalettedSingleBandPseudoColor);
* }
* else // QgsRasterLayer::GrayOrUndefined
* {
* myRasterLayer->setDrawingStyle(QgsRasterLayer::SingleBandPseudoColor);
* }
* \endcode
*
* Raster layers can also have an arbitrary level of transparency defined, and have their
* color palettes inverted using the setTransparency and setInvertHistogram methods.
*
@@ -328,8 +310,10 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
/** \brief Set default contrast enhancement */
void setDefaultContrastEnhancement();

/** \brief Overloaded version of the above function for convenience when restoring from xml */
void setDrawingStyle( const QString & theDrawingStyleQString );
/** \brief Overloaded version of the above function for convenience when restoring from xml
* @note Deprecated since QGIS 2.10. Use setRendererForDrawingStyle() or directly setRenderer()
*/
Q_DECL_DEPRECATED void setDrawingStyle( const QString & theDrawingStyleQString );

/** \brief [ data provider interface ] A wrapper function to emit a progress update signal */
void showProgress( int theValue );
@@ -408,8 +392,6 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
/** Pointer to data provider */
QgsRasterDataProvider* mDataProvider;

//DrawingStyle mDrawingStyle;

/** [ data provider interface ] Timestamp, the last modified time of the data source when the layer was created */
QDateTime mLastModified;

0 comments on commit 40acaa0

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