• 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
MarbleGlobal.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 2007-2009 Torsten Rahn <tackat@kde.org>
9 // Copyright 2007 Inge Wallin <ingwa@kde.org>
10 //
11 
12 #ifndef MARBLE_GLOBAL_H
13 #define MARBLE_GLOBAL_H
14 
15 
16 #include <math.h>
17 
18 #include <QString>
19 #include <QColor>
20 
21 #include "marble_export.h"
22 #include "MarbleColors.h"
23 
24 // #define QT_STRICT_ITERATORS
25 
26 
27 namespace Marble
28 {
29 
30 enum TessellationFlag {
31  NoTessellation = 0x0,
32  Tessellate = 0x1,
33  RespectLatitudeCircle = 0x2,
34  FollowGround = 0x4,
35  RotationIndicatesFill = 0x8,
36  SkipLatLonNormalization = 0x10
37 };
38 
39 Q_DECLARE_FLAGS(TessellationFlags, TessellationFlag)
40 
41 
44 enum Projection {
45  Spherical,
46  Equirectangular,
47  Mercator
48 };
49 
53 enum Dimension {
54  Latitude,
55  Longitude
56 };
57 
58 Q_DECLARE_FLAGS(Dimensions, Dimension)
59 
60 
63 enum AngleUnit {
64  DMSDegree,
65  DecimalDegree,
66  UTM
67 };
68 
72 enum ViewContext {
73  Still,
74  Animation
75 };
76 
80 enum MapQuality {
81  OutlineQuality,
82  LowQuality,
83  NormalQuality,
84  HighQuality,
85  PrintQuality
86 };
87 
91 enum GraphicsSystem {
92  NativeGraphics,
93  RasterGraphics,
94  OpenGLGraphics
95 };
96 
100 enum ProxyType {
101  HttpProxy,
102  Socks5Proxy
103 };
104 
108 enum LabelPositionFlag {
109  NoLabel = 0x0,
110  LineStart = 0x1,
111  LineCenter = 0x2,
112  LineEnd = 0x4,
113  IgnoreXMargin = 0x8,
114  IgnoreYMargin = 0x10
115 };
116 
117 Q_DECLARE_FLAGS(LabelPositionFlags, LabelPositionFlag)
118 
119 
122 enum LabelLocalization {
123  CustomAndNative,
124  Custom,
125  Native
126 };
128 
132 enum DragLocation {
133  KeepAxisVertically,
134  FollowMousePointer
135 };
136 
140 enum OnStartup {
141  ShowHomeLocation,
142  LastLocationVisited
143 };
144 
145 enum AltitudeMode {
146  ClampToGround,
147  RelativeToGround,
148  Absolute
149 };
150 
151 enum Pole {
152  AnyPole,
153  NorthPole,
154  SouthPole
155 };
156 
160 enum DownloadUsage {
161  DownloadBulk,
162  DownloadBrowse
163 };
164 
169 enum FlyToMode {
170  Automatic,
171  Instant,
172  Linear,
173  Jump
174 };
175 
179 enum SearchMode {
180  GlobalSearch,
181  AreaSearch
182 };
183 
184 const int defaultLevelZeroColumns = 2;
185 const int defaultLevelZeroRows = 1;
186 
187 // Conversion Metric / Imperial System: km vs. miles
188 const qreal MI2KM = 1.609344;
189 const qreal KM2MI = 1.0 / MI2KM;
190 
191 // Conversion Metric / Imperial System: meter vs. feet
192 const qreal M2FT = 3.2808;
193 const qreal FT2M = 1.0 / M2FT;
194 
195 // Conversion meter vs millimeter
196 const qreal M2MM = 1000;
197 const qreal MM2M = 1.0 / M2MM;
198 
199 // Conversion degree vs. radians
200 const qreal DEG2RAD = M_PI / 180.0;
201 const qreal RAD2DEG = 180.0 / M_PI;
202 
203 // Conversion meter vs kilometer
204 const qreal KM2METER = 1000.0;
205 const qreal METER2KM = 1.0 / KM2METER;
206 
207 //Conversion hour vs minute
208 const qreal HOUR2MIN = 60.0;
209 const qreal MIN2HOUR = 1.0 / HOUR2MIN;
210 
211 //Conversion (time) minute vs second
212 const qreal MIN2SEC = 60.0;
213 const qreal SEC2MIN = 1.0 / MIN2SEC;
214 
215 //Conversion hour vs second
216 const qreal HOUR2SEC = 3600.0;
217 const qreal SEC2HOUR = 1.0 / HOUR2SEC;
218 
219 // Version definitions to use with an external application (as digiKam)
220 
221 // String for about dialog and http user agent
222 // FIXME: check if blanks are allowed in user agent version numbers
223 const QString MARBLE_VERSION_STRING = QString::fromLatin1( "0.17.0 (stable version)" );
224 
225 // API Version id:
226 // form : 0xMMmmpp
227 // MM = major revision.
228 // mm = minor revision.
229 // pp = patch revision.
230 #define MARBLE_VERSION 0x001100
231 
232 static const char NOT_AVAILABLE[] = QT_TR_NOOP("not available");
233 
234 const int tileDigits = 6;
235 
236 // Average earth radius in m
237 // Deprecated: Please use model()->planetRadius() instead.
238 const qreal EARTH_RADIUS = 6378000.0;
239 
240 // Maximum level of base tiles
241 const int maxBaseTileLevel = 4;
242 
243 // Default size (width and height) of tiles
244 const unsigned int c_defaultTileSize = 675;
245 
246 class MarbleGlobalPrivate;
247 class MarbleLocale;
248 
249 #ifdef __GNUC__
250 #define MARBLE_DEPRECATED(func) func __attribute__ ((deprecated))
251 #elif defined(_MSC_VER)
252 #define MARBLE_DEPRECATED(func) __declspec(deprecated) func
253 #else
254 #pragma message("WARNING: You need to implement MARBLE_DEPRECATED for this compiler in MarbleGlobal.h")
255 #define MARBLE_DEPRECATED(func) func
256 #endif
257 
258 class MARBLE_EXPORT MarbleGlobal
259 {
260  public:
261  static MarbleGlobal * getInstance();
262  ~MarbleGlobal();
263 
264  MarbleLocale * locale() const;
265 
266  enum Profile {
267  Default = 0x0,
268  SmallScreen = 0x1,
269  HighResolution = 0x2
270  };
271 
272  Q_DECLARE_FLAGS( Profiles, Profile )
273 
274  Profiles profiles() const;
275  void setProfiles( Profiles profiles );
276 
280  static Profiles detectProfiles();
281 
282  private:
283  MarbleGlobal();
284 
285  Q_DISABLE_COPY( MarbleGlobal )
286  MarbleGlobalPrivate * const d;
287 };
288 
289 }
290 
291 Q_DECLARE_OPERATORS_FOR_FLAGS( Marble::TessellationFlags )
292 Q_DECLARE_OPERATORS_FOR_FLAGS( Marble::LabelPositionFlags )
293 Q_DECLARE_OPERATORS_FOR_FLAGS( Marble::MarbleGlobal::Profiles )
294 
295 #endif
Marble::RAD2DEG
const qreal RAD2DEG
Definition: MarbleGlobal.h:201
Marble::SearchMode
SearchMode
Search mode: Global (worldwide) versus area (local, regional) search.
Definition: MarbleGlobal.h:179
Marble::AnyPole
Any pole.
Definition: MarbleGlobal.h:152
Marble::RasterGraphics
Renders everything onto a pixmap.
Definition: MarbleGlobal.h:93
Marble::SouthPole
Only South Pole.
Definition: MarbleGlobal.h:154
MarbleColors.h
Marble::ShowHomeLocation
Show home location on startup.
Definition: MarbleGlobal.h:141
Marble::NoTessellation
Definition: MarbleGlobal.h:31
Marble::Automatic
A sane value is chosen automatically depending on animation settings and the action.
Definition: MarbleGlobal.h:170
Marble::LabelLocalization
LabelLocalization
This enum is used to choose the localization of the labels.
Definition: MarbleGlobal.h:122
Marble::SEC2MIN
const qreal SEC2MIN
Definition: MarbleGlobal.h:213
Marble::Absolute
Altitude is given relative to the sealevel.
Definition: MarbleGlobal.h:148
Marble::MM2M
const qreal MM2M
Definition: MarbleGlobal.h:197
Marble::DownloadUsage
DownloadUsage
This enum is used to describe the type of download.
Definition: MarbleGlobal.h:160
Marble::KeepAxisVertically
Keep planet axis vertically.
Definition: MarbleGlobal.h:133
Marble::IgnoreYMargin
Definition: MarbleGlobal.h:114
Marble::Jump
Linear interpolation of lon and lat, distance increases towards the middle point, then decreases...
Definition: MarbleGlobal.h:173
Marble::KM2METER
const qreal KM2METER
Definition: MarbleGlobal.h:204
Marble::ViewContext
ViewContext
This enum is used to choose context in which map quality gets used.
Definition: MarbleGlobal.h:72
Marble::HOUR2SEC
const qreal HOUR2SEC
Definition: MarbleGlobal.h:216
Marble::DecimalDegree
Degrees in decimal notation.
Definition: MarbleGlobal.h:65
Marble::UTM
UTM.
Definition: MarbleGlobal.h:66
Marble::DownloadBrowse
Browsing mode, normal operation of Marble, like a web browser.
Definition: MarbleGlobal.h:162
Marble::AreaSearch
Search a certain region of a planet (e.g. visible region)
Definition: MarbleGlobal.h:181
Marble::IgnoreXMargin
Definition: MarbleGlobal.h:113
Marble::PrintQuality
Print quality.
Definition: MarbleGlobal.h:85
Marble::SkipLatLonNormalization
Definition: MarbleGlobal.h:36
Marble::MapQuality
MapQuality
This enum is used to choose the map quality shown in the view.
Definition: MarbleGlobal.h:80
Marble::defaultLevelZeroColumns
const int defaultLevelZeroColumns
Definition: MarbleGlobal.h:184
Marble::OpenGLGraphics
Uses OpenGL.
Definition: MarbleGlobal.h:94
Marble::DragLocation
DragLocation
This enum is used to choose how the globe behaves while dragging.
Definition: MarbleGlobal.h:132
Marble::RotationIndicatesFill
Definition: MarbleGlobal.h:35
Marble::GlobalSearch
Search a whole planet.
Definition: MarbleGlobal.h:180
Marble::NativeGraphics
Uses the native graphics system of the OS.
Definition: MarbleGlobal.h:92
Marble::maxBaseTileLevel
const int maxBaseTileLevel
Definition: MarbleGlobal.h:241
Marble::LowQuality
Low resolution (e.g. interlaced)
Definition: MarbleGlobal.h:82
Marble::Latitude
Latitude.
Definition: MarbleGlobal.h:54
Marble::Equirectangular
Flat projection ("plate carree")
Definition: MarbleGlobal.h:46
Marble::RelativeToGround
Altitude is always given relative to ground level.
Definition: MarbleGlobal.h:147
Marble::HOUR2MIN
const qreal HOUR2MIN
Definition: MarbleGlobal.h:208
Marble::FT2M
const qreal FT2M
Definition: MarbleGlobal.h:193
Marble::Animation
animated view (e.g. while rotating the globe)
Definition: MarbleGlobal.h:74
Marble::EARTH_RADIUS
const qreal EARTH_RADIUS
Definition: MarbleGlobal.h:238
Marble::M2FT
const qreal M2FT
Definition: MarbleGlobal.h:192
Marble::Mercator
Mercator projection.
Definition: MarbleGlobal.h:47
Marble::c_defaultTileSize
const unsigned int c_defaultTileSize
Definition: MarbleGlobal.h:244
Marble::MIN2SEC
const qreal MIN2SEC
Definition: MarbleGlobal.h:212
Marble::AltitudeMode
AltitudeMode
Definition: MarbleGlobal.h:145
Marble::LineEnd
Definition: MarbleGlobal.h:112
MARBLE_EXPORT
#define MARBLE_EXPORT
Definition: marble_export.h:20
Marble::Native
Display the name in the official language and glyphs of the labeled place.
Definition: MarbleGlobal.h:125
Marble::LineCenter
Definition: MarbleGlobal.h:111
Marble::Still
still image
Definition: MarbleGlobal.h:73
Marble::NormalQuality
Normal quality.
Definition: MarbleGlobal.h:83
Marble::NoLabel
Definition: MarbleGlobal.h:109
Marble::NOT_AVAILABLE
static const char NOT_AVAILABLE[]
Definition: MarbleGlobal.h:232
Marble::LineStart
Definition: MarbleGlobal.h:110
Marble::DEG2RAD
const qreal DEG2RAD
Definition: MarbleGlobal.h:200
Marble::METER2KM
const qreal METER2KM
Definition: MarbleGlobal.h:205
Marble::LabelPositionFlag
LabelPositionFlag
This enum is used to choose the localization of the labels.
Definition: MarbleGlobal.h:108
Marble::KM2MI
const qreal KM2MI
Definition: MarbleGlobal.h:189
Marble::TessellationFlag
TessellationFlag
Definition: MarbleGlobal.h:30
Marble::OnStartup
OnStartup
This enum is used to choose how the globe behaves while dragging.
Definition: MarbleGlobal.h:140
Marble::MarbleLocale
A class that contains all localization stuff for Marble.
Definition: MarbleLocale.h:31
Marble::FlyToMode
FlyToMode
Describes possible flight mode (interpolation between source and target camera positions) ...
Definition: MarbleGlobal.h:169
Marble::RespectLatitudeCircle
Definition: MarbleGlobal.h:33
Marble::LastLocationVisited
Show last location visited on quit.
Definition: MarbleGlobal.h:142
Marble::Longitude
Longitude.
Definition: MarbleGlobal.h:55
Marble::OutlineQuality
Only a wire representation is drawn.
Definition: MarbleGlobal.h:81
Marble::HttpProxy
Uses an Http proxy.
Definition: MarbleGlobal.h:101
Marble::tileDigits
const int tileDigits
Definition: MarbleGlobal.h:234
Marble::DMSDegree
Degrees in DMS notation.
Definition: MarbleGlobal.h:64
marble_export.h
Marble::Dimension
Dimension
This enum is used to choose the dimension.
Definition: MarbleGlobal.h:53
Marble::AngleUnit
AngleUnit
This enum is used to choose the unit chosen to measure angles.
Definition: MarbleGlobal.h:63
Marble::HighQuality
High quality (e.g. antialiasing for lines)
Definition: MarbleGlobal.h:84
Marble::ClampToGround
Altitude always sticks to ground level.
Definition: MarbleGlobal.h:146
Marble::SEC2HOUR
const qreal SEC2HOUR
Definition: MarbleGlobal.h:217
Marble::MI2KM
const qreal MI2KM
Definition: MarbleGlobal.h:188
Marble::FollowMousePointer
Follow mouse pointer exactly.
Definition: MarbleGlobal.h:134
Marble::Socks5Proxy
Uses a Socks5Proxy.
Definition: MarbleGlobal.h:102
Marble::Projection
Projection
This enum is used to choose the projection shown in the view.
Definition: MarbleGlobal.h:44
M_PI
#define M_PI
Definition: GeoDataCoordinates.h:26
Marble::Custom
Shows the name in the user's language.
Definition: MarbleGlobal.h:124
Marble::MarbleGlobal
Definition: MarbleGlobal.h:258
Marble::MarbleGlobalPrivate
Definition: MarbleGlobal_p.h:27
Marble::MIN2HOUR
const qreal MIN2HOUR
Definition: MarbleGlobal.h:209
Marble::Instant
Change camera position immediately (no interpolation)
Definition: MarbleGlobal.h:171
Marble::MarbleGlobal::Profile
Profile
Definition: MarbleGlobal.h:266
Marble::M2MM
const qreal M2MM
Definition: MarbleGlobal.h:196
Marble::FollowGround
Definition: MarbleGlobal.h:34
Marble::GraphicsSystem
GraphicsSystem
This enum is used to choose which graphics system Qt is using.
Definition: MarbleGlobal.h:91
Marble::Tessellate
Definition: MarbleGlobal.h:32
Marble::Spherical
Spherical projection.
Definition: MarbleGlobal.h:45
Marble::CustomAndNative
Custom and native labels.
Definition: MarbleGlobal.h:123
Marble::Pole
Pole
Definition: MarbleGlobal.h:151
Marble::NorthPole
Only North Pole.
Definition: MarbleGlobal.h:153
Marble::ProxyType
ProxyType
This enum is used to specify the proxy that is used.
Definition: MarbleGlobal.h:100
Marble::Linear
Linear interpolation of lon, lat and distance to ground.
Definition: MarbleGlobal.h:172
Marble::DownloadBulk
Bulk download, for example "File/Download region".
Definition: MarbleGlobal.h:161
Marble::MARBLE_VERSION_STRING
const QString MARBLE_VERSION_STRING
Definition: MarbleGlobal.h:223
Marble::defaultLevelZeroRows
const int defaultLevelZeroRows
Definition: MarbleGlobal.h:185
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:51 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