QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
Classes | Functions
qgsinterval.h File Reference
#include <QVariant>
#include <chrono>
#include "qgis_sip.h"
#include "qgis_core.h"
#include "qgis.h"
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.
 
QgsInterval CORE_EXPORT operator- (QDate date1, QDate date2)
 Returns the interval between two dates.
 
QgsInterval CORE_EXPORT operator- (QTime time1, QTime time2)
 Returns the interval between two times.
 
QDebug CORE_EXPORT operator<< (QDebug dbg, const QgsInterval &interval)
 Debug string representation of interval.
 

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
not available in Python bindings

Definition at line 318 of file qgsinterval.cpp.

◆ operator-() [1/2]

QgsInterval CORE_EXPORT operator- ( QDate  date1,
QDate  date2 
)

Returns the interval between two dates.

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

Definition at line 323 of file qgsinterval.cpp.

◆ operator-() [2/2]

QgsInterval CORE_EXPORT operator- ( QTime  time1,
QTime  time2 
)

Returns the interval between two times.

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

Definition at line 329 of file qgsinterval.cpp.

◆ operator<<()

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

Debug string representation of interval.

Definition at line 299 of file qgsinterval.cpp.