Marble

GeoDataFeature.h
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2007 Murad Tagirov <[email protected]>
9 // Copyright 2009 Patrick Spendrin <[email protected]>
10 //
11 
12 
13 #ifndef MARBLE_GEODATAFEATURE_H
14 #define MARBLE_GEODATAFEATURE_H
15 
16 #include "GeoDataObject.h"
17 
18 #include "geodata_export.h"
19 
20 namespace Marble
21 {
22 
23 // forward define all features we can find.
24 class GeoDataRegion;
25 class GeoDataAbstractView;
26 
27 class GeoDataStyle;
28 class GeoDataStyleMap;
29 
30 class GeoDataExtendedData;
31 
32 class GeoDataTimeSpan;
33 class GeoDataTimeStamp;
34 
35 class GeoDataFeaturePrivate;
36 
37 class GeoDataSnippet;
38 
49 class GEODATA_EXPORT GeoDataFeature : public GeoDataObject
50 {
51  public:
54  explicit GeoDataFeature( const QString& name );
55 
56  GeoDataFeature( const GeoDataFeature& other );
57 
58  ~GeoDataFeature() override;
59 
60  GeoDataFeature& operator=( const GeoDataFeature& other );
61 
62  bool operator==(const GeoDataFeature &other) const;
63  inline bool operator!=(const GeoDataFeature &other) const { return !(*this == other); }
64 
65  EnumFeatureId featureId() const;
66 
76  QString name() const;
81  void setName( const QString &value );
82 
90  GeoDataSnippet snippet() const;
95  void setSnippet( const GeoDataSnippet &value );
96 
98  QString address() const;
100  void setAddress( const QString &value);
101 
103  QString phoneNumber() const;
105  void setPhoneNumber( const QString &value );
106 
108  QString description() const;
110  void setDescription( const QString &value );
111 
120  bool descriptionIsCDATA() const;
122  void setDescriptionCDATA( bool cdata );
123 
125  const GeoDataAbstractView *abstractView() const;
126  GeoDataAbstractView *abstractView();
128  void setAbstractView( GeoDataAbstractView *abstractView );
129 
131  QString styleUrl() const;
133  void setStyleUrl( const QString &value );
134 
136  bool isVisible() const;
137 
139  bool isGloballyVisible() const;
140 
149  void setVisible( bool value );
150 
154  const GeoDataTimeSpan& timeSpan() const;
155  GeoDataTimeSpan& timeSpan();
156 
161  void setTimeSpan( const GeoDataTimeSpan &timeSpan );
162 
166  const GeoDataTimeStamp& timeStamp() const;
167  GeoDataTimeStamp& timeStamp();
168 
173  void setTimeStamp( const GeoDataTimeStamp &timeStamp );
174 
182  QSharedPointer<const GeoDataStyle> customStyle() const;
187  void setStyle( const QSharedPointer<GeoDataStyle> &style );
188 
192  GeoDataExtendedData& extendedData();
193  const GeoDataExtendedData& extendedData() const;
194 
199  void setExtendedData( const GeoDataExtendedData& extendedData );
200 
204  const GeoDataRegion& region() const;
205  GeoDataRegion& region();
212  void setRegion( const GeoDataRegion& region );
213 
219  const QString role() const;
224  void setRole( const QString &role );
225 
232  int zoomLevel() const;
237  void setZoomLevel( int index );
238 
242  qint64 popularity() const;
247  void setPopularity( qint64 popularity );
248 
256  const GeoDataStyleMap* styleMap() const;
260  void setStyleMap( const GeoDataStyleMap* map );
261 
263  virtual GeoDataFeature * clone() const = 0;
264 
265 
267  void pack( QDataStream& stream ) const override;
269  void unpack( QDataStream& stream ) override;
270 
271  protected:
272  // the d-pointer needs to be protected to be accessible from derived classes
273  GeoDataFeaturePrivate* const d_ptr;
274  explicit GeoDataFeature(GeoDataFeaturePrivate* dd);
275  GeoDataFeature(const GeoDataFeature& other, GeoDataFeaturePrivate* dd);
276 
277  bool equals( const GeoDataFeature &other ) const;
278  using GeoDataObject::equals;
279 
280  private:
281  Q_DECLARE_PRIVATE(GeoDataFeature)
282 };
283 
284 }
285 
286 #endif
Binds a QML item to a specific geodetic location in screen coordinates.
A base class for all geodata objects.
Definition: GeoDataObject.h:48
virtual bool equals(const GeoDataObject &other) const
Compares the value of id and targetId of the two objects.
a class to map different styles to one style
a class which allows to add custom data to KML Feature.
A base class for all geodata features.
GeoDataRegion describes the visibility and extent of a feature.
Definition: GeoDataRegion.h:48
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jul 6 2020 23:18:57 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.