author | harlekin <harlekin> | 2002-08-02 11:38:17 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-08-02 11:38:17 (UTC) |
commit | d3a54af5288cd30fc1a4f2dafc9f848b245046d6 (patch) (unidiff) | |
tree | 7390858ac62708bfc81078493e580a57297c61fa | |
parent | 471dc69956af37e7c5f481c10482f280db853491 (diff) | |
download | opie-d3a54af5288cd30fc1a4f2dafc9f848b245046d6.zip opie-d3a54af5288cd30fc1a4f2dafc9f848b245046d6.tar.gz opie-d3a54af5288cd30fc1a4f2dafc9f848b245046d6.tar.bz2 |
theme work
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 38 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.h | 1 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 1 |
4 files changed, 26 insertions, 16 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 689366e..300a5c8 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -140,49 +140,49 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
140 | songInfo.setFocusPolicy( QWidget::NoFocus ); | 140 | songInfo.setFocusPolicy( QWidget::NoFocus ); |
141 | changeTextColor( &songInfo ); | 141 | changeTextColor( &songInfo ); |
142 | 142 | ||
143 | slider.setFixedHeight( 20 ); | 143 | slider.setFixedHeight( 20 ); |
144 | slider.setMinValue( 0 ); | 144 | slider.setMinValue( 0 ); |
145 | slider.setMaxValue( 1 ); | 145 | slider.setMaxValue( 1 ); |
146 | slider.setFocusPolicy( QWidget::NoFocus ); | 146 | slider.setFocusPolicy( QWidget::NoFocus ); |
147 | slider.setBackgroundPixmap( *pixBg ); | 147 | slider.setBackgroundPixmap( *pixBg ); |
148 | 148 | ||
149 | time.setFocusPolicy( QWidget::NoFocus ); | 149 | time.setFocusPolicy( QWidget::NoFocus ); |
150 | time.setAlignment( Qt::AlignCenter ); | 150 | time.setAlignment( Qt::AlignCenter ); |
151 | time.setFrame(FALSE); | 151 | time.setFrame(FALSE); |
152 | changeTextColor( &time ); | 152 | changeTextColor( &time ); |
153 | 153 | ||
154 | resizeEvent( NULL ); | 154 | resizeEvent( NULL ); |
155 | 155 | ||
156 | connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); | 156 | connect( &slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); |
157 | connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); | 157 | connect( &slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); |
158 | 158 | ||
159 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); | 159 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); |
160 | connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); | 160 | connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); |
161 | connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); | 161 | connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); |
162 | connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) ); | 162 | connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) ); |
163 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); | 163 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); |
164 | 164 | ||
165 | // Intialise state | 165 | // Intialise state |
166 | setLength( mediaPlayerState->length() ); | 166 | setLength( mediaPlayerState->length() ); |
167 | setPosition( mediaPlayerState->position() ); | 167 | setPosition( mediaPlayerState->position() ); |
168 | setLooping( mediaPlayerState->fullscreen() ); | 168 | setLooping( mediaPlayerState->fullscreen() ); |
169 | setPaused( mediaPlayerState->paused() ); | 169 | setPaused( mediaPlayerState->paused() ); |
170 | setPlaying( mediaPlayerState->playing() ); | 170 | setPlaying( mediaPlayerState->playing() ); |
171 | 171 | ||
172 | } | 172 | } |
173 | 173 | ||
174 | AudioWidget::~AudioWidget() { | 174 | AudioWidget::~AudioWidget() { |
175 | 175 | ||
176 | for ( int i = 0; i < 11; i++ ) { | 176 | for ( int i = 0; i < 11; i++ ) { |
177 | delete buttonPixUp[i]; | 177 | delete buttonPixUp[i]; |
178 | delete buttonPixDown[i]; | 178 | delete buttonPixDown[i]; |
179 | } | 179 | } |
180 | delete pixBg; | 180 | delete pixBg; |
181 | delete imgUp; | 181 | delete imgUp; |
182 | delete imgDn; | 182 | delete imgDn; |
183 | delete imgButtonMask; | 183 | delete imgButtonMask; |
184 | for ( int i = 0; i < 11; i++ ) { | 184 | for ( int i = 0; i < 11; i++ ) { |
185 | delete masks[i]; | 185 | delete masks[i]; |
186 | } | 186 | } |
187 | } | 187 | } |
188 | 188 | ||
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index bce6b89..48caf00 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -65,86 +65,91 @@ struct MediaButton { | |||
65 | }; | 65 | }; |
66 | 66 | ||
67 | 67 | ||
68 | // Layout information for the videoButtons (and if it is a toggle button or not) | 68 | // Layout information for the videoButtons (and if it is a toggle button or not) |
69 | MediaButton videoButtons[] = { | 69 | MediaButton videoButtons[] = { |
70 | { 5+0*32+xo, 200+yo, FALSE, FALSE, FALSE, 4 }, // previous | 70 | { 5+0*32+xo, 200+yo, FALSE, FALSE, FALSE, 4 }, // previous |
71 | { 5+1*32+xo, 200+yo, FALSE, FALSE, FALSE, 1 }, // stop | 71 | { 5+1*32+xo, 200+yo, FALSE, FALSE, FALSE, 1 }, // stop |
72 | { 5+2*32+xo, 200+yo, TRUE, FALSE, FALSE, 0 }, // play | 72 | { 5+2*32+xo, 200+yo, TRUE, FALSE, FALSE, 0 }, // play |
73 | { 5+3*32+xo, 200+yo, TRUE, FALSE, FALSE, 2 }, // pause | 73 | { 5+3*32+xo, 200+yo, TRUE, FALSE, FALSE, 2 }, // pause |
74 | { 5+4*32+xo, 200+yo, FALSE, FALSE, FALSE, 3 }, // next | 74 | { 5+4*32+xo, 200+yo, FALSE, FALSE, FALSE, 3 }, // next |
75 | { 5+5*32+xo, 200+yo, FALSE, FALSE, FALSE, 8 }, // playlist | 75 | { 5+5*32+xo, 200+yo, FALSE, FALSE, FALSE, 8 }, // playlist |
76 | { 5+6*32+xo, 200+yo, TRUE, FALSE, FALSE, 9 } // fullscreen | 76 | { 5+6*32+xo, 200+yo, TRUE, FALSE, FALSE, 9 } // fullscreen |
77 | }; | 77 | }; |
78 | 78 | ||
79 | 79 | ||
80 | static const int numButtons = (sizeof(videoButtons)/sizeof(MediaButton)); | 80 | static const int numButtons = (sizeof(videoButtons)/sizeof(MediaButton)); |
81 | 81 | ||
82 | 82 | ||
83 | VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : | 83 | VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : |
84 | QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { | 84 | QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { |
85 | setCaption( tr("OpiePlayer - Video") ); | 85 | setCaption( tr("OpiePlayer - Video") ); |
86 | Config cfg("OpiePlayer"); | 86 | Config cfg("OpiePlayer"); |
87 | cfg.setGroup("VideoWidget"); | 87 | cfg.setGroup("VideoWidget"); |
88 | 88 | ||
89 | QString backgroundPix, Button0aPix, Button0bPix, controlsPix; | 89 | QString Button0aPix, Button0bPix, controlsPix; |
90 | backgroundPix=cfg.readEntry( "backgroundPix", "opieplayer/metalFinish"); | 90 | //backgroundPix=cfg.readEntry( "backgroundPix", "opieplayer/metalFinish"); |
91 | Button0aPix=cfg.readEntry( "Button0aPix", "opieplayer/mediaButton0a"); | 91 | Button0aPix=cfg.readEntry( "Button0aPix", "opieplayer/mediaButton0a"); |
92 | Button0bPix=cfg.readEntry( "Button0bPix","opieplayer/mediaButton0b"); | 92 | Button0bPix=cfg.readEntry( "Button0bPix","opieplayer/mediaButton0b"); |
93 | controlsPix=cfg.readEntry( "controlsPix","opieplayer/mediaControls0" ); | 93 | controlsPix=cfg.readEntry( "controlsPix","opieplayer/mediaControls0" ); |
94 | 94 | ||
95 | cfg.setGroup("AudioWidget"); | ||
96 | QString skin = cfg.readEntry("Skin","default"); | ||
97 | QString skinPath = "opieplayer/skins/" + skin; | ||
98 | backgroundPix = QString("%1/background").arg(skinPath) ; | ||
99 | |||
95 | setBackgroundPixmap( Resource::loadPixmap( backgroundPix) ); | 100 | setBackgroundPixmap( Resource::loadPixmap( backgroundPix) ); |
96 | pixmaps[0] = new QPixmap( Resource::loadPixmap( Button0aPix ) ); | 101 | pixmaps[0] = new QPixmap( Resource::loadPixmap( Button0aPix ) ); |
97 | pixmaps[1] = new QPixmap( Resource::loadPixmap( Button0bPix ) ); | 102 | pixmaps[1] = new QPixmap( Resource::loadPixmap( Button0bPix ) ); |
98 | pixmaps[2] = new QPixmap( Resource::loadPixmap( controlsPix) ); | 103 | pixmaps[2] = new QPixmap( Resource::loadPixmap( controlsPix) ); |
99 | currentFrame = new QImage( 220 + 2, 160, (QPixmap::defaultDepth() == 16) ? 16 : 32 ); | 104 | currentFrame = new QImage( 220 + 2, 160, (QPixmap::defaultDepth() == 16) ? 16 : 32 ); |
100 | 105 | ||
101 | slider = new QSlider( Qt::Horizontal, this ); | 106 | slider = new QSlider( Qt::Horizontal, this ); |
102 | slider->setMinValue( 0 ); | 107 | slider->setMinValue( 0 ); |
103 | slider->setMaxValue( 1 ); | 108 | slider->setMaxValue( 1 ); |
104 | slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) ); | 109 | slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) ); |
105 | slider->setFocusPolicy( QWidget::NoFocus ); | 110 | slider->setFocusPolicy( QWidget::NoFocus ); |
106 | slider->setGeometry( QRect( 7, 250, 220, 20 ) ); | 111 | slider->setGeometry( QRect( 7, 250, 220, 20 ) ); |
107 | 112 | ||
108 | connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); | 113 | connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); |
109 | connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); | 114 | connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); |
110 | 115 | ||
111 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); | 116 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); |
112 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | 117 | connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); |
113 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 118 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
114 | connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); | 119 | connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); |
115 | connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) ); | 120 | connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) ); |
116 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); | 121 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); |
117 | 122 | ||
118 | // Intialise state | 123 | // Intialise state |
119 | setLength( mediaPlayerState->length() ); | 124 | setLength( mediaPlayerState->length() ); |
120 | setPosition( mediaPlayerState->position() ); | 125 | setPosition( mediaPlayerState->position() ); |
121 | setFullscreen( mediaPlayerState->fullscreen() ); | 126 | setFullscreen( mediaPlayerState->fullscreen() ); |
122 | setPaused( mediaPlayerState->paused() ); | 127 | setPaused( mediaPlayerState->paused() ); |
123 | setPlaying( mediaPlayerState->playing() ); | 128 | setPlaying( mediaPlayerState->playing() ); |
124 | 129 | ||
125 | videoFrame = new XineVideoWidget( 240, 155 ,this, "Video frame" ); | 130 | videoFrame = new XineVideoWidget( 240, 155 ,this, "Video frame" ); |
126 | videoFrame->setGeometry( QRect( 0, 15 , 240 ,170 ) ); | 131 | |
127 | } | 132 | } |
128 | 133 | ||
129 | 134 | ||
130 | VideoWidget::~VideoWidget() { | 135 | VideoWidget::~VideoWidget() { |
131 | for ( int i = 0; i < 3; i++ ) { | 136 | for ( int i = 0; i < 3; i++ ) { |
132 | delete pixmaps[i]; | 137 | delete pixmaps[i]; |
133 | } | 138 | } |
134 | delete currentFrame; | 139 | delete currentFrame; |
135 | } | 140 | } |
136 | 141 | ||
137 | 142 | ||
138 | static bool videoSliderBeingMoved = FALSE; | 143 | static bool videoSliderBeingMoved = FALSE; |
139 | 144 | ||
140 | 145 | ||
141 | void VideoWidget::sliderPressed() { | 146 | void VideoWidget::sliderPressed() { |
142 | videoSliderBeingMoved = TRUE; | 147 | videoSliderBeingMoved = TRUE; |
143 | } | 148 | } |
144 | 149 | ||
145 | 150 | ||
146 | void VideoWidget::sliderReleased() { | 151 | void VideoWidget::sliderReleased() { |
147 | videoSliderBeingMoved = FALSE; | 152 | videoSliderBeingMoved = FALSE; |
148 | if ( slider->width() == 0 ) { | 153 | if ( slider->width() == 0 ) { |
149 | return; | 154 | return; |
150 | } | 155 | } |
@@ -248,72 +253,75 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { | |||
248 | case VideoPlayList: mediaPlayerState->setList(); return; | 253 | case VideoPlayList: mediaPlayerState->setList(); return; |
249 | case VideoFullscreen: mediaPlayerState->setFullscreen( TRUE ); makeVisible(); return; | 254 | case VideoFullscreen: mediaPlayerState->setFullscreen( TRUE ); makeVisible(); return; |
250 | } | 255 | } |
251 | 256 | ||
252 | } | 257 | } |
253 | } | 258 | } |
254 | 259 | ||
255 | 260 | ||
256 | void VideoWidget::mousePressEvent( QMouseEvent *event ) { | 261 | void VideoWidget::mousePressEvent( QMouseEvent *event ) { |
257 | mouseMoveEvent( event ); | 262 | mouseMoveEvent( event ); |
258 | } | 263 | } |
259 | 264 | ||
260 | 265 | ||
261 | void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { | 266 | void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { |
262 | if ( mediaPlayerState->fullscreen() ) { | 267 | if ( mediaPlayerState->fullscreen() ) { |
263 | mediaPlayerState->setFullscreen( FALSE ); | 268 | mediaPlayerState->setFullscreen( FALSE ); |
264 | makeVisible(); | 269 | makeVisible(); |
265 | 270 | ||
266 | mouseMoveEvent( event ); | 271 | mouseMoveEvent( event ); |
267 | } | 272 | } |
268 | } | 273 | } |
269 | 274 | ||
270 | 275 | ||
271 | void VideoWidget::makeVisible() { | 276 | void VideoWidget::makeVisible() { |
272 | if ( mediaPlayerState->fullscreen() ) { | 277 | if ( mediaPlayerState->fullscreen() ) { |
273 | setBackgroundMode( QWidget::NoBackground ); | 278 | setBackgroundMode( QWidget::NoBackground ); |
274 | showFullScreen(); | 279 | showFullScreen(); |
275 | resize( qApp->desktop()->size() ); | 280 | resize( qApp->desktop()->size() ); |
276 | slider->hide(); | 281 | slider->hide(); |
277 | } else { | 282 | } else { |
278 | setBackgroundPixmap( Resource::loadPixmap( "opieplayer/metalFinish" ) ); | 283 | setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) ); |
279 | showNormal(); | 284 | showNormal(); |
280 | showMaximized(); | 285 | showMaximized(); |
281 | slider->show(); | 286 | slider->show(); |
282 | } | 287 | } |
283 | } | 288 | } |
284 | 289 | ||
285 | 290 | ||
286 | void VideoWidget::paintEvent( QPaintEvent * ) { | 291 | void VideoWidget::paintEvent( QPaintEvent * ) { |
287 | QPainter p( this ); | 292 | QPainter p( this ); |
288 | 293 | ||
289 | if ( mediaPlayerState->fullscreen() ) { | 294 | if ( mediaPlayerState->fullscreen() ) { |
290 | // Clear the background | 295 | // Clear the background |
291 | p.setBrush( QBrush( Qt::black ) ); | 296 | p.setBrush( QBrush( Qt::black ) ); |
292 | videoFrame->setGeometry( QRect( 0, 0 , 240 ,340 ) ); | 297 | videoFrame->setGeometry( QRect( 0, 0 , 240 ,340 ) ); |
293 | 298 | ||
294 | } else { | 299 | } else { |
300 | |||
301 | videoFrame->setGeometry( QRect( 0, 15 , 240 ,170 ) ); | ||
295 | // draw the buttons | 302 | // draw the buttons |
303 | |||
296 | for ( int i = 0; i < numButtons; i++ ) { | 304 | for ( int i = 0; i < numButtons; i++ ) { |
297 | paintButton( &p, i ); | 305 | paintButton( &p, i ); |
298 | } | 306 | } |
299 | // draw the slider | 307 | // draw the slider |
300 | slider->repaint( TRUE ); | 308 | slider->repaint( TRUE ); |
301 | } | 309 | } |
302 | } | 310 | } |
303 | 311 | ||
304 | 312 | ||
305 | void VideoWidget::closeEvent( QCloseEvent* ) { | 313 | void VideoWidget::closeEvent( QCloseEvent* ) { |
306 | mediaPlayerState->setList(); | 314 | mediaPlayerState->setList(); |
307 | } | 315 | } |
308 | 316 | ||
309 | 317 | ||
310 | bool VideoWidget::playVideo() { | 318 | bool VideoWidget::playVideo() { |
311 | bool result = FALSE; | 319 | bool result = FALSE; |
312 | 320 | ||
313 | int stream = 0; | 321 | int stream = 0; |
314 | 322 | ||
315 | int sw = 240; | 323 | int sw = 240; |
316 | int sh = 320; | 324 | int sh = 320; |
317 | int dd = QPixmap::defaultDepth(); | 325 | int dd = QPixmap::defaultDepth(); |
318 | int w = height(); | 326 | int w = height(); |
319 | int h = width(); | 327 | int h = width(); |
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h index 8f98889..0122d5d 100644 --- a/noncore/multimedia/opieplayer2/videowidget.h +++ b/noncore/multimedia/opieplayer2/videowidget.h | |||
@@ -65,36 +65,37 @@ public slots: | |||
65 | void setPaused( bool b) { setToggleButton( VideoPause, b ); } | 65 | void setPaused( bool b) { setToggleButton( VideoPause, b ); } |
66 | void setPlaying( bool b) { setToggleButton( VideoPlay, b ); } | 66 | void setPlaying( bool b) { setToggleButton( VideoPlay, b ); } |
67 | void setFullscreen( bool b ) { setToggleButton( VideoFullscreen, b ); } | 67 | void setFullscreen( bool b ) { setToggleButton( VideoFullscreen, b ); } |
68 | void makeVisible(); | 68 | void makeVisible(); |
69 | void setPosition( long ); | 69 | void setPosition( long ); |
70 | void setLength( long ); | 70 | void setLength( long ); |
71 | void setView( char ); | 71 | void setView( char ); |
72 | 72 | ||
73 | signals: | 73 | signals: |
74 | void sliderMoved( long ); | 74 | void sliderMoved( long ); |
75 | 75 | ||
76 | protected: | 76 | protected: |
77 | void paintEvent( QPaintEvent *pe ); | 77 | void paintEvent( QPaintEvent *pe ); |
78 | void mouseMoveEvent( QMouseEvent *event ); | 78 | void mouseMoveEvent( QMouseEvent *event ); |
79 | void mousePressEvent( QMouseEvent *event ); | 79 | void mousePressEvent( QMouseEvent *event ); |
80 | void mouseReleaseEvent( QMouseEvent *event ); | 80 | void mouseReleaseEvent( QMouseEvent *event ); |
81 | void closeEvent( QCloseEvent *event ); | 81 | void closeEvent( QCloseEvent *event ); |
82 | void keyReleaseEvent( QKeyEvent *e); | 82 | void keyReleaseEvent( QKeyEvent *e); |
83 | 83 | ||
84 | private: | 84 | private: |
85 | void paintButton( QPainter *p, int i ); | 85 | void paintButton( QPainter *p, int i ); |
86 | void toggleButton( int ); | 86 | void toggleButton( int ); |
87 | void setToggleButton( int, bool ); | 87 | void setToggleButton( int, bool ); |
88 | 88 | ||
89 | QString backgroundPix; | ||
89 | QSlider *slider; | 90 | QSlider *slider; |
90 | QPixmap *pixmaps[3]; | 91 | QPixmap *pixmaps[3]; |
91 | QImage *currentFrame; | 92 | QImage *currentFrame; |
92 | int scaledWidth; | 93 | int scaledWidth; |
93 | int scaledHeight; | 94 | int scaledHeight; |
94 | XineVideoWidget* videoFrame; | 95 | XineVideoWidget* videoFrame; |
95 | }; | 96 | }; |
96 | 97 | ||
97 | #endif // VIDEO_WIDGET_H | 98 | #endif // VIDEO_WIDGET_H |
98 | 99 | ||
99 | 100 | ||
100 | 101 | ||
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 3be9fa4..3faeab1 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp | |||
@@ -24,48 +24,49 @@ | |||
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 | #include <qtimer.h> | 35 | #include <qtimer.h> |
36 | #include "xinecontrol.h" | 36 | #include "xinecontrol.h" |
37 | #include "mediaplayerstate.h" | 37 | #include "mediaplayerstate.h" |
38 | #include "videowidget.h" | 38 | #include "videowidget.h" |
39 | 39 | ||
40 | extern MediaPlayerState *mediaPlayerState; | 40 | extern MediaPlayerState *mediaPlayerState; |
41 | extern VideoWidget *videoUI; | 41 | extern VideoWidget *videoUI; |
42 | XineControl::XineControl( QObject *parent, const char *name ) | 42 | XineControl::XineControl( QObject *parent, const char *name ) |
43 | : QObject( parent, name ) { | 43 | : QObject( parent, name ) { |
44 | libXine = new XINE::Lib(videoUI->vidWidget() ); | 44 | libXine = new XINE::Lib(videoUI->vidWidget() ); |
45 | 45 | ||
46 | connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( pause(bool) ) ); | 46 | connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( pause(bool) ) ); |
47 | connect( this, SIGNAL( positionChanged( int position ) ), mediaPlayerState, SLOT( updatePosition( long p ) ) ); | 47 | connect( this, SIGNAL( positionChanged( int position ) ), mediaPlayerState, SLOT( updatePosition( long p ) ) ); |
48 | connect(this, SIGNAL( postitionChanged(int position) ), mediaPlayerState, SLOT( setPosition( long p ) ) ); | ||
48 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) ); | 49 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) ); |
49 | connect( mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) ); | 50 | connect( mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) ); |
50 | connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) ); | 51 | connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) ); |
51 | 52 | ||
52 | } | 53 | } |
53 | 54 | ||
54 | XineControl::~XineControl() { | 55 | XineControl::~XineControl() { |
55 | delete libXine; | 56 | delete libXine; |
56 | } | 57 | } |
57 | 58 | ||
58 | void XineControl::play( const QString& fileName ) { | 59 | void XineControl::play( const QString& fileName ) { |
59 | libXine->play( fileName ); | 60 | libXine->play( fileName ); |
60 | mediaPlayerState->setPlaying( true ); | 61 | mediaPlayerState->setPlaying( true ); |
61 | // default to audio view until we know how to handle video | 62 | // default to audio view until we know how to handle video |
62 | // MediaDetect mdetect; | 63 | // MediaDetect mdetect; |
63 | char whichGui = mdetect.videoOrAudio( fileName ); | 64 | char whichGui = mdetect.videoOrAudio( fileName ); |
64 | if (whichGui == 'f') { | 65 | if (whichGui == 'f') { |
65 | qDebug("Nicht erkannter Dateityp"); | 66 | qDebug("Nicht erkannter Dateityp"); |
66 | return; | 67 | return; |
67 | } | 68 | } |
68 | 69 | ||
69 | if (whichGui == 'a') { | 70 | if (whichGui == 'a') { |
70 | libXine->setShowVideo( false ); | 71 | libXine->setShowVideo( false ); |
71 | } else { | 72 | } else { |