playimage.h 428 B

1234567891011121314151617181920212223242526
  1. #ifndef PLAYIMAGE_H
  2. #define PLAYIMAGE_H
  3. #include <QWidget>
  4. #include <qmutex.h>
  5. class PlayImage : public QWidget
  6. {
  7. Q_OBJECT
  8. public:
  9. explicit PlayImage(QWidget *parent = nullptr);
  10. void updateImage(const QImage& image);
  11. void updatePixmap(const QPixmap& pixmap);
  12. signals:
  13. protected:
  14. void paintEvent(QPaintEvent *event) override;
  15. private:
  16. QPixmap m_pixmap;
  17. QMutex m_mutex;
  18. };
  19. #endif // PLAYIMAGE_H