summaryrefslogtreecommitdiff
path: root/flashplayerwidget.h
blob: 99a2e1b2261077c46368459b8dd2915e38748f90 (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
45
46

#ifndef FLASHPLAYERWIDGET_H
#define FLASHPLAYERWIDGET_H

// Qt
#include <qwidget.h>

class 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(); 
        void render();

    private:
        class Private;
        Private* d;
};

#endif //FLASHPLAYERWIDGET_H