QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Enumerations | Functions | Variables
qgsexpression.cpp File Reference
#include "qgsexpression.h"
#include <QtDebug>
#include <QDomDocument>
#include <QSettings>
#include <QDate>
#include <QRegExp>
#include <QColor>
#include <QUuid>
#include <math.h>
#include <limits>
#include "qgsdistancearea.h"
#include "qgsfeature.h"
#include "qgsgeometry.h"
#include "qgslogger.h"
#include "qgsogcutils.h"
#include "qgsvectorlayer.h"
#include "qgssymbollayerv2utils.h"
#include "qgsvectorcolorrampv2.h"
#include "qgsstylev2.h"
Include dependency graph for qgsexpression.cpp:

Go to the source code of this file.

Macros

#define TVL_True   QVariant(1)
 
#define TVL_False   QVariant(0)
 
#define TVL_Unknown   QVariant()
 
#define ENSURE_NO_EVAL_ERROR   { if (parent->hasEvalError()) return QVariant(); }
 
#define SET_EVAL_ERROR(x)   { parent->setEvalErrorString(x); return QVariant(); }
 
#define ENSURE_GEOM_TYPE(f, g, geomtype)
 

Enumerations

enum  TVL { False, True, Unknown }
 

Functions

QgsExpression::NodeparseExpression (const QString &str, QString &parserErrorMsg)
 
static QVariant tvl2variant (TVL v)
 
bool isIntSafe (const QVariant &v)
 
bool isDoubleSafe (const QVariant &v)
 
bool isDateTimeSafe (const QVariant &v)
 
bool isIntervalSafe (const QVariant &v)
 
bool isNull (const QVariant &v)
 
static QString getStringValue (const QVariant &value, QgsExpression *)
 
static double getDoubleValue (const QVariant &value, QgsExpression *parent)
 
static int getIntValue (const QVariant &value, QgsExpression *parent)
 
static QDateTime getDateTimeValue (const QVariant &value, QgsExpression *parent)
 
static QDate getDateValue (const QVariant &value, QgsExpression *parent)
 
static QTime getTimeValue (const QVariant &value, QgsExpression *parent)
 
static QgsExpression::Interval getInterval (const QVariant &value, QgsExpression *parent, bool report_error=false)
 
static QgsGeometry getGeometry (const QVariant &value, QgsExpression *parent)
 
static QgsFeature getFeature (const QVariant &value, QgsExpression *parent)
 
static TVL getTVLValue (const QVariant &value, QgsExpression *parent)
 
static QVariant fcnSqrt (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnAbs (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnSin (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnCos (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnTan (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnAsin (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnAcos (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnAtan (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnAtan2 (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnExp (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnLn (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnLog10 (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnLog (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnRndF (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnRnd (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnLinearScale (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnExpScale (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnMax (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnMin (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnClamp (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnFloor (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnCeil (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnToInt (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnToReal (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnToString (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnToDateTime (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnCoalesce (const QVariantList &values, const QgsFeature *, QgsExpression *)
 
static QVariant fcnLower (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnUpper (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnTitle (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnTrim (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnWordwrap (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnLength (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnReplace (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnRegexpReplace (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnRegexpMatch (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnRegexpSubstr (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnUuid (const QVariantList &, const QgsFeature *, QgsExpression *)
 
static QVariant fcnSubstr (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnRowNumber (const QVariantList &, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnFeatureId (const QVariantList &, const QgsFeature *f, QgsExpression *)
 
static QVariant fcnFeature (const QVariantList &, const QgsFeature *f, QgsExpression *)
 
static QVariant fcnAttribute (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnConcat (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnStrpos (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnRight (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnLeft (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnRPad (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnLPad (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnFormatString (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnNow (const QVariantList &, const QgsFeature *, QgsExpression *)
 
static QVariant fcnToDate (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnToTime (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnToInterval (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnAge (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnDay (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnYear (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnMonth (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnWeek (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnHour (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnMinute (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnSeconds (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnX (const QVariantList &, const QgsFeature *f, QgsExpression *)
 
static QVariant fcnY (const QVariantList &, const QgsFeature *f, QgsExpression *)
 
static QVariant pointAt (const QVariantList &values, const QgsFeature *f, QgsExpression *parent)
 
static QVariant fcnXat (const QVariantList &values, const QgsFeature *f, QgsExpression *parent)
 
static QVariant fcnYat (const QVariantList &values, const QgsFeature *f, QgsExpression *parent)
 
static QVariant fcnGeometry (const QVariantList &, const QgsFeature *f, QgsExpression *)
 
static QVariant fcnGeomFromWKT (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnGeomFromGML (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnGeomArea (const QVariantList &, const QgsFeature *f, QgsExpression *parent)
 
static QVariant fcnGeomLength (const QVariantList &, const QgsFeature *f, QgsExpression *parent)
 
static QVariant fcnGeomPerimeter (const QVariantList &, const QgsFeature *f, QgsExpression *parent)
 
static QVariant fcnBounds (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnBoundsWidth (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnBoundsHeight (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnXMin (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnXMax (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnYMin (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnYMax (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnBbox (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnDisjoint (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnIntersects (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnTouches (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnCrosses (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnContains (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnOverlaps (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnWithin (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnBuffer (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnCentroid (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnConvexHull (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnDifference (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnDistance (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnIntersection (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnSymDifference (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnCombine (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnGeomToWKT (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnRound (const QVariantList &values, const QgsFeature *f, QgsExpression *parent)
 
static QVariant fcnPi (const QVariantList &values, const QgsFeature *f, QgsExpression *parent)
 
static QVariant fcnScale (const QVariantList &, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnFormatNumber (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnFormatDate (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnColorRgb (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fncColorRgba (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
QVariant fcnRampColor (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnColorHsl (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fncColorHsla (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnColorHsv (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fncColorHsva (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnColorCmyk (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fncColorCmyka (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 
static QVariant fcnSpecialColumn (const QVariantList &values, const QgsFeature *, QgsExpression *parent)
 

Variables

static TVL AND [3][3]
 
static TVL OR [3][3]
 
static TVL NOT [3] = { True, False, Unknown }
 

Macro Definition Documentation

#define ENSURE_GEOM_TYPE (   f,
  g,
  geomtype 
)
Value:
if (!f) return QVariant(); \
QgsGeometry* g = f->geometry(); \
if (!g || g->type() != geomtype) return QVariant();

Definition at line 1000 of file qgsexpression.cpp.

Referenced by fcnGeomArea(), fcnGeomLength(), fcnGeomPerimeter(), fcnX(), fcnY(), and pointAt().

#define ENSURE_NO_EVAL_ERROR   { if (parent->hasEvalError()) return QVariant(); }
#define SET_EVAL_ERROR (   x)    { parent->setEvalErrorString(x); return QVariant(); }

Definition at line 201 of file qgsexpression.cpp.

Referenced by QgsExpression::NodeUnaryOperator::eval().

#define TVL_False   QVariant(0)
#define TVL_True   QVariant(1)
#define TVL_Unknown   QVariant()

Enumeration Type Documentation

enum TVL
Enumerator
False 
True 
Unknown 

Definition at line 118 of file qgsexpression.cpp.

Function Documentation

static QVariant fcnAbs ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 360 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

static QVariant fcnAcos ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 386 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

static QVariant fcnAge ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 886 of file qgsexpression.cpp.

References getDateTimeValue().

Referenced by QgsExpression::Functions().

static QVariant fcnAsin ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 381 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

static QVariant fcnAtan ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 391 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

static QVariant fcnAtan2 ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 396 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

static QVariant fcnAttribute ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 802 of file qgsexpression.cpp.

References QgsFeature::attribute(), getFeature(), and getStringValue().

Referenced by QgsExpression::Functions().

static QVariant fcnBbox ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1159 of file qgsexpression.cpp.

References getGeometry(), QgsGeometry::intersects(), TVL_False, and TVL_True.

Referenced by QgsExpression::Functions().

static QVariant fcnBounds ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static
static QVariant fcnBoundsHeight ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static
static QVariant fcnBoundsWidth ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static
static QVariant fcnBuffer ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static
static QVariant fcnCeil ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 580 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

static QVariant fcnCentroid ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1223 of file qgsexpression.cpp.

References QgsGeometry::centroid(), and getGeometry().

Referenced by QgsExpression::Functions().

static QVariant fcnClamp ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 553 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

static QVariant fcnCoalesce ( const QVariantList &  values,
const QgsFeature ,
QgsExpression  
)
static

Definition at line 604 of file qgsexpression.cpp.

Referenced by QgsExpression::Functions().

static QVariant fcnColorCmyk ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1458 of file qgsexpression.cpp.

References getIntValue(), QgsExpression::setEvalErrorString(), and tr.

Referenced by QgsExpression::Functions().

static QVariant fcnColorHsl ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1378 of file qgsexpression.cpp.

References getIntValue(), QgsExpression::setEvalErrorString(), and tr.

Referenced by QgsExpression::Functions().

static QVariant fcnColorHsv ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1418 of file qgsexpression.cpp.

References getIntValue(), QgsExpression::setEvalErrorString(), and tr.

Referenced by QgsExpression::Functions().

static QVariant fcnColorRgb ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1334 of file qgsexpression.cpp.

References getIntValue(), QgsExpression::setEvalErrorString(), and tr.

Referenced by QgsExpression::Functions().

static QVariant fcnCombine ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1272 of file qgsexpression.cpp.

References QgsGeometry::combine(), and getGeometry().

Referenced by QgsExpression::Functions().

static QVariant fcnConcat ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 809 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

static QVariant fcnContains ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1189 of file qgsexpression.cpp.

References QgsGeometry::contains(), getGeometry(), TVL_False, and TVL_True.

Referenced by QgsExpression::Functions().

static QVariant fcnConvexHull ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1231 of file qgsexpression.cpp.

References QgsGeometry::convexHull(), and getGeometry().

Referenced by QgsExpression::Functions().

static QVariant fcnCos ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 371 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

static QVariant fcnCrosses ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1183 of file qgsexpression.cpp.

References QgsGeometry::crosses(), getGeometry(), TVL_False, and TVL_True.

Referenced by QgsExpression::Functions().

static QVariant fcnDay ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static
static QVariant fcnDifference ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1239 of file qgsexpression.cpp.

References QgsGeometry::difference(), and getGeometry().

Referenced by QgsExpression::Functions().

static QVariant fcnDisjoint ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1165 of file qgsexpression.cpp.

References QgsGeometry::disjoint(), getGeometry(), TVL_False, and TVL_True.

Referenced by QgsExpression::Functions().

static QVariant fcnDistance ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1248 of file qgsexpression.cpp.

References QgsGeometry::distance(), and getGeometry().

Referenced by QgsExpression::Functions().

static QVariant fcnExp ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 402 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

static QVariant fcnExpScale ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 483 of file qgsexpression.cpp.

References getDoubleValue(), QgsExpression::setEvalErrorString(), and tr.

Referenced by QgsExpression::Functions().

static QVariant fcnFeature ( const QVariantList &  ,
const QgsFeature f,
QgsExpression  
)
static

Definition at line 798 of file qgsexpression.cpp.

Referenced by QgsExpression::Functions().

static QVariant fcnFeatureId ( const QVariantList &  ,
const QgsFeature f,
QgsExpression  
)
static

Definition at line 792 of file qgsexpression.cpp.

References QgsFeature::id().

Referenced by QgsExpression::Functions().

static QVariant fcnFloor ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 574 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

static QVariant fcnFormatDate ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1327 of file qgsexpression.cpp.

References getDateTimeValue(), and getStringValue().

Referenced by QgsExpression::Functions().

static QVariant fcnFormatNumber ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1320 of file qgsexpression.cpp.

References getDoubleValue(), and getIntValue().

Referenced by QgsExpression::Functions().

static QVariant fcnFormatString ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 855 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

static QVariant fcnGeomArea ( const QVariantList &  ,
const QgsFeature f,
QgsExpression parent 
)
static
static QVariant fcnGeometry ( const QVariantList &  ,
const QgsFeature f,
QgsExpression  
)
static

Definition at line 1062 of file qgsexpression.cpp.

References QgsFeature::geometry().

Referenced by QgsExpression::Functions().

static QVariant fcnGeomFromGML ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1079 of file qgsexpression.cpp.

References QgsOgcUtils::geometryFromGML(), and getStringValue().

Referenced by QgsExpression::Functions().

static QVariant fcnGeomFromWKT ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1070 of file qgsexpression.cpp.

References QgsGeometry::fromWkt(), and getStringValue().

Referenced by QgsExpression::Functions().

static QVariant fcnGeomLength ( const QVariantList &  ,
const QgsFeature f,
QgsExpression parent 
)
static
static QVariant fcnGeomPerimeter ( const QVariantList &  ,
const QgsFeature f,
QgsExpression parent 
)
static
static QVariant fcnGeomToWKT ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1281 of file qgsexpression.cpp.

References QgsGeometry::exportToWkt(), and getGeometry().

Referenced by QgsExpression::Functions().

static QVariant fcnHour ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static
static QVariant fcnIntersection ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1254 of file qgsexpression.cpp.

References getGeometry(), and QgsGeometry::intersection().

Referenced by QgsExpression::Functions().

static QVariant fcnIntersects ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1171 of file qgsexpression.cpp.

References getGeometry(), QgsGeometry::intersects(), TVL_False, and TVL_True.

Referenced by QgsExpression::Functions().

static QVariant fcnLeft ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 832 of file qgsexpression.cpp.

References getIntValue(), and getStringValue().

Referenced by QgsExpression::Functions().

static QVariant fcnLength ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 708 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

static QVariant fcnLinearScale ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 451 of file qgsexpression.cpp.

References getDoubleValue(), QgsExpression::setEvalErrorString(), and tr.

Referenced by QgsExpression::Functions().

static QVariant fcnLn ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 407 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

static QVariant fcnLog ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 421 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

static QVariant fcnLog10 ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 414 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

static QVariant fcnLower ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 614 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

static QVariant fcnLPad ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 847 of file qgsexpression.cpp.

References fill, getIntValue(), and getStringValue().

Referenced by QgsExpression::Functions().

static QVariant fcnMax ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 517 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

static QVariant fcnMin ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 535 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

static QVariant fcnMinute ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static
static QVariant fcnMonth ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static
static QVariant fcnNow ( const QVariantList &  ,
const QgsFeature ,
QgsExpression  
)
static

Definition at line 866 of file qgsexpression.cpp.

Referenced by QgsExpression::Functions().

static QVariant fcnOverlaps ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1195 of file qgsexpression.cpp.

References getGeometry(), QgsGeometry::overlaps(), TVL_False, and TVL_True.

Referenced by QgsExpression::Functions().

static QVariant fcnPi ( const QVariantList &  values,
const QgsFeature f,
QgsExpression parent 
)
static

Definition at line 1307 of file qgsexpression.cpp.

References M_PI.

Referenced by QgsExpression::Functions().

QVariant fcnRampColor ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static QVariant fcnRegexpMatch ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 735 of file qgsexpression.cpp.

References getStringValue(), QgsExpression::setEvalErrorString(), and tr.

Referenced by QgsExpression::Functions().

static QVariant fcnRegexpReplace ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 720 of file qgsexpression.cpp.

References getStringValue(), QgsExpression::setEvalErrorString(), and tr.

Referenced by QgsExpression::Functions().

static QVariant fcnRegexpSubstr ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 749 of file qgsexpression.cpp.

References getStringValue(), QgsExpression::setEvalErrorString(), and tr.

Referenced by QgsExpression::Functions().

static QVariant fcnReplace ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 713 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

static QVariant fcnRight ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 825 of file qgsexpression.cpp.

References getIntValue(), and getStringValue().

Referenced by QgsExpression::Functions().

static QVariant fcnRnd ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 440 of file qgsexpression.cpp.

References getIntValue(), pal::max(), and pal::min().

Referenced by QgsExpression::Functions().

static QVariant fcnRndF ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 429 of file qgsexpression.cpp.

References getDoubleValue(), pal::max(), and pal::min().

Referenced by QgsExpression::Functions().

static QVariant fcnRound ( const QVariantList &  values,
const QgsFeature f,
QgsExpression parent 
)
static

Definition at line 1288 of file qgsexpression.cpp.

References getDoubleValue(), and getIntValue().

Referenced by QgsExpression::Functions().

static QVariant fcnRowNumber ( const QVariantList &  ,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 787 of file qgsexpression.cpp.

References QgsExpression::currentRowNumber().

Referenced by QgsExpression::Functions().

static QVariant fcnRPad ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 839 of file qgsexpression.cpp.

References fill, getIntValue(), and getStringValue().

Referenced by QgsExpression::Functions().

static QVariant fcnScale ( const QVariantList &  ,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1315 of file qgsexpression.cpp.

References QgsExpression::scale().

Referenced by QgsExpression::Functions().

static QVariant fcnSeconds ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static
static QVariant fcnSin ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 366 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

static QVariant fcnSpecialColumn ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1502 of file qgsexpression.cpp.

References getStringValue(), and QgsExpression::specialColumn().

Referenced by QgsExpression::Functions().

static QVariant fcnSqrt ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 354 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

static QVariant fcnStrpos ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 819 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

static QVariant fcnSubstr ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 779 of file qgsexpression.cpp.

References getIntValue(), and getStringValue().

Referenced by QgsExpression::Functions().

static QVariant fcnSymDifference ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1263 of file qgsexpression.cpp.

References getGeometry(), and QgsGeometry::symDifference().

Referenced by QgsExpression::Functions().

static QVariant fcnTan ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 376 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

static QVariant fcnTitle ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 624 of file qgsexpression.cpp.

References getStringValue(), and size.

Referenced by QgsExpression::Functions().

static QVariant fcnToDate ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 871 of file qgsexpression.cpp.

References getDateValue().

Referenced by QgsExpression::Functions().

static QVariant fcnToDateTime ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 599 of file qgsexpression.cpp.

References getDateTimeValue().

Referenced by QgsExpression::Functions().

static QVariant fcnToInt ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 586 of file qgsexpression.cpp.

References getIntValue().

Referenced by QgsExpression::Functions().

static QVariant fcnToInterval ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 881 of file qgsexpression.cpp.

References getInterval().

Referenced by QgsExpression::Functions().

static QVariant fcnToReal ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 590 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

static QVariant fcnToString ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 594 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

static QVariant fcnToTime ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 876 of file qgsexpression.cpp.

References getTimeValue().

Referenced by QgsExpression::Functions().

static QVariant fcnTouches ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1177 of file qgsexpression.cpp.

References getGeometry(), QgsGeometry::touches(), TVL_False, and TVL_True.

Referenced by QgsExpression::Functions().

static QVariant fcnTrim ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 636 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

static QVariant fcnUpper ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 619 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

static QVariant fcnUuid ( const QVariantList &  ,
const QgsFeature ,
QgsExpression  
)
static

Definition at line 774 of file qgsexpression.cpp.

Referenced by QgsExpression::Functions().

static QVariant fcnWeek ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static
static QVariant fcnWithin ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 1201 of file qgsexpression.cpp.

References getGeometry(), TVL_False, TVL_True, and QgsGeometry::within().

Referenced by QgsExpression::Functions().

static QVariant fcnWordwrap ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static

Definition at line 642 of file qgsexpression.cpp.

References getIntValue(), and getStringValue().

Referenced by QgsExpression::Functions().

static QVariant fcnX ( const QVariantList &  ,
const QgsFeature f,
QgsExpression  
)
static

Definition at line 1005 of file qgsexpression.cpp.

References ENSURE_GEOM_TYPE, and QGis::Point.

Referenced by QgsExpression::Functions().

static QVariant fcnXat ( const QVariantList &  values,
const QgsFeature f,
QgsExpression parent 
)
static

Definition at line 1046 of file qgsexpression.cpp.

References pointAt().

Referenced by QgsExpression::Functions().

static QVariant fcnXMax ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static
static QVariant fcnXMin ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static
static QVariant fcnY ( const QVariantList &  ,
const QgsFeature f,
QgsExpression  
)
static

Definition at line 1017 of file qgsexpression.cpp.

References ENSURE_GEOM_TYPE, and QGis::Point.

Referenced by QgsExpression::Functions().

static QVariant fcnYat ( const QVariantList &  values,
const QgsFeature f,
QgsExpression parent 
)
static

Definition at line 1054 of file qgsexpression.cpp.

References pointAt().

Referenced by QgsExpression::Functions().

static QVariant fcnYear ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static
static QVariant fcnYMax ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static
static QVariant fcnYMin ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static
static QVariant fncColorCmyka ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static
static QVariant fncColorHsla ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static
static QVariant fncColorHsva ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static
static QVariant fncColorRgba ( const QVariantList &  values,
const QgsFeature ,
QgsExpression parent 
)
static
static QDateTime getDateTimeValue ( const QVariant &  value,
QgsExpression parent 
)
static
static QDate getDateValue ( const QVariant &  value,
QgsExpression parent 
)
static

Definition at line 269 of file qgsexpression.cpp.

References QgsExpression::setEvalErrorString(), and tr.

Referenced by fcnToDate().

static double getDoubleValue ( const QVariant &  value,
QgsExpression parent 
)
static
static QgsFeature getFeature ( const QVariant &  value,
QgsExpression parent 
)
static

Definition at line 323 of file qgsexpression.cpp.

References QgsExpression::setEvalErrorString().

Referenced by fcnAttribute().

static QgsGeometry getGeometry ( const QVariant &  value,
QgsExpression parent 
)
static
static QgsExpression::Interval getInterval ( const QVariant &  value,
QgsExpression parent,
bool  report_error = false 
)
static
static int getIntValue ( const QVariant &  value,
QgsExpression parent 
)
static
static QString getStringValue ( const QVariant &  value,
QgsExpression  
)
static
static QTime getTimeValue ( const QVariant &  value,
QgsExpression parent 
)
static

Definition at line 283 of file qgsexpression.cpp.

References QgsExpression::setEvalErrorString(), and tr.

Referenced by fcnToTime().

static TVL getTVLValue ( const QVariant &  value,
QgsExpression parent 
)
static
bool isDateTimeSafe ( const QVariant &  v)
inline

Definition at line 175 of file qgsexpression.cpp.

Referenced by QgsExpression::NodeBinaryOperator::eval().

bool isDoubleSafe ( const QVariant &  v)
inline
bool isIntervalSafe ( const QVariant &  v)
inline
bool isIntSafe ( const QVariant &  v)
inline
bool isNull ( const QVariant &  v)
inline
QgsExpression::Node* parseExpression ( const QString &  str,
QString &  parserErrorMsg 
)
static QVariant pointAt ( const QVariantList &  values,
const QgsFeature f,
QgsExpression parent 
)
static

Definition at line 1030 of file qgsexpression.cpp.

References ENSURE_GEOM_TYPE, getIntValue(), QGis::Line, QgsExpression::setEvalErrorString(), and tr.

Referenced by fcnXat(), and fcnYat().

static QVariant tvl2variant ( TVL  v)
static

Variable Documentation

TVL AND[3][3]
static
Initial value:
=
{
{ False, False, False },
{ False, True, Unknown },
{ False, Unknown, Unknown }
}

Definition at line 125 of file qgsexpression.cpp.

Referenced by QgsExpression::NodeBinaryOperator::eval().

TVL NOT[3] = { True, False, Unknown }
static

Definition at line 140 of file qgsexpression.cpp.

Referenced by QgsExpression::NodeUnaryOperator::eval().

TVL OR[3][3]
static
Initial value:

Definition at line 133 of file qgsexpression.cpp.

Referenced by QgsExpression::NodeBinaryOperator::eval().