qmlfrontend/preview_image_provider.h
author Wuzzy <Wuzzy2@mail.ru>
Sat, 16 May 2020 01:04:27 +0200
changeset 15561 3c1c5ff824f7
parent 14154 8354b390f1a2
permissions -rw-r--r--
Many improvements and fixes for hats webpage * Fix static hats not being animated properly * Make widges more user-friendly * Add local mode to hats webpage to make testing easier (IS_LOCAL variable) * Cleanup code * Update themes list * Update list of local hats

#ifndef PREVIEWIMAGEPROVIDER_H
#define PREVIEWIMAGEPROVIDER_H

#include <QPixmap>
#include <QQuickImageProvider>
#include <QSize>

class PreviewImageProvider : public QQuickImageProvider {
 public:
  PreviewImageProvider();

  QPixmap requestPixmap(const QString &id, QSize *size,
                        const QSize &requestedSize);

  void setImage(const QImage &preview);

 private:
  QPixmap m_px;
};

#endif  // PREVIEWIMAGEPROVIDER_H