Definition at line 216 of file qdatetime.h.
#include <qdatetime.h>
Public Member Functions |
|
| QDateTime () | |
| QDateTime (const QDate &) | |
| QDateTime (const QDate &, const QTime &, Qt::TimeSpec spec=Qt::LocalTime) | |
| QDateTime (const QDateTime &other) | |
| ~QDateTime () | |
| QDateTime & | operator= (const QDateTime &other) |
| bool | isNull () const |
| bool | isValid () const |
| QDate | date () const |
| QTime | time () const |
| Qt::TimeSpec | timeSpec () const |
| qint64 | toMSecsSinceEpoch () const |
| uint | toTime_t () const |
| void | setDate (const QDate &date) |
| void | setTime (const QTime &time) |
| void | setTimeSpec (Qt::TimeSpec spec) |
| void | setMSecsSinceEpoch (qint64 msecs) |
| void | setTime_t (uint secsSince1Jan1970UTC) |
| QString | toString (Qt::DateFormat f=Qt::TextDate) const |
| QString | toString (const QString &format) const |
| QDateTime | addDays (int days) const |
| QDateTime | addMonths (int months) const |
| QDateTime | addYears (int years) const |
| QDateTime | addSecs (int secs) const |
| QDateTime | addMSecs (qint64 msecs) const |
| QDateTime | toTimeSpec (Qt::TimeSpec spec) const |
| QDateTime | toLocalTime () const |
| QDateTime | toUTC () const |
| int | daysTo (const QDateTime &) const |
| int | secsTo (const QDateTime &) const |
| qint64 | msecsTo (const QDateTime &) const |
| bool | operator== (const QDateTime &other) const |
| bool | operator!= (const QDateTime &other) const |
| bool | operator< (const QDateTime &other) const |
| bool | operator<= (const QDateTime &other) const |
| bool | operator> (const QDateTime &other) const |
| bool | operator>= (const QDateTime &other) const |
| void | setUtcOffset (int seconds) |
| int | utcOffset () const |
Static Public Member Functions |
|
| static QDateTime | currentDateTime () |
| static QDateTime | currentDateTimeUtc () |
| static QDateTime | fromString (const QString &s, Qt::DateFormat f=Qt::TextDate) |
| static QDateTime | fromString (const QString &s, const QString &format) |
| static QDateTime | fromTime_t (uint secsSince1Jan1970UTC) |
| static QDateTime | fromMSecsSinceEpoch (qint64 msecs) |
| static qint64 | currentMSecsSinceEpoch () |
Friends |
|
| class | QDateTimePrivate |
| Q_CORE_EXPORT QDataStream & | operator<< (QDataStream &, const QDateTime &) |
| Q_CORE_EXPORT QDataStream & | operator>> (QDataStream &, QDateTime &) |
| QDateTime | ( | ) |
| QDateTime | ( | const QDate & | , |
| const QTime & | , | ||
| Qt::TimeSpec | spec =
Qt::LocalTime |
||
| ) |
| ~QDateTime | ( | ) |
| bool isNull | ( | ) | const |
| bool isValid | ( | ) | const |
| QDate date | ( | ) | const |
| QTime time | ( | ) | const |
| Qt::TimeSpec timeSpec | ( | ) | const |
| qint64 toMSecsSinceEpoch | ( | ) | const |
| uint toTime_t | ( | ) | const |
| void setDate | ( | const QDate & | date | ) |
| void setTime | ( | const QTime & | time | ) |
| void setTimeSpec | ( | Qt::TimeSpec | spec | ) |
| void setMSecsSinceEpoch | ( | qint64 | msecs | ) |
| void setTime_t | ( | uint | secsSince1Jan1970UTC | ) |
| QString toString | ( | Qt::DateFormat | f = Qt::TextDate |
) | const |
| QDateTime addDays | ( | int | days | ) | const |
| QDateTime addMonths | ( | int | months | ) | const |
| QDateTime addYears | ( | int | years | ) | const |
| QDateTime addSecs | ( | int | secs | ) | const |
| QDateTime toTimeSpec | ( | Qt::TimeSpec | spec | ) | const |
| QDateTime toLocalTime | ( | ) | const [inline] |
Definition at line 250 of file qdatetime.h.
{ return toTimeSpec(Qt::LocalTime); }
| QDateTime toUTC | ( | ) | const [inline] |
Definition at line 251 of file qdatetime.h.
{ return toTimeSpec(Qt::UTC); }
| int daysTo | ( | const QDateTime & | ) | const |
| int secsTo | ( | const QDateTime & | ) | const |
| bool operator== | ( | const QDateTime & | other | ) | const |
| bool operator!= | ( | const QDateTime & | other | ) | const [inline] |
Definition at line 257 of file qdatetime.h.
{ return !(*this == other); }
| bool operator< | ( | const QDateTime & | other | ) | const |
| bool operator<= | ( | const QDateTime & | other | ) | const [inline] |
Definition at line 259 of file qdatetime.h.
{ return !(other < *this); }
| bool operator> | ( | const QDateTime & | other | ) | const [inline] |
Definition at line 260 of file qdatetime.h.
{ return other < *this; }
| bool operator>= | ( | const QDateTime & | other | ) | const [inline] |
Definition at line 261 of file qdatetime.h.
{ return !(*this < other); }
| void setUtcOffset | ( | int | seconds | ) |
| int utcOffset | ( | ) | const |
| static QDateTime currentDateTime | ( | ) | [static] |
| static QDateTime currentDateTimeUtc | ( | ) | [static] |
| static QDateTime fromString | ( | const QString & | s, |
| Qt::DateFormat | f =
Qt::TextDate |
||
| ) | [static] |
| static QDateTime fromTime_t | ( | uint | secsSince1Jan1970UTC | ) | [static] |
| static qint64 currentMSecsSinceEpoch | ( | ) | [static] |
friend class QDateTimePrivate
[friend] |
Definition at line 292 of file qdatetime.h.
| Q_CORE_EXPORT QDataStream& operator<< | ( | QDataStream & | , |
| const QDateTime & | |||
| ) | [friend] |
| Q_CORE_EXPORT QDataStream& operator>> | ( | QDataStream & | , |
| QDateTime & | |||
| ) | [friend] |