Marble

GeoDataTimeStamp.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_GEODATATIMESTAMP_H
7#define MARBLE_GEODATATIMESTAMP_H
8
9#include "GeoDataTimePrimitive.h"
10
11#include "geodata_export.h"
12
13class QDateTime;
14
15namespace Marble
16{
17
18class GeoDataTimeStampPrivate;
19
20/**
21 */
22class GEODATA_EXPORT GeoDataTimeStamp : public GeoDataTimePrimitive
23{
24public:
25 enum TimeResolution {
26 SecondResolution,
27 DayResolution,
28 MonthResolution,
29 YearResolution
30 };
31
32 GeoDataTimeStamp();
33 GeoDataTimeStamp(const GeoDataTimeStamp &other);
34 ~GeoDataTimeStamp() override;
35
36 /**
37 * @brief assignment operator
38 */
39 GeoDataTimeStamp &operator=(const GeoDataTimeStamp &other);
40
41 /**
42 * @brief equality operators
43 */
44 bool operator==(const GeoDataTimeStamp &other) const;
45 bool operator!=(const GeoDataTimeStamp &other) const;
46
47 /// Provides type information for downcasting a GeoNode
48 const char *nodeType() const override;
49
50 /**
51 * @brief return the when time of timestamp
52 */
53 QDateTime when() const;
54
55 /**
56 * @brief Set the when time of timestamp
57 * @param when the when time of timestamp
58 */
59 void setWhen(const QDateTime &when);
60
61 void setResolution(TimeResolution resolution);
62
63 TimeResolution resolution() const;
64
65 /**
66 * @brief Serialize the timestamp to a stream
67 * @param stream the stream
68 */
69 void pack(QDataStream &stream) const override;
70
71 /**
72 * @brief Unserialize the timestamp from a stream
73 * @param stream the stream
74 */
75 void unpack(QDataStream &stream) override;
76
77private:
78 GeoDataTimeStampPrivate *const d;
79};
80
81}
82
83#endif
KIOCORE_EXPORT bool operator!=(const UDSEntry &entry, const UDSEntry &other)
bool operator==(const StyleDelim &l, const StyleDelim &r)
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 Fri Nov 8 2024 12:02:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.