Marble

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

KDE's Doxygen guidelines are available online.