mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
- Add QgsDataDefined class - Add QgsDataDefinedButton class - Add data defined Python support - Add standalone SVG selector dialog to QgsSvgSelectorWidget class - Fix for #4607, show only pertinent fields when setting a data defined value - Fix for #5048 and #5049, data defined settings are literally used - Fix for #5726, number formatting does not work for expressions - Fix for #7755, using bufferSize to enable/disable label buffer is confusing - Fix for #7779, labels do not register in label collision engine; and for #4719, inactive options in labeling dialog - Prepare label text's expression upfront when preparing layer; makes rendering much faster - Change name of 'feature obstacles' to appropriate terminology
54 lines
1.4 KiB
Plaintext
54 lines
1.4 KiB
Plaintext
/** \ingroup core
|
|
* \class QgsDataDefined
|
|
* A container class for data source field mapping or expression.
|
|
* @note added in QGIS 1.9
|
|
*/
|
|
|
|
class QgsDataDefined
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgsdatadefined.h>
|
|
%End
|
|
public:
|
|
/**
|
|
* Construct a new data defined object
|
|
*
|
|
* @param parent The parent QWidget
|
|
* @param active Whether the current data defined is active
|
|
* @param useexpr Whether to use expression instead of field
|
|
* @param expr Expression string
|
|
* @param field Field name string
|
|
*/
|
|
QgsDataDefined( bool active = false,
|
|
bool useexpr = false,
|
|
const QString& expr = QString(),
|
|
const QString& field = QString() );
|
|
|
|
~QgsDataDefined();
|
|
|
|
bool isActive() const;
|
|
void setActive( bool active );
|
|
|
|
bool useExpression() const;
|
|
void setUseExpression( bool use );
|
|
|
|
QString expressionString() const;
|
|
void setExpressionString( const QString& expr );
|
|
|
|
//QMap<QString, QVariant> expressionParams() const;
|
|
//void setExpressionParams( QMap<QString, QVariant> params );
|
|
void insertExpressionParam( QString key, QVariant param );
|
|
|
|
bool prepareExpression( QgsVectorLayer* layer );
|
|
bool expressionIsPrepared() const;
|
|
|
|
QgsExpression* expression();
|
|
QStringList referencedColumns( QgsVectorLayer* layer );
|
|
|
|
QString field() const;
|
|
void setField( const QString& field );
|
|
|
|
//QMap< QString, QString > toMap();
|
|
|
|
};
|