Marble

MarbleGlobal.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-2009 Torsten Rahn <[email protected]>
9 // Copyright 2007 Inge Wallin <[email protected]>
10 //
11 
12 #ifndef MARBLE_GLOBAL_H
13 #define MARBLE_GLOBAL_H
14 
15 
16 #include <cmath>
17 
18 #include <QString>
19 
20 #include "marble_export.h"
21 
22 // #define QT_STRICT_ITERATORS
23 
24 /* M_PI is a #define that may or may not be handled in <cmath> */
25 #ifndef M_PI
26 #define M_PI 3.14159265358979323846264338327950288419717
27 #endif
28 
29 namespace Marble
30 {
31 
32 enum TessellationFlag {
33  NoTessellation = 0x0,
34  Tessellate = 0x1,
35  RespectLatitudeCircle = 0x2,
36  FollowGround = 0x4,
37  PreventNodeFiltering = 0x8
38 };
39 
40 Q_DECLARE_FLAGS(TessellationFlags, TessellationFlag)
41 
42 
45 enum Projection {
54  // NOTE: MarbleWidget::setProjection(int) relies on VerticalPerspective being the last
55  // value above. Adjust that method if you do changes here
56 };
57 
61 enum AngleUnit {
64  UTM
65 };
66 
73 };
74 
78 enum MapQuality {
84 };
85 
89 enum ProxyType {
92 };
93 
98  NoLabel = 0x0,
99  LineStart = 0x1,
100  LineCenter = 0x2,
101  LineEnd = 0x4,
102  IgnoreXMargin = 0x8,
103  IgnoreYMargin = 0x10,
104  FollowLine = 0x20
105 };
106 
107 Q_DECLARE_FLAGS(LabelPositionFlags, LabelPositionFlag)
108 
109 
116 };
118 
125 };
126 
130 enum OnStartup {
133 };
134 
141 };
142 
143 enum Pole {
147 };
148 
155 };
156 
161 enum FlyToMode {
166 };
167 
174 };
175 
184 };
185 
186 const int defaultLevelZeroColumns = 2;
187 const int defaultLevelZeroRows = 1;
188 
189 // Conversion Metric / Imperial System: km vs. miles
190 const qreal MI2KM = 1.609344;
191 const qreal KM2MI = 1.0 / MI2KM;
192 
193 // Conversion Nautical / Imperial System: nm vs. km
194 const qreal NM2KM = 1.852;
195 const qreal KM2NM = 1.0 / NM2KM;
196 const qreal NM2FT = 6080; // nm feet
197 
198 // Conversion Metric / Imperial System: meter vs. feet
199 const qreal M2FT = 3.2808;
200 const qreal FT2M = 1.0 / M2FT;
201 
202 // Conversion Metric / Imperial System: meter vs inch
203 const qreal M2IN = 39.3701;
204 const qreal IN2M = 1.0 / M2IN;
205 
206 // Interconversion between Imperial System: feet vs inch
207 const qreal FT2IN = 12.0;
208 
209 // Conversion Metric / Imperial System: meter vs yard
210 const qreal M2YD = 1.09361;
211 const qreal YD2M = 1.0 / M2YD;
212 
213 // Conversion meter vs millimeter
214 const qreal M2MM = 1000.0;
215 const qreal MM2M = 1.0 / M2MM;
216 
217 // Conversion meter vs centimeter
218 const qreal M2CM = 100.0;
219 const qreal CM2M = 1.0 / M2CM;
220 
221 // Conversion degree vs. radians
222 const qreal DEG2RAD = M_PI / 180.0;
223 const qreal RAD2DEG = 180.0 / M_PI;
224 
225 // Conversion meter vs kilometer
226 const qreal KM2METER = 1000.0;
227 const qreal METER2KM = 1.0 / KM2METER;
228 
229 //Conversion hour vs minute
230 const qreal HOUR2MIN = 60.0;
231 const qreal MIN2HOUR = 1.0 / HOUR2MIN;
232 
233 //Conversion (time) minute vs second
234 const qreal MIN2SEC = 60.0;
235 const qreal SEC2MIN = 1.0 / MIN2SEC;
236 
237 //Conversion hour vs second
238 const qreal HOUR2SEC = 3600.0;
239 const qreal SEC2HOUR = 1.0 / HOUR2SEC;
240 
241 const qreal TWOPI = 2 * M_PI;
242 
243 // Version definitions to use with an external application (as digiKam)
244 
245 // String for about dialog and http user agent
246 // FIXME: check if blanks are allowed in user agent version numbers
247 const QString MARBLE_VERSION_STRING = QString::fromLatin1( "0.27.20 (0.28 development version)" );
248 
249 // API Version id:
250 // form : 0xMMmmpp
251 // MM = major revision.
252 // mm = minor revision.
253 // pp = patch revision.
254 #define MARBLE_VERSION 0x001b14
255 
256 static const char NOT_AVAILABLE[] = QT_TRANSLATE_NOOP("Marble", "not available");
257 
258 const int tileDigits = 6;
259 
260 // Average earth radius in m
261 // Deprecated: Please use model()->planetRadius() instead.
262 const qreal EARTH_RADIUS = 6378137.0;
263 
264 // Maximum level of base tiles
265 const int maxBaseTileLevel = 4;
266 
267 // Default size (width and height) of tiles
268 const unsigned int c_defaultTileSize = 675;
269 
270 class MarbleGlobalPrivate;
271 class MarbleLocale;
272 
273 class MARBLE_EXPORT MarbleGlobal
274 {
275  public:
276  static MarbleGlobal * getInstance();
277  ~MarbleGlobal();
278 
279  MarbleLocale * locale() const;
280 
281  enum Profile {
282  Default = 0x0,
283  SmallScreen = 0x1,
284  HighResolution = 0x2
285  };
286 
287  Q_DECLARE_FLAGS( Profiles, Profile )
288 
289  Profiles profiles() const;
290  void setProfiles( Profiles profiles );
291 
293  MARBLE_DEPRECATED static Profiles detectProfiles();
294 
295  private:
296  MarbleGlobal();
297 
298  Q_DISABLE_COPY( MarbleGlobal )
299  MarbleGlobalPrivate * const d;
300 };
301 
302 }
303 
304 Q_DECLARE_OPERATORS_FOR_FLAGS( Marble::TessellationFlags )
305 Q_DECLARE_OPERATORS_FOR_FLAGS( Marble::LabelPositionFlags )
306 Q_DECLARE_OPERATORS_FOR_FLAGS( Marble::MarbleGlobal::Profiles )
307 
308 #endif
Rendering is based on no or partial data, more data was requested (e.g. pending network queries) ...
Definition: MarbleGlobal.h:182
SearchMode
Search mode: Global (worldwide) versus area (local, regional) search.
Definition: MarbleGlobal.h:171
Any pole.
Definition: MarbleGlobal.h:144
Only South Pole.
Definition: MarbleGlobal.h:146
Show home location on startup.
Definition: MarbleGlobal.h:131
A sane value is chosen automatically depending on animation settings and the action.
Definition: MarbleGlobal.h:162
LabelLocalization
This enum is used to choose the localization of the labels.
Definition: MarbleGlobal.h:112
Altitude is given relative to the sealevel.
Definition: MarbleGlobal.h:138
DownloadUsage
This enum is used to describe the type of download.
Definition: MarbleGlobal.h:152
Keep planet axis vertically.
Definition: MarbleGlobal.h:123
Binds a QML item to a specific geodetic location in screen coordinates.
Altitude always sticks to sea floor.
Definition: MarbleGlobal.h:140
Linear interpolation of lon and lat, distance increases towards the middle point, then decreases...
Definition: MarbleGlobal.h:165
Stereographic projection.
Definition: MarbleGlobal.h:50
ViewContext
This enum is used to choose context in which map quality gets used.
Definition: MarbleGlobal.h:70
Degrees in decimal notation.
Definition: MarbleGlobal.h:63
Browsing mode, normal operation of Marble, like a web browser.
Definition: MarbleGlobal.h:154
Search a certain region of a planet (e.g. visible region)
Definition: MarbleGlobal.h:173
Print quality.
Definition: MarbleGlobal.h:83
MapQuality
This enum is used to choose the map quality shown in the view.
Definition: MarbleGlobal.h:78
DragLocation
This enum is used to choose how the globe behaves while dragging.
Definition: MarbleGlobal.h:122
Search a whole planet.
Definition: MarbleGlobal.h:172
Low resolution (e.g. interlaced)
Definition: MarbleGlobal.h:80
Flat projection ("plate carree")
Definition: MarbleGlobal.h:47
Altitude is always given relative to ground level.
Definition: MarbleGlobal.h:137
animated view (e.g. while rotating the globe)
Definition: MarbleGlobal.h:72
Mercator projection.
Definition: MarbleGlobal.h:48
Display the name in the official language and glyphs of the labeled place.
Definition: MarbleGlobal.h:115
still image
Definition: MarbleGlobal.h:71
Normal quality.
Definition: MarbleGlobal.h:81
Data is missing and some error occurred when trying to retrieve it (e.g. network failure) ...
Definition: MarbleGlobal.h:183
LabelPositionFlag
This enum is used to choose the localization of the labels.
Definition: MarbleGlobal.h:97
All data is there and up to date.
Definition: MarbleGlobal.h:180
OnStartup
This enum is used to choose how the globe behaves while dragging.
Definition: MarbleGlobal.h:130
A class that contains all localization stuff for Marble.
Definition: MarbleLocale.h:31
FlyToMode
Describes possible flight mode (interpolation between source and target camera positions) ...
Definition: MarbleGlobal.h:161
Show last location visited on quit.
Definition: MarbleGlobal.h:132
Azimuthal Equidistant projection.
Definition: MarbleGlobal.h:52
Only a wire representation is drawn.
Definition: MarbleGlobal.h:79
Uses an Http proxy.
Definition: MarbleGlobal.h:90
Degrees in DMS notation.
Definition: MarbleGlobal.h:62
AngleUnit
This enum is used to choose the unit chosen to measure angles.
Definition: MarbleGlobal.h:61
High quality (e.g. antialiasing for lines)
Definition: MarbleGlobal.h:82
Altitude always sticks to ground level.
Definition: MarbleGlobal.h:136
Follow mouse pointer exactly.
Definition: MarbleGlobal.h:124
Uses a Socks5Proxy.
Definition: MarbleGlobal.h:91
Projection
This enum is used to choose the projection shown in the view.
Definition: MarbleGlobal.h:45
Shows the name in the user&#39;s language.
Definition: MarbleGlobal.h:114
QString fromLatin1(const char *str, int size)
Rendering is based on complete, but outdated data, data update was requested.
Definition: MarbleGlobal.h:181
Gnomonic projection.
Definition: MarbleGlobal.h:49
Change camera position immediately (no interpolation)
Definition: MarbleGlobal.h:163
Vertical perspective projection.
Definition: MarbleGlobal.h:53
Altitude is given relative to the sea floor.
Definition: MarbleGlobal.h:139
Spherical projection ("Orthographic")
Definition: MarbleGlobal.h:46
Custom and native labels.
Definition: MarbleGlobal.h:113
Only North Pole.
Definition: MarbleGlobal.h:145
Lambert Azimuthal Equal-Area projection.
Definition: MarbleGlobal.h:51
ProxyType
This enum is used to specify the proxy that is used.
Definition: MarbleGlobal.h:89
Linear interpolation of lon, lat and distance to ground.
Definition: MarbleGlobal.h:164
Bulk download, for example "File/Download region".
Definition: MarbleGlobal.h:153
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed May 27 2020 22:35:51 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.