• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • geodata
  • data
GeoDataDocument.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3  Copyright (C) 2007 Murad Tagirov <tmurad@gmail.com>
4  Copyright (C) 2009 Patrick Spendrin <ps_ml@gmx.de>
5 
6  This file is part of the KDE project
7 
8  This library is free software you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public
10  License as published by the Free Software Foundation either
11  version 2 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public License for more details.
17 
18  You should have received a copy of the GNU Library General Public License
19  aint with this library see the file COPYING.LIB. If not, write to
20  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  Boston, MA 02110-1301, USA.
22 */
23 
24 #ifndef MARBLE_GEODATADOCUMENT_H
25 #define MARBLE_GEODATADOCUMENT_H
26 
27 #include <QHash>
28 #include <QMetaType>
29 #include <QVector>
30 
31 #include "geodata_export.h"
32 
33 #include "GeoDataContainer.h"
34 #include "GeoDocument.h"
35 
36 namespace Marble
37 {
38 
39 enum DocumentRole {
40  UnknownDocument,
41  MapDocument,
42  UserDocument,
43  TrackingDocument,
44  BookmarkDocument,
45  SearchResultDocument
46 };
47 
48 
49 class GeoDataStyle;
50 class GeoDataStyleMap;
51 class GeoDataNetworkLinkControl;
52 class GeoDataSchema;
53 
54 class GeoDataDocumentPrivate;
55 
65 class GEODATA_EXPORT GeoDataDocument : public GeoDocument,
66  public GeoDataContainer
67 {
68 public:
69  GeoDataDocument();
70  GeoDataDocument( const GeoDataDocument& other );
71  ~GeoDataDocument();
72 
73  bool operator==( const GeoDataDocument &other ) const;
74  bool operator!=( const GeoDataDocument &other ) const;
75 
77  virtual bool isGeoDataDocument() const { return true; }
78 
79  DocumentRole documentRole() const;
80  void setDocumentRole( DocumentRole role );
81 
82  QString property() const;
83  void setProperty( QString property );
84 
93  QString fileName() const;
98  void setFileName( const QString &value );
99 
103  QString baseUri() const;
104 
109  void setBaseUri( const QString &baseUri );
110 
114  GeoDataNetworkLinkControl networkLinkControl() const;
115 
119  void setNetworkLinkControl( const GeoDataNetworkLinkControl &networkLinkControl );
120 
125  void addStyle( const GeoDataStyle& style );
126 
131  void removeStyle( const QString& styleId );
132 
137  GeoDataStyle& style( const QString& styleId );
138  GeoDataStyle style( const QString& styleId ) const;
139 
143  QList<GeoDataStyle> styles() const;
144 
149  void addStyleMap( const GeoDataStyleMap& map );
150 
155  void removeStyleMap( const QString& mapId );
156 
161  GeoDataStyleMap& styleMap( const QString& styleId );
162  GeoDataStyleMap styleMap( const QString& styleId ) const;
163 
167  QList<GeoDataStyleMap> styleMaps() const;
168 
173  void addSchema( const GeoDataSchema& schema );
174 
179  void removeSchema( const QString& schemaId );
180 
185  GeoDataSchema schema( const QString& schemaId ) const;
186  GeoDataSchema &schema( const QString& schemaId );
187 
191  QList<GeoDataSchema> schemas() const;
192 
193  // Serialize the Placemark to @p stream
194  virtual void pack( QDataStream& stream ) const;
195  // Unserialize the Placemark from @p stream
196  virtual void unpack( QDataStream& stream );
197 
198 private:
199  GeoDataDocumentPrivate *p();
200  const GeoDataDocumentPrivate *p() const;
201 };
202 
203 }
204 Q_DECLARE_METATYPE(Marble::GeoDataDocument*)
205 #endif
Marble::GeoDataDocument
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:65
GeoDataContainer.h
QDataStream
Marble::GeoDataContainer
A base class that can hold GeoDataFeatures.
Definition: GeoDataContainer.h:47
Marble::GeoDataStyleMap
a class to map different styles to one style
Definition: GeoDataStyleMap.h:38
Marble::GeoDataDocumentPrivate
Definition: GeoDataDocument_p.h:25
Marble::SearchResultDocument
Definition: GeoDataDocument.h:45
Marble::BookmarkDocument
Definition: GeoDataDocument.h:44
Marble::operator==
bool operator==(const DownloadPolicyKey &lhs, const DownloadPolicyKey &rhs)
Definition: DownloadPolicy.h:49
Marble::UnknownDocument
Definition: GeoDataDocument.h:40
Marble::GeoDataStyle
an addressable style group
Definition: GeoDataStyle.h:55
Marble::TrackingDocument
Definition: GeoDataDocument.h:43
Marble::UserDocument
Definition: GeoDataDocument.h:42
Marble::operator!=
bool operator!=(GeoDataLatLonBox const &lhs, GeoDataLatLonBox const &rhs)
Definition: GeoDataLatLonBox.cpp:59
GeoDocument.h
QString
QList
Marble::MapDocument
Definition: GeoDataDocument.h:41
Marble::GeoDataSchema
Definition: GeoDataSchema.h:30
Marble::GeoDocument
A shared base class between GeoDataDocument/GeoSourceDocument.
Definition: GeoDocument.h:42
Marble::GeoDataDocument::isGeoDataDocument
virtual bool isGeoDataDocument() const
Provides type information for downcasting a GeoData.
Definition: GeoDataDocument.h:77
GEODATA_EXPORT
#define GEODATA_EXPORT
Definition: geodata_export.h:22
geodata_export.h
Marble::GeoDataNetworkLinkControl
Definition: GeoDataNetworkLinkControl.h:27
Marble::DocumentRole
DocumentRole
Definition: GeoDataDocument.h:39
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal