Marble

GeoDataTimeSpan.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2010 Harshit Jain <hjain.itbhu@gmail.com>
4//
5
6#ifndef MARBLE_GEODATATIMESPAN_H
7#define MARBLE_GEODATATIMESPAN_H
8
9#include "GeoDataTimePrimitive.h"
10
11#include "geodata_export.h"
12
13namespace Marble
14{
15
16class GeoDataTimeStamp;
17class GeoDataTimeSpanPrivate;
18
19/**
20 */
21class GEODATA_EXPORT GeoDataTimeSpan : public GeoDataTimePrimitive
22{
23public:
24 GeoDataTimeSpan();
25 GeoDataTimeSpan(const GeoDataTimeSpan &other);
26 ~GeoDataTimeSpan() override;
27
28 /**
29 * @brief assignment operator
30 */
31 GeoDataTimeSpan &operator=(const GeoDataTimeSpan &other);
32
33 /**
34 * @brief equality operators
35 */
36 bool operator==(const GeoDataTimeSpan &other) const;
37 bool operator!=(const GeoDataTimeSpan &other) const;
38
39 /// Provides type information for downcasting a GeoNode
40 const char *nodeType() const override;
41
42 /**
43 * @brief return the beginning instant of a timespan
44 */
45 const GeoDataTimeStamp &begin() const;
46 GeoDataTimeStamp &begin();
47
48 /**
49 * @brief Set the beginning instant of a timespan
50 * @param begin the beginning instant of a timespan
51 */
52 void setBegin(const GeoDataTimeStamp &begin);
53
54 /**
55 * @brief return the ending instant of a timespan
56 */
57 const GeoDataTimeStamp &end() const;
58 GeoDataTimeStamp &end();
59
60 /**
61 * @brief Set the ending instant of a timespan
62 * @param end the ending instant of a timespan
63 */
64 void setEnd(const GeoDataTimeStamp &end);
65
66 /**
67 * @return True iff either of begin or end is valid, or if begin and end are both valid and begin is <= end
68 */
69 bool isValid() const;
70
71 /**
72 * @brief Serialize the timespan to a stream
73 * @param stream the stream
74 */
75 void pack(QDataStream &stream) const override;
76
77 /**
78 * @brief Unserialize the timespan from a stream
79 * @param stream the stream
80 */
81 void unpack(QDataStream &stream) override;
82
83private:
84 GeoDataTimeSpanPrivate *const d;
85};
86
87}
88
89#endif // MARBLE_GEODATATIMESPAN_H
QAction * end(const QObject *recvr, const char *slot, QObject *parent)
KIOCORE_EXPORT bool operator!=(const UDSEntry &entry, const UDSEntry &other)
KIOCORE_EXPORT bool operator==(const UDSEntry &entry, const UDSEntry &other)
bool isValid(QStringView ifopt)
const QList< QKeySequence > & begin()
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:37:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.