summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/videowidget.h
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/videowidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/videowidget.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/videowidget.h b/core/multimedia/opieplayer/videowidget.h
index cf13743..fe56ca1 100644
--- a/core/multimedia/opieplayer/videowidget.h
+++ b/core/multimedia/opieplayer/videowidget.h
@@ -1,87 +1,88 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef VIDEO_WIDGET_H 20#ifndef VIDEO_WIDGET_H
21#define VIDEO_WIDGET_H 21#define VIDEO_WIDGET_H
22 22
23 23
24#include <qwidget.h> 24#include <qwidget.h>
25 25
26class QPixmap; 26class QPixmap;
27class QSlider; 27class QSlider;
28 28
29 29
30enum VideoButtons { 30enum 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 40
41class VideoWidget : public QWidget { 41class VideoWidget : public QWidget {
42 Q_OBJECT 42 Q_OBJECT
43public: 43public:
44 VideoWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); 44 VideoWidget( QWidget* parent=0, const char* name=0, WFlags f=0 );
45 ~VideoWidget(); 45 ~VideoWidget();
46 46
47 bool playVideo(); 47 bool playVideo();
48 48
49public slots: 49public slots:
50 void updateSlider( long, long ); 50 void updateSlider( long, long );
51 void sliderPressed( ); 51 void sliderPressed( );
52 void sliderReleased( ); 52 void sliderReleased( );
53 void setPaused( bool b) { setToggleButton( VideoPause, b ); } 53 void setPaused( bool b) { setToggleButton( VideoPause, b ); }
54 void setPlaying( bool b) { setToggleButton( VideoPlay, b ); } 54 void setPlaying( bool b) { setToggleButton( VideoPlay, b ); }
55 void setFullscreen( bool b ) { setToggleButton( VideoFullscreen, b ); } 55 void setFullscreen( bool b ) { setToggleButton( VideoFullscreen, b ); }
56 void makeVisible(); 56 void makeVisible();
57 void setPosition( long ); 57 void setPosition( long );
58 void setLength( long ); 58 void setLength( long );
59 void setView( char ); 59 void setView( char );
60 60
61signals: 61signals:
62 void sliderMoved( long ); 62 void sliderMoved( long );
63 63
64protected: 64protected:
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 71
71private: 72private:
72 void paintButton( QPainter *p, int i ); 73 void paintButton( QPainter *p, int i );
73 void toggleButton( int ); 74 void toggleButton( int );
74 void setToggleButton( int, bool ); 75 void setToggleButton( int, bool );
75 76
76 QSlider *slider; 77 QSlider *slider;
77 QPixmap *pixmaps[3]; 78 QPixmap *pixmaps[3];
78 QImage *currentFrame; 79 QImage *currentFrame;
79 intscaledWidth; 80 int scaledWidth;
80 int scaledHeight; 81 int scaledHeight;
81}; 82};
82 83
83 84
84#endif // VIDEO_WIDGET_H 85#endif // VIDEO_WIDGET_H
85 86
86 87
87 88