diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-05-25 08:28:35 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-05-25 08:58:37 -0700 |
commit | 92ee374494b83c47115f6f479530e7e9678ad562 (patch) | |
tree | 8455b81d5f1cbe26492331f6716693e66c574ad2 /qt-ui/globe.cpp | |
parent | dbb84188c2d323365e100a47cdddd6e793d5e068 (diff) | |
download | subsurface-92ee374494b83c47115f6f479530e7e9678ad562.tar.gz |
Find Google maps in Subsurface's source tree
This way the user doesn't need to move the two folders googlemaps and
googlesat around in the filesystem.
This only works if Subsurface is started from the build directory - it
doesn't work when Subsurface is installed (and it doesn't at all address
the need to install these files and bundle them as well).
I'd consider this a hack to show how the real solution should work.
There is one more part of this that is a hack: Marble no longer searches
its default data directory; the path we set replaces the Marble system
search path. Sadly, Marble doesn't support paths the way Unix thinks of
them with multiple directories, separated by ':'. So this means that
Marble no longer finds any of its default icons. For most of them that
seems fine as I don't think lacking the icons for "manned_landing",
"robotic_rover", "unmanned_hard_landing" or the various types of places of
worship that Marble supports is necessarily a big issues for Subsurface,
but at least the default_location icon seemed important. And since we now
need to carry our own, I replaced the boring circle with a tiny dive flag.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/globe.cpp')
-rw-r--r-- | qt-ui/globe.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp index 0bd8f3d83..014a84a09 100644 --- a/qt-ui/globe.cpp +++ b/qt-ui/globe.cpp @@ -8,6 +8,7 @@ #include <marble/GeoDataPlacemark.h> #include <marble/GeoDataDocument.h> #include <marble/MarbleModel.h> +#include <marble/MarbleDirs.h> #if INCOMPLETE_MARBLE #include "marble/GeoDataTreeModel.h" #else @@ -18,6 +19,9 @@ GlobeGPS::GlobeGPS(QWidget* parent) : MarbleWidget(parent), loadedDives(0) { + // this will find the Google maps when running from your build directory + // TODO: all the magic to find the install path (and actually install/bundle these files) + MarbleDirs::setMarbleDataPath(QDir("./marbledata").absolutePath()); messageWidget = new KMessageWidget(this); messageWidget->setCloseButtonVisible(false); messageWidget->setHidden(true); |