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>
33 Q_IMPORT_PLUGIN(qjpeg)
37 using namespace Marble;
46 KComponentData componentData( aboutData, KComponentData::SkipMainComponentRegistration );
48 KConfigGroup viewGroup( componentData.config(),
"View" );
49 QString graphicsSystem = viewGroup.readEntry(
"graphicsSystem",
"RasterGraphics" );
51 QString graphicsString(
"native" );
52 if ( graphicsSystem ==
QString(
"RasterGraphics" ) ) {
53 graphicsString =
QString(
"raster" );
55 if ( graphicsSystem ==
QString(
"OpenGLGraphics" ) ) {
56 graphicsString =
QString(
"opengl" );
59 return graphicsString;
62 int main (
int argc,
char *argv[] )
64 KAboutData aboutData(
"marble", 0,
65 ki18n(
"Marble Virtual Globe" ),
67 ki18n(
"A World Atlas." ),
68 KAboutData::License_LGPL,
69 ki18n(
"(c) 2007-2014" ),
71 "http://edu.kde.org/marble" );
74 aboutData.addAuthor( ki18n(
"Torsten Rahn" ),
75 ki18n(
"Developer and Original Author" ),
77 aboutData.addAuthor( ki18n(
"Bernhard Beschow" ),
78 ki18n(
"WMS Support, Mobile, Performance" ),
79 "bbeschow@cs.tu-berlin.de" );
80 aboutData.addAuthor( ki18n(
"Thibaut Gridel" ),
83 aboutData.addAuthor( ki18n(
"Jens-Michael Hoffmann" ),
84 ki18n(
"OpenStreetMap Integration, OSM Namefinder, Download Management" ),
85 "jmho@c-xx.com",
"http://www.c-xx.com" );
86 aboutData.addAuthor( ki18n(
"Florian Eßer" ),
87 ki18n(
"Elevation Profile" ),
88 "f.esser@rwth-aachen.de" );
89 aboutData.addAuthor( ki18n(
"Wes Hardaker" ),
90 ki18n(
"APRS Plugin" ),
91 "marble@hardakers.net" );
92 aboutData.addAuthor( ki18n(
"Bastian Holst" ),
93 ki18n(
"Online Services support" ),
94 "bastianholst@gmx.de" );
95 aboutData.addAuthor( ki18n(
"Guillaume Martres" ),
96 ki18n(
"Satellites" ),
97 "smarter@ubuntu.com" );
98 aboutData.addAuthor( ki18n(
"Rene Kuettner" ),
99 ki18n(
"Satellites, Eclipses" ),
100 "rene@bitkanal.net" );
101 aboutData.addAuthor( ki18n(
"Friedrich W. H. Kossebau" ),
102 ki18n(
"Plasma Integration, Bugfixes" ),
103 "kossebau@kde.org" );
104 aboutData.addAuthor( ki18n(
"Dennis Nienhüser" ),
105 ki18n(
"Routing, Navigation, Mobile" ),
106 "earthwings@gentoo.org" );
107 aboutData.addAuthor( ki18n(
"Niko Sams" ),
108 ki18n(
"Routing, Elevation Profile" ),
109 "niko.sams@gmail.com" );
110 aboutData.addAuthor( ki18n(
"Patrick Spendrin" ),
111 ki18n(
"Core Developer: KML and Windows support" ),
112 "pspendrin@gmail.com" );
113 aboutData.addAuthor( ki18n(
"Eckhart Wörner" ),
115 "kde@ewsoftware.de" );
119 aboutData.addAuthor( ki18n(
"Inge Wallin" ),
120 ki18n(
"Core Developer and Co-Maintainer" ),
121 "inge@lysator.liu.se" );
122 aboutData.addAuthor( ki18n(
"Henry de Valence" ),
123 ki18n(
"Core Developer: Marble Runners, World-Clock Plasmoid" ),
124 "hdevalence@gmail.com" );
125 aboutData.addAuthor( ki18n(
"Pino Toscano" ),
126 ki18n(
"Network plugins" ),
128 aboutData.addAuthor( ki18n(
"Harshit Jain" ),
129 ki18n(
"Planet filter" ),
130 "sonu.itbhu@googlemail.com" );
131 aboutData.addAuthor( ki18n(
"Simon Edwards" ),
132 ki18n(
"Marble Python Bindings" ),
133 "simon@simonzone.com" );
134 aboutData.addAuthor( ki18n(
"Magnus Valle" ),
135 ki18n(
"Historical Maps" ),
137 aboutData.addAuthor( ki18n(
"Médéric Boquien" ),
138 ki18n(
"Astronomical Observatories" ),
139 "mboquien@free.fr" );
142 aboutData.addAuthor( ki18n(
"Rene Kuettner" ),
143 ki18n(
"ESA Summer of Code in Space 2012 Project:"
144 " Visualization of planetary satellites" ),
145 "rene@bitkanal.net" );
146 aboutData.addAuthor( ki18n(
"Guillaume Martres" ),
147 ki18n(
"ESA Summer of Code in Space 2011 Project:"
148 " Visualization of Satellite Orbits" ),
149 "smarter@ubuntu.com" );
152 aboutData.addAuthor( ki18n(
"Konstantin Oblaukhov" ),
153 ki18n(
"Google Summer of Code 2011 Project:"
154 " OpenStreetMap Vector Rendering" ),
155 "oblaukhov.konstantin@gmail.com" );
156 aboutData.addAuthor( ki18n(
"Daniel Marth" ),
157 ki18n(
"Google Summer of Code 2011 Project:"
158 " Marble Touch on MeeGo" ),
159 "danielmarth@gmx.at" );
160 aboutData.addAuthor( ki18n(
"Gaurav Gupta" ),
161 ki18n(
"Google Summer of Code 2010 Project:"
163 "1989.gaurav@gmail.com" );
164 aboutData.addAuthor( ki18n(
"Harshit Jain " ),
165 ki18n(
"Google Summer of Code 2010 Project:"
167 "hjain.itbhu@gmail.com" );
168 aboutData.addAuthor( ki18n(
"Siddharth Srivastava" ),
169 ki18n(
"Google Summer of Code 2010 Project:"
170 " Turn-by-turn Navigation" ),
171 "akssps011@gmail.com" );
172 aboutData.addAuthor( ki18n(
"Andrew Manson" ),
173 ki18n(
"Google Summer of Code 2009 Project:"
175 "g.real.ate@gmail.com" );
176 aboutData.addAuthor( ki18n(
"Bastian Holst" ),
177 ki18n(
"Google Summer of Code 2009 Project:"
178 " Online Services" ),
179 "bastianholst@gmx.de" );
180 aboutData.addAuthor( ki18n(
"Patrick Spendrin" ),
181 ki18n(
"Google Summer of Code 2008 Project:"
182 " Vector Tiles for Marble" ),
183 "pspendrin@gmail.com" );
184 aboutData.addAuthor( ki18n(
"Shashank Singh" ),
185 ki18n(
"Google Summer of Code 2008 Project:"
186 " Panoramio / Wikipedia -photo support for Marble" ),
187 "shashank.personal@gmail.com" );
188 aboutData.addAuthor( ki18n(
"Carlos Licea" ),
189 ki18n(
"Google Summer of Code 2007 Project:"
190 " Equirectangular Projection (\"Flat Map\")" ),
191 "carlos.licea@kdemail.net" );
192 aboutData.addAuthor( ki18n(
"Andrew Manson" ),
193 ki18n(
"Google Summer of Code 2007 Project:"
194 " GPS Support for Marble" ),
195 "g.real.ate@gmail.com" );
196 aboutData.addAuthor( ki18n(
"Murad Tagirov" ),
197 ki18n(
"Google Summer of Code 2007 Project:"
198 " KML Support for Marble" ),
199 "tmurad@gmail.com" );
202 aboutData.addAuthor( ki18n(
"Simon Schmeisser" ),
203 ki18n(
"Development & Patches" ));
204 aboutData.addAuthor( ki18n(
"Claudiu Covaci" ),
205 ki18n(
"Development & Patches" ));
206 aboutData.addAuthor( ki18n(
"David Roberts" ),
207 ki18n(
"Development & Patches" ));
208 aboutData.addAuthor( ki18n(
"Nikolas Zimmermann" ),
209 ki18n(
"Development & Patches" ));
210 aboutData.addAuthor( ki18n(
"Jan Becker" ),
211 ki18n(
"Development & Patches" ));
212 aboutData.addAuthor( ki18n(
"Stefan Asserhäll" ),
213 ki18n(
"Development & Patches" ));
214 aboutData.addAuthor( ki18n(
"Laurent Montel" ),
215 ki18n(
"Development & Patches" ));
216 aboutData.addAuthor( ki18n(
"Mayank Madan" ),
217 ki18n(
"Development & Patches" ));
218 aboutData.addAuthor( ki18n(
"Prashanth Udupa" ),
219 ki18n(
"Development & Patches" ));
220 aboutData.addAuthor( ki18n(
"Anne-Marie Mahfouf" ),
221 ki18n(
"Development & Patches" ));
222 aboutData.addAuthor( ki18n(
"Josef Spillner" ),
223 ki18n(
"Development & Patches" ));
224 aboutData.addAuthor( ki18n(
"Frerich Raabe" ),
225 ki18n(
"Development & Patches" ));
226 aboutData.addAuthor( ki18n(
"Frederik Gladhorn" ),
227 ki18n(
"Development & Patches" ));
228 aboutData.addAuthor( ki18n(
"Fredrik Höglund" ),
229 ki18n(
"Development & Patches" ));
230 aboutData.addAuthor( ki18n(
"Albert Astals Cid" ),
231 ki18n(
"Development & Patches" ));
232 aboutData.addAuthor( ki18n(
"Thomas Zander" ),
233 ki18n(
"Development & Patches" ));
234 aboutData.addAuthor( ki18n(
"Joseph Wenninger" ),
235 ki18n(
"Development & Patches" ));
236 aboutData.addAuthor( ki18n(
"Kris Thomsen" ),
237 ki18n(
"Development & Patches" ));
238 aboutData.addAuthor( ki18n(
"Daniel Molkentin" ),
239 ki18n(
"Development & Patches" ));
240 aboutData.addAuthor( ki18n(
"Christophe Leske" ),
241 ki18n(
"Platforms & Distributions" ));
242 aboutData.addAuthor( ki18n(
"Sebastian Wiedenroth" ),
243 ki18n(
"Platforms & Distributions" ));
244 aboutData.addAuthor( ki18n(
"Tim Sutton" ),
245 ki18n(
"Platforms & Distributions" ));
246 aboutData.addAuthor( ki18n(
"Christian Ehrlicher" ),
247 ki18n(
"Platforms & Distributions" ));
248 aboutData.addAuthor( ki18n(
"Ralf Habacker" ),
249 ki18n(
"Platforms & Distributions" ));
250 aboutData.addAuthor( ki18n(
"Steffen Joeris" ),
251 ki18n(
"Platforms & Distributions" ));
252 aboutData.addAuthor( ki18n(
"Marcus Czeslinski" ),
253 ki18n(
"Platforms & Distributions" ));
254 aboutData.addAuthor( ki18n(
"Marcus D. Hanwell" ),
255 ki18n(
"Platforms & Distributions" ));
256 aboutData.addAuthor( ki18n(
"Chitlesh Goorah" ),
257 ki18n(
"Platforms & Distributions" ));
258 aboutData.addAuthor( ki18n(
"Nuno Pinheiro" ),
260 aboutData.addAuthor( ki18n(
"Torsten Rahn" ),
264 aboutData.addCredit( ki18n(
"Luis Silva" ),
265 ki18n(
"Various Suggestions & Testing" ));
266 aboutData.addCredit( ki18n(
"Stefan Jordan" ),
267 ki18n(
"Various Suggestions & Testing" ));
268 aboutData.addCredit( ki18n(
"Robert Scott" ),
269 ki18n(
"Various Suggestions & Testing" ));
270 aboutData.addCredit( ki18n(
"Lubos Petrovic" ),
271 ki18n(
"Various Suggestions & Testing" ));
272 aboutData.addCredit( ki18n(
"Benoit Sigoure" ),
273 ki18n(
"Various Suggestions & Testing" ));
274 aboutData.addCredit( ki18n(
"Martin Konold" ),
275 ki18n(
"Various Suggestions & Testing" ));
276 aboutData.addCredit( ki18n(
"Matthias Welwarsky" ),
277 ki18n(
"Various Suggestions & Testing" ));
278 aboutData.addCredit( ki18n(
"Rainer Endres" ),
279 ki18n(
"Various Suggestions & Testing" ));
280 aboutData.addCredit( ki18n(
"Ralf Gesellensetter" ),
281 ki18n(
"Various Suggestions & Testing" ));
282 aboutData.addCredit( ki18n(
"Tim Alder" ),
283 ki18n(
"Various Suggestions & Testing" ));
284 aboutData.addCredit( ki18n(
"John Layt" ),
285 ki18n(
"Special thanks for providing an"
286 " important source of inspiration by creating"
287 " Marble's predecessor \"Kartographer\"." ));
291 KCmdLineArgs::init( argc, argv, &aboutData );
296 KCmdLineOptions options;
297 options.add(
"debug-info", ki18n(
"Enable debug output" ) );
298 options.add(
"timedemo", ki18n(
"Make a time measurement to check performance" ) );
299 options.add(
"fps", ki18n(
"Show frame rate" ) );
300 options.add(
"tile-id", ki18n(
"Show tile IDs" ) );
301 options.add(
"runtimeTrace", ki18n(
"Show time spent in each layer" ) );
302 options.add(
"marbledatapath <data path>", ki18n(
"Use a different directory which contains map data" ) );
304 options.add(
"nosmallscreen", ki18n(
"Do not use the interface optimized for small screens" ) );
307 options.add(
"smallscreen", ki18n(
"Use the interface optimized for small screens" ) );
310 options.add(
"nohighresolution", ki18n(
"Do not use the interface optimized for high resolutions" ) );
313 options.add(
"highresolution", ki18n(
"Use the interface optimized for high resolutions" ) );
315 options.add(
"latlon <coordinates>", ki18n(
"Show map at given lat lon coordinates" ) );
316 options.add(
"geo-uri <uri>", ki18n(
"Show map at given geo uri" ) );
317 options.add(
"distance <value>", ki18n(
"Set the distance of the observer to the globe (in km)" ) );
318 options.add(
"map <id>", ki18n(
"Use map id (e.g. \"earth/openstreetmap/openstreetmap.dgml\")" ) );
319 options.add(
"+[file]", ki18n(
"One or more placemark files to be opened" ) );
321 KCmdLineArgs::addCmdLineOptions( options );
322 KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
325 KGlobal::locale()->insertCatalog(
"marble_qt" );
331 if ( args->isSet(
"smallscreen" ) ) {
338 if ( args->isSet(
"highresolution" ) ) {
347 QString marbleDataPath = args->getOption(
"marbledatapath" );
348 if( marbleDataPath.
isEmpty() ) {
349 marbleDataPath.
clear();
355 if ( args->isSet(
"timedemo" ) ) {
362 if ( args->isSet(
"fps" ) ) {
366 if ( args->isSet(
"tile-id" ) ) {
370 const QString map = args->getOption(
"map" );
375 const QString coordinatesString = args->getOption(
"latlon" );
376 if ( !coordinatesString.
isEmpty() ) {
377 bool success =
false;
386 const QString geoUriString = args->getOption(
"geo-uri" );
387 if ( !geoUriString.
isEmpty() ) {
391 const QString distance = args->getOption(
"distance" );
393 bool success =
false;
394 const qreal distanceValue = distance.
toDouble(&success);
400 for (
int i = 0; i < args->count(); ++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...
double toDouble(bool *ok) const
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...
QString readGraphicsSystem(int argc, char *argv[], const KAboutData &aboutData)
static MarbleGlobal * getInstance()
void openGeoUri(const QString &geoUriString)
Opens the passed Geo URI.
void setGraphicsSystem(const QString &system)
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
MarbleWidget * marbleWidget()