21 #ifndef QGSRASTERLAYER_H 22 #define QGSRASTERLAYER_H 178 const QString &baseName = QString::null,
179 bool loadDefaultStyleFlag =
true );
190 bool loadDefaultStyleFlag =
true );
219 static bool isValidRasterFileName(
const QString & theFileNameQString,
QString &retError );
220 static bool isValidRasterFileName(
const QString & theFileNameQString );
226 void setDataProvider(
const QString & provider );
251 int bandCount()
const;
254 const QString bandName(
int theBandNoInt );
265 virtual void reload()
override;
283 virtual bool isSpatial()
const override {
return true; }
289 QPixmap paletteAsPixmap(
int theBandNumber = 1 );
295 double rasterUnitsPerPixelX();
296 double rasterUnitsPerPixelY();
309 int theSampleSize = SAMPLE_SIZE,
310 bool theGenerateLookupTableFlag =
true );
313 void setDefaultContrastEnhancement();
318 Q_DECL_DEPRECATED
void setDrawingStyle(
const QString & theDrawingStyleQString );
321 void showProgress(
int theValue );
328 Q_DECL_DEPRECATED
QPixmap previewAsPixmap(
QSize size,
const QColor& bgColor = Qt::white );
333 QImage::Format format = QImage::Format_ARGB32_Premultiplied );
352 void showStatusMessage(
const QString & theMessage );
355 Q_DECL_DEPRECATED
void updateProgress(
int,
int );
358 void onProgress(
int,
double,
const QString& );
362 void progressUpdate(
int theValue );
388 void closeDataProvider();
398 const QString TRSTRING_NOT_SET;
virtual QStringList subLayers() const
Returns the sublayers of this layer (Useful for providers that manage their own layers, such as WMS)
A rectangle specified with double values.
Base class for all map layer types.
Base class for processing modules.
virtual QString metadata()
Obtain Metadata for this layer.
QgsHueSaturationFilter * hueSaturationFilter() const
DrawingStyle
This enumerator describes the different kinds of drawing we can do.
This class provides qgis with the ability to render raster datasets onto the mapcanvas.
QgsRasterPipe * pipe()
Get raster pipe.
virtual bool readSymbology(const QDomNode &node, QString &errorMessage)=0
Read the symbology for the current layer from the Dom node supplied.
virtual void reload()
Synchronises with changes in the datasource.
virtual bool isSpatial() const override
Returns true if the layer is considered a spatial layer, ie it has some form of geometry associated w...
Resample filter pipe for rasters.
QgsRasterRenderer * renderer() const
static const double SAMPLE_SIZE
Default sample size (number of pixels) for estimated statistics/histogram calculation.
virtual QgsMapLayerRenderer * createMapRenderer(QgsRenderContext &rendererContext)
Return new instance of QgsMapLayerRenderer that will be used for rendering of given context...
virtual bool writeSymbology(QDomNode &node, QDomDocument &doc, QString &errorMessage) const =0
Write the symbology for the layer into the docment provided.
QgsBrightnessContrastFilter * brightnessFilter() const
virtual bool draw(QgsRenderContext &rendererContext)
This is the method that does the actual work of drawing the layer onto a paint device.
ColorShadingAlgorithm
This enumerator describes the types of shading that can be used.
Perform transforms between map coordinates and device coordinates.
virtual bool writeXml(QDomNode &layer_node, QDomDocument &document)
Called by writeLayerXML(), used by children to write state specific to them to project files...
static const double CUMULATIVE_CUT_UPPER
Default cumulative cut upper limit.
ContrastEnhancementLimits
Contrast enhancement limits.
LayerType rasterType()
Accessor for raster layer type (which is a read only property)
virtual bool readStyle(const QDomNode &node, QString &errorMessage)
Read the style for the current layer from the Dom node supplied.
virtual bool writeStyle(QDomNode &node, QDomDocument &doc, QString &errorMessage) const
Write just the style information for the layer into the document.
virtual void setSubLayerVisibility(const QString &name, bool vis)
Set the visibility of the given sublayer name.
QList< QPair< QString, QColor > > QgsLegendColorList
ContrastEnhancementAlgorithm
This enumerator describes the types of contrast enhancement algorithms that can be used...
Contains information about the context of a rendering operation.
virtual QDateTime timestamp() const override
Time stamp of data source in the moment when data/metadata were loaded by provider.
QgsRasterResampleFilter * resampleFilter() const
Set raster resample filter.
virtual bool readXml(const QDomNode &layer_node)
Called by readLayerXML(), used by children to read state specific to them from project files...
Brightness/contrast filter pipe for rasters.
Color and saturation filter pipe for rasters.
static const double CUMULATIVE_CUT_LOWER
Default cumulative cut lower limit.
Base class for utility classes that encapsulate information necessary for rendering of map layers...
This class provides details of the viewable area that a raster will be rendered into.
LayerType
This enumerator describes the type of raster layer.
virtual void setLayerOrder(const QStringList &layers)
Reorders the previously selected sublayers of this layer from bottom to top (Useful for providers tha...
Raster renderer pipe that applies colors to a raster.
Base class for raster data providers.