Spectral/matrix/imageprovider.h

29 lines
720 B
C
Raw Normal View History

2018-03-02 08:56:36 +00:00
#ifndef IMAGEPROVIDER_H
#define IMAGEPROVIDER_H
#include <QtQuick/QQuickImageProvider>
#include <QtCore/QReadWriteLock>
#include <QObject>
2018-03-02 08:56:36 +00:00
#include "connection.h"
2018-07-07 11:06:13 +00:00
#include "imageproviderconnection.h"
2018-03-02 08:56:36 +00:00
class ImageProvider: public QQuickImageProvider
{
public:
explicit ImageProvider(QObject* parent = nullptr);
2018-03-02 08:56:36 +00:00
QImage requestImage(const QString& id, QSize* pSize,
const QSize& requestedSize) override;
void initializeEngine(QQmlEngine *engine, const char *uri);
ImageProviderConnection* getConnection() { return m_connection; }
2018-03-02 08:56:36 +00:00
private:
QReadWriteLock m_lock;
ImageProviderConnection* m_connection;
2018-03-02 08:56:36 +00:00
};
#endif // IMAGEPROVIDER_H