Files
MapLibreParticleLab/platform/qt/src/qmapboxgl_p.hpp
Thiago Marcos P. Santos 99942558b2 [Qt] Fix build when using Qt namespaces
Fix when building with namespaces enabled.

http://wiki.qt.io/Qt_In_Namespace
2017-01-19 16:34:51 +01:00

58 lines
1.4 KiB
C++

#pragma once
#include "qmapboxgl.hpp"
#include <mbgl/map/map.hpp>
#include <mbgl/map/backend.hpp>
#include <mbgl/map/view.hpp>
#include <mbgl/util/default_thread_pool.hpp>
#include <mbgl/storage/default_file_source.hpp>
#include <mbgl/util/geo.hpp>
#include <QObject>
#include <QSize>
class QMapboxGLPrivate : public QObject, public mbgl::View, public mbgl::Backend
{
Q_OBJECT
public:
explicit QMapboxGLPrivate(QMapboxGL *, const QMapboxGLSettings &, const QSize &size, qreal pixelRatio);
virtual ~QMapboxGLPrivate();
// mbgl::View implementation.
float getPixelRatio() const;
void bind() final;
std::array<uint16_t, 2> getSize() const;
std::array<uint16_t, 2> getFramebufferSize() const;
void activate() final {}
void deactivate() final {}
void invalidate() final;
void notifyMapChange(mbgl::MapChange) final;
mbgl::EdgeInsets margins;
QSize size { 0, 0 };
QSize fbSize { 0, 0 };
QMapboxGL *q_ptr { nullptr };
std::unique_ptr<mbgl::DefaultFileSource> fileSourceObj;
mbgl::ThreadPool threadPool;
std::unique_ptr<mbgl::Map> mapObj;
bool dirty { false };
#if QT_VERSION >= 0x050000
QOpenGLFramebufferObject *fbo { nullptr };
#endif
public slots:
void connectionEstablished();
signals:
void needsRendering();
void mapChanged(QMapboxGL::MapChange);
void copyrightsChanged(const QString &copyrightsHtml);
};