summaryrefslogtreecommitdiff
path: root/src/location/maps
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-09-21 20:12:21 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-09-26 22:25:16 +0200
commitdf7fddf600bed1dab77299b02c0bc98bb540bc28 (patch)
treea451d94b28a2a99acdbe9149e94f4774b5821715 /src/location/maps
parent6634b152b61a39f455be4d6fdcc173d8c9574eb8 (diff)
downloadqtlocation-df7fddf600bed1dab77299b02c0bc98bb540bc28.tar.gz
Remove turn-by-turn navigation
It is unfinished and untested, with no support from any backend. This was the last bit of functionality in the labs module, so remove that entirely, including the QML plugin and the now unused QParameterizableObject type. Change-Id: Ic448e643cb345d1da877137a673ab572c836b3fe Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/maps')
-rw-r--r--src/location/maps/qgeoserviceprovider.cpp28
-rw-r--r--src/location/maps/qgeoserviceprovider.h3
-rw-r--r--src/location/maps/qgeoserviceprovider_p.h1
-rw-r--r--src/location/maps/qgeoserviceproviderfactory.cpp25
-rw-r--r--src/location/maps/qgeoserviceproviderfactory.h3
-rw-r--r--src/location/maps/qnavigationmanager.cpp125
-rw-r--r--src/location/maps/qnavigationmanager_p.h104
-rw-r--r--src/location/maps/qnavigationmanagerengine.cpp219
-rw-r--r--src/location/maps/qnavigationmanagerengine_p.h166
9 files changed, 0 insertions, 674 deletions
diff --git a/src/location/maps/qgeoserviceprovider.cpp b/src/location/maps/qgeoserviceprovider.cpp
index 2b99a7f3..97b0ac55 100644
--- a/src/location/maps/qgeoserviceprovider.cpp
+++ b/src/location/maps/qgeoserviceprovider.cpp
@@ -45,13 +45,11 @@
#include "qgeomappingmanager_p.h"
#include "qgeoroutingmanager.h"
#include "qplacemanager.h"
-#include "qnavigationmanager_p.h"
#include "qgeocodingmanagerengine.h"
#include "qgeomappingmanagerengine_p.h"
#include "qgeoroutingmanagerengine.h"
#include "qplacemanagerengine.h"
#include "qplacemanagerengine_p.h"
-#include "qnavigationmanagerengine_p.h"
#include <QList>
#include <QString>
@@ -364,10 +362,6 @@ template <> QPlaceManagerEngine *createEngine<QPlaceManagerEngine>(QGeoServicePr
{
return d_ptr->factory->createPlaceManagerEngine(d_ptr->cleanedParameterMap, &(d_ptr->placeError), &(d_ptr->placeErrorString));
}
-template <> QNavigationManagerEngine *createEngine<QNavigationManagerEngine>(QGeoServiceProviderPrivate *d_ptr)
-{
- return d_ptr->factory->createNavigationManagerEngine(d_ptr->cleanedParameterMap, &(d_ptr->navigationError), &(d_ptr->navigationErrorString));
-}
/* Template for generating the code for each of the geocodingManager(),
* mappingManager() etc methods */
@@ -547,22 +541,6 @@ QPlaceManager *QGeoServiceProvider::placeManager() const
}
/*!
- Returns a new QNavigationManager made available by the service provider.
-
- After this function has been called, error() and errorString() will
- report any errors which occurred during the construction of the QNavigationManagerEngine.
-*/
-QNavigationManager *QGeoServiceProvider::navigationManager() const
-{
- QNavigationManager * mgr = d_ptr->manager<QNavigationManager, QNavigationManagerEngine>(
- &(d_ptr->navigationError), &(d_ptr->navigationErrorString),
- &(d_ptr->navigationManager));
- if (!mgr)
- qDebug() << d_ptr->error << ", " << d_ptr->errorString;
- return mgr;
-}
-
-/*!
Returns an error code describing the error which occurred during the
last operation that was performed by this class.
*/
@@ -748,8 +726,6 @@ void QGeoServiceProvider::setLocale(const QLocale &locale)
d_ptr->mappingManager->setLocale(locale);
if (d_ptr->placeManager)
d_ptr->placeManager->setLocale(locale);
- if (d_ptr->navigationManager)
- d_ptr->navigationManager->setLocale(locale);
}
/*******************************************************************************
@@ -778,7 +754,6 @@ QGeoServiceProviderPrivate::~QGeoServiceProviderPrivate()
delete routingManager;
delete mappingManager;
delete placeManager;
- delete navigationManager;
}
void QGeoServiceProviderPrivate::unload()
@@ -795,9 +770,6 @@ void QGeoServiceProviderPrivate::unload()
delete placeManager;
placeManager = nullptr;
- delete navigationManager;
- navigationManager = nullptr;
-
factory = nullptr;
error = QGeoServiceProvider::NoError;
errorString = QLatin1String("");
diff --git a/src/location/maps/qgeoserviceprovider.h b/src/location/maps/qgeoserviceprovider.h
index 0cde3137..32679f9e 100644
--- a/src/location/maps/qgeoserviceprovider.h
+++ b/src/location/maps/qgeoserviceprovider.h
@@ -52,12 +52,10 @@ class QGeoCodingManager;
class QGeoMappingManager;
class QGeoRoutingManager;
class QPlaceManager;
-class QNavigationManager;
class QGeoCodingManagerEngine;
class QGeoMappingManagerEngine;
class QGeoRoutingManagerEngine;
class QPlaceManagerEngine;
-class QNavigationManagerEngine;
class QGeoServiceProviderPrivate;
class QQmlEngine;
@@ -158,7 +156,6 @@ public:
QGeoMappingManager *mappingManager() const;
QGeoRoutingManager *routingManager() const;
QPlaceManager *placeManager() const;
- QNavigationManager *navigationManager() const;
Error error() const;
QString errorString() const;
diff --git a/src/location/maps/qgeoserviceprovider_p.h b/src/location/maps/qgeoserviceprovider_p.h
index 5e87f84a..2d2fb4ad 100644
--- a/src/location/maps/qgeoserviceprovider_p.h
+++ b/src/location/maps/qgeoserviceprovider_p.h
@@ -97,7 +97,6 @@ public:
QGeoRoutingManager *routingManager;
QGeoMappingManager *mappingManager;
QPlaceManager *placeManager;
- QNavigationManager *navigationManager = nullptr;
QQmlEngine *qmlEngine = nullptr;
QGeoServiceProvider::Error geocodeError;
diff --git a/src/location/maps/qgeoserviceproviderfactory.cpp b/src/location/maps/qgeoserviceproviderfactory.cpp
index fdd27464..62007bf1 100644
--- a/src/location/maps/qgeoserviceproviderfactory.cpp
+++ b/src/location/maps/qgeoserviceproviderfactory.cpp
@@ -168,31 +168,6 @@ QGeoServiceProviderFactory::createPlaceManagerEngine(const QVariantMap &paramete
}
/*!
- Returns a new QNavigationManagerEngine instance, initialized with \a
- parameters, which implements navigation functionality.
-
- If \a error is not \nullptr, it should be set to QGeoServiceProvider::NoError on
- success or an appropriate QGeoServiceProvider::Error on failure.
-
- If \a errorString is not \nullptr, it should be set to a string describing any
- error which occurred.
-
- The default implementation returns \nullptr, which causes a
- QGeoServiceProvider::NotSupportedError in QGeoServiceProvider.
-*/
-QNavigationManagerEngine *
-QGeoServiceProviderFactory::createNavigationManagerEngine(const QVariantMap &parameters,
- QGeoServiceProvider::Error *error,
- QString *errorString) const
-{
- Q_UNUSED(parameters);
- Q_UNUSED(error);
- Q_UNUSED(errorString);
-
- return nullptr;
-}
-
-/*!
Notify the plugin when the qml engine is ready. In this moment the plugins can use it
to register Image Providers.
diff --git a/src/location/maps/qgeoserviceproviderfactory.h b/src/location/maps/qgeoserviceproviderfactory.h
index f804cbe6..9b71f03c 100644
--- a/src/location/maps/qgeoserviceproviderfactory.h
+++ b/src/location/maps/qgeoserviceproviderfactory.h
@@ -67,9 +67,6 @@ public:
QGeoServiceProvider::Error *error,
QString *errorString) const;
- virtual QNavigationManagerEngine *createNavigationManagerEngine(const QVariantMap &parameters,
- QGeoServiceProvider::Error *error,
- QString *errorString) const;
virtual void setQmlEngine(QQmlEngine * engine);
};
diff --git a/src/location/maps/qnavigationmanager.cpp b/src/location/maps/qnavigationmanager.cpp
deleted file mode 100644
index f5f4dc57..00000000
--- a/src/location/maps/qnavigationmanager.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtLocation module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qnavigationmanager_p.h"
-#include "qnavigationmanagerengine_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QNavigationManagerPrivate
-{
-public:
- QNavigationManagerPrivate();
- ~QNavigationManagerPrivate();
-
- QNavigationManagerEngine *engine = nullptr;
-
-private:
- Q_DISABLE_COPY(QNavigationManagerPrivate)
-};
-
-QNavigationManagerPrivate::QNavigationManagerPrivate() = default;
-QNavigationManagerPrivate::~QNavigationManagerPrivate()
-{
- delete engine;
-}
-
-QNavigationManager::~QNavigationManager()
-{
- delete d_ptr;
-}
-
-QString QNavigationManager::managerName() const
-{
- return d_ptr->engine->managerName();
-}
-
-int QNavigationManager::managerVersion() const
-{
- return d_ptr->engine->managerVersion();
-}
-
-QNavigationManagerEngine *QNavigationManager::engine()
-{
- return d_ptr->engine;
-}
-
-bool QNavigationManager::isInitialized() const
-{
- return d_ptr->engine->isInitialized();
-}
-
-void QNavigationManager::setLocale(const QLocale &locale)
-{
- d_ptr->engine->setLocale(locale);
-}
-
-QLocale QNavigationManager::locale() const
-{
- return d_ptr->engine->locale();
-}
-
-void QNavigationManager::setMeasurementSystem(QLocale::MeasurementSystem system)
-{
- d_ptr->engine->setMeasurementSystem(system);
-}
-
-QLocale::MeasurementSystem QNavigationManager::measurementSystem() const
-{
- return d_ptr->engine->measurementSystem();
-}
-
-QAbstractNavigator *QNavigationManager::createNavigator(const QSharedPointer<QDeclarativeNavigatorParams> &navigator)
-{
- return d_ptr->engine->createNavigator(navigator);
-}
-
-QNavigationManager::QNavigationManager(QNavigationManagerEngine *engine, QObject *parent) : QObject(parent),
- d_ptr(new QNavigationManagerPrivate)
-{
- d_ptr->engine = engine;
- if (!d_ptr->engine) {
- qFatal("The navigation manager engine that was set for this mapping manager was NULL.");
- }
-
- connect(d_ptr->engine, &QNavigationManagerEngine::initialized,
- this, &QNavigationManager::initialized, Qt::QueuedConnection);
-}
-
-QT_END_NAMESPACE
diff --git a/src/location/maps/qnavigationmanager_p.h b/src/location/maps/qnavigationmanager_p.h
deleted file mode 100644
index 4d137ca6..00000000
--- a/src/location/maps/qnavigationmanager_p.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtLocation module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNAVIGATIONMANAGER_P_H
-#define QNAVIGATIONMANAGER_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QObject>
-#include <QLocale>
-#include <QtLocation/private/qlocationglobal_p.h>
-
-QT_BEGIN_NAMESPACE
-
-class QNavigationManagerEngine;
-class QNavigationManagerPrivate;
-class QDeclarativeNavigatorParams;
-class QDeclarativeGeoWaypoint;
-class QGeoRoute;
-class QGeoRouteSegment;
-class QAbstractNavigator;
-class Q_LOCATION_PRIVATE_EXPORT QNavigationManager : public QObject
-{
- Q_OBJECT
-
-public:
- ~QNavigationManager();
-
- QString managerName() const;
- int managerVersion() const;
- QNavigationManagerEngine *engine();
- bool isInitialized() const;
-
- void setLocale(const QLocale &locale);
- QLocale locale() const;
- void setMeasurementSystem(QLocale::MeasurementSystem system);
- QLocale::MeasurementSystem measurementSystem() const;
-
- QAbstractNavigator *createNavigator(const QSharedPointer<QDeclarativeNavigatorParams> &navigator);
-
-Q_SIGNALS:
- void initialized();
-
-
-protected:
- QNavigationManager(QNavigationManagerEngine *engine, QObject *parent = nullptr);
-
-private:
- QNavigationManagerPrivate *d_ptr;
- Q_DISABLE_COPY(QNavigationManager)
-
- friend class QGeoServiceProvider;
- friend class QGeoServiceProviderPrivate;
-};
-
-
-QT_END_NAMESPACE
-
-#endif // QNAVIGATIONMANAGER_P_H
diff --git a/src/location/maps/qnavigationmanagerengine.cpp b/src/location/maps/qnavigationmanagerengine.cpp
deleted file mode 100644
index 9d7dd850..00000000
--- a/src/location/maps/qnavigationmanagerengine.cpp
+++ /dev/null
@@ -1,219 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtLocation module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qgeoroute.h"
-#include "qnavigationmanagerengine_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QNavigationManagerEnginePrivate
-{
-public:
- QString managerName;
- int managerVersion;
- QLocale locale;
- QLocale::MeasurementSystem measurementSystem;
- bool initialized = false;
-};
-
-class QAbstractNavigatorPrivate
-{
-public:
- QLocale locale;
- QLocale::MeasurementSystem measurementSystem;
-};
-
-QAbstractNavigator::QAbstractNavigator(QObject *parent)
- : QObject(parent)
- , d(new QAbstractNavigatorPrivate)
-{
-}
-
-QAbstractNavigator::~QAbstractNavigator()
-{
-}
-
-void QAbstractNavigator::setLocale(const QLocale &locale)
-{
- d->locale = locale;
-}
-
-QLocale QAbstractNavigator::locale() const
-{
- return d->locale;
-}
-
-void QAbstractNavigator::setMeasurementSystem(QLocale::MeasurementSystem system)
-{
- d->measurementSystem = system;
-}
-
-QLocale::MeasurementSystem QAbstractNavigator::measurementSystem() const
-{
- return d->measurementSystem;
-}
-
-QVariant QAbstractNavigator::nextManeuverIcon() const
-{
- return QVariant();
-}
-
-double QAbstractNavigator::distanceToNextManeuver() const
-{
- return qQNaN();
-}
-
-int QAbstractNavigator::timeToNextManeuver() const
-{
- return -1;
-}
-
-int QAbstractNavigator::remainingTravelTime() const
-{
- return -1;
-}
-
-double QAbstractNavigator::remainingTravelDistance() const
-{
- return qQNaN();
-}
-
-int QAbstractNavigator::remainingTravelTimeToNextWaypoint() const
-{
- return -1;
-}
-
-double QAbstractNavigator::remainingTravelDistanceToNextWaypoint() const
-{
- return qQNaN();
-}
-
-double QAbstractNavigator::traveledDistance() const
-{
- return 0;
-}
-
-int QAbstractNavigator::traveledTime() const
-{
- return 0;
-}
-
-QGeoRoute QAbstractNavigator::currentRoute() const
-{
- return QGeoRoute();
-}
-
-QGeoRoute QAbstractNavigator::currentRouteLeg() const
-{
- return QGeoRoute();
-}
-
-QList<QGeoRoute> QAbstractNavigator::alternativeRoutes() const
-{
- return QList<QGeoRoute>();
-}
-
-int QAbstractNavigator::currentSegment() const
-{
- return 0;
-}
-
-QNavigationManagerEngine::QNavigationManagerEngine(const QVariantMap &parameters, QObject *parent)
- : QObject(parent)
- , d(new QNavigationManagerEnginePrivate)
-{
- Q_UNUSED(parameters);
-}
-
-QNavigationManagerEngine::~QNavigationManagerEngine()
-{
-}
-
-void QNavigationManagerEngine::setManagerName(const QString &name)
-{
- d->managerName = name;
-}
-
-QString QNavigationManagerEngine::managerName() const
-{
- return d->managerName;
-}
-
-void QNavigationManagerEngine::setManagerVersion(int version)
-{
- d->managerVersion = version;
-}
-
-int QNavigationManagerEngine::managerVersion() const
-{
- return d->managerVersion;
-}
-
-void QNavigationManagerEngine::setLocale(const QLocale &locale)
-{
- d->locale = locale;
-}
-
-QLocale QNavigationManagerEngine::locale() const
-{
- return d->locale;
-}
-
-void QNavigationManagerEngine::setMeasurementSystem(QLocale::MeasurementSystem system)
-{
- d->measurementSystem = system;
-}
-
-QLocale::MeasurementSystem QNavigationManagerEngine::measurementSystem() const
-{
- return d->measurementSystem;
-}
-
-bool QNavigationManagerEngine::isInitialized() const
-{
- return d->initialized;
-}
-
-void QNavigationManagerEngine::engineInitialized()
-{
- d->initialized = true;
- emit initialized();
-}
-
-QT_END_NAMESPACE
diff --git a/src/location/maps/qnavigationmanagerengine_p.h b/src/location/maps/qnavigationmanagerengine_p.h
deleted file mode 100644
index e0f0b50a..00000000
--- a/src/location/maps/qnavigationmanagerengine_p.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtLocation module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QNAVIGATIONMANAGERENGINE_H
-#define QNAVIGATIONMANAGERENGINE_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtLocation/private/qlocationglobal_p.h>
-#include <QObject>
-#include <QLocale>
-
-QT_BEGIN_NAMESPACE
-
-class QAbstractNavigatorPrivate;
-class QGeoMap;
-class QGeoMapParameter;
-class QMapRouteObject;
-class QGeoRoute;
-class QNavigationManager;
-class QNavigationManagerEnginePrivate;
-class QDeclarativeNavigatorParams;
-class QDeclarativeGeoWaypoint;
-class QDeclarativeGeoRoute;
-
-/*
- This class is not supposed to react on QDeclarativeNavigator properties changes.
- This class is meant to react only on start, stop and setTrackPosition.
- Upon start(), it is supposed to fetch all info from the QDeclarativeNavigatorParams that the engine is supposed
- to inject.
-*/
-class Q_LOCATION_PRIVATE_EXPORT QAbstractNavigator: public QObject
-{
- Q_OBJECT
-public:
- QAbstractNavigator(QObject *parent = nullptr);
- ~QAbstractNavigator() override;
- virtual void setLocale(const QLocale &locale);
- virtual QLocale locale() const;
- virtual void setMeasurementSystem(QLocale::MeasurementSystem system);
- virtual QLocale::MeasurementSystem measurementSystem() const;
- virtual bool active() const = 0;
- virtual bool ready() const = 0;
-
- virtual QVariant nextManeuverIcon() const;
- virtual double distanceToNextManeuver() const;
- virtual int timeToNextManeuver() const;
- virtual int remainingTravelTime() const;
- virtual double remainingTravelDistance() const;
- virtual int remainingTravelTimeToNextWaypoint() const;
- virtual double remainingTravelDistanceToNextWaypoint() const;
- virtual double traveledDistance() const;
- virtual int traveledTime() const;
- virtual QGeoRoute currentRoute() const;
- virtual QGeoRoute currentRouteLeg() const;
- virtual QList<QGeoRoute> alternativeRoutes() const = 0;
- virtual int currentSegment() const;
- virtual void setAutomaticReroutingEnabled(bool autoRerouting) = 0;
- virtual bool automaticReroutingEnabled() const = 0; // configured via navigation params at construction time
- virtual bool isOnRoute() = 0;
- virtual void recalculateRoutes() = 0;
-
-public slots:
- virtual bool start() = 0;
- virtual bool stop() = 0;
- virtual void setTrackPosition(bool trackPosition) = 0;
-
-signals:
- // These must be emitted by the engine
- void activeChanged(bool active);
- void waypointReached(const QDeclarativeGeoWaypoint *pos);
- void destinationReached();
- void currentRouteChanged();
- void currentRouteLegChanged();
- void currentSegmentChanged();
-
- void nextManeuverIconChanged();
- void progressInformationChanged();
- void isOnRouteChanged();
- void alternativeRoutesChanged();
-
-private:
- std::unique_ptr<QAbstractNavigatorPrivate> d;
-};
-
-class Q_LOCATION_PRIVATE_EXPORT QNavigationManagerEngine : public QObject
-{
- Q_OBJECT
-public:
- explicit QNavigationManagerEngine(const QVariantMap &parameters, QObject *parent = nullptr);
- ~QNavigationManagerEngine() override;
-
- void setManagerName(const QString &name);
- QString managerName() const;
- void setManagerVersion(int version);
- int managerVersion() const;
- virtual void setLocale(const QLocale &locale);
- virtual QLocale locale() const;
- virtual void setMeasurementSystem(QLocale::MeasurementSystem system);
- virtual QLocale::MeasurementSystem measurementSystem() const;
-
- virtual bool isInitialized() const;
- virtual QAbstractNavigator *createNavigator(const QSharedPointer<QDeclarativeNavigatorParams> &navigator) = 0;
-
-signals:
- void initialized();
-
-protected:
- /*!
- Marks the engine as initialized. Subclasses of QGeoMappingManagerEngine are to
- call this method after performing implementation-specific initialization within
- the constructor.
- */
- virtual void engineInitialized();
-
- std::unique_ptr<QNavigationManagerEnginePrivate> d;
-};
-
-QT_END_NAMESPACE
-
-#endif // QNAVIGATIONMANAGERENGINE_H