19#ifndef QGSRASTERLABELING_H
20#define QGSRASTERLABELING_H
33class QgsRasterLayerRendererFeedback;
79 void setNumericFormat( std::unique_ptr< QgsNumericFormat > format );
93 int band()
const {
return mBandNumber; }
100 void setBand(
int band ) { mBandNumber = band; }
140 void setResampleOver(
int pixels );
145 std::unique_ptr< QgsNumericFormat > mNumericFormat;
152 int mResampleOver = 1;
154 QList<QgsLabelFeature *> mLabels;
174 if ( sipCpp->type() ==
"simple" )
175 sipType = sipType_QgsRasterLayerSimpleLabeling;
196 virtual QString
type()
const = 0;
228 virtual void multiplyOpacity(
double opacityFactor );
235 virtual bool isInScaleRange(
double scale )
const;
247 virtual void toSld( QDomNode &parent,
const QVariantMap &props )
const;
280 QString type()
const override;
285 bool requiresAdvancedEffects() const override;
286 void multiplyOpacity(
double opacityFactor ) override;
326 int band()
const {
return mBandNumber; }
333 void setBand(
int band ) { mBandNumber = band; }
400 double zIndex()
const;
409 void setZIndex(
double index );
423 double maximumScale()
const;
437 void setMaximumScale(
double scale );
451 double minimumScale()
const;
465 void setMinimumScale(
double scale );
473 void setScaleBasedVisibility(
bool enabled );
482 bool hasScaleBasedVisibility()
const;
484 bool isInScaleRange(
double scale )
const override;
511 int resampleOver()
const;
520 void setResampleOver(
int pixels );
527 std::unique_ptr< QgsNumericFormat > mNumericFormat;
530 double mPriority = 0.5;
537 bool mScaleVisibility =
false;
538 double mMaximumScale = 0;
539 double mMinimumScale = 0;
542 int mResampleOver = 1;
RasterResamplingMethod
Resampling method for raster provider-level resampling.
@ Average
Average resampling.
The QgsAbstractLabelProvider class is an interface class.
virtual QList< QgsLabelFeature * > labelFeatures(QgsRenderContext &context)=0
Returns list of label features (they are owned by the provider and thus deleted on its destruction)
virtual void drawLabel(QgsRenderContext &context, pal::LabelPosition *label) const =0
Draw this label at the position determined by the labeling engine.
double priority() const
Default priority of labels (may be overridden by individual labels).
double mPriority
Default priority of labels. 0 = highest priority, 1 = lowest priority.
virtual void startRender(QgsRenderContext &context)
To be called before rendering of labels begins.
Abstract base class for labeling settings for raster layers.
virtual std::unique_ptr< QgsRasterLayerLabelProvider > provider(QgsRasterLayer *layer) const =0
Creates a raster label provider corresponding to this object's configuration.
virtual QString type() const =0
Unique type string of the labeling configuration implementation.
QgsAbstractRasterLayerLabeling & operator=(const QgsAbstractRasterLayerLabeling &rhs)=delete
QgsAbstractRasterLayerLabeling cannot be copied, use clone() instead.
virtual QgsAbstractRasterLayerLabeling * clone() const =0
Returns a new copy of the object.
virtual ~QgsAbstractRasterLayerLabeling()=default
virtual QDomElement save(QDomDocument &doc, const QgsReadWriteContext &context) const =0
Saves the labeling configuration to an XML element.
virtual bool requiresAdvancedEffects() const =0
Returns true if drawing labels requires advanced effects like composition modes, which could prevent ...
QgsAbstractRasterLayerLabeling()=default
QgsAbstractRasterLayerLabeling(const QgsAbstractRasterLayerLabeling &rhs)=delete
QgsAbstractRasterLayerLabeling cannot be copied, use clone() instead.
Contains general settings related to how labels are placed.
Contains settings related to how the label engine removes candidate label positions and reduces the n...
Point geometry type, with support for z-dimension and m-values.
Implements labeling support for raster layers.
void setZIndex(double index)
Sets the Z-Index of the labels.
void setBand(int band)
Sest the raster band to use for label values.
void setPlacementSettings(const QgsLabelPlacementSettings &settings)
Sets the label placement settings.
void setPriority(double priority)
Sets the priority of labels.
int band() const
Returns the raster band to use for label values.
void setThinningSettings(const QgsLabelThinningSettings &settings)
Sets the label thinning settings.
Basic implementation of the labeling interface for raster layers.
void setThinningSettings(const QgsLabelThinningSettings &settings)
Sets the label thinning settings.
double priority() const
Returns the priority of labels.
~QgsRasterLayerSimpleLabeling() override
QgsLabelPlacementSettings & placementSettings()
Returns the label placement settings.
const QgsLabelPlacementSettings & placementSettings() const
Returns the label placement settings.
void setPriority(double priority)
Sets the priority of labels.
QgsLabelThinningSettings & thinningSettings()
Returns the label thinning settings.
void setPlacementSettings(const QgsLabelPlacementSettings &settings)
Sets the label placement settings.
void setBand(int band)
Sest the raster band to use for label values.
const QgsLabelThinningSettings & thinningSettings() const
Returns the label thinning settings.
Represents a raster layer.
Contains a pipeline of raster interfaces for sequential raster processing.
The class is used as a container of context for various read/write operations on other objects.
Contains information about the context of a rendering operation.
An interface for classes which can visit style entity (e.g.
Container for all settings relating to text rendering.
LabelPosition is a candidate feature label position.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
This class provides details of the viewable area that a raster will be rendered into.