Commit b4f0cd66 authored by Gus Grubba's avatar Gus Grubba

Merge pull request #2854 from dogmaphobic/flickableInOfflineMaps

Flickable in Offline Maps
parents 96126177 74ff6711
...@@ -29,13 +29,13 @@ This file is part of the QGROUNDCONTROL project ...@@ -29,13 +29,13 @@ This file is part of the QGROUNDCONTROL project
* *
*/ */
#include <math.h>
#include <QSettings>
#include "QGCMapEngine.h" #include "QGCMapEngine.h"
#include "QGCMapTileSet.h" #include "QGCMapTileSet.h"
#include "QGCMapEngineManager.h" #include "QGCMapEngineManager.h"
#include <QSettings>
#include <math.h>
QGC_LOGGING_CATEGORY(QGCCachedTileSetLog, "QGCCachedTileSetLog") QGC_LOGGING_CATEGORY(QGCCachedTileSetLog, "QGCCachedTileSetLog")
#define TILE_BATCH_SIZE 256 #define TILE_BATCH_SIZE 256
......
...@@ -27,6 +27,8 @@ This file is part of the QGROUNDCONTROL project ...@@ -27,6 +27,8 @@ This file is part of the QGROUNDCONTROL project
* Original work: The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012. * Original work: The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
*/ */
#include "QGCMapEngine.h"
#include <QRegExp> #include <QRegExp>
#include <QNetworkReply> #include <QNetworkReply>
#include <QEventLoop> #include <QEventLoop>
...@@ -34,8 +36,6 @@ This file is part of the QGROUNDCONTROL project ...@@ -34,8 +36,6 @@ This file is part of the QGROUNDCONTROL project
#include <QString> #include <QString>
#include <QByteArray> #include <QByteArray>
#include "QGCMapEngine.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
UrlFactory::UrlFactory() UrlFactory::UrlFactory()
: _timeout(5 * 1000) : _timeout(5 * 1000)
......
...@@ -29,6 +29,9 @@ This file is part of the QGROUNDCONTROL project ...@@ -29,6 +29,9 @@ This file is part of the QGROUNDCONTROL project
* *
*/ */
#include "QGCMapEngine.h"
#include "QGCMapTileSet.h"
#include <QVariant> #include <QVariant>
#include <QtSql/QSqlQuery> #include <QtSql/QSqlQuery>
#include <QSqlError> #include <QSqlError>
...@@ -39,9 +42,6 @@ This file is part of the QGROUNDCONTROL project ...@@ -39,9 +42,6 @@ This file is part of the QGROUNDCONTROL project
#include "time.h" #include "time.h"
#include "QGCMapEngine.h"
#include "QGCMapTileSet.h"
const char* kDefaultSet = "Default Tile Set"; const char* kDefaultSet = "Default Tile Set";
const QString kSession = QLatin1String("QGeoTileWorkerSession"); const QString kSession = QLatin1String("QGeoTileWorkerSession");
......
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
** **
****************************************************************************/ ****************************************************************************/
#include "QGeoCodeReplyQGC.h"
#include <QtCore/QJsonDocument> #include <QtCore/QJsonDocument>
#include <QtCore/QJsonObject> #include <QtCore/QJsonObject>
#include <QtCore/QJsonArray> #include <QtCore/QJsonArray>
...@@ -54,8 +56,6 @@ ...@@ -54,8 +56,6 @@
#include <QSet> #include <QSet>
#include <QDebug> #include <QDebug>
#include "QGeoCodeReplyQGC.h"
enum QGeoCodeTypeGoogle { enum QGeoCodeTypeGoogle {
GeoCodeTypeUnknown, GeoCodeTypeUnknown,
StreetAddress, // indicates a precise street address. StreetAddress, // indicates a precise street address.
......
...@@ -44,6 +44,9 @@ ...@@ -44,6 +44,9 @@
** **
****************************************************************************/ ****************************************************************************/
#include "QGeoCodingManagerEngineQGC.h"
#include "QGeoCodeReplyQGC.h"
#include <QtCore/QVariantMap> #include <QtCore/QVariantMap>
#include <QtCore/QUrl> #include <QtCore/QUrl>
#include <QtCore/QUrlQuery> #include <QtCore/QUrlQuery>
...@@ -55,10 +58,6 @@ ...@@ -55,10 +58,6 @@
#include <QtPositioning/QGeoAddress> #include <QtPositioning/QGeoAddress>
#include <QtPositioning/QGeoShape> #include <QtPositioning/QGeoShape>
#include <QtPositioning/QGeoRectangle> #include <QtPositioning/QGeoRectangle>
#include <QDebug>
#include "QGeoCodingManagerEngineQGC.h"
#include "QGeoCodeReplyQGC.h"
static QString addressToQuery(const QGeoAddress &address) static QString addressToQuery(const QGeoAddress &address)
{ {
......
...@@ -44,13 +44,13 @@ ...@@ -44,13 +44,13 @@
** **
****************************************************************************/ ****************************************************************************/
#include "QGCMapEngine.h"
#include "QGeoMapReplyQGC.h"
#include <QtLocation/private/qgeotilespec_p.h> #include <QtLocation/private/qgeotilespec_p.h>
#include <QtNetwork/QNetworkAccessManager> #include <QtNetwork/QNetworkAccessManager>
#include <QFile> #include <QFile>
#include "QGCMapEngine.h"
#include "QGeoMapReplyQGC.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
QGeoTiledMapReplyQGC::QGeoTiledMapReplyQGC(QNetworkAccessManager *networkManager, const QNetworkRequest &request, const QGeoTileSpec &spec, QObject *parent) QGeoTiledMapReplyQGC::QGeoTiledMapReplyQGC(QNetworkAccessManager *networkManager, const QNetworkRequest &request, const QGeoTileSpec &spec, QObject *parent)
: QGeoTiledMapReply(spec, parent) : QGeoTiledMapReply(spec, parent)
......
...@@ -44,13 +44,12 @@ ...@@ -44,13 +44,12 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtLocation/private/qgeotiledmappingmanagerengine_p.h>
#include "qdebug.h"
#include "QGeoServiceProviderPluginQGC.h" #include "QGeoServiceProviderPluginQGC.h"
#include "QGeoTiledMappingManagerEngineQGC.h" #include "QGeoTiledMappingManagerEngineQGC.h"
#include "QGeoCodingManagerEngineQGC.h" #include "QGeoCodingManagerEngineQGC.h"
#include <QtLocation/private/qgeotiledmappingmanagerengine_p.h>
Q_EXTERN_C Q_DECL_EXPORT const char *qt_plugin_query_metadata(); Q_EXTERN_C Q_DECL_EXPORT const char *qt_plugin_query_metadata();
Q_EXTERN_C Q_DECL_EXPORT QT_PREPEND_NAMESPACE(QObject) *qt_plugin_instance(); Q_EXTERN_C Q_DECL_EXPORT QT_PREPEND_NAMESPACE(QObject) *qt_plugin_instance();
......
...@@ -44,14 +44,14 @@ ...@@ -44,14 +44,14 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtCore/QLocale>
#include <QtNetwork/QNetworkRequest>
#include <QtLocation/private/qgeotilespec_p.h>
#include "QGCMapEngine.h" #include "QGCMapEngine.h"
#include "QGeoTileFetcherQGC.h" #include "QGeoTileFetcherQGC.h"
#include "QGeoMapReplyQGC.h" #include "QGeoMapReplyQGC.h"
#include <QtCore/QLocale>
#include <QtNetwork/QNetworkRequest>
#include <QtLocation/private/qgeotilespec_p.h>
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
QGeoTileFetcherQGC::QGeoTileFetcherQGC(QGeoTiledMappingManagerEngine *parent) QGeoTileFetcherQGC::QGeoTileFetcherQGC(QGeoTiledMappingManagerEngine *parent)
: QGeoTileFetcher(parent) : QGeoTileFetcher(parent)
......
...@@ -44,6 +44,10 @@ ...@@ -44,6 +44,10 @@
** **
****************************************************************************/ ****************************************************************************/
#include "QGCMapEngine.h"
#include "QGeoTiledMappingManagerEngineQGC.h"
#include "QGeoTileFetcherQGC.h"
#include <QtLocation/private/qgeocameracapabilities_p.h> #include <QtLocation/private/qgeocameracapabilities_p.h>
#include <QtLocation/private/qgeomaptype_p.h> #include <QtLocation/private/qgeomaptype_p.h>
#if QT_VERSION < 0x050500 #if QT_VERSION < 0x050500
...@@ -54,10 +58,6 @@ ...@@ -54,10 +58,6 @@
#include <QDir> #include <QDir>
#include <QStandardPaths> #include <QStandardPaths>
#include "QGCMapEngine.h"
#include "QGeoTiledMappingManagerEngineQGC.h"
#include "QGeoTileFetcherQGC.h"
#if QT_VERSION >= 0x050500 #if QT_VERSION >= 0x050500
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
QGeoTiledMapQGC::QGeoTiledMapQGC(QGeoTiledMappingManagerEngine *engine, QObject *parent) QGeoTiledMapQGC::QGeoTiledMapQGC(QGeoTiledMappingManagerEngine *engine, QObject *parent)
......
...@@ -611,8 +611,14 @@ Rectangle { ...@@ -611,8 +611,14 @@ Rectangle {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.margins: ScreenTools.defaultFontPixelWidth anchors.margins: ScreenTools.defaultFontPixelWidth
visible: false visible: false
QGCFlickable {
id: infoScroll
anchors.fill: parent
contentHeight: infoColumn.height
flickableDirection: Flickable.VerticalFlick
clip: true
Column { Column {
id: infoColumn
width: parent.width width: parent.width
spacing: ScreenTools.defaultFontPixelHeight spacing: ScreenTools.defaultFontPixelHeight
Item { Item {
...@@ -779,6 +785,7 @@ Rectangle { ...@@ -779,6 +785,7 @@ Rectangle {
} }
} }
} }
}
Rectangle { Rectangle {
id: _optionsView id: _optionsView
color: __qgcPal.windowShade color: __qgcPal.windowShade
...@@ -794,7 +801,14 @@ Rectangle { ...@@ -794,7 +801,14 @@ Rectangle {
maxCacheMemSize.text = QGroundControl.mapEngineManager.maxMemCache maxCacheMemSize.text = QGroundControl.mapEngineManager.maxMemCache
} }
} }
QGCFlickable {
id: optionsScroll
anchors.fill: parent
contentHeight: optionsColumn.height
flickableDirection: Flickable.VerticalFlick
clip: true
Column { Column {
id: optionsColumn
width: parent.width width: parent.width
spacing: ScreenTools.defaultFontPixelHeight spacing: ScreenTools.defaultFontPixelHeight
Item { Item {
...@@ -906,4 +920,5 @@ Rectangle { ...@@ -906,4 +920,5 @@ Rectangle {
} }
} }
} }
}
} }
...@@ -29,11 +29,9 @@ ...@@ -29,11 +29,9 @@
#include "QGCMapTileSet.h" #include "QGCMapTileSet.h"
#include "QGCMapUrlEngine.h" #include "QGCMapUrlEngine.h"
#include <stdio.h>
#include <QQmlEngine>
#include <QSettings> #include <QSettings>
#include <QStorageInfo> #include <QStorageInfo>
#include <stdio.h>
QGC_LOGGING_CATEGORY(QGCMapEngineManagerLog, "QGCMapEngineManagerLog") QGC_LOGGING_CATEGORY(QGCMapEngineManagerLog, "QGCMapEngineManagerLog")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment