QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Classes | Functions
qgsinterval.h File Reference
#include <QVariant>
Include dependency graph for qgsinterval.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  QgsInterval
 A representation of the interval between two datetime values. More...
 

Functions

QDateTime CORE_EXPORT operator+ (const QDateTime &start, const QgsInterval &interval)
 Adds an interval to a datetime. More...
 
QgsInterval CORE_EXPORT operator- (const QDateTime &datetime1, const QDateTime &datetime2)
 Returns the interval between two datetimes. More...
 
QgsInterval CORE_EXPORT operator- (const QDate &date1, const QDate &date2)
 Returns the interval between two dates. More...
 
QgsInterval CORE_EXPORT operator- (const QTime &time1, const QTime &time2)
 Returns the interval between two times. More...
 
QDebug operator<< (QDebug dbg, const QgsInterval &interval)
 Debug string representation of interval. More...
 

Function Documentation

◆ operator+()

QDateTime CORE_EXPORT operator+ ( const QDateTime start,
const QgsInterval interval 
)

Adds an interval to a datetime.

Parameters
startinitial datetime
intervalinterval to add
Note
added in QGIS 2.16
not available in Python bindings

Definition at line 128 of file qgsinterval.cpp.

◆ operator-() [1/3]

QgsInterval CORE_EXPORT operator- ( const QDateTime datetime1,
const QDateTime datetime2 
)

Returns the interval between two datetimes.

Parameters
datetime1start datetime
datetime2datetime to subtract, ie subtract datetime2 from datetime1
Note
added in QGIS 2.16
not available in Python bindings

Definition at line 122 of file qgsinterval.cpp.

◆ operator-() [2/3]

QgsInterval CORE_EXPORT operator- ( const QDate date1,
const QDate date2 
)

Returns the interval between two dates.

Parameters
date1start date
date2date to subtract, ie subtract date2 from date1
Note
added in QGIS 2.16
not available in Python bindings

Definition at line 133 of file qgsinterval.cpp.

◆ operator-() [3/3]

QgsInterval CORE_EXPORT operator- ( const QTime time1,
const QTime time2 
)

Returns the interval between two times.

Parameters
time1start time
time2time to subtract, ie subtract time2 from time1
Note
added in QGIS 2.16
not available in Python bindings

Definition at line 139 of file qgsinterval.cpp.

◆ operator<<()

QDebug operator<< ( QDebug  dbg,
const QgsInterval interval 
)

Debug string representation of interval.

Definition at line 113 of file qgsinterval.cpp.