marble
MobileMainWindow.cpp
Go to the documentation of this file.
75 MainWindow::MainWindow( const QString &marbleDataPath, const QVariantMap &cmdLineSettings, QWidget *parent ) :
126 connect( m_kineticScrollingAction, SIGNAL(triggered(bool)), this, SLOT(setKineticScrollingEnabled(bool)) );
132 downloadRegionAction->setStatusTip( tr( "Download a map region in different zoom levels for offline usage" ) );
199 // delay file loading to initObject(), such that restoring view from previous session in readSettings()
280 dialog->setApplicationTitle( tr( "Marble Virtual Globe %1" ).arg( "MARBLE_MOBILE_VERSION_STRING" ) );
317 const Orientation orientation = (Orientation)settings.value( "orientation", (int)OrientationLandscape ).toInt();
325 m_marbleWidget->model()->bookmarkManager()->setShowBookmarks( settings.value( "showBookmarks", true ).toBool() );
333 const QVariantMap::ConstIterator mapThemeIdIt = overrideSettings.find( QLatin1String( "mapTheme" ) );
351 const QVariantMap::ConstIterator distanceIt = overrideSettings.find( QLatin1String( "distance" ) );
378 bool const startupWarning = settings.value( "showGuidanceModeStartupWarning", QVariant( true ) ).toBool();
380 routingManager->setLastOpenPath( settings.value( "lastRouteOpenPath", QDir::homePath() ).toString() );
381 routingManager->setLastSavePath( settings.value( "lastRouteSavePath", QDir::homePath() ).toString() );
384 tempColor = QColor( settings.value( "routeColorStandard", Oxygen::skyBlue4.name() ).toString() );
388 tempColor = QColor( settings.value( "routeColorHighlighted", Oxygen::skyBlue1.name() ).toString() );
392 tempColor = QColor( settings.value( "routeColorAlternative", Oxygen::aluminumGray4.name() ).toString() );
424 if ( profileIndex >= 0 && profileIndex < m_marbleWidget->model()->routingManager()->profilesModel()->rowCount() ) {
425 RoutingProfile profile = m_marbleWidget->model()->routingManager()->profilesModel()->profiles().at( profileIndex );
433 QString positionProvider = settings.value( "activePositionTrackingPlugin", QString() ).toString();
450 CurrentLocationWidget* trackingWidget = qobject_cast<CurrentLocationWidget*>( m_trackingWindow->centralWidget() );
455 trackingWidget->setLastOpenPath( settings.value( "lastTrackOpenPath", QDir::homePath() ).toString() );
456 trackingWidget->setLastSavePath( settings.value( "lastTrackSavePath", QDir::homePath() ).toString() );
461 m_marbleWidget->setDefaultFont( settings.value( "mapFont", QApplication::font() ).value<QFont>() );
462 m_marbleWidget->setMapQualityForViewContext( static_cast<Marble::MapQuality>( settings.value( "stillQuality", Marble::HighQuality ).toInt() ), Marble::Still );
463 m_marbleWidget->setMapQualityForViewContext( static_cast<Marble::MapQuality>( settings.value( "animationQuality", Marble::LowQuality ).toInt() ), Marble::Animation );
464 m_marbleWidget->setDefaultAngleUnit( static_cast<Marble::AngleUnit>( settings.value( "angleUnit", Marble::DMSDegree ).toInt() ) );
473 m_marbleWidget->model()->setPersistentTileCacheLimit( settings.value( "persistentTileCacheLimit", 0 ).toInt() * 1024 ); // default to unlimited
474 m_marbleWidget->setVolatileTileCacheLimit( settings.value( "volatileTileCacheLimit", 6 ).toInt() * 1024 );
518 QList<RoutingProfile> profiles = m_marbleWidget->model()->routingManager()->profilesModel()->profiles();
540 RoutingProfile const profile = m_marbleWidget->model()->routingManager()->routeRequest()->routingProfile();
557 const CurrentLocationWidget *trackingWidget = static_cast<const CurrentLocationWidget *>( m_trackingWindow->centralWidget() );
568 settings.setValue( "inertialEarthRotation", m_marbleWidget->inputHandler()->inertialEarthRotationEnabled() );
576 settings.setValue( "showGuidanceModeStartupWarning", routingManager->showGuidanceModeStartupWarning() );
QLayout * layout() const
PositionProviderPlugin positionProviderPlugin
Definition: PositionTracking.h:35
A main window that sets the WA_Maemo5StackedWindow attribute to serve as a stackable window on Maemo...
Definition: StackableWindow.h:24
QByteArray toByteArray() const
void setWidget(QWidget *widget)
void setPersistentTileCacheLimit(quint64 kiloBytes)
Set the limit of the persistent (on hard disc) tile cache.
Definition: MarbleModel.cpp:607
void setTrackVisible(bool visible)
Definition: CurrentLocationWidget.cpp:440
Definition: position-tracking.qml:12
void setSizes(const QList< int > &list)
bool loadFile(const QString &relativeFilePath)
load bookmark file as GeoDataDocument and return true if loaded successfully else false ...
Definition: BookmarkManager.cpp:91
void closeEvent(QCloseEvent *event)
Definition: MobileMainWindow.cpp:285
QList< RoutingProfile > profiles() const
Definition: RoutingProfilesModel.cpp:60
static void setMarbleDataPath(const QString &adaptedPath)
Definition: MarbleDirs.cpp:307
QStringList childKeys() const
QString name() const
void addAction(QAction *action)
void setStretchFactor(int index, int stretch)
void endGroup()
void setChecked(bool)
This file contains the headers for MarbleModel.
QList< const PositionProviderPlugin * > positionProviderPlugins() const
Returns all available PositionProviderPlugins.
Definition: PluginManager.cpp:84
Display * display()
void setNetworkAccessible(NetworkAccessibility accessible)
void setSpecifiedLatLonAltBox(GeoDataLatLonAltBox const &)
Definition: DownloadRegionDialog.cpp:342
void setMinimumWidth(int minw)
void setIcon(const QIcon &icon)
const T & at(int i) const
void setAnimationsEnabled(bool enabled)
Set whether travels to a point should get animated.
Definition: MarbleWidget.cpp:1041
bool contains(const QString &str, Qt::CaseSensitivity cs) const
A widget consisting of input fields for places / routing destinations, a list view showing routing in...
Definition: RoutingWidget.h:35
virtual void setVisible(bool visible)
void setRouteColorAlternative(QColor color)
Set color for alternative route rendering.
Definition: RoutingManager.cpp:510
void setAttribute(Qt::WidgetAttribute attribute, bool on)
T value() const
void setProjection(int projection)
Set the Projection used for the map.
Definition: MarbleWidget.cpp:591
const GeoDataLatLonAltBox & viewLatLonAltBox() const
Definition: ViewportParams.cpp:305
int exec()
void setDefaultAngleUnit(AngleUnit angleUnit)
Definition: MarbleWidget.cpp:1051
void setAlpha(int alpha)
QColor routeColorAlternative() const
Get color for alternative route rendering.
Definition: RoutingManager.cpp:515
Definition: MapViewWidget.h:32
void setInertialEarthRotationEnabled(bool enabled)
Definition: MarbleInputHandler.cpp:116
void setVolatileTileCacheLimit(quint64 kiloBytes)
Set the limit of the volatile (in RAM) tile cache.
Definition: MarbleWidget.cpp:987
const PluginManager * pluginManager() const
Definition: MarbleModel.cpp:634
QString lastOpenPath() const
Definition: CurrentLocationWidget.cpp:430
Definition: RoutingProfile.h:24
QString homePath()
void setProfiles(const QList< RoutingProfile > &profiles)
Definition: RoutingProfilesModel.cpp:53
QString tr(const char *sourceText, const char *disambiguation, int n)
AutoNavigation::CenterMode recenterMode() const
Definition: CurrentLocationWidget.cpp:415
void readPluginSettings(QSettings &settings)
Reads the plugin settings from the passed QSettings.
Definition: MarbleWidget.cpp:1112
void setWindowIcon(const QIcon &icon)
MainWindow(const QString &marbleDataPath=QString(), QWidget *parent=0)
Definition: KdeMainWindow.cpp:40
bool isFullScreen() const
void addWidget(QWidget *widget)
void setOrientation(Qt::Orientation)
void setShowBookmarks(bool visible)
Definition: BookmarkManager.cpp:169
A widget class that displays a view of the earth.
Definition: MarbleWidget.h:104
The abstract class that provides position information.
Definition: PositionProviderPlugin.h:26
Definition: PositionTracking.h:31
int indexOf(const T &value, int from) const
void setVisibleLatLonAltBox(GeoDataLatLonAltBox const &)
Definition: DownloadRegionDialog.cpp:347
int width() const
void setValue(const QString &key, const QVariant &value)
void resize(int w, int h)
QVector< TileCoordsPyramid > region() const
Definition: DownloadRegionDialog.cpp:311
void setRouteColorStandard(QColor color)
Set color for standard route rendering.
Definition: RoutingManager.cpp:490
const char * name() const
QWidget * centralWidget() const
A dialog that provides a list of targets to go to: The current location, route start, destination and via points and bookmarks.
Definition: GoToDialog.h:33
QColor routeColorStandard() const
Get color for standard route rendering.
Definition: RoutingManager.cpp:495
RoutingProfile routingProfile() const
Definition: RouteRequest.cpp:321
void addGeoDataFile(const QString &filename)
Handle file loading into the treeModel.
Definition: MarbleModel.cpp:725
bool testAttribute(Qt::WidgetAttribute attribute) const
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
QFont font()
int count(const T &value) const
void downloadRegion(QVector< TileCoordsPyramid > const &)
Definition: MarbleWidget.cpp:1176
void processEvents(QFlags< QEventLoop::ProcessEventsFlag > flags)
qreal centerLongitude() const
Return the longitude of the center point.
Definition: MarbleWidget.cpp:680
void setLayout(QLayout *layout)
void setWorkOffline(bool workOffline)
Definition: MarbleModel.cpp:843
void setAutoZoom(bool activate)
Slot for Auto Zooming while navigating.
Definition: CurrentLocationWidget.cpp:350
int toInt(bool *ok) const
void setMarbleModel(const MarbleModel *)
Definition: PositionProviderPlugin.cpp:42
void setUpdatesEnabled(bool enable)
void home(qreal &lon, qreal &lat, int &zoom) const
get the home point
Definition: MarbleModel.cpp:446
bool contains(const QString &key) const
void setRouteColorHighlighted(QColor color)
Set color for highlighted route rendering.
Definition: RoutingManager.cpp:500
RoutingProfilesModel * profilesModel()
Provides access to the model which contains all possible routing profiles.
Definition: RoutingManager.cpp:256
void raise()
bool isEmpty() const
void setLastSavePath(const QString &path)
Set last directory the user saved a route to.
Definition: RoutingManager.cpp:480
PositionTracking * positionTracking() const
Definition: MarbleModel.cpp:512
QStringList childGroups() const
bool inertialEarthRotationEnabled() const
Returns true iff dragging the map with the mouse keeps spinning in the chosen direction for a slightl...
Definition: MarbleInputHandler.cpp:121
void setRoutingProfile(const RoutingProfile &profile)
Definition: RouteRequest.cpp:315
void move(int x, int y)
QString lastSavePath() const
Return last directory the user saved a route to.
Definition: RoutingManager.cpp:485
void setShowGuidanceModeStartupWarning(bool show)
Set whether a warning message should be shown to the user before starting guidance mode...
Definition: RoutingManager.cpp:460
void setCentralWidget(QWidget *widget)
void setLastSavePath(const QString &path)
Definition: CurrentLocationWidget.cpp:451
WId winId() const
GeoDataCoordinates coordinates() const
Returns the position of the item selected by the user, or a default constructed GeoDataLookAt if the ...
Definition: GoToDialog.cpp:389
void setAllowedTileLevelRange(int const minimumTileLevel, int const maximumTileLevel)
Definition: DownloadRegionDialog.cpp:261
void readSettings()
Restores a previously saved route request and route from disk, if any.
Definition: RoutingManager.cpp:374
Definition: MarbleAboutDialog.h:30
int alpha() const
virtual QString nameId() const =0
Returns the unique name of the plugin.
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
QList< Key > keys() const
QSize toSize() const
void loadDefaultProfiles()
Definition: RoutingProfilesModel.cpp:126
bool trackVisible() const
Definition: CurrentLocationWidget.cpp:425
void setLastOpenPath(const QString &path)
Definition: CurrentLocationWidget.cpp:446
Delegates data retrieval and model updates to the appropriate routing provider.
Definition: RoutingManager.h:37
bool autoZoom() const
Definition: CurrentLocationWidget.cpp:420
void remove(const QString &key)
void centerOn(const qreal lon, const qreal lat, bool animated=false)
Center the view on a geographical point.
Definition: MarbleWidget.cpp:549
void setWidgetResizable(bool resizable)
void setShortcut(const QKeySequence &shortcut)
void setRecenterMode(int recenterMode)
Slot that decides whether recentering should be done.
Definition: CurrentLocationWidget.cpp:342
This file contains the headers for ViewportParams.
QByteArray saveState(int version) const
void setCheckable(bool)
bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType type, QGenericReturnArgument ret, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8, QGenericArgument val9)
const QHash< QString, QHash< QString, QVariant > > & pluginSettings() const
Definition: RoutingProfile.cpp:33
void setHome(qreal lon, qreal lat, int zoom=1050)
Set the home point.
Definition: MarbleModel.cpp:452
void setLastOpenPath(const QString &path)
Set last directory the user opened a route from.
Definition: RoutingManager.cpp:470
void setMapQualityForViewContext(MapQuality quality, ViewContext viewContext)
Set the map quality for the specified view context.
Definition: MarbleWidget.cpp:1009
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
QVariant value(const QString &key, const QVariant &defaultValue) const
void setStatusTip(const QString &statusTip)
void setMarbleWidget(MarbleWidget *widget, MapThemeManager *mapThemeManager)
Set a MarbleWidget associated to this widget.
Definition: MapViewWidget.cpp:401
char * toString(const T &value)
void activateWindow()
bool isEmpty() const
void setWindowTitle(const QString &)
bool restoreState(const QByteArray &state, int version)
void setShowAtmosphere(bool visible)
Set whether the atmospheric glow is visible.
Definition: MarbleWidget.cpp:861
void showFullScreen()
BookmarkManager * bookmarkManager()
return instance of BookmarkManager
Definition: MarbleModel.cpp:213
void setShowDirectionsButtonVisible(bool visible)
Show or hide the "open file..." button.
Definition: RoutingWidget.cpp:634
QWebPage * page() const
QString lastSavePath() const
Definition: CurrentLocationWidget.cpp:435
void writeSettings() const
Saves the current route request and the current route to disk.
Definition: RoutingManager.cpp:327
bool toBool() const
Projection
This enum is used to choose the projection shown in the view.
Definition: MarbleGlobal.h:44
This file contains the headers for MarbleWidget.
QPoint toPoint() const
virtual PositionProviderPlugin * newInstance() const =0
Create a new PositionProvider Plugin and return it.
void setDistance(qreal distance)
Set the distance of the observer to the globe in km.
Definition: MarbleWidget.cpp:1076
double toDouble(bool *ok) const
void setPositionProviderPlugin(PositionProviderPlugin *plugin)
Change the position provider to use.
Definition: PositionTracking.cpp:184
void setDefaultFont(const QFont &font)
Definition: MarbleWidget.cpp:1061
void show()
int find(QChar c, int i, bool cs) const
MarbleWidget * marbleWidget() const
Definition: KdeMainWindow.cpp:153
QStringList mapThemeIds() const
Returns a list of all locally available map theme IDs.
Definition: MapThemeManager.cpp:138
void writePluginSettings(QSettings &settings) const
Writes the plugin settings in the passed QSettings.
Definition: MarbleWidget.cpp:1129
void clearVolatileTileCache()
Definition: MarbleWidget.cpp:981
QColor routeColorHighlighted() const
Get color for highlighted route rendering.
Definition: RoutingManager.cpp:505
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
MarbleWidgetInputHandler * inputHandler() const
Returns the current input handler.
Definition: MarbleWidget.cpp:320
void addGeoDataFile(const QString &path)
Definition: MobileMainWindow.cpp:197
QString toString() const
QString lastOpenPath() const
Return last directory the user opened a route from.
Definition: RoutingManager.cpp:475
void setNetworkAccessManager(QNetworkAccessManager *manager)
void setMarbleModel(MarbleModel *marbleModel)
Definition: MarbleLegendBrowser.cpp:89
bool showGuidanceModeStartupWarning() const
Returns true (default) if a warning is shown to the user when starting guidance mode.
Definition: RoutingManager.cpp:465
void setMarbleWidget(MarbleWidget *widget)
Set a MarbleWidget associated to this widget.
Definition: CurrentLocationWidget.cpp:104
void beginGroup(const QString &prefix)
qreal centerLatitude() const
Return the latitude of the center point.
Definition: MarbleWidget.cpp:675
void setSelectionMethod(SelectionMethod const )
Definition: DownloadRegionDialog.cpp:274
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.