13 #include <KDE/KApplication>
14 #include <KDE/KLocale>
15 #include <KDE/KAboutData>
16 #include <KDE/KCmdLineArgs>
17 #include <KDE/KConfig>
18 #include <KDE/KConfigGroup>
19 #include <KDE/KGlobal>
31 Q_IMPORT_PLUGIN(qjpeg)
35 using namespace Marble;
44 KComponentData componentData( aboutData, KComponentData::SkipMainComponentRegistration );
46 KConfigGroup viewGroup( componentData.config(),
"View" );
47 QString graphicsSystem = viewGroup.readEntry(
"graphicsSystem",
"RasterGraphics" );
49 QString graphicsString(
"native" );
50 if ( graphicsSystem == QString(
"RasterGraphics" ) ) {
51 graphicsString = QString(
"raster" );
53 if ( graphicsSystem == QString(
"OpenGLGraphics" ) ) {
54 graphicsString = QString(
"opengl" );
57 return graphicsString;
60 int main (
int argc,
char *argv[] )
62 KAboutData aboutData(
"marble", 0,
63 ki18n(
"Marble Virtual Globe" ),
65 ki18n(
"A World Atlas." ),
66 KAboutData::License_LGPL,
67 ki18n(
"(c) 2007-2012" ),
69 "http://edu.kde.org/marble" );
72 aboutData.addAuthor( ki18n(
"Torsten Rahn" ),
73 ki18n(
"Developer and Original Author" ),
75 aboutData.addAuthor( ki18n(
"Bernhard Beschow" ),
76 ki18n(
"WMS Support, Mobile, Performance" ),
77 "bbeschow@cs.tu-berlin.de" );
78 aboutData.addAuthor( ki18n(
"Thibaut Gridel" ),
81 aboutData.addAuthor( ki18n(
"Jens-Michael Hoffmann" ),
82 ki18n(
"OpenStreetMap Integration, OSM Namefinder, Download Management" ),
83 "jmho@c-xx.com",
"http://www.c-xx.com" );
84 aboutData.addAuthor( ki18n(
"Florian Eßer" ),
85 ki18n(
"Elevation Profile" ),
86 "f.esser@rwth-aachen.de" );
87 aboutData.addAuthor( ki18n(
"Wes Hardaker" ),
88 ki18n(
"APRS Plugin" ),
89 "marble@hardakers.net" );
90 aboutData.addAuthor( ki18n(
"Bastian Holst" ),
91 ki18n(
"Online Services support" ),
92 "bastianholst@gmx.de" );
93 aboutData.addAuthor( ki18n(
"Guillaume Martres" ),
94 ki18n(
"Satellites" ),
95 "smarter@ubuntu.com" );
96 aboutData.addAuthor( ki18n(
"Rene Kuettner" ),
97 ki18n(
"Satellites, Eclipses" ),
98 "rene@bitkanal.net" );
99 aboutData.addAuthor( ki18n(
"Friedrich W. H. Kossebau" ),
100 ki18n(
"Plasma Integration, Bugfixes" ),
101 "kossebau@kde.org" );
102 aboutData.addAuthor( ki18n(
"Dennis Nienhüser" ),
103 ki18n(
"Routing, Navigation, Mobile" ),
104 "earthwings@gentoo.org" );
105 aboutData.addAuthor( ki18n(
"Niko Sams" ),
106 ki18n(
"Routing, Elevation Profile" ),
107 "niko.sams@gmail.com" );
108 aboutData.addAuthor( ki18n(
"Patrick Spendrin" ),
109 ki18n(
"Core Developer: KML and Windows support" ),
110 "pspendrin@gmail.com" );
111 aboutData.addAuthor( ki18n(
"Eckhart Wörner" ),
113 "kde@ewsoftware.de" );
117 aboutData.addAuthor( ki18n(
"Inge Wallin" ),
118 ki18n(
"Core Developer and Co-Maintainer" ),
119 "inge@lysator.liu.se" );
120 aboutData.addAuthor( ki18n(
"Henry de Valence" ),
121 ki18n(
"Core Developer: Marble Runners, World-Clock Plasmoid" ),
122 "hdevalence@gmail.com" );
123 aboutData.addAuthor( ki18n(
"Pino Toscano" ),
124 ki18n(
"Network plugins" ),
126 aboutData.addAuthor( ki18n(
"Harshit Jain" ),
127 ki18n(
"Planet filter" ),
128 "sonu.itbhu@googlemail.com" );
129 aboutData.addAuthor( ki18n(
"Simon Edwards" ),
130 ki18n(
"Marble Python Bindings" ),
131 "simon@simonzone.com" );
132 aboutData.addAuthor( ki18n(
"Magnus Valle" ),
133 ki18n(
"Historical Maps" ),
135 aboutData.addAuthor( ki18n(
"Médéric Boquien" ),
136 ki18n(
"Astronomical Observatories" ),
137 "mboquien@free.fr" );
140 aboutData.addAuthor( ki18n(
"Rene Kuettner" ),
141 ki18n(
"ESA Summer of Code in Space 2012 Project:"
142 " Visualization of planetary satellites" ),
143 "rene@bitkanal.net" );
144 aboutData.addAuthor( ki18n(
"Guillaume Martres" ),
145 ki18n(
"ESA Summer of Code in Space 2011 Project:"
146 " Visualisation of Satellite Orbits" ),
147 "smarter@ubuntu.com" );
150 aboutData.addAuthor( ki18n(
"Konstantin Oblaukhov" ),
151 ki18n(
"Google Summer of Code 2011 Project:"
152 " OpenStreetMap Vector Rendering" ),
153 "oblaukhov.konstantin@gmail.com" );
154 aboutData.addAuthor( ki18n(
"Daniel Marth" ),
155 ki18n(
"Google Summer of Code 2011 Project:"
156 " Marble Touch on MeeGo" ),
157 "danielmarth@gmx.at" );
158 aboutData.addAuthor( ki18n(
"Gaurav Gupta" ),
159 ki18n(
"Google Summer of Code 2010 Project:"
161 "1989.gaurav@gmail.com" );
162 aboutData.addAuthor( ki18n(
"Harshit Jain " ),
163 ki18n(
"Google Summer of Code 2010 Project:"
165 "hjain.itbhu@gmail.com" );
166 aboutData.addAuthor( ki18n(
"Siddharth Srivastava" ),
167 ki18n(
"Google Summer of Code 2010 Project:"
168 " Turn-by-turn Navigation" ),
169 "akssps011@gmail.com" );
170 aboutData.addAuthor( ki18n(
"Andrew Manson" ),
171 ki18n(
"Google Summer of Code 2009 Project:"
173 "g.real.ate@gmail.com" );
174 aboutData.addAuthor( ki18n(
"Bastian Holst" ),
175 ki18n(
"Google Summer of Code 2009 Project:"
176 " Online Services" ),
177 "bastianholst@gmx.de" );
178 aboutData.addAuthor( ki18n(
"Patrick Spendrin" ),
179 ki18n(
"Google Summer of Code 2008 Project:"
180 " Vector Tiles for Marble" ),
181 "pspendrin@gmail.com" );
182 aboutData.addAuthor( ki18n(
"Shashank Singh" ),
183 ki18n(
"Google Summer of Code 2008 Project:"
184 " Panoramio / Wikipedia -photo support for Marble" ),
185 "shashank.personal@gmail.com" );
186 aboutData.addAuthor( ki18n(
"Carlos Licea" ),
187 ki18n(
"Google Summer of Code 2007 Project:"
188 " Equirectangular Projection (\"Flat Map\")" ),
189 "carlos.licea@kdemail.net" );
190 aboutData.addAuthor( ki18n(
"Andrew Manson" ),
191 ki18n(
"Google Summer of Code 2007 Project:"
192 " GPS Support for Marble" ),
193 "g.real.ate@gmail.com" );
194 aboutData.addAuthor( ki18n(
"Murad Tagirov" ),
195 ki18n(
"Google Summer of Code 2007 Project:"
196 " KML Support for Marble" ),
197 "tmurad@gmail.com" );
200 aboutData.addAuthor( ki18n(
"Simon Schmeisser" ),
201 ki18n(
"Development & Patches" ));
202 aboutData.addAuthor( ki18n(
"Claudiu Covaci" ),
203 ki18n(
"Development & Patches" ));
204 aboutData.addAuthor( ki18n(
"David Roberts" ),
205 ki18n(
"Development & Patches" ));
206 aboutData.addAuthor( ki18n(
"Nikolas Zimmermann" ),
207 ki18n(
"Development & Patches" ));
208 aboutData.addAuthor( ki18n(
"Jan Becker" ),
209 ki18n(
"Development & Patches" ));
210 aboutData.addAuthor( ki18n(
"Stefan Asserhäll" ),
211 ki18n(
"Development & Patches" ));
212 aboutData.addAuthor( ki18n(
"Laurent Montel" ),
213 ki18n(
"Development & Patches" ));
214 aboutData.addAuthor( ki18n(
"Mayank Madan" ),
215 ki18n(
"Development & Patches" ));
216 aboutData.addAuthor( ki18n(
"Prashanth Udupa" ),
217 ki18n(
"Development & Patches" ));
218 aboutData.addAuthor( ki18n(
"Anne-Marie Mahfouf" ),
219 ki18n(
"Development & Patches" ));
220 aboutData.addAuthor( ki18n(
"Josef Spillner" ),
221 ki18n(
"Development & Patches" ));
222 aboutData.addAuthor( ki18n(
"Frerich Raabe" ),
223 ki18n(
"Development & Patches" ));
224 aboutData.addAuthor( ki18n(
"Frederik Gladhorn" ),
225 ki18n(
"Development & Patches" ));
226 aboutData.addAuthor( ki18n(
"Fredrik Höglund" ),
227 ki18n(
"Development & Patches" ));
228 aboutData.addAuthor( ki18n(
"Albert Astals Cid" ),
229 ki18n(
"Development & Patches" ));
230 aboutData.addAuthor( ki18n(
"Thomas Zander" ),
231 ki18n(
"Development & Patches" ));
232 aboutData.addAuthor( ki18n(
"Joseph Wenninger" ),
233 ki18n(
"Development & Patches" ));
234 aboutData.addAuthor( ki18n(
"Kris Thomsen" ),
235 ki18n(
"Development & Patches" ));
236 aboutData.addAuthor( ki18n(
"Daniel Molkentin" ),
237 ki18n(
"Development & Patches" ));
238 aboutData.addAuthor( ki18n(
"Christophe Leske" ),
239 ki18n(
"Platforms & Distributions" ));
240 aboutData.addAuthor( ki18n(
"Sebastian Wiedenroth" ),
241 ki18n(
"Platforms & Distributions" ));
242 aboutData.addAuthor( ki18n(
"Tim Sutton" ),
243 ki18n(
"Platforms & Distributions" ));
244 aboutData.addAuthor( ki18n(
"Christian Ehrlicher" ),
245 ki18n(
"Platforms & Distributions" ));
246 aboutData.addAuthor( ki18n(
"Ralf Habacker" ),
247 ki18n(
"Platforms & Distributions" ));
248 aboutData.addAuthor( ki18n(
"Steffen Joeris" ),
249 ki18n(
"Platforms & Distributions" ));
250 aboutData.addAuthor( ki18n(
"Marcus Czeslinski" ),
251 ki18n(
"Platforms & Distributions" ));
252 aboutData.addAuthor( ki18n(
"Marcus D. Hanwell" ),
253 ki18n(
"Platforms & Distributions" ));
254 aboutData.addAuthor( ki18n(
"Chitlesh Goorah" ),
255 ki18n(
"Platforms & Distributions" ));
256 aboutData.addAuthor( ki18n(
"Nuno Pinheiro" ),
258 aboutData.addAuthor( ki18n(
"Torsten Rahn" ),
262 aboutData.addCredit( ki18n(
"Luis Silva" ),
263 ki18n(
"Various Suggestions & Testing" ));
264 aboutData.addCredit( ki18n(
"Stefan Jordan" ),
265 ki18n(
"Various Suggestions & Testing" ));
266 aboutData.addCredit( ki18n(
"Robert Scott" ),
267 ki18n(
"Various Suggestions & Testing" ));
268 aboutData.addCredit( ki18n(
"Lubos Petrovic" ),
269 ki18n(
"Various Suggestions & Testing" ));
270 aboutData.addCredit( ki18n(
"Benoit Sigoure" ),
271 ki18n(
"Various Suggestions & Testing" ));
272 aboutData.addCredit( ki18n(
"Martin Konold" ),
273 ki18n(
"Various Suggestions & Testing" ));
274 aboutData.addCredit( ki18n(
"Matthias Welwarsky" ),
275 ki18n(
"Various Suggestions & Testing" ));
276 aboutData.addCredit( ki18n(
"Rainer Endres" ),
277 ki18n(
"Various Suggestions & Testing" ));
278 aboutData.addCredit( ki18n(
"Ralf Gesellensetter" ),
279 ki18n(
"Various Suggestions & Testing" ));
280 aboutData.addCredit( ki18n(
"Tim Alder" ),
281 ki18n(
"Various Suggestions & Testing" ));
282 aboutData.addCredit( ki18n(
"John Layt" ),
283 ki18n(
"Special thanks for providing an"
284 " important source of inspiration by creating"
285 " Marble's predecessor \"Kartographer\"." ));
289 KCmdLineArgs::init( argc, argv, &aboutData );
294 KCmdLineOptions options;
295 options.add(
"debug-info", ki18n(
"Enable debug output" ) );
296 options.add(
"timedemo", ki18n(
"Make a time measurement to check performance" ) );
297 options.add(
"fps", ki18n(
"Show frame rate" ) );
298 options.add(
"tile-id", ki18n(
"Show tile IDs" ) );
299 options.add(
"runtimeTrace", ki18n(
"Show time spent in each layer" ) );
300 options.add(
"marbledatapath <data path>", ki18n(
"Use a different directory which contains map data" ) );
302 options.add(
"nosmallscreen", ki18n(
"Do not use the interface optimized for small screens" ) );
305 options.add(
"smallscreen", ki18n(
"Use the interface optimized for small screens" ) );
308 options.add(
"nohighresolution", ki18n(
"Do not use the interface optimized for high resolutions" ) );
311 options.add(
"highresolution", ki18n(
"Use the interface optimized for high resolutions" ) );
313 options.add(
"latlon <coordinates>", ki18n(
"Show map at given lat lon coordinates" ) );
314 options.add(
"distance <value>", ki18n(
"Set the distance of the observer to the globe (in km)" ) );
315 options.add(
"map <id>", ki18n(
"Use map id (e.g. \"earth/openstreetmap/openstreetmap.dgml\")" ) );
316 options.add(
"+[file]", ki18n(
"One or more placemark files to be opened" ) );
318 KCmdLineArgs::addCmdLineOptions( options );
319 KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
322 KGlobal::locale()->insertCatalog(
"marble_qt" );
328 if ( args->isSet(
"smallscreen" ) ) {
335 if ( args->isSet(
"highresolution" ) ) {
344 QString marbleDataPath = args->getOption(
"marbledatapath" );
345 if( marbleDataPath.isEmpty() ) {
346 marbleDataPath.clear();
349 window->setAttribute( Qt::WA_DeleteOnClose,
true );
352 if ( args->isSet(
"timedemo" ) ) {
353 window->resize(900, 640);
359 if ( args->isSet(
"fps" ) ) {
363 if ( args->isSet(
"tile-id" ) ) {
367 const QString map = args->getOption(
"map" );
368 if ( !map.isEmpty() ) {
372 const QString coordinatesString = args->getOption(
"latlon" );
373 if ( !coordinatesString.isEmpty() ) {
374 bool success =
false;
383 const QString distance = args->getOption(
"distance" );
384 if ( !distance.isEmpty() ) {
385 bool success =
false;
386 const qreal distanceValue = distance.toDouble(&success);
392 for (
int i = 0; i < args->count(); ++i ) {
395 if ( QFile::exists( args->arg( i ) ) )
A 3d point representation.
void setProfiles(Profiles profiles)
ControlView * marbleControl() const
static Profiles detectProfiles()
Automatically detects the profile.
qreal latitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the latitude of the GeoDataCoordinates object use the unit parameter to switch between Radi...
static QString applicationVersion()
Returns the version of the Marble applications (which differs from the Marble library version)...
int main(int argc, char *argv[])
qreal longitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the longitude of the GeoDataCoordinates object use the unit parameter to switch between Rad...
MarbleWidget * marbleWidget() const
QString readGraphicsSystem(int argc, char *argv[], const KAboutData &aboutData)
static MarbleGlobal * getInstance()
void addGeoDataFile(QString filename)
static GeoDataCoordinates fromString(const QString &string, bool &successful)
try to parse the string into a coordinate pair
MarbleWidget * marbleWidget() const
static void setEnabled(bool enabled)
setEnabled Toggle debug information output generation