#pragma once #include "qmapboxgl.hpp" #include #include #include #include #include #include #include #include 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 getSize() const; std::array 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 fileSourceObj; mbgl::ThreadPool threadPool; std::unique_ptr 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 ©rightsHtml); };