-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.h | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 5a23d84..8fe572f 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -46,193 +46,193 @@ | |||
46 | 46 | ||
47 | #ifdef Q_WS_QWS | 47 | #ifdef Q_WS_QWS |
48 | # define USE_DIRECT_PAINTER | 48 | # define USE_DIRECT_PAINTER |
49 | # include <qdirectpainter_qws.h> | 49 | # include <qdirectpainter_qws.h> |
50 | # include <qgfxraster_qws.h> | 50 | # include <qgfxraster_qws.h> |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | 53 | ||
54 | extern MediaPlayerState *mediaPlayerState; | 54 | extern MediaPlayerState *mediaPlayerState; |
55 | 55 | ||
56 | 56 | ||
57 | static const int xo = 2; // movable x offset | 57 | static const int xo = 2; // movable x offset |
58 | static const int yo = 0; // movable y offset | 58 | static const int yo = 0; // movable y offset |
59 | 59 | ||
60 | 60 | ||
61 | struct MediaButton { | 61 | struct MediaButton { |
62 | bool isToggle, isHeld, isDown; | 62 | bool isToggle, isHeld, isDown; |
63 | }; | 63 | }; |
64 | 64 | ||
65 | MediaButton videoButtons[] = { | 65 | MediaButton videoButtons[] = { |
66 | { FALSE, FALSE, FALSE }, // stop | 66 | { FALSE, FALSE, FALSE }, // stop |
67 | { TRUE, FALSE, FALSE }, // play | 67 | { TRUE, FALSE, FALSE }, // play |
68 | { FALSE, FALSE, FALSE }, // previous | 68 | { FALSE, FALSE, FALSE }, // previous |
69 | { FALSE, FALSE, FALSE }, // next | 69 | { FALSE, FALSE, FALSE }, // next |
70 | { FALSE, FALSE, FALSE }, // volUp | 70 | { FALSE, FALSE, FALSE }, // volUp |
71 | { FALSE, FALSE, FALSE }, // volDown | 71 | { FALSE, FALSE, FALSE }, // volDown |
72 | { TRUE, FALSE, FALSE } // fullscreen | 72 | { TRUE, FALSE, FALSE } // fullscreen |
73 | }; | 73 | }; |
74 | 74 | ||
75 | const char *skinV_mask_file_names[7] = { | 75 | const char *skinV_mask_file_names[7] = { |
76 | "stop","play","back","fwd","up","down","full" | 76 | "stop","play","back","fwd","up","down","full" |
77 | }; | 77 | }; |
78 | 78 | ||
79 | static const int numVButtons = (sizeof(videoButtons)/sizeof(MediaButton)); | 79 | static const int numVButtons = (sizeof(videoButtons)/sizeof(MediaButton)); |
80 | 80 | ||
81 | 81 | ||
82 | VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : | 82 | VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : |
83 | QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { | 83 | QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { |
84 | setCaption( tr("OpiePlayer - Video") ); | 84 | setCaption( tr("OpiePlayer - Video") ); |
85 | 85 | ||
86 | videoFrame = new XineVideoWidget ( this, "Video frame" ); | 86 | videoFrame = new XineVideoWidget ( this, "Video frame" ); |
87 | connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & ))); | 87 | connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & ))); |
88 | 88 | ||
89 | Config cfg("OpiePlayer"); | 89 | Config cfg("OpiePlayer"); |
90 | cfg.setGroup("Options"); | 90 | cfg.setGroup("Options"); |
91 | skin = cfg.readEntry("Skin","default"); | 91 | skin = cfg.readEntry("Skin","default"); |
92 | 92 | ||
93 | QString skinPath = "opieplayer2/skins/" + skin; | 93 | QString skinPath = "opieplayer2/skins/" + skin; |
94 | pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); | 94 | pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); |
95 | imgUp = new QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) ); | 95 | imgUp = new QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) ); |
96 | imgDn = new QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) ); | 96 | imgDn = new QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) ); |
97 | 97 | ||
98 | imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 ); | 98 | imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 ); |
99 | imgButtonMask->fill( 0 ); | 99 | imgButtonMask->fill( 0 ); |
100 | 100 | ||
101 | for ( int i = 0; i < 7; i++ ) { | 101 | for ( int i = 0; i < 7; i++ ) { |
102 | QString filename = QString(getenv("OPIEDIR")) + "/pics/" + skinPath + "/skinV_mask_" + skinV_mask_file_names[i] + ".png"; | 102 | QString filename = QString(getenv("OPIEDIR")) + "/pics/" + skinPath + "/skinV_mask_" + skinV_mask_file_names[i] + ".png"; |
103 | masks[i] = new QBitmap( filename ); | 103 | masks[i] = new QBitmap( filename ); |
104 | qDebug(filename); | 104 | qDebug(filename); |
105 | if ( !masks[i]->isNull() ) { | 105 | if ( !masks[i]->isNull() ) { |
106 | QImage imgMask = masks[i]->convertToImage(); | 106 | QImage imgMask = masks[i]->convertToImage(); |
107 | uchar **dest = imgButtonMask->jumpTable(); | 107 | uchar **dest = imgButtonMask->jumpTable(); |
108 | for ( int y = 0; y < imgUp->height(); y++ ) { | 108 | for ( int y = 0; y < imgUp->height(); y++ ) { |
109 | uchar *line = dest[y]; | 109 | uchar *line = dest[y]; |
110 | for ( int x = 0; x < imgUp->width(); x++ ) { | 110 | for ( int x = 0; x < imgUp->width(); x++ ) { |
111 | if ( !qRed( imgMask.pixel( x, y ) ) ) | 111 | if ( !qRed( imgMask.pixel( x, y ) ) ) |
112 | line[x] = i + 1; | 112 | line[x] = i + 1; |
113 | } | 113 | } |
114 | } | 114 | } |
115 | } | 115 | } |
116 | } | 116 | } |
117 | 117 | ||
118 | for ( int i = 0; i < 7; i++ ) { | 118 | for ( int i = 0; i < 7; i++ ) { |
119 | buttonPixUp[i] = NULL; | 119 | buttonPixUp[i] = NULL; |
120 | buttonPixDown[i] = NULL; | 120 | buttonPixDown[i] = NULL; |
121 | } | 121 | } |
122 | 122 | ||
123 | setBackgroundPixmap( *pixBg ); | 123 | setBackgroundPixmap( *pixBg ); |
124 | 124 | ||
125 | slider = new QSlider( Qt::Horizontal, this ); | 125 | slider = new QSlider( Qt::Horizontal, this ); |
126 | slider->setMinValue( 0 ); | 126 | slider->setMinValue( 0 ); |
127 | slider->setMaxValue( 1 ); | 127 | slider->setMaxValue( 1 ); |
128 | slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) ); | 128 | slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) ); |
129 | slider->setFocusPolicy( QWidget::NoFocus ); | 129 | slider->setFocusPolicy( QWidget::NoFocus ); |
130 | 130 | ||
131 | resizeEvent( NULL ); | 131 | resizeEvent( NULL ); |
132 | 132 | ||
133 | connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); | 133 | connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); |
134 | connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); | 134 | connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); |
135 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); | 135 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); |
136 | connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); | 136 | connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); |
137 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); | 137 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); |
138 | 138 | ||
139 | setLength( mediaPlayerState->length() ); | 139 | setLength( mediaPlayerState->length() ); |
140 | setPosition( mediaPlayerState->position() ); | 140 | setPosition( mediaPlayerState->position() ); |
141 | setFullscreen( mediaPlayerState->fullscreen() ); | 141 | setFullscreen( mediaPlayerState->fullscreen() ); |
142 | setPaused( mediaPlayerState->paused() ); | 142 | // setPaused( mediaPlayerState->paused() ); |
143 | setPlaying( mediaPlayerState->playing() ); | 143 | setPlaying( mediaPlayerState->playing() ); |
144 | } | 144 | } |
145 | 145 | ||
146 | 146 | ||
147 | VideoWidget::~VideoWidget() { | 147 | VideoWidget::~VideoWidget() { |
148 | 148 | ||
149 | for ( int i = 0; i < 7; i++ ) { | 149 | for ( int i = 0; i < 7; i++ ) { |
150 | delete buttonPixUp[i]; | 150 | delete buttonPixUp[i]; |
151 | delete buttonPixDown[i]; | 151 | delete buttonPixDown[i]; |
152 | } | 152 | } |
153 | 153 | ||
154 | delete pixBg; | 154 | delete pixBg; |
155 | delete imgUp; | 155 | delete imgUp; |
156 | delete imgDn; | 156 | delete imgDn; |
157 | delete imgButtonMask; | 157 | delete imgButtonMask; |
158 | for ( int i = 0; i < 7; i++ ) { | 158 | for ( int i = 0; i < 7; i++ ) { |
159 | delete masks[i]; | 159 | delete masks[i]; |
160 | } | 160 | } |
161 | 161 | ||
162 | } | 162 | } |
163 | 163 | ||
164 | QPixmap *combineVImageWithBackground( QImage img, QPixmap bg, QPoint offset ) { | 164 | QPixmap *combineVImageWithBackground( QImage img, QPixmap bg, QPoint offset ) { |
165 | QPixmap pix( img.width(), img.height() ); | 165 | QPixmap pix( img.width(), img.height() ); |
166 | QPainter p( &pix ); | 166 | QPainter p( &pix ); |
167 | p.drawTiledPixmap( pix.rect(), bg, offset ); | 167 | p.drawTiledPixmap( pix.rect(), bg, offset ); |
168 | p.drawImage( 0, 0, img ); | 168 | p.drawImage( 0, 0, img ); |
169 | return new QPixmap( pix ); | 169 | return new QPixmap( pix ); |
170 | } | 170 | } |
171 | 171 | ||
172 | QPixmap *maskVPixToMask( QPixmap pix, QBitmap mask ) { | 172 | QPixmap *maskVPixToMask( QPixmap pix, QBitmap mask ) { |
173 | QPixmap *pixmap = new QPixmap( pix ); | 173 | QPixmap *pixmap = new QPixmap( pix ); |
174 | pixmap->setMask( mask ); | 174 | pixmap->setMask( mask ); |
175 | return pixmap; | 175 | return pixmap; |
176 | } | 176 | } |
177 | 177 | ||
178 | void VideoWidget::resizeEvent( QResizeEvent * ) { | 178 | void VideoWidget::resizeEvent( QResizeEvent * ) { |
179 | int h = height(); | 179 | int h = height(); |
180 | int w = width(); | 180 | int w = width(); |
181 | int Vh = 160; | 181 | int Vh = 160; |
182 | //videoFrame->height(); | 182 | //videoFrame->height(); |
183 | int Vw = 220; | 183 | int Vw = 220; |
184 | //videoFrame->width(); | 184 | //videoFrame->width(); |
185 | 185 | ||
186 | 186 | ||
187 | slider->setFixedWidth( w - 20 ); | 187 | slider->setFixedWidth( w - 20 ); |
188 | slider->setGeometry( QRect( 15, h - 30, w - 90, 20 ) ); | 188 | slider->setGeometry( QRect( 15, h - 30, w - 90, 20 ) ); |
189 | slider->setBackgroundOrigin( QWidget::ParentOrigin ); | 189 | slider->setBackgroundOrigin( QWidget::ParentOrigin ); |
190 | slider->setFocusPolicy( QWidget::NoFocus ); | 190 | slider->setFocusPolicy( QWidget::NoFocus ); |
191 | slider->setBackgroundPixmap( *pixBg ); | 191 | slider->setBackgroundPixmap( *pixBg ); |
192 | 192 | ||
193 | xoff = 0;// ( imgUp->width() ) / 2; | 193 | xoff = 0;// ( imgUp->width() ) / 2; |
194 | yoff = 180;//(( Vh - imgUp->height() ) / 2) - 10; | 194 | yoff = 180;//(( Vh - imgUp->height() ) / 2) - 10; |
195 | QPoint p( xoff, yoff ); | 195 | QPoint p( xoff, yoff ); |
196 | 196 | ||
197 | 197 | ||
198 | QPixmap *pixUp = combineVImageWithBackground( *imgUp, *pixBg, p ); | 198 | QPixmap *pixUp = combineVImageWithBackground( *imgUp, *pixBg, p ); |
199 | QPixmap *pixDn = combineVImageWithBackground( *imgDn, *pixBg, p ); | 199 | QPixmap *pixDn = combineVImageWithBackground( *imgDn, *pixBg, p ); |
200 | 200 | ||
201 | for ( int i = 0; i < 7; i++ ) { | 201 | for ( int i = 0; i < 7; i++ ) { |
202 | if ( !masks[i]->isNull() ) { | 202 | if ( !masks[i]->isNull() ) { |
203 | delete buttonPixUp[i]; | 203 | delete buttonPixUp[i]; |
204 | delete buttonPixDown[i]; | 204 | delete buttonPixDown[i]; |
205 | buttonPixUp[i] = maskVPixToMask( *pixUp, *masks[i] ); | 205 | buttonPixUp[i] = maskVPixToMask( *pixUp, *masks[i] ); |
206 | buttonPixDown[i] = maskVPixToMask( *pixDn, *masks[i] ); | 206 | buttonPixDown[i] = maskVPixToMask( *pixDn, *masks[i] ); |
207 | } | 207 | } |
208 | } | 208 | } |
209 | 209 | ||
210 | delete pixUp; | 210 | delete pixUp; |
211 | delete pixDn; | 211 | delete pixDn; |
212 | } | 212 | } |
213 | 213 | ||
214 | static bool videoSliderBeingMoved = FALSE; | 214 | static bool videoSliderBeingMoved = FALSE; |
215 | 215 | ||
216 | void VideoWidget::sliderPressed() { | 216 | void VideoWidget::sliderPressed() { |
217 | videoSliderBeingMoved = TRUE; | 217 | videoSliderBeingMoved = TRUE; |
218 | } | 218 | } |
219 | 219 | ||
220 | void VideoWidget::sliderReleased() { | 220 | void VideoWidget::sliderReleased() { |
221 | videoSliderBeingMoved = FALSE; | 221 | videoSliderBeingMoved = FALSE; |
222 | if ( slider->width() == 0 ) { | 222 | if ( slider->width() == 0 ) { |
223 | return; | 223 | return; |
224 | } | 224 | } |
225 | long val = long((double)slider->value() * mediaPlayerState->length() / slider->width()); | 225 | long val = long((double)slider->value() * mediaPlayerState->length() / slider->width()); |
226 | mediaPlayerState->setPosition( val ); | 226 | mediaPlayerState->setPosition( val ); |
227 | } | 227 | } |
228 | 228 | ||
229 | void VideoWidget::setPosition( long i ) { | 229 | void VideoWidget::setPosition( long i ) { |
230 | updateSlider( i, mediaPlayerState->length() ); | 230 | updateSlider( i, mediaPlayerState->length() ); |
231 | } | 231 | } |
232 | 232 | ||
233 | 233 | ||
234 | void VideoWidget::setLength( long max ) { | 234 | void VideoWidget::setLength( long max ) { |
235 | updateSlider( mediaPlayerState->position(), max ); | 235 | updateSlider( mediaPlayerState->position(), max ); |
236 | } | 236 | } |
237 | 237 | ||
238 | void VideoWidget::setView( char view ) { | 238 | void VideoWidget::setView( char view ) { |
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h index 710ba9e..b35558b 100644 --- a/noncore/multimedia/opieplayer2/videowidget.h +++ b/noncore/multimedia/opieplayer2/videowidget.h | |||
@@ -1,123 +1,122 @@ | |||
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 L. Potter <ljp@llornkcor.com> | 5 | Copyright (c) 2002 L. Potter <ljp@llornkcor.com> |
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 | #ifndef VIDEO_WIDGET_H | 34 | #ifndef VIDEO_WIDGET_H |
35 | #define VIDEO_WIDGET_H | 35 | #define VIDEO_WIDGET_H |
36 | 36 | ||
37 | #include <qwidget.h> | 37 | #include <qwidget.h> |
38 | #include "xinevideowidget.h" | 38 | #include "xinevideowidget.h" |
39 | 39 | ||
40 | class QPixmap; | 40 | class QPixmap; |
41 | class QSlider; | 41 | class QSlider; |
42 | 42 | ||
43 | enum VideoButtons { | 43 | enum VideoButtons { |
44 | VideoStop = 0, | 44 | VideoStop = 0, |
45 | VideoPlay, | 45 | VideoPlay, |
46 | // VideoPause, | 46 | // VideoPause, |
47 | VideoPrevious, | 47 | VideoPrevious, |
48 | VideoNext, | 48 | VideoNext, |
49 | VideoVolUp, | 49 | VideoVolUp, |
50 | VideoVolDown, | 50 | VideoVolDown, |
51 | VideoFullscreen | 51 | VideoFullscreen |
52 | }; | 52 | }; |
53 | 53 | ||
54 | class VideoWidget : public QWidget { | 54 | class VideoWidget : public QWidget { |
55 | Q_OBJECT | 55 | Q_OBJECT |
56 | public: | 56 | public: |
57 | VideoWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); | 57 | VideoWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); |
58 | ~VideoWidget(); | 58 | ~VideoWidget(); |
59 | 59 | ||
60 | 60 | ||
61 | XineVideoWidget* vidWidget(); | 61 | XineVideoWidget* vidWidget(); |
62 | public slots: | 62 | public slots: |
63 | void updateSlider( long, long ); | 63 | void updateSlider( long, long ); |
64 | void sliderPressed( ); | 64 | void sliderPressed( ); |
65 | void sliderReleased( ); | 65 | void sliderReleased( ); |
66 | void setPaused( bool b); | ||
67 | void setPlaying( bool b); | 66 | void setPlaying( bool b); |
68 | void setFullscreen( bool b ); | 67 | void setFullscreen( bool b ); |
69 | void makeVisible(); | 68 | void makeVisible(); |
70 | void setPosition( long ); | 69 | void setPosition( long ); |
71 | void setLength( long ); | 70 | void setLength( long ); |
72 | void setView( char ); | 71 | void setView( char ); |
73 | 72 | ||
74 | signals: | 73 | signals: |
75 | void moreClicked(); | 74 | void moreClicked(); |
76 | void lessClicked(); | 75 | void lessClicked(); |
77 | void moreReleased(); | 76 | void moreReleased(); |
78 | void lessReleased(); | 77 | void lessReleased(); |
79 | void sliderMoved( long ); | 78 | void sliderMoved( long ); |
80 | void videoResized ( const QSize &s ); | 79 | void videoResized ( const QSize &s ); |
81 | 80 | ||
82 | protected: | 81 | protected: |
83 | 82 | ||
84 | void resizeEvent( QResizeEvent * ); | 83 | void resizeEvent( QResizeEvent * ); |
85 | void paintEvent( QPaintEvent *pe ); | 84 | void paintEvent( QPaintEvent *pe ); |
86 | void showEvent( QShowEvent *se ); | 85 | void showEvent( QShowEvent *se ); |
87 | void mouseMoveEvent( QMouseEvent *event ); | 86 | void mouseMoveEvent( QMouseEvent *event ); |
88 | void mousePressEvent( QMouseEvent *event ); | 87 | void mousePressEvent( QMouseEvent *event ); |
89 | void mouseReleaseEvent( QMouseEvent *event ); | 88 | void mouseReleaseEvent( QMouseEvent *event ); |
90 | void closeEvent( QCloseEvent *event ); | 89 | void closeEvent( QCloseEvent *event ); |
91 | void keyReleaseEvent( QKeyEvent *e); | 90 | void keyReleaseEvent( QKeyEvent *e); |
92 | 91 | ||
93 | private: | 92 | private: |
94 | // Ticker songInfo; | 93 | // Ticker songInfo; |
95 | QPixmap *pixBg; | 94 | QPixmap *pixBg; |
96 | QImage *imgUp; | 95 | QImage *imgUp; |
97 | QImage *imgDn; | 96 | QImage *imgDn; |
98 | QImage *imgButtonMask; | 97 | QImage *imgButtonMask; |
99 | QBitmap *masks[7]; | 98 | QBitmap *masks[7]; |
100 | QPixmap *buttonPixUp[7]; | 99 | QPixmap *buttonPixUp[7]; |
101 | QPixmap *buttonPixDown[7]; | 100 | QPixmap *buttonPixDown[7]; |
102 | QString skin; | 101 | QString skin; |
103 | // QPixmap *pixmaps[4]; | 102 | // QPixmap *pixmaps[4]; |
104 | int xoff, yoff; | 103 | int xoff, yoff; |
105 | 104 | ||
106 | 105 | ||
107 | void paintButton( QPainter *p, int i ); | 106 | void paintButton( QPainter *p, int i ); |
108 | void toggleButton( int ); | 107 | void toggleButton( int ); |
109 | void setToggleButton( int, bool ); | 108 | void setToggleButton( int, bool ); |
110 | 109 | ||
111 | QString backgroundPix; | 110 | QString backgroundPix; |
112 | QSlider *slider; | 111 | QSlider *slider; |
113 | QPixmap *pixmaps[3]; | 112 | QPixmap *pixmaps[3]; |
114 | QImage *currentFrame; | 113 | QImage *currentFrame; |
115 | int scaledWidth; | 114 | int scaledWidth; |
116 | int scaledHeight; | 115 | int scaledHeight; |
117 | XineVideoWidget* videoFrame; | 116 | XineVideoWidget* videoFrame; |
118 | }; | 117 | }; |
119 | 118 | ||
120 | #endif // VIDEO_WIDGET_H | 119 | #endif // VIDEO_WIDGET_H |
121 | 120 | ||
122 | 121 | ||
123 | 122 | ||