QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
15 #ifndef QGSPROPERTYTRANSFORMER_H
16 #define QGSPROPERTYTRANSFORMER_H
18 #include "qgis_core.h"
25 #include <QStringList>
26 #include <QDomElement>
27 #include <QDomDocument>
93 void setControlPoints(
const QList< QgsPointXY > &points );
100 void addControlPoint(
double x,
double y );
107 void removeControlPoint(
double x,
double y );
112 double y(
double x )
const;
119 QVector< double > y(
const QVector< double > &x )
const;
127 bool readXml(
const QDomElement &elem,
const QDomDocument &doc );
135 bool writeXml( QDomElement &transformElem, QDomDocument &doc )
const;
143 QVariant toVariant()
const;
151 bool loadVariant(
const QVariant &transformer );
155 void calcSecondDerivativeArray();
157 QList< QgsPointXY > mControlPoints;
159 double *mSecondDerivativeArray =
nullptr;
176 sipType = sipType_QgsGenericNumericTransformer;
178 sipType = sipType_QgsSizeScaleTransformer;
180 sipType = sipType_QgsColorRampTransformer;
182 sipType = sipType_QgsPropertyTransformer;
233 virtual bool loadVariant(
const QVariant &transformer );
241 virtual QVariant toVariant()
const;
300 virtual QString
toExpression(
const QString &baseExpression )
const = 0;
323 double transformNumeric(
double input )
const;
357 double maxValue = 1.0,
358 double minOutput = 0.0,
359 double maxOutput = 1.0,
360 double nullOutput = 0.0,
361 double exponent = 1.0 );
365 QVariant toVariant() const override;
366 bool loadVariant( const QVariant &definition ) override;
367 QVariant transform( const
QgsExpressionContext &context, const QVariant &value ) const override;
368 QString toExpression( const QString &baseExpression ) const override;
388 double value(
double input ) const;
395 double minOutputValue()
const {
return mMinOutput; }
485 double minValue = 0.0,
486 double maxValue = 1.0,
487 double minSize = 0.0,
488 double maxSize = 1.0,
489 double nullSize = 0.0,
490 double exponent = 1.0 );
494 QVariant toVariant() const override;
495 bool loadVariant( const QVariant &definition ) override;
496 QVariant transform( const
QgsExpressionContext &context, const QVariant &value ) const override;
497 QString toExpression( const QString &baseExpression ) const override;
518 double size(
double value ) const;
525 double minSize()
const {
return mMinSize; }
589 void setType( ScaleType type );
592 ScaleType mType = Linear;
620 double maxValue = 1.0,
622 const QColor &nullColor = QColor( 0, 0, 0, 0 ) );
631 QVariant toVariant() const override;
632 bool loadVariant( const QVariant &definition ) override;
633 QVariant transform( const
QgsExpressionContext &context, const QVariant &value ) const override;
634 QString toExpression( const QString &baseExpression ) const override;
641 QColor color(
double value ) const;
661 QColor nullColor()
const {
return mNullColor; }
686 std::unique_ptr< QgsColorRamp > mGradientRamp;
692 #endif // QGSPROPERTYTRANSFORMER_H
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Abstract base class for color ramps.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)