![]() |
KD SOAP API Documentation 2.2
|
#include <KDDateTime.h>


Public Member Functions | |
| KDDateTime () | |
| KDDateTime (const KDDateTime &) | |
| KDDateTime (const QDateTime &) | |
| ~KDDateTime () | |
| operator QVariant () const | |
| KDDateTime & | operator= (const KDDateTime &) |
| void | setTimeZone (const QString &timeZone) |
| QString | timeZone () const |
| QString | toDateString () const |
Public Member Functions inherited from QDateTime | |
| QDateTime () | |
| QDateTime (const QDate &date) | |
| QDateTime (const QDate &date, const QTime &time, const QTimeZone &timeZone) | |
| QDateTime (const QDate &date, const QTime &time, Qt::TimeSpec spec) | |
| QDateTime (const QDate &date, const QTime &time, Qt::TimeSpec spec, int offsetSeconds) | |
| QDateTime (const QDateTime &other) | |
| QDateTime (QDateTime &&other) | |
| ~QDateTime () | |
| QDateTime | addDays (qint64 ndays) const const |
| QDateTime | addMonths (int nmonths) const const |
| QDateTime | addMSecs (qint64 msecs) const const |
| QDateTime | addSecs (qint64 s) const const |
| QDateTime | addYears (int nyears) const const |
| QDate | date () const const |
| qint64 | daysTo (const QDateTime &other) const const |
| bool | isDaylightTime () const const |
| bool | isNull () const const |
| bool | isValid () const const |
| qint64 | msecsTo (const QDateTime &other) const const |
| int | offsetFromUtc () const const |
| bool | operator!= (const QDateTime &other) const const |
| bool | operator< (const QDateTime &other) const const |
| QDataStream & | operator<< (QDataStream &out, const QDateTime &dateTime) |
| bool | operator<= (const QDateTime &other) const const |
| QDateTime & | operator= (const QDateTime &other) |
| bool | operator== (const QDateTime &other) const const |
| bool | operator> (const QDateTime &other) const const |
| bool | operator>= (const QDateTime &other) const const |
| QDataStream & | operator>> (QDataStream &in, QDateTime &dateTime) |
| qint64 | secsTo (const QDateTime &other) const const |
| void | setDate (const QDate &date) |
| void | setMSecsSinceEpoch (qint64 msecs) |
| void | setOffsetFromUtc (int offsetSeconds) |
| void | setSecsSinceEpoch (qint64 secs) |
| void | setTime (const QTime &time) |
| void | setTime_t (uint seconds) |
| void | setTimeSpec (Qt::TimeSpec spec) |
| void | setTimeZone (const QTimeZone &toZone) |
| void | swap (QDateTime &other) |
| QTime | time () const const |
| Qt::TimeSpec | timeSpec () const const |
| QTimeZone | timeZone () const const |
| QString | timeZoneAbbreviation () const const |
| CFDateRef | toCFDate () const const |
| QDateTime | toLocalTime () const const |
| qint64 | toMSecsSinceEpoch () const const |
| NSDate * | toNSDate () const const |
| QDateTime | toOffsetFromUtc (int offsetSeconds) const const |
| qint64 | toSecsSinceEpoch () const const |
| QString | toString (const QString &format) const const |
| QString | toString (const QString &format, QCalendar cal) const const |
| QString | toString (QStringView format) const const |
| QString | toString (QStringView format, QCalendar cal) const const |
| QString | toString (Qt::DateFormat format) const const |
| uint | toTime_t () const const |
| QDateTime | toTimeSpec (Qt::TimeSpec spec) const const |
| QDateTime | toTimeZone (const QTimeZone &timeZone) const const |
| QDateTime | toUTC () const const |
Additional Inherited Members | |
Public Types inherited from QDateTime | |
| enum | YearRange |
Public Attributes inherited from QDateTime | |
| First | |
| Last | |
A DateTime class with an additional (optional) timezone.
As specified in https://www.w3.org/TR/xmlschema-2/#dateTime, the timezone can be empty (local time), "Z" (for UTC) or an offset from UTC like "+05:00" or "-03:00"
Definition at line 27 of file KDDateTime.h.
| KDDateTime::KDDateTime | ( | ) |
Definition at line 20 of file KDDateTime.cpp.
| KDDateTime::KDDateTime | ( | const KDDateTime & | rhs | ) |
Definition at line 25 of file KDDateTime.cpp.
| KDDateTime::KDDateTime | ( | const QDateTime & | rhs | ) |
Implicit constructor from a QDateTime. Sets the timeZone to "local", i.e. empty
Definition at line 31 of file KDDateTime.cpp.
| KDDateTime::~KDDateTime | ( | ) |
Definition at line 46 of file KDDateTime.cpp.
|
static |
Creates a KDDateTime from a SOAP-compliant string representation.
Definition at line 88 of file KDDateTime.cpp.
References QString::chop(), QString::endsWith(), QString::fromLatin1(), QDateTime::fromString(), Qt::ISODate, QString::right(), setTimeZone(), and QString::startsWith().
| KDDateTime::operator QVariant | ( | ) | const |
Converts the KDDateTime to QVariant, to avoid implicit conversion to base QDateTime.
Definition at line 50 of file KDDateTime.cpp.
References QVariant::fromValue().
| KDDateTime & KDDateTime::operator= | ( | const KDDateTime & | rhs | ) |
Definition at line 37 of file KDDateTime.cpp.
References QDateTime::operator=().
| void KDDateTime::setTimeZone | ( | const QString & | timeZone | ) |
Sets the timeZone. Can be empty, "Z", or an offset like "+05:00" or "-03:00".
Definition at line 60 of file KDDateTime.cpp.
References QStringView::first(), QString::indexOf(), QString::isEmpty(), QString::leftRef(), Qt::LocalTime, QString::midRef(), Qt::OffsetFromUTC, QDateTime::setOffsetFromUtc(), QDateTime::setTimeSpec(), timeZone(), QStringRef::toInt(), and Qt::UTC.
Referenced by fromDateString().
| QString KDDateTime::timeZone | ( | ) | const |
Returns the time zone set by setTimeZone.
Definition at line 55 of file KDDateTime.cpp.
Referenced by setTimeZone().
| QString KDDateTime::toDateString | ( | ) | const |
Returns a SOAP-compliant string representation of the date/time object.
Definition at line 109 of file KDDateTime.cpp.
References Qt::ISODate, QDateTime::time(), and QDateTime::toString().
Referenced by variantToTextValue().
© 2010-2024 Klarälvdalens Datakonsult AB (KDAB)
https://www.kdab.com/development-resources/qt-tools/kd-soap/