mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Deprecate QgsRasterLayer::setDrawingStyle() (fixes #12635)
This commit is contained in:
parent
646b445bf7
commit
40acaa051a
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user