#include <kptdatetime.h>
Public Member Functions | |
DateTime () | |
DateTime (const QDateTime &dt) | |
DateTime (const QDate &date) | |
DateTime (const QDate &date, const QTime &time) | |
DateTime | operator+ (const Duration &duration) const |
DateTime | operator- (const Duration &duration) const |
Duration | operator- (const DateTime &dt) const |
Duration | operator- (const DateTime &dt) |
DateTime & | operator+= (const Duration &duration) |
DateTime & | operator-= (const Duration &duration) |
Static Public Member Functions | |
static DateTime | fromString (const QString dts) |
Private Member Functions | |
Duration | duration (const DateTime &dt) const |
void | add (const Duration &duration) |
void | subtract (const Duration &duration) |
Definition at line 33 of file kptdatetime.h.
KPlato::DateTime::DateTime | ( | ) |
KPlato::DateTime::DateTime | ( | const QDateTime & | dt | ) |
Definition at line 30 of file kptdatetime.cc.
KPlato::DateTime::DateTime | ( | const QDate & | date | ) |
Definition at line 33 of file kptdatetime.cc.
KPlato::DateTime::DateTime | ( | const QDate & | date, | |
const QTime & | time | |||
) |
Definition at line 36 of file kptdatetime.cc.
Adds the duration
duration | to the datetime |
Definition at line 65 of file kptdatetime.cc.
References add(), and duration().
Subtracts the duration
duration | from the datetime |
Definition at line 76 of file kptdatetime.cc.
References duration(), and subtract().
Returns the absolute duration between the two datetimes
Definition at line 52 of file kptdatetime.h.
References duration().
static DateTime KPlato::DateTime::fromString | ( | const QString | dts | ) | [inline, static] |
Definition at line 58 of file kptdatetime.h.
References DateTime().
Referenced by KPlato::Task::load(), KPlato::Resource::load(), KPlato::Project::load(), KPlato::MainSchedule::loadXML(), KPlato::NodeSchedule::loadXML(), and KPlato::AppointmentInterval::loadXML().
Definition at line 51 of file kptdatetime.cc.
References KPlato::Duration::addDays(), and KPlato::Duration::addSeconds().
Referenced by add(), operator+(), operator+=(), operator-(), operator-=(), and subtract().
void KPlato::DateTime::add | ( | const Duration & | duration | ) | [private] |
Definition at line 39 of file kptdatetime.cc.
References duration(), and KPlato::Duration::seconds().
Referenced by operator+(), and operator+=().
void KPlato::DateTime::subtract | ( | const Duration & | duration | ) | [private] |
Definition at line 45 of file kptdatetime.cc.
References duration(), and KPlato::Duration::seconds().
Referenced by operator-(), and operator-=().