Diffstat (limited to 'core/multimedia/opieplayer/videowidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/videowidget.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/core/multimedia/opieplayer/videowidget.h b/core/multimedia/opieplayer/videowidget.h index fe56ca1..fd86cd2 100644 --- a/core/multimedia/opieplayer/videowidget.h +++ b/core/multimedia/opieplayer/videowidget.h | |||
@@ -28,61 +28,72 @@ class QSlider; | |||
28 | 28 | ||
29 | 29 | ||
30 | enum VideoButtons { | 30 | enum VideoButtons { |
31 | VideoPrevious, | 31 | VideoPrevious, |
32 | VideoStop, | 32 | VideoStop, |
33 | VideoPlay, | 33 | VideoPlay, |
34 | VideoPause, | 34 | VideoPause, |
35 | VideoNext, | 35 | VideoNext, |
36 | VideoPlayList, | 36 | VideoPlayList, |
37 | VideoFullscreen | 37 | VideoFullscreen |
38 | }; | 38 | }; |
39 | 39 | ||
40 | |||
41 | class VideoWidget : public QWidget { | 40 | class VideoWidget : public QWidget { |
42 | Q_OBJECT | 41 | Q_OBJECT |
43 | public: | 42 | public: |
44 | VideoWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); | 43 | VideoWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); |
45 | ~VideoWidget(); | 44 | ~VideoWidget(); |
46 | 45 | ||
47 | bool playVideo(); | 46 | bool playVideo(); |
48 | 47 | ||
49 | public slots: | 48 | public slots: |
50 | void updateSlider( long, long ); | 49 | void updateSlider( long, long ); |
51 | void sliderPressed( ); | 50 | void sliderPressed( ); |
52 | void sliderReleased( ); | 51 | void sliderReleased( ); |
53 | void setPaused( bool b) { setToggleButton( VideoPause, b ); } | 52 | void setPaused( bool b) { setToggleButton( VideoPause, b ); } |
54 | void setPlaying( bool b) { setToggleButton( VideoPlay, b ); } | 53 | void setPlaying( bool b) { setToggleButton( VideoPlay, b ); } |
55 | void setFullscreen( bool b ) { setToggleButton( VideoFullscreen, b ); } | 54 | void setFullscreen( bool b ) { setToggleButton( VideoFullscreen, b ); } |
56 | void makeVisible(); | 55 | void makeVisible(); |
57 | void setPosition( long ); | 56 | void setPosition( long ); |
58 | void setLength( long ); | 57 | void setLength( long ); |
59 | void setView( char ); | 58 | void setView( char ); |
60 | 59 | ||
61 | signals: | 60 | signals: |
62 | void sliderMoved( long ); | 61 | void sliderMoved( long ); |
63 | 62 | ||
64 | protected: | 63 | protected: |
64 | void resizeEvent( QResizeEvent * ); | ||
65 | void paintEvent( QPaintEvent *pe ); | 65 | void paintEvent( QPaintEvent *pe ); |
66 | void mouseMoveEvent( QMouseEvent *event ); | 66 | void mouseMoveEvent( QMouseEvent *event ); |
67 | void mousePressEvent( QMouseEvent *event ); | 67 | void mousePressEvent( QMouseEvent *event ); |
68 | void mouseReleaseEvent( QMouseEvent *event ); | 68 | void mouseReleaseEvent( QMouseEvent *event ); |
69 | void closeEvent( QCloseEvent *event ); | 69 | void closeEvent( QCloseEvent *event ); |
70 | void keyReleaseEvent( QKeyEvent *e); | 70 | void keyReleaseEvent( QKeyEvent *e); |
71 | 71 | ||
72 | private: | 72 | private: |
73 | void paintButton( QPainter *p, int i ); | 73 | QPixmap *pixBg; |
74 | void toggleButton( int ); | 74 | QImage *imgUp; |
75 | void setToggleButton( int, bool ); | 75 | QImage *imgDn; |
76 | 76 | QImage *imgButtonMask; | |
77 | QBitmap *masks[7]; | ||
78 | QString backgroundPix; | ||
79 | QPixmap *buttonPixUp[7]; | ||
80 | QPixmap *buttonPixDown[7]; | ||
81 | QString skin; | ||
77 | QSlider *slider; | 82 | QSlider *slider; |
78 | QPixmap *pixmaps[3]; | 83 | QPixmap *pixmaps[3]; |
79 | QImage *currentFrame; | 84 | QImage *currentFrame; |
85 | int xoff, yoff; | ||
80 | int scaledWidth; | 86 | int scaledWidth; |
81 | int scaledHeight; | 87 | int scaledHeight; |
88 | |||
89 | void paintButton( QPainter *p, int i ); | ||
90 | void toggleButton( int ); | ||
91 | void setToggleButton( int, bool ); | ||
92 | |||
82 | }; | 93 | }; |
83 | 94 | ||
84 | 95 | ||
85 | #endif // VIDEO_WIDGET_H | 96 | #endif // VIDEO_WIDGET_H |
86 | 97 | ||
87 | 98 | ||
88 | 99 | ||