Files
MapLibreParticleLab/platform/qt/test/qmapboxgl.test.hpp
Konstantin Käfer 64c75b442c [build] split out DefaultFileSource and dependents to a separate target
We don't want to link it into the node bindings, so keep it in a separate target
2017-09-28 13:48:36 -04:00

37 lines
695 B
C++

#include <mbgl/test/util.hpp>
#include <QApplication>
#include <QMapboxGL>
// We're using QGLFramebufferObject, which is only available in Qt 5 and up.
#if QT_VERSION >= 0x050000
#include <QGLWidget>
#include <QGLFramebufferObject>
class QMapboxGLTest : public QObject, public ::testing::Test {
Q_OBJECT
public:
QMapboxGLTest();
void runUntil(QMapboxGL::MapChange);
private:
QGLWidget widget;
const QSize size;
QGLFramebufferObject fbo;
protected:
QMapboxGLSettings settings;
QMapboxGL map;
std::function<void(QMapboxGL::MapChange)> changeCallback;
private slots:
void onMapChanged(QMapboxGL::MapChange);
void onNeedsRendering();
};
#endif