summaryrefslogtreecommitdiff
path: root/flashplayerwidget.h
blob: 25c4dbd9c680392f0bdd62174b815c8a9b0848dc (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
40
41
42
43
44

#ifndef FLASHPLAYERWIDGET_H
#define FLASHPLAYERWIDGET_H

// Qt
#include <QWidget>
#include <QUrl>

class FlashPlayerWidget : public QWidget
{
Q_OBJECT

    public:
        FlashPlayerWidget(QWidget* parent = 0);
        virtual ~FlashPlayerWidget();

        QSize movieSize() const;

    public slots:
        void play();
        void pause(); 
        void load(const QUrl& url);

    protected:
        virtual void paintEvent( QPaintEvent* event );
        virtual void mousePressEvent( QMouseEvent* event );
        virtual void mouseReleaseEvent( QMouseEvent* event );
        virtual void mouseMoveEvent( QMouseEvent* event );
        virtual void resizeEvent( QResizeEvent* event );

    private slots:
        void advance();

    private:
        void handleMouseEvent( QMouseEvent* event ); 
        void prepareSurface(); 

    private:
        class Private;
        Private* d;
};

#endif //FLASHPLAYERWIDGET_H