[Marble-commits] KDE/kdeedu/marble/src/lib/routing
Dennis Nienhüser
earthwings at gentoo.org
Sun Apr 3 16:51:02 CEST 2011
SVN commit 1226969 by nienhueser:
Show a warning message when activating guidance mode that advises against possibly erroneous instructions and reminds to apply common sense. Can be turned off with a 'don't show again' switch.
M +13 -1 RoutingManager.cpp
--- trunk/KDE/kdeedu/marble/src/lib/routing/RoutingManager.cpp #1226968:1226969
@@ -29,7 +29,7 @@
#include "PositionProviderPlugin.h"
#include <QtCore/QFile>
-#include <QtGui/QMessageBox>
+#include <QtGui/QErrorMessage>
#include <QMutexLocker>
namespace Marble
@@ -330,6 +330,18 @@
if ( enabled ) {
d->saveRoute( d->stateFile( "guidance.kml" ) );
+
+ QString text = "<p>" + tr( "The Marble development team wishes you a pleasant and safe journey." ) + "</p>";
+ text += "<p>" + tr( "Caution: Driving instructions may be incomplete or inaccurate." );
+ text += " " + tr( "Road construction, weather and other unforeseen variables can result in this suggested route not to be the most expedient or safest route to your destination." );
+ text += " " + tr( "Please use common sense while navigating." ) + "</p>";
+ QErrorMessage* message = new QErrorMessage;
+ message->setWindowTitle( "Guidance Mode - Marble" );
+
+ bool const smallScreen = MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen;
+ message->resize( 380, smallScreen ? 400 : 240 );
+ connect( message, SIGNAL( finished( int ) ), message, SLOT( deleteLater() ) );
+ message->showMessage( text, "routing_plugin_startup_warning" );
} else {
d->loadRoute( d->stateFile( "guidance.kml" ) );
}
More information about the Marble-commits
mailing list