7#include "GeoDataTimeSpan.h"
10#include "GeoDataTimeSpan_p.h"
17#include "GeoDataTypes.h"
18#include "MarbleDebug.h"
23GeoDataTimeSpan::GeoDataTimeSpan()
24 : GeoDataTimePrimitive()
25 , d(new GeoDataTimeSpanPrivate)
29GeoDataTimeSpan::GeoDataTimeSpan(
const GeoDataTimeSpan &other)
30 : GeoDataTimePrimitive(other)
31 , d(new GeoDataTimeSpanPrivate(*other.d))
35GeoDataTimeSpan::~GeoDataTimeSpan()
40const char *GeoDataTimeSpan::nodeType()
const
42 return GeoDataTypes::GeoDataTimePrimitiveType;
45const GeoDataTimeStamp &GeoDataTimeSpan::end()
const
50GeoDataTimeStamp &GeoDataTimeSpan::end()
55void GeoDataTimeSpan::setEnd(
const GeoDataTimeStamp &end)
60bool GeoDataTimeSpan::isValid()
const
62 if (d->m_begin.when().isValid() != d->m_end.when().isValid()) {
66 return d->m_begin.when().isValid() && d->m_end.when().isValid() && d->m_begin.when() <= d->m_end.when();
69const GeoDataTimeStamp &GeoDataTimeSpan::begin()
const
74GeoDataTimeStamp &GeoDataTimeSpan::begin()
79void GeoDataTimeSpan::setBegin(
const GeoDataTimeStamp &begin)
84GeoDataTimeSpan &GeoDataTimeSpan::operator=(
const GeoDataTimeSpan &other)
86 GeoDataTimePrimitive::operator=(other);
91bool GeoDataTimeSpan::operator==(
const GeoDataTimeSpan &other)
const
93 return equals(other) && d->m_begin == other.d->m_begin && d->m_end == other.d->m_end;
96bool GeoDataTimeSpan::operator!=(
const GeoDataTimeSpan &other)
const
101void GeoDataTimeSpan::pack(
QDataStream &stream)
const
103 GeoDataTimePrimitive::pack(stream);
104 d->m_begin.pack(stream);
105 d->m_end.pack(stream);
110 GeoDataTimePrimitive::unpack(stream);
111 d->m_begin.unpack(stream);
112 d->m_end.unpack(stream);
KIOCORE_EXPORT bool operator==(const UDSEntry &entry, const UDSEntry &other)
const QList< QKeySequence > & begin()
const QList< QKeySequence > & end()
bool equals(const QVariant &lhs, const QVariant &rhs)
Binds a QML item to a specific geodetic location in screen coordinates.