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

This commit is contained in:
Martin Dobias 2015-06-18 12:47:45 +08:00
parent 646b445bf7
commit 40acaa051a
2 changed files with 5 additions and 23 deletions

View File

@ -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 );

View File

@ -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;