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{
24 public:
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
48 /// Provides type information for downcasting a GeoNode
49 const char* nodeType() const override;
50
51 /**
52 * @brief return the when time of timestamp
53 */
54 QDateTime when() const;
55
56 /**
57 * @brief Set the when time of timestamp
58 * @param when the when time of timestamp
59 */
60 void setWhen( const QDateTime& when );
61
62 void setResolution( TimeResolution resolution );
63
64 TimeResolution resolution() const;
65
66 /**
67 * @brief Serialize the timestamp to a stream
68 * @param stream the stream
69 */
70 void pack( QDataStream& stream ) const override;
71
72 /**
73 * @brief Unserialize the timestamp from a stream
74 * @param stream the stream
75 */
76 void unpack( QDataStream& stream ) override;
77
78 private:
79 GeoDataTimeStampPrivate * const d;
80};
81
82}
83
84#endif
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 Fri May 3 2024 11:49:04 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.