QGIS API Documentation  2.0.1-Dufour
 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 ()
bool isValid ()
void setValid (bool valid)
double seconds ()
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 371 of file qgsexpression.h.

Constructor & Destructor Documentation

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

Definition at line 382 of file qgsexpression.h.

QgsExpression::Interval::~Interval ( )

Definition at line 41 of file qgsexpression.cpp.

Member Function Documentation

double QgsExpression::Interval::days ( )
inline

Definition at line 387 of file qgsexpression.h.

Referenced by fcnDay().

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

Definition at line 50 of file qgsexpression.cpp.

References DAY, HOUR, invalidInterVal(), MINUTE, MONTHS, tr, WEEKS, and YEARS.

Referenced by getInterval(), and isIntervalSafe().

double QgsExpression::Interval::hours ( )
inline

Definition at line 388 of file qgsexpression.h.

Referenced by fcnHour().

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

Definition at line 43 of file qgsexpression.cpp.

References setValid().

Referenced by fromString(), and getInterval().

bool QgsExpression::Interval::isValid ( )
inline

Definition at line 390 of file qgsexpression.h.

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

double QgsExpression::Interval::minutes ( )
inline

Definition at line 389 of file qgsexpression.h.

Referenced by fcnMinute().

double QgsExpression::Interval::months ( )
inline

Definition at line 385 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 391 of file qgsexpression.h.

Referenced by invalidInterVal().

double QgsExpression::Interval::weeks ( )
inline

Definition at line 386 of file qgsexpression.h.

Referenced by fcnWeek().

double QgsExpression::Interval::years ( )
inline

Definition at line 384 of file qgsexpression.h.

Referenced by fcnYear().

Member Data Documentation

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

Definition at line 378 of file qgsexpression.h.

Referenced by fromString().

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

Definition at line 379 of file qgsexpression.h.

Referenced by fromString().

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

Definition at line 380 of file qgsexpression.h.

Referenced by fromString().

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

Definition at line 376 of file qgsexpression.h.

Referenced by fromString().

double QgsExpression::Interval::mSeconds
private

Definition at line 397 of file qgsexpression.h.

Referenced by operator==().

bool QgsExpression::Interval::mValid
private

Definition at line 398 of file qgsexpression.h.

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

Definition at line 377 of file qgsexpression.h.

Referenced by fromString().

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

Definition at line 375 of file qgsexpression.h.

Referenced by fromString().


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