Diffstat (limited to 'noncore/multimedia/opieplayer2/xinevideowidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/xinevideowidget.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/xinevideowidget.h b/noncore/multimedia/opieplayer2/xinevideowidget.h index 7d9a6d2..2fc627d 100644 --- a/noncore/multimedia/opieplayer2/xinevideowidget.h +++ b/noncore/multimedia/opieplayer2/xinevideowidget.h | |||
@@ -1,64 +1,72 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | ||
4 | Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> | 4 | Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> |
5 | Copyright (c) 2002 LJP <> | 5 | Copyright (c) 2002 LJP <> |
6 | Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> | 6 | Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> |
7 | =. | 7 | =. |
8 | .=l. | 8 | .=l. |
9 | .>+-= | 9 | .>+-= |
10 | _;:, .> :=|. This program is free software; you can | 10 | _;:, .> :=|. This program is free software; you can |
11 | .> <`_, > . <= redistribute it and/or modify it under | 11 | .> <`_, > . <= redistribute it and/or modify it under |
12 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 12 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
13 | .="- .-=="i, .._ License as published by the Free Software | 13 | .="- .-=="i, .._ License as published by the Free Software |
14 | - . .-<_> .<> Foundation; either version 2 of the License, | 14 | - . .-<_> .<> Foundation; either version 2 of the License, |
15 | ._= =} : or (at your option) any later version. | 15 | ._= =} : or (at your option) any later version. |
16 | .%`+i> _;_. | 16 | .%`+i> _;_. |
17 | .i_,=:_. -<s. This program is distributed in the hope that | 17 | .i_,=:_. -<s. This program is distributed in the hope that |
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
19 | : .. .:, . . . without even the implied warranty of | 19 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
22 | ..}^=.= = ; Library General Public License for more | 22 | ..}^=.= = ; Library General Public License for more |
23 | ++= -. .` .: details. | 23 | ++= -. .` .: details. |
24 | : = ...= . :.=- | 24 | : = ...= . :.=- |
25 | -. .:....=;==+<; You should have received a copy of the GNU | 25 | -. .:....=;==+<; You should have received a copy of the GNU |
26 | -_. . . )=. = Library General Public License along with | 26 | -_. . . )=. = Library General Public License along with |
27 | -- :-=` this library; see the file COPYING.LIB. | 27 | -- :-=` this library; see the file COPYING.LIB. |
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
30 | Boston, MA 02111-1307, USA. | 30 | Boston, MA 02111-1307, USA. |
31 | 31 | ||
32 | */ | 32 | */ |
33 | 33 | ||
34 | 34 | ||
35 | 35 | ||
36 | #include <qwidget.h> | 36 | #include <qwidget.h> |
37 | 37 | ||
38 | #include "lib.h" | ||
39 | |||
38 | class QImage; | 40 | class QImage; |
39 | class XineVideoWidget : public QWidget { | 41 | class XineVideoWidget : public QWidget { |
40 | Q_OBJECT | 42 | Q_OBJECT |
41 | public: | 43 | public: |
42 | XineVideoWidget( int width, int height, QWidget* parent, const char* name ); | 44 | XineVideoWidget( QWidget* parent, const char* name ); |
43 | ~XineVideoWidget(); | 45 | ~XineVideoWidget(); |
44 | QImage *image() { return m_image; }; | 46 | QImage *image() { return m_image; }; |
45 | void setImage( QImage* image ); | 47 | void setImage( QImage* image ); |
46 | void setImage( uchar* image, int yoffsetXLine, int xoffsetXBytes, | 48 | void setImage( uchar* image, int width, int height, int linestep); |
47 | int width, int height, int linestep, int bytes, int bpp); | ||
48 | int width() const; | ||
49 | int height() const; | ||
50 | void clear() ; | 49 | void clear() ; |
50 | |||
51 | protected: | 51 | protected: |
52 | void paintEvent( QPaintEvent* p ); | 52 | void paintEvent( QPaintEvent* p ); |
53 | void resizeEvent ( QResizeEvent *r ); | ||
54 | |||
55 | void mousePressEvent ( QMouseEvent *e ); | ||
56 | void mouseReleaseEvent ( QMouseEvent *e ); | ||
57 | |||
58 | signals: | ||
59 | void videoResized ( const QSize &s ); | ||
60 | |||
53 | private: | 61 | private: |
54 | QRect m_lastframe; | 62 | QRect m_lastframe; |
55 | QRect m_thisframe; | 63 | QRect m_thisframe; |
56 | 64 | ||
57 | uchar* m_buff; | 65 | uchar* m_buff; |
58 | int m_bytes_per_line_fb; | 66 | int m_bytes_per_line_fb; |
59 | int m_bytes_per_line_frame; | 67 | int m_bytes_per_line_frame; |
60 | int m_bytes_per_pixel; | 68 | int m_bytes_per_pixel; |
61 | QImage* m_image; | 69 | QImage* m_image; |
62 | 70 | int m_rotation; | |
63 | }; | 71 | }; |
64 | 72 | ||