QGIS API Documentation  2.2.0-Valmiera
 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 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 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 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 915 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 202 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 119 of file qgsexpression.cpp.

Function Documentation

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

Definition at line 352 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 378 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 801 of file qgsexpression.cpp.

References getDateTimeValue().

Referenced by QgsExpression::Functions().

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

Definition at line 373 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 383 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 388 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

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

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

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

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 596 of file qgsexpression.cpp.

Referenced by QgsExpression::Functions().

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

Definition at line 1323 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 1243 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 1283 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 1199 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 1137 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 724 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

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

Definition at line 1054 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 1096 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 363 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 1048 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 1104 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 1030 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 1113 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 394 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 475 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 718 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 566 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 1192 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 1185 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 770 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 977 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 994 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 985 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 1146 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 1119 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 1036 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 747 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 634 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

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

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

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 413 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 406 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 606 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

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

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

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

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

Referenced by QgsExpression::Functions().

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

Definition at line 1060 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 1172 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 661 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 646 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 675 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 639 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

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

Definition at line 740 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 432 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 421 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 1153 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 713 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 754 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 1180 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 358 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

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

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 734 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

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

Definition at line 705 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 1128 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 368 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

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

References getDateValue().

Referenced by QgsExpression::Functions().

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

Definition at line 591 of file qgsexpression.cpp.

References getDateTimeValue().

Referenced by QgsExpression::Functions().

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

Definition at line 578 of file qgsexpression.cpp.

References getIntValue().

Referenced by QgsExpression::Functions().

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

Definition at line 796 of file qgsexpression.cpp.

References getInterval().

Referenced by QgsExpression::Functions().

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

Definition at line 582 of file qgsexpression.cpp.

References getDoubleValue().

Referenced by QgsExpression::Functions().

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

Definition at line 586 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

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

Definition at line 791 of file qgsexpression.cpp.

References getTimeValue().

Referenced by QgsExpression::Functions().

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

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

References getStringValue().

Referenced by QgsExpression::Functions().

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

Definition at line 611 of file qgsexpression.cpp.

References getStringValue().

Referenced by QgsExpression::Functions().

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

Definition at line 700 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 1066 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 920 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 961 of file qgsexpression.cpp.

References pointAt().

Referenced by QgsExpression::Functions().

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

Definition at line 932 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 969 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 270 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 284 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 176 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 945 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 126 of file qgsexpression.cpp.

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

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

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

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