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

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • lib
  • marble
GeoPolygon.h
Go to the documentation of this file.
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 2004-2007 Torsten Rahn <tackat@kde.org>
9 // Copyright 2007 Inge Wallin <ingwa@kde.org>
10 //
11 
12 #ifndef MARBLE_GEOPOLYGON_H
13 #define MARBLE_GEOPOLYGON_H
14 
15 #include <QObject>
16 #include <QString>
17 #include <QThread>
18 #include <QVector>
19 #include "marble_export.h"
20 
21 #include "GeoDataCoordinates.h"
22 
23 namespace Marble
24 {
25 
26 /*
27  NOTE: USAGE OF THIS CLASS IS DEPRECATED
28  Use GeoDataLineString, GeoDataLinearRing OR GeoDataPolygon instead!
29 
30  GeoDataPoint defines the nodes in a polyLine
31 */
32 
33 class MARBLE_EXPORT GeoPolygon : public GeoDataCoordinates::Vector
34 {
35  public:
36  GeoPolygon();
37  virtual ~GeoPolygon();
38 
56  enum DateLineCrossing{None, Odd, Even};
57 
58  int getIndex() const { return m_index; }
59  bool getClosed() const { return m_closed; }
60  void setClosed( bool closed ){ m_closed = closed; }
61 
62  void setIndex( int index ){ m_index = index; }
63 
64  int getDateLine() const { return m_dateLineCrossing; }
65  void setDateLine( int dateLineCrossing ){ m_dateLineCrossing = dateLineCrossing; }
66 
67  void setBoundary( qreal, qreal, qreal, qreal );
68  GeoDataCoordinates::PtrVector getBoundary() const { return m_boundary; }
69 
70  void displayBoundary();
71 
72  // Type definitions
73  typedef QVector<GeoPolygon *> PtrVector;
74 
75 // QString m_sourceFileName;
76 
77  private:
78  int m_dateLineCrossing;
79  bool m_closed;
80 
81  GeoDataCoordinates::PtrVector m_boundary;
82 
83  int m_index;
84 };
85 
86 
87 /*
88  * A PntMap is a collection of GeoPolygons, i.e. a complete map of vectors.
89  *
90  * FIXME: Rename it (into GeoPolygonMap?)
91  */
92 
93 class PntMapLoader;
94 
95 class MARBLE_EXPORT PntMap : public QObject,
96  public GeoPolygon::PtrVector
97 {
98  Q_OBJECT
99  public:
100  PntMap();
101  ~PntMap();
102 
103  bool isInitialized() const;
104 
105  void load( const QString & );
106 
107  Q_SIGNALS:
108  void initialized();
109 
110  private Q_SLOTS:
111  void setInitialized( bool );
112 
113  private:
114  bool m_isInitialized;
115  PntMapLoader* m_loader;
116 
117  Q_DISABLE_COPY( PntMap )
118 };
119 
120 class MARBLE_EXPORT PntMapLoader : public QThread
121 {
122  Q_OBJECT
123  public:
124  PntMapLoader( PntMap* parent, const QString& filename );
125 
126  void run();
127  Q_SIGNALS:
128  void pntMapLoaded( bool );
129 
130  private:
131  PntMap *m_parent;
132  QString m_filename;
133 };
134 
135 }
136 
137 #endif
Marble::GeoDataCoordinates::Vector
QVector< GeoDataCoordinates > Vector
Definition: GeoDataCoordinates.h:102
GeoDataCoordinates.h
Marble::GeoPolygon::setClosed
void setClosed(bool closed)
Definition: GeoPolygon.h:60
QObject
Marble::GeoPolygon::getDateLine
int getDateLine() const
Definition: GeoPolygon.h:64
Marble::None
Definition: tools/osm-addresses/OsmParser.h:40
Marble::PntMap
Definition: GeoPolygon.h:95
MARBLE_EXPORT
#define MARBLE_EXPORT
Definition: marble_export.h:20
Marble::PntMapLoader
Definition: GeoPolygon.h:120
Marble::GeoPolygon
Definition: GeoPolygon.h:33
Marble::GeoPolygon::setIndex
void setIndex(int index)
Definition: GeoPolygon.h:62
Marble::GeoPolygon::Odd
Definition: GeoPolygon.h:56
Marble::GeoPolygon::getBoundary
GeoDataCoordinates::PtrVector getBoundary() const
Definition: GeoPolygon.h:68
Marble::GeoPolygon::PtrVector
QVector< GeoPolygon * > PtrVector
Definition: GeoPolygon.h:73
Marble::GeoPolygon::getClosed
bool getClosed() const
Definition: GeoPolygon.h:59
Marble::GeoDataCoordinates::PtrVector
QVector< GeoDataCoordinates * > PtrVector
Definition: GeoDataCoordinates.h:103
marble_export.h
Marble::GeoPolygon::setDateLine
void setDateLine(int dateLineCrossing)
Definition: GeoPolygon.h:65
Marble::GeoPolygon::DateLineCrossing
DateLineCrossing
enum used to specify how a polyline crosses the IDL
Definition: GeoPolygon.h:56
Marble::GeoPolygon::getIndex
int getIndex() const
Definition: GeoPolygon.h:58
QThread
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:50 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
  • kstars
  • libkdeedu
  •   keduvocdocument
  • 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