• 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
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  // NOTE: MarbleWidget::setProjection(int) relies on Mercator being the last
49  // value above. Adjust that method if you do changes here
50 };
51 
55 enum Dimension {
56  Latitude,
57  Longitude
58 };
59 
60 Q_DECLARE_FLAGS(Dimensions, Dimension)
61 
62 
65 enum AngleUnit {
66  DMSDegree,
67  DecimalDegree,
68  UTM
69 };
70 
74 enum ViewContext {
75  Still,
76  Animation
77 };
78 
82 enum MapQuality {
83  OutlineQuality,
84  LowQuality,
85  NormalQuality,
86  HighQuality,
87  PrintQuality
88 };
89 
93 enum GraphicsSystem {
94  NativeGraphics,
95  RasterGraphics,
96  OpenGLGraphics
97 };
98 
102 enum ProxyType {
103  HttpProxy,
104  Socks5Proxy
105 };
106 
110 enum LabelPositionFlag {
111  NoLabel = 0x0,
112  LineStart = 0x1,
113  LineCenter = 0x2,
114  LineEnd = 0x4,
115  IgnoreXMargin = 0x8,
116  IgnoreYMargin = 0x10
117 };
118 
119 Q_DECLARE_FLAGS(LabelPositionFlags, LabelPositionFlag)
120 
121 
124 enum LabelLocalization {
125  CustomAndNative,
126  Custom,
127  Native
128 };
130 
134 enum DragLocation {
135  KeepAxisVertically,
136  FollowMousePointer
137 };
138 
142 enum OnStartup {
143  ShowHomeLocation,
144  LastLocationVisited
145 };
146 
147 enum AltitudeMode {
148  ClampToGround,
149  RelativeToGround,
150  Absolute,
151  RelativeToSeaFloor,
152  ClampToSeaFloor
153 };
154 
155 enum Pole {
156  AnyPole,
157  NorthPole,
158  SouthPole
159 };
160 
164 enum DownloadUsage {
165  DownloadBulk,
166  DownloadBrowse
167 };
168 
173 enum FlyToMode {
174  Automatic,
175  Instant,
176  Linear,
177  Jump
178 };
179 
183 enum SearchMode {
184  GlobalSearch,
185  AreaSearch
186 };
187 
191 enum RenderStatus {
192  Complete,
193  WaitingForUpdate,
194  WaitingForData,
195  Incomplete
196 };
197 
198 const int defaultLevelZeroColumns = 2;
199 const int defaultLevelZeroRows = 1;
200 
201 // Conversion Metric / Imperial System: km vs. miles
202 const qreal MI2KM = 1.609344;
203 const qreal KM2MI = 1.0 / MI2KM;
204 
205 // Conversion Nautical / Imperial System: nm vs. km
206 const qreal NM2KM = 1.852;
207 const qreal KM2NM = 1.0 / NM2KM;
208 const qreal NM2FT = 6080; // nm feet
209 
210 // Conversion Metric / Imperial System: meter vs. feet
211 const qreal M2FT = 3.2808;
212 const qreal FT2M = 1.0 / M2FT;
213 
214 // Conversion meter vs millimeter
215 const qreal M2MM = 1000;
216 const qreal MM2M = 1.0 / M2MM;
217 
218 // Conversion degree vs. radians
219 const qreal DEG2RAD = M_PI / 180.0;
220 const qreal RAD2DEG = 180.0 / M_PI;
221 
222 // Conversion meter vs kilometer
223 const qreal KM2METER = 1000.0;
224 const qreal METER2KM = 1.0 / KM2METER;
225 
226 //Conversion hour vs minute
227 const qreal HOUR2MIN = 60.0;
228 const qreal MIN2HOUR = 1.0 / HOUR2MIN;
229 
230 //Conversion (time) minute vs second
231 const qreal MIN2SEC = 60.0;
232 const qreal SEC2MIN = 1.0 / MIN2SEC;
233 
234 //Conversion hour vs second
235 const qreal HOUR2SEC = 3600.0;
236 const qreal SEC2HOUR = 1.0 / HOUR2SEC;
237 
238 // Version definitions to use with an external application (as digiKam)
239 
240 // String for about dialog and http user agent
241 // FIXME: check if blanks are allowed in user agent version numbers
242 const QString MARBLE_VERSION_STRING = QString::fromLatin1( "0.19.2 (stable release)" );
243 
244 // API Version id:
245 // form : 0xMMmmpp
246 // MM = major revision.
247 // mm = minor revision.
248 // pp = patch revision.
249 #define MARBLE_VERSION 0x001302
250 
251 static const char NOT_AVAILABLE[] = QT_TR_NOOP("not available");
252 
253 const int tileDigits = 6;
254 
255 // Average earth radius in m
256 // Deprecated: Please use model()->planetRadius() instead.
257 const qreal EARTH_RADIUS = 6378000.0;
258 
259 // Maximum level of base tiles
260 const int maxBaseTileLevel = 4;
261 
262 // Default size (width and height) of tiles
263 const unsigned int c_defaultTileSize = 675;
264 
265 class MarbleGlobalPrivate;
266 class MarbleLocale;
267 
268 #ifdef __GNUC__
269 #define MARBLE_DEPRECATED(func) func __attribute__ ((deprecated))
270 #elif defined(_MSC_VER)
271 #define MARBLE_DEPRECATED(func) __declspec(deprecated) func
272 #else
273 #pragma message("WARNING: You need to implement MARBLE_DEPRECATED for this compiler in MarbleGlobal.h")
274 #define MARBLE_DEPRECATED(func) func
275 #endif
276 
277 class MARBLE_EXPORT MarbleGlobal
278 {
279  public:
280  static MarbleGlobal * getInstance();
281  ~MarbleGlobal();
282 
283  MarbleLocale * locale() const;
284 
285  enum Profile {
286  Default = 0x0,
287  SmallScreen = 0x1,
288  HighResolution = 0x2
289  };
290 
291  Q_DECLARE_FLAGS( Profiles, Profile )
292 
293  Profiles profiles() const;
294  void setProfiles( Profiles profiles );
295 
299  static Profiles detectProfiles();
300 
301  private:
302  MarbleGlobal();
303 
304  Q_DISABLE_COPY( MarbleGlobal )
305  MarbleGlobalPrivate * const d;
306 };
307 
308 }
309 
310 Q_DECLARE_OPERATORS_FOR_FLAGS( Marble::TessellationFlags )
311 Q_DECLARE_OPERATORS_FOR_FLAGS( Marble::LabelPositionFlags )
312 Q_DECLARE_OPERATORS_FOR_FLAGS( Marble::MarbleGlobal::Profiles )
313 
314 #endif
Marble::WaitingForData
Rendering is based on no or partial data, more data was requested (e.g. pending network queries) ...
Definition: MarbleGlobal.h:194
Marble::RAD2DEG
const qreal RAD2DEG
Definition: MarbleGlobal.h:220
Marble::SearchMode
SearchMode
Search mode: Global (worldwide) versus area (local, regional) search.
Definition: MarbleGlobal.h:183
Marble::AnyPole
Any pole.
Definition: MarbleGlobal.h:156
Marble::RasterGraphics
Renders everything onto a pixmap.
Definition: MarbleGlobal.h:95
Marble::SouthPole
Only South Pole.
Definition: MarbleGlobal.h:158
MarbleColors.h
Marble::ShowHomeLocation
Show home location on startup.
Definition: MarbleGlobal.h:143
Marble::NoTessellation
Definition: MarbleGlobal.h:31
Marble::Automatic
A sane value is chosen automatically depending on animation settings and the action.
Definition: MarbleGlobal.h:174
Marble::LabelLocalization
LabelLocalization
This enum is used to choose the localization of the labels.
Definition: MarbleGlobal.h:124
Marble::SEC2MIN
const qreal SEC2MIN
Definition: MarbleGlobal.h:232
Marble::Absolute
Altitude is given relative to the sealevel.
Definition: MarbleGlobal.h:150
Marble::MM2M
const qreal MM2M
Definition: MarbleGlobal.h:216
Marble::DownloadUsage
DownloadUsage
This enum is used to describe the type of download.
Definition: MarbleGlobal.h:164
Marble::KeepAxisVertically
Keep planet axis vertically.
Definition: MarbleGlobal.h:135
Marble::ClampToSeaFloor
Altitude always sticks to sea floor.
Definition: MarbleGlobal.h:152
Marble::IgnoreYMargin
Definition: MarbleGlobal.h:116
Marble::Jump
Linear interpolation of lon and lat, distance increases towards the middle point, then decreases...
Definition: MarbleGlobal.h:177
Marble::KM2METER
const qreal KM2METER
Definition: MarbleGlobal.h:223
Marble::ViewContext
ViewContext
This enum is used to choose context in which map quality gets used.
Definition: MarbleGlobal.h:74
Marble::HOUR2SEC
const qreal HOUR2SEC
Definition: MarbleGlobal.h:235
Marble::DecimalDegree
Degrees in decimal notation.
Definition: MarbleGlobal.h:67
Marble::UTM
UTM.
Definition: MarbleGlobal.h:68
Marble::DownloadBrowse
Browsing mode, normal operation of Marble, like a web browser.
Definition: MarbleGlobal.h:166
Marble::AreaSearch
Search a certain region of a planet (e.g. visible region)
Definition: MarbleGlobal.h:185
Marble::IgnoreXMargin
Definition: MarbleGlobal.h:115
Marble::PrintQuality
Print quality.
Definition: MarbleGlobal.h:87
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:82
Marble::defaultLevelZeroColumns
const int defaultLevelZeroColumns
Definition: MarbleGlobal.h:198
Marble::NM2KM
const qreal NM2KM
Definition: MarbleGlobal.h:206
Marble::OpenGLGraphics
Uses OpenGL.
Definition: MarbleGlobal.h:96
Marble::DragLocation
DragLocation
This enum is used to choose how the globe behaves while dragging.
Definition: MarbleGlobal.h:134
Marble::RotationIndicatesFill
Definition: MarbleGlobal.h:35
Marble::GlobalSearch
Search a whole planet.
Definition: MarbleGlobal.h:184
Marble::NativeGraphics
Uses the native graphics system of the OS.
Definition: MarbleGlobal.h:94
Marble::maxBaseTileLevel
const int maxBaseTileLevel
Definition: MarbleGlobal.h:260
Marble::LowQuality
Low resolution (e.g. interlaced)
Definition: MarbleGlobal.h:84
Marble::Latitude
Latitude.
Definition: MarbleGlobal.h:56
Marble::Equirectangular
Flat projection ("plate carree")
Definition: MarbleGlobal.h:46
Marble::RelativeToGround
Altitude is always given relative to ground level.
Definition: MarbleGlobal.h:149
Marble::HOUR2MIN
const qreal HOUR2MIN
Definition: MarbleGlobal.h:227
Marble::FT2M
const qreal FT2M
Definition: MarbleGlobal.h:212
Marble::Animation
animated view (e.g. while rotating the globe)
Definition: MarbleGlobal.h:76
Marble::EARTH_RADIUS
const qreal EARTH_RADIUS
Definition: MarbleGlobal.h:257
Marble::M2FT
const qreal M2FT
Definition: MarbleGlobal.h:211
Marble::Mercator
Mercator projection.
Definition: MarbleGlobal.h:47
Marble::c_defaultTileSize
const unsigned int c_defaultTileSize
Definition: MarbleGlobal.h:263
Marble::MIN2SEC
const qreal MIN2SEC
Definition: MarbleGlobal.h:231
Marble::AltitudeMode
AltitudeMode
Definition: MarbleGlobal.h:147
Marble::LineEnd
Definition: MarbleGlobal.h:114
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:127
Marble::LineCenter
Definition: MarbleGlobal.h:113
Marble::Still
still image
Definition: MarbleGlobal.h:75
Marble::NormalQuality
Normal quality.
Definition: MarbleGlobal.h:85
Marble::NoLabel
Definition: MarbleGlobal.h:111
Marble::NOT_AVAILABLE
static const char NOT_AVAILABLE[]
Definition: MarbleGlobal.h:251
Marble::LineStart
Definition: MarbleGlobal.h:112
QString
Marble::RenderStatus
RenderStatus
Definition: MarbleGlobal.h:191
Marble::DEG2RAD
const qreal DEG2RAD
Definition: MarbleGlobal.h:219
Marble::Incomplete
Data is missing and some error occurred when trying to retrieve it (e.g. network failure) ...
Definition: MarbleGlobal.h:195
Marble::METER2KM
const qreal METER2KM
Definition: MarbleGlobal.h:224
Marble::LabelPositionFlag
LabelPositionFlag
This enum is used to choose the localization of the labels.
Definition: MarbleGlobal.h:110
Marble::KM2MI
const qreal KM2MI
Definition: MarbleGlobal.h:203
Marble::TessellationFlag
TessellationFlag
Definition: MarbleGlobal.h:30
Marble::Complete
All data is there and up to date.
Definition: MarbleGlobal.h:192
Marble::OnStartup
OnStartup
This enum is used to choose how the globe behaves while dragging.
Definition: MarbleGlobal.h:142
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:173
Marble::NM2FT
const qreal NM2FT
Definition: MarbleGlobal.h:208
Marble::RespectLatitudeCircle
Definition: MarbleGlobal.h:33
Marble::LastLocationVisited
Show last location visited on quit.
Definition: MarbleGlobal.h:144
Marble::Longitude
Longitude.
Definition: MarbleGlobal.h:57
Marble::OutlineQuality
Only a wire representation is drawn.
Definition: MarbleGlobal.h:83
Marble::HttpProxy
Uses an Http proxy.
Definition: MarbleGlobal.h:103
Marble::tileDigits
const int tileDigits
Definition: MarbleGlobal.h:253
Marble::DMSDegree
Degrees in DMS notation.
Definition: MarbleGlobal.h:66
marble_export.h
Marble::Dimension
Dimension
This enum is used to choose the dimension.
Definition: MarbleGlobal.h:55
Marble::AngleUnit
AngleUnit
This enum is used to choose the unit chosen to measure angles.
Definition: MarbleGlobal.h:65
Marble::HighQuality
High quality (e.g. antialiasing for lines)
Definition: MarbleGlobal.h:86
Marble::ClampToGround
Altitude always sticks to ground level.
Definition: MarbleGlobal.h:148
Marble::SEC2HOUR
const qreal SEC2HOUR
Definition: MarbleGlobal.h:236
Marble::MI2KM
const qreal MI2KM
Definition: MarbleGlobal.h:202
Marble::FollowMousePointer
Follow mouse pointer exactly.
Definition: MarbleGlobal.h:136
Marble::Socks5Proxy
Uses a Socks5Proxy.
Definition: MarbleGlobal.h:104
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:126
QString::fromLatin1
QString fromLatin1(const char *str, int size)
Marble::WaitingForUpdate
Rendering is based on complete, but outdated data, data update was requested.
Definition: MarbleGlobal.h:193
Marble::MarbleGlobal
Definition: MarbleGlobal.h:277
Marble::MarbleGlobalPrivate
Definition: MarbleGlobal_p.h:27
Marble::MIN2HOUR
const qreal MIN2HOUR
Definition: MarbleGlobal.h:228
Marble::Instant
Change camera position immediately (no interpolation)
Definition: MarbleGlobal.h:175
Marble::MarbleGlobal::Profile
Profile
Definition: MarbleGlobal.h:285
Marble::KM2NM
const qreal KM2NM
Definition: MarbleGlobal.h:207
Marble::M2MM
const qreal M2MM
Definition: MarbleGlobal.h:215
Marble::FollowGround
Definition: MarbleGlobal.h:34
Marble::RelativeToSeaFloor
Altitude is given relative to the sea floor.
Definition: MarbleGlobal.h:151
Marble::GraphicsSystem
GraphicsSystem
This enum is used to choose which graphics system Qt is using.
Definition: MarbleGlobal.h:93
Marble::Tessellate
Definition: MarbleGlobal.h:32
Marble::Spherical
Spherical projection.
Definition: MarbleGlobal.h:45
Marble::CustomAndNative
Custom and native labels.
Definition: MarbleGlobal.h:125
Marble::Pole
Pole
Definition: MarbleGlobal.h:155
Marble::NorthPole
Only North Pole.
Definition: MarbleGlobal.h:157
Marble::ProxyType
ProxyType
This enum is used to specify the proxy that is used.
Definition: MarbleGlobal.h:102
Marble::Linear
Linear interpolation of lon, lat and distance to ground.
Definition: MarbleGlobal.h:176
Marble::DownloadBulk
Bulk download, for example "File/Download region".
Definition: MarbleGlobal.h:165
Marble::MARBLE_VERSION_STRING
const QString MARBLE_VERSION_STRING
Definition: MarbleGlobal.h:242
Marble::defaultLevelZeroRows
const int defaultLevelZeroRows
Definition: MarbleGlobal.h:199
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 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