summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeotiledmappingmanagerengine_p.h
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2012-06-06 09:19:09 +1000
committerQt by Nokia <qt-info@nokia.com>2012-06-07 03:05:34 +0200
commit5e8bdd51c889403db99d0dbad908b6e862252a70 (patch)
tree7dc34fce9b8996b8a380d7719b28dee9842ef5f9 /src/location/maps/qgeotiledmappingmanagerengine_p.h
parent702a9d73fa145fd107c8a3f03d68d93b6968af77 (diff)
downloadqtlocation-5e8bdd51c889403db99d0dbad908b6e862252a70.tar.gz
Remove Maps from public C++ API.
The preliminary C++ Maps API was exposed to provide an interface between the QML plugin and the geo services plugins. Mark it as private API for now as it is likely to change when the full C++ API is developed. Mapping functionality is currently only available through QML. Change-Id: Id16e0f1a2165c70192047dffa40e69ab1f29ba69 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
Diffstat (limited to 'src/location/maps/qgeotiledmappingmanagerengine_p.h')
-rw-r--r--src/location/maps/qgeotiledmappingmanagerengine_p.h111
1 files changed, 77 insertions, 34 deletions
diff --git a/src/location/maps/qgeotiledmappingmanagerengine_p.h b/src/location/maps/qgeotiledmappingmanagerengine_p.h
index 07b2d5d4..2d38481c 100644
--- a/src/location/maps/qgeotiledmappingmanagerengine_p.h
+++ b/src/location/maps/qgeotiledmappingmanagerengine_p.h
@@ -37,56 +37,99 @@
**
** $QT_END_LICENSE$
**
+** This file is part of the Nokia services plugin for the Maps and
+** Navigation API. The use of these services, whether by use of the
+** plugin or by other means, is governed by the terms and conditions
+** described by the file NOKIA_TERMS_AND_CONDITIONS.txt in
+** this package, located in the directory containing the Nokia services
+** plugin source code.
+**
****************************************************************************/
+#ifndef QGEOTILEDMAPPINGMANAGERENGINE_H
+#define QGEOTILEDMAPPINGMANAGERENGINE_H
-#ifndef QGEOTILEDMAPPINGMANAGER_P_H
-#define QGEOTILEDMAPPINGMANAGER_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 <QSize>
-#include <QList>
-#include <QHash>
-#include <QSet>
-#include <QThread>
-#include "qgeotiledmappingmanagerengine.h"
+#include <QPair>
+#include <QtLocation/qlocationglobal.h>
+#include "qgeomaptype_p.h"
+#include "qgeomappingmanagerengine_p.h"
+
+QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+class QGeoTiledMappingManagerEnginePrivate;
+class QGeoMapRequestOptions;
+class QGeoTileFetcher;
+class QGeoTileTexture;
+
+class QGeoTileSpec;
class QGeoTiledMapData;
class QGeoTileCache;
-class QGeoTileSpec;
-class QGeoTileFetcher;
-class QGeoTiledMappingManagerEnginePrivate
+class Q_LOCATION_EXPORT QGeoTiledMappingManagerEngine : public QGeoMappingManagerEngine
{
+ Q_OBJECT
+
public:
- QGeoTiledMappingManagerEnginePrivate();
- ~QGeoTiledMappingManagerEnginePrivate();
-
- QThread *thread_;
- QSize tileSize_;
- QSet<QGeoTiledMapData *> tileMaps_;
- QHash<QGeoTiledMapData *, QSet<QGeoTileSpec> > mapHash_;
- QHash<QGeoTileSpec, QSet<QGeoTiledMapData *> > tileHash_;
- QGeoTiledMappingManagerEngine::CacheAreas cacheHint_;
- QGeoTileCache *tileCache_;
- QGeoTileFetcher *fetcher_;
+ enum CacheArea {
+ DiskCache = 0x01,
+ MemoryCache = 0x02,
+ AllCaches = 0xFF
+ };
+ Q_DECLARE_FLAGS(CacheAreas, CacheArea)
+
+ explicit QGeoTiledMappingManagerEngine(QObject *parent = 0);
+ virtual ~QGeoTiledMappingManagerEngine();
+
+ QGeoTileFetcher *tileFetcher();
+
+ virtual QGeoMap *createMap(QObject *parent);
+
+ void registerMap(QGeoTiledMapData *map);
+ void deregisterMap(QGeoTiledMapData *map);
+
+ QSize tileSize() const;
+
+ void updateTileRequests(QGeoTiledMapData *map,
+ const QSet<QGeoTileSpec> &tilesAdded,
+ const QSet<QGeoTileSpec> &tilesRemoved);
+
+ QGeoTileCache *tileCache(); // TODO: check this is still used
+ QSharedPointer<QGeoTileTexture> getTileTexture(const QGeoTileSpec &spec);
+
+
+ QGeoTiledMappingManagerEngine::CacheAreas cacheHint() const;
+
+private Q_SLOTS:
+ void engineTileFinished(const QGeoTileSpec &spec, const QByteArray &bytes, const QString &format);
+ void engineTileError(const QGeoTileSpec &spec, const QString &errorString);
+
+Q_SIGNALS:
+ void tileError(const QGeoTileSpec &spec, const QString &errorString);
+
+protected:
+ void setTileFetcher(QGeoTileFetcher *fetcher);
+ void setTileSize(const QSize &tileSize);
+ void setCacheHint(QGeoTiledMappingManagerEngine::CacheAreas cacheHint);
+
+ QGeoTileCache *createTileCacheWithDir(const QString &cacheDirectory);
private:
- Q_DISABLE_COPY(QGeoTiledMappingManagerEnginePrivate)
+ QGeoTiledMappingManagerEnginePrivate *d_ptr;
+
+ Q_DECLARE_PRIVATE(QGeoTiledMappingManagerEngine)
+ Q_DISABLE_COPY(QGeoTiledMappingManagerEngine)
+
+ friend class QGeoTileFetcher;
};
+Q_DECLARE_OPERATORS_FOR_FLAGS(QGeoTiledMappingManagerEngine::CacheAreas)
+
QT_END_NAMESPACE
+QT_END_HEADER
+
#endif