QGIS API Documentation  2.0.1-Dufour
 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 <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 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 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 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 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 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 909 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 351 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 377 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 795 of file qgsexpression.cpp.

References getDateTimeValue().

Referenced by QgsExpression::Functions().

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

Definition at line 372 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 382 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 387 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 1018 of file qgsexpression.cpp.

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

Referenced by QgsExpression::Functions().

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 571 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 1082 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 544 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 595 of file qgsexpression.cpp.

Referenced by QgsExpression::Functions().

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

Definition at line 1317 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 1237 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 1277 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 1193 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 1131 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 718 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

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

Definition at line 1048 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 1090 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 362 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 1042 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 1098 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 1024 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 1107 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 393 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 474 of file qgsexpression.cpp.

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

Referenced by QgsExpression::Functions().

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

Definition at line 712 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 565 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 1186 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 1179 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 764 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 971 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 988 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 979 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 1140 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 1113 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 1030 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 741 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 633 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

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

Definition at line 442 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 398 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 412 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 405 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 605 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

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

Definition at line 756 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 508 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 526 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 775 of file qgsexpression.cpp.

Referenced by QgsExpression::Functions().

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

Definition at line 1054 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 1166 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 660 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 645 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 674 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 638 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

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

Definition at line 734 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 431 of file qgsexpression.cpp.

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

Referenced by QgsExpression::Functions().

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

Definition at line 420 of file qgsexpression.cpp.

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

Referenced by QgsExpression::Functions().

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

Definition at line 1147 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 707 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 748 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 1174 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 357 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 1361 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 345 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 728 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

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

Definition at line 699 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 1122 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 367 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 615 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 780 of file qgsexpression.cpp.

References getDateValue().

Referenced by QgsExpression::Functions().

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

Definition at line 590 of file qgsexpression.cpp.

References getDateTimeValue().

Referenced by QgsExpression::Functions().

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

Definition at line 577 of file qgsexpression.cpp.

References getIntValue().

Referenced by QgsExpression::Functions().

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

Definition at line 790 of file qgsexpression.cpp.

References getInterval().

Referenced by QgsExpression::Functions().

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

Definition at line 581 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 585 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

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

Definition at line 785 of file qgsexpression.cpp.

References getTimeValue().

Referenced by QgsExpression::Functions().

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

Definition at line 1036 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 627 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

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

Definition at line 610 of file qgsexpression.cpp.

References getStringValue().

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 1060 of file qgsexpression.cpp.

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

Referenced by QgsExpression::Functions().

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

Definition at line 914 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 955 of file qgsexpression.cpp.

References pointAt().

Referenced by QgsExpression::Functions().

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

Definition at line 926 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 963 of file qgsexpression.cpp.

References pointAt().

Referenced by QgsExpression::Functions().

static QVariant fcnYear ( 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 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 939 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:
{
{ False, True, Unknown },
{ True, True, True },
}

Definition at line 133 of file qgsexpression.cpp.

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