[Qt] Wire up connection established signal
This commit is contained in:
committed by
Thiago Marcos P. Santos
parent
efb96e80ec
commit
5482a46a04
@@ -133,6 +133,7 @@ public:
|
||||
|
||||
public slots:
|
||||
void render();
|
||||
void connectionEstablished();
|
||||
|
||||
signals:
|
||||
void needsRendering();
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <mbgl/gl/gl.hpp>
|
||||
#include <mbgl/map/map.hpp>
|
||||
#include <mbgl/sprite/sprite_image.hpp>
|
||||
#include <mbgl/storage/network_status.hpp>
|
||||
#include <mbgl/util/geo.hpp>
|
||||
#include <mbgl/util/vec.hpp>
|
||||
|
||||
@@ -409,6 +410,11 @@ void QMapboxGL::render()
|
||||
d_ptr->mapObj->render();
|
||||
}
|
||||
|
||||
void QMapboxGL::connectionEstablished()
|
||||
{
|
||||
d_ptr->connectionEstablished();
|
||||
}
|
||||
|
||||
QMapboxGLPrivate::QMapboxGLPrivate(QMapboxGL *q, const QMapboxGLSettings &settings)
|
||||
: QObject(q)
|
||||
, size(0, 0)
|
||||
@@ -464,3 +470,8 @@ void QMapboxGLPrivate::notifyMapChange(mbgl::MapChange change)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void QMapboxGLPrivate::connectionEstablished()
|
||||
{
|
||||
mbgl::NetworkStatus::Reachable();
|
||||
}
|
||||
|
||||
@@ -42,6 +42,9 @@ public:
|
||||
std::unique_ptr<mbgl::DefaultFileSource> fileSourceObj;
|
||||
std::unique_ptr<mbgl::Map> mapObj;
|
||||
|
||||
public slots:
|
||||
void connectionEstablished();
|
||||
|
||||
signals:
|
||||
void mapRegionDidChange();
|
||||
void needsRendering();
|
||||
|
||||
Reference in New Issue
Block a user