QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
QgsExpression::Interval Class Reference

#include <qgsexpression.h>

Public Member Functions

 Interval (double seconds=0)
 ~Interval ()
double years ()
double months ()
double weeks ()
double days ()
double hours ()
double minutes ()
double seconds ()
bool isValid ()
void setValid (bool valid)
bool operator== (const QgsExpression::Interval &other) const

Static Public Member Functions

static QgsExpression::Interval invalidInterVal ()
static QgsExpression::Interval fromString (QString string)

Private Attributes

double mSeconds
bool mValid

Static Private Attributes

static const int YEARS = 31557600
static const int MONTHS = 60 * 60 * 24 * 30
static const int WEEKS = 60 * 60 * 24 * 7
static const int DAY = 60 * 60 * 24
static const int HOUR = 60 * 60
static const int MINUTE = 60

Detailed Description

Definition at line 384 of file qgsexpression.h.

Constructor & Destructor Documentation

QgsExpression::Interval::Interval ( double  seconds = 0)
inline

Definition at line 395 of file qgsexpression.h.

QgsExpression::Interval::~Interval ( )

Definition at line 42 of file qgsexpression.cpp.

Member Function Documentation

double QgsExpression::Interval::days ( )
inline

Definition at line 400 of file qgsexpression.h.

Referenced by fcnDay().

QgsExpression::Interval QgsExpression::Interval::fromString ( QString  string)
static

Definition at line 51 of file qgsexpression.cpp.

References invalidInterVal(), and tr.

Referenced by getInterval(), and isIntervalSafe().

double QgsExpression::Interval::hours ( )
inline

Definition at line 401 of file qgsexpression.h.

Referenced by fcnHour().

QgsExpression::Interval QgsExpression::Interval::invalidInterVal ( )
static

Definition at line 44 of file qgsexpression.cpp.

References setValid().

Referenced by fromString(), and getInterval().

bool QgsExpression::Interval::isValid ( )
inline

Definition at line 404 of file qgsexpression.h.

Referenced by fcnDay(), fcnHour(), fcnMinute(), fcnMonth(), fcnSeconds(), fcnWeek(), and fcnYear().

double QgsExpression::Interval::minutes ( )
inline

Definition at line 402 of file qgsexpression.h.

Referenced by fcnMinute().

double QgsExpression::Interval::months ( )
inline

Definition at line 398 of file qgsexpression.h.

Referenced by fcnMonth().

bool QgsExpression::Interval::operator== ( const QgsExpression::Interval other) const

Definition at line 110 of file qgsexpression.cpp.

References mSeconds.

double QgsExpression::Interval::seconds ( )
inline
void QgsExpression::Interval::setValid ( bool  valid)
inline

Definition at line 405 of file qgsexpression.h.

Referenced by invalidInterVal().

double QgsExpression::Interval::weeks ( )
inline

Definition at line 399 of file qgsexpression.h.

Referenced by fcnWeek().

double QgsExpression::Interval::years ( )
inline

Definition at line 397 of file qgsexpression.h.

Referenced by fcnYear().

Member Data Documentation

const int QgsExpression::Interval::DAY = 60 * 60 * 24
staticprivate

Definition at line 391 of file qgsexpression.h.

const int QgsExpression::Interval::HOUR = 60 * 60
staticprivate

Definition at line 392 of file qgsexpression.h.

const int QgsExpression::Interval::MINUTE = 60
staticprivate

Definition at line 393 of file qgsexpression.h.

const int QgsExpression::Interval::MONTHS = 60 * 60 * 24 * 30
staticprivate

Definition at line 389 of file qgsexpression.h.

double QgsExpression::Interval::mSeconds
private

Definition at line 410 of file qgsexpression.h.

Referenced by operator==().

bool QgsExpression::Interval::mValid
private

Definition at line 411 of file qgsexpression.h.

const int QgsExpression::Interval::WEEKS = 60 * 60 * 24 * 7
staticprivate

Definition at line 390 of file qgsexpression.h.

const int QgsExpression::Interval::YEARS = 31557600
staticprivate

Definition at line 388 of file qgsexpression.h.


The documentation for this class was generated from the following files: