aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina/LVideoLabel.h
blob: 8c544b168bb88ab7e8d11e490c8f777a12dc9c7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef LVIDEOLABEL_H
#define LVIDEOLABEL_H

#include <QLabel>
#include <QMediaPlayer>
#include <QTimer>
#include <QResizeEvent>
#include "LVideoSurface.h"

class LVideoLabel : public QLabel{
  Q_OBJECT
  public:
    LVideoLabel(QString, QWidget* parent=NULL);
    ~LVideoLabel();
    void setShrinkPixmap(bool);

  protected:
    void enterEvent(QEvent*);
    void leaveEvent(QEvent*);
    void resizeEvent(QResizeEvent*);

  signals:
    void rollOver();
    void frameReceived(QPixmap);

  private slots:
    void initializeBackend();
    void stopVideo(QPixmap);
    void setDuration(QMediaPlayer::MediaStatus);

  private:
    QMediaPlayer *mediaPlayer;
    LVideoSurface *surface;
    QPixmap thumbnail;
    bool entered;
    bool shrink;
    QString filepath;
};
#endif
bgstack15