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{
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
bool isValid(QStringView ifopt)
const QList< QKeySequence > & begin()
const QList< QKeySequence > & end()
Binds a QML item to a specific geodetic location in screen coordinates.
bool operator==(const QGraphicsApiFilter &reference, const QGraphicsApiFilter &sample)
bool operator!=(const QGraphicsApiFilter &reference, const QGraphicsApiFilter &sample)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.