-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 3 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 11 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.cpp | 6 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.h | 2 |
4 files changed, 13 insertions, 9 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 56203e0..604ed3a 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -503,69 +503,70 @@ void AudioWidget::closeEvent( QCloseEvent* ) { | |||
503 | 503 | ||
504 | void AudioWidget::paintEvent( QPaintEvent * pe) { | 504 | void AudioWidget::paintEvent( QPaintEvent * pe) { |
505 | if ( !pe->erased() ) { | 505 | if ( !pe->erased() ) { |
506 | // Combine with background and double buffer | 506 | // Combine with background and double buffer |
507 | QPixmap pix( pe->rect().size() ); | 507 | QPixmap pix( pe->rect().size() ); |
508 | QPainter p( &pix ); | 508 | QPainter p( &pix ); |
509 | p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() ); | 509 | p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() ); |
510 | p.drawTiledPixmap( pe->rect(), *pixBg, pe->rect().topLeft() ); | 510 | p.drawTiledPixmap( pe->rect(), *pixBg, pe->rect().topLeft() ); |
511 | for ( int i = 0; i < numButtons; i++ ) | 511 | for ( int i = 0; i < numButtons; i++ ) |
512 | paintButton( &p, i ); | 512 | paintButton( &p, i ); |
513 | QPainter p2( this ); | 513 | QPainter p2( this ); |
514 | p2.drawPixmap( pe->rect().topLeft(), pix ); | 514 | p2.drawPixmap( pe->rect().topLeft(), pix ); |
515 | } else { | 515 | } else { |
516 | QPainter p( this ); | 516 | QPainter p( this ); |
517 | for ( int i = 0; i < numButtons; i++ ) | 517 | for ( int i = 0; i < numButtons; i++ ) |
518 | paintButton( &p, i ); | 518 | paintButton( &p, i ); |
519 | } | 519 | } |
520 | } | 520 | } |
521 | 521 | ||
522 | void AudioWidget::keyReleaseEvent( QKeyEvent *e) | 522 | void AudioWidget::keyReleaseEvent( QKeyEvent *e) |
523 | { | 523 | { |
524 | switch ( e->key() ) { | 524 | switch ( e->key() ) { |
525 | ////////////////////////////// Zaurus keys | 525 | ////////////////////////////// Zaurus keys |
526 | case Key_Home: | 526 | case Key_Home: |
527 | break; | 527 | break; |
528 | case Key_F9: //activity | 528 | case Key_F9: //activity |
529 | hide(); | 529 | hide(); |
530 | // qDebug("Audio F9"); | 530 | // qDebug("Audio F9"); |
531 | break; | 531 | break; |
532 | case Key_F10: //contacts | 532 | case Key_F10: //contacts |
533 | break; | 533 | break; |
534 | case Key_F11: //menu | 534 | case Key_F11: //menu |
535 | mediaPlayerState->toggleBlank(); | ||
535 | break; | 536 | break; |
536 | case Key_F12: //home | 537 | case Key_F12: //home |
537 | break; | 538 | break; |
538 | case Key_F13: //mail | 539 | case Key_F13: //mail |
539 | mediaPlayerState->toggleBlank(); | 540 | mediaPlayerState->toggleBlank(); |
540 | break; | 541 | break; |
541 | case Key_Space: { | 542 | case Key_Space: { |
542 | if(mediaPlayerState->playing()) { | 543 | if(mediaPlayerState->playing()) { |
543 | // toggleButton(1); | 544 | // toggleButton(1); |
544 | mediaPlayerState->setPlaying(FALSE); | 545 | mediaPlayerState->setPlaying(FALSE); |
545 | // toggleButton(1); | 546 | // toggleButton(1); |
546 | } else { | 547 | } else { |
547 | // toggleButton(0); | 548 | // toggleButton(0); |
548 | mediaPlayerState->setPlaying(TRUE); | 549 | mediaPlayerState->setPlaying(TRUE); |
549 | // toggleButton(0); | 550 | // toggleButton(0); |
550 | } | 551 | } |
551 | } | 552 | } |
552 | break; | 553 | break; |
553 | case Key_Down: | 554 | case Key_Down: |
554 | // toggleButton(6); | 555 | // toggleButton(6); |
555 | emit lessClicked(); | 556 | emit lessClicked(); |
556 | emit lessReleased(); | 557 | emit lessReleased(); |
557 | // toggleButton(6); | 558 | // toggleButton(6); |
558 | break; | 559 | break; |
559 | case Key_Up: | 560 | case Key_Up: |
560 | // toggleButton(5); | 561 | // toggleButton(5); |
561 | emit moreClicked(); | 562 | emit moreClicked(); |
562 | emit moreReleased(); | 563 | emit moreReleased(); |
563 | // toggleButton(5); | 564 | // toggleButton(5); |
564 | break; | 565 | break; |
565 | case Key_Right: | 566 | case Key_Right: |
566 | // toggleButton(3); | 567 | // toggleButton(3); |
567 | mediaPlayerState->setNext(); | 568 | mediaPlayerState->setNext(); |
568 | // toggleButton(3); | 569 | // toggleButton(3); |
569 | break; | 570 | break; |
570 | case Key_Left: | 571 | case Key_Left: |
571 | // toggleButton(4); | 572 | // toggleButton(4); |
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 858b51f..87f4f0c 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp | |||
@@ -1,63 +1,65 @@ | |||
1 | #include <qpe/qpeapplication.h> | 1 | #include <qpe/qpeapplication.h> |
2 | #include <qpe/qlibrary.h> | 2 | #include <qpe/qlibrary.h> |
3 | #include <qpe/resource.h> | 3 | #include <qpe/resource.h> |
4 | #include <qpe/config.h> | 4 | #include <qpe/config.h> |
5 | #include <qpe/qcopenvelope_qws.h> | 5 | #include <qpe/qcopenvelope_qws.h> |
6 | 6 | ||
7 | #include <qmainwindow.h> | 7 | #include <qmainwindow.h> |
8 | #include <qmessagebox.h> | 8 | #include <qmessagebox.h> |
9 | #include <qwidgetstack.h> | 9 | #include <qwidgetstack.h> |
10 | #include <qfile.h> | 10 | #include <qfile.h> |
11 | 11 | ||
12 | #include "mediaplayer.h" | 12 | #include "mediaplayer.h" |
13 | #include "playlistwidget.h" | 13 | #include "playlistwidget.h" |
14 | #include "audiowidget.h" | 14 | #include "audiowidget.h" |
15 | #include "videowidget.h" | 15 | #include "videowidget.h" |
16 | #include "volumecontrol.h" | 16 | #include "volumecontrol.h" |
17 | 17 | ||
18 | #include "mediaplayerstate.h" | 18 | #include "mediaplayerstate.h" |
19 | 19 | ||
20 | // for setBacklight() | 20 | // for setBacklight() |
21 | #include <linux/fb.h> | 21 | #include <linux/fb.h> |
22 | #include <sys/file.h> | 22 | #include <sys/file.h> |
23 | #include <sys/ioctl.h> | 23 | #include <sys/ioctl.h> |
24 | 24 | ||
25 | 25 | ||
26 | extern AudioWidget *audioUI; | 26 | extern AudioWidget *audioUI; |
27 | extern VideoWidget *videoUI; | 27 | extern VideoWidget *videoUI; |
28 | extern PlayListWidget *playList; | 28 | extern PlayListWidget *playList; |
29 | extern MediaPlayerState *mediaPlayerState; | 29 | extern MediaPlayerState *mediaPlayerState; |
30 | 30 | ||
31 | 31 | ||
32 | #define FBIOBLANK 0x4611 | ||
33 | |||
32 | MediaPlayer::MediaPlayer( QObject *parent, const char *name ) | 34 | MediaPlayer::MediaPlayer( QObject *parent, const char *name ) |
33 | : QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) { | 35 | : QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) { |
34 | 36 | ||
35 | 37 | ||
36 | // xineControl = new XineControl(); | 38 | // xineControl = new XineControl(); |
37 | // QPEApplication::grabKeyboard(); // EVIL | 39 | // QPEApplication::grabKeyboard(); // EVIL |
38 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 40 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
39 | 41 | ||
40 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) ); | 42 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) ); |
41 | 43 | ||
42 | connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) ); | 44 | connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) ); |
43 | 45 | ||
44 | connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); | 46 | connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); |
45 | connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); | 47 | connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); |
46 | connect( mediaPlayerState, SIGNAL( blankToggled( bool ) ), this, SLOT ( blank( bool ) ) ); | 48 | connect( mediaPlayerState, SIGNAL( blankToggled( bool ) ), this, SLOT ( blank( bool ) ) ); |
47 | 49 | ||
48 | connect( audioUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) ); | 50 | connect( audioUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) ); |
49 | connect( audioUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) ); | 51 | connect( audioUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) ); |
50 | connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); | 52 | connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); |
51 | connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); | 53 | connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); |
52 | 54 | ||
53 | connect( videoUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) ); | 55 | connect( videoUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) ); |
54 | connect( videoUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) ); | 56 | connect( videoUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) ); |
55 | connect( videoUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); | 57 | connect( videoUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); |
56 | connect( videoUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); | 58 | connect( videoUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); |
57 | 59 | ||
58 | volControl = new VolumeControl; | 60 | volControl = new VolumeControl; |
59 | xineControl = new XineControl(); | 61 | xineControl = new XineControl(); |
60 | } | 62 | } |
61 | 63 | ||
62 | MediaPlayer::~MediaPlayer() { | 64 | MediaPlayer::~MediaPlayer() { |
63 | delete xineControl; | 65 | delete xineControl; |
@@ -223,72 +225,73 @@ void MediaPlayer::timerEvent( QTimerEvent * ) { | |||
223 | 225 | ||
224 | if ( drawnOnScreenDisplay ) { | 226 | if ( drawnOnScreenDisplay ) { |
225 | if ( onScreenDisplayVolume > v ) { | 227 | if ( onScreenDisplayVolume > v ) { |
226 | videoUI->repaint( (w - 200) / 2 + v * 20 + 0, h - yoff + 40, (onScreenDisplayVolume - v) * 20 + 9, 30, FALSE ); | 228 | videoUI->repaint( (w - 200) / 2 + v * 20 + 0, h - yoff + 40, (onScreenDisplayVolume - v) * 20 + 9, 30, FALSE ); |
227 | } | 229 | } |
228 | } | 230 | } |
229 | drawnOnScreenDisplay = TRUE; | 231 | drawnOnScreenDisplay = TRUE; |
230 | onScreenDisplayVolume = v; | 232 | onScreenDisplayVolume = v; |
231 | QPainter p( videoUI ); | 233 | QPainter p( videoUI ); |
232 | p.setPen( QColor( 0x10, 0xD0, 0x10 ) ); | 234 | p.setPen( QColor( 0x10, 0xD0, 0x10 ) ); |
233 | p.setBrush( QColor( 0x10, 0xD0, 0x10 ) ); | 235 | p.setBrush( QColor( 0x10, 0xD0, 0x10 ) ); |
234 | 236 | ||
235 | QFont f; | 237 | QFont f; |
236 | f.setPixelSize( 20 ); | 238 | f.setPixelSize( 20 ); |
237 | f.setBold( TRUE ); | 239 | f.setBold( TRUE ); |
238 | p.setFont( f ); | 240 | p.setFont( f ); |
239 | p.drawText( (w - 200) / 2, h - yoff + 20, tr("Volume") ); | 241 | p.drawText( (w - 200) / 2, h - yoff + 20, tr("Volume") ); |
240 | 242 | ||
241 | for ( unsigned int i = 0; i < 10; i++ ) { | 243 | for ( unsigned int i = 0; i < 10; i++ ) { |
242 | if ( v > i ) { | 244 | if ( v > i ) { |
243 | p.drawRect( (w - 200) / 2 + i * 20 + 0, h - yoff + 40, 9, 30 ); | 245 | p.drawRect( (w - 200) / 2 + i * 20 + 0, h - yoff + 40, 9, 30 ); |
244 | } else { | 246 | } else { |
245 | p.drawRect( (w - 200) / 2 + i * 20 + 3, h - yoff + 50, 3, 10 ); | 247 | p.drawRect( (w - 200) / 2 + i * 20 + 3, h - yoff + 50, 3, 10 ); |
246 | } | 248 | } |
247 | } | 249 | } |
248 | } | 250 | } |
249 | } | 251 | } |
250 | 252 | ||
251 | 253 | ||
252 | void MediaPlayer::blank( bool b ) { | 254 | void MediaPlayer::blank( bool b ) { |
253 | fd=open("/dev/fb0",O_RDWR); | 255 | fd=open("/dev/fb0",O_RDWR); |
254 | if (fd != -1) { | 256 | if (fd != -1) { |
255 | 257 | if ( b ) { | |
256 | if ( !b ) { | ||
257 | qDebug("do blanking"); | 258 | qDebug("do blanking"); |
258 | ioctl( fd, FBIOBLANK, 3 ); | 259 | ioctl( fd, FBIOBLANK, 3 ); |
259 | isBlanked = TRUE; | 260 | isBlanked = TRUE; |
260 | } else { | 261 | } else { |
261 | qDebug("do unblanking"); | 262 | qDebug("do unblanking"); |
262 | ioctl( fd, FBIOBLANK, 0); | 263 | ioctl( fd, FBIOBLANK, 0); |
263 | isBlanked = FALSE; | 264 | isBlanked = FALSE; |
264 | } | 265 | } |
265 | close( fd ); | 266 | close( fd ); |
267 | } else { | ||
268 | qDebug("<< /dev/fb0 could not be opend >>"); | ||
266 | } | 269 | } |
267 | } | 270 | } |
268 | 271 | ||
269 | void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { | 272 | void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { |
270 | switch ( e->key() ) { | 273 | switch ( e->key() ) { |
271 | ////////////////////////////// Zaurus keys | 274 | ////////////////////////////// Zaurus keys |
272 | case Key_Home: | 275 | case Key_Home: |
273 | break; | 276 | break; |
274 | case Key_F9: //activity | 277 | case Key_F9: //activity |
275 | break; | 278 | break; |
276 | case Key_F10: //contacts | 279 | case Key_F10: //contacts |
277 | break; | 280 | break; |
278 | case Key_F11: //menu | 281 | case Key_F11: //menu |
279 | break; | 282 | break; |
280 | case Key_F12: //home | 283 | case Key_F12: //home |
281 | qDebug("Blank here"); | 284 | qDebug("Blank here"); |
282 | // mediaPlayerState->toggleBlank(); | 285 | // mediaPlayerState->toggleBlank(); |
283 | break; | 286 | break; |
284 | case Key_F13: //mail | 287 | case Key_F13: //mail |
285 | qDebug("Blank here"); | 288 | qDebug("Blank here"); |
286 | // mediaPlayerState->toggleBlank(); | 289 | // mediaPlayerState->toggleBlank(); |
287 | break; | 290 | break; |
288 | } | 291 | } |
289 | } | 292 | } |
290 | 293 | ||
291 | void MediaPlayer::cleanUp() { | 294 | void MediaPlayer::cleanUp() { |
292 | // QPEApplication::grabKeyboard(); | 295 | // QPEApplication::grabKeyboard(); |
293 | // QPEApplication::ungrabKeyboard(); | 296 | // QPEApplication::ungrabKeyboard(); |
294 | } | 297 | } |
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp index 6aafb88..6833e07 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp | |||
@@ -86,74 +86,74 @@ bool MediaPlayerState::paused() { | |||
86 | } | 86 | } |
87 | 87 | ||
88 | bool MediaPlayerState::playing() { | 88 | bool MediaPlayerState::playing() { |
89 | return isPlaying; | 89 | return isPlaying; |
90 | } | 90 | } |
91 | 91 | ||
92 | bool MediaPlayerState::stop() { | 92 | bool MediaPlayerState::stop() { |
93 | return isStoped; | 93 | return isStoped; |
94 | } | 94 | } |
95 | 95 | ||
96 | long MediaPlayerState::position() { | 96 | long MediaPlayerState::position() { |
97 | return curPosition; | 97 | return curPosition; |
98 | } | 98 | } |
99 | 99 | ||
100 | long MediaPlayerState::length() { | 100 | long MediaPlayerState::length() { |
101 | return curLength; | 101 | return curLength; |
102 | } | 102 | } |
103 | 103 | ||
104 | char MediaPlayerState::view() { | 104 | char MediaPlayerState::view() { |
105 | return curView; | 105 | return curView; |
106 | } | 106 | } |
107 | 107 | ||
108 | // slots | 108 | // slots |
109 | void MediaPlayerState::setIsStreaming( bool b ) { | 109 | void MediaPlayerState::setIsStreaming( bool b ) { |
110 | 110 | ||
111 | if ( isStreaming == b ) { | 111 | if ( isStreaming == b ) { |
112 | return; | 112 | return; |
113 | } | 113 | } |
114 | isStreaming = b; | 114 | isStreaming = b; |
115 | } | 115 | } |
116 | 116 | ||
117 | 117 | ||
118 | void MediaPlayerState::setBlank( bool b ) { | 118 | void MediaPlayerState::setFullscreen( bool b ) { |
119 | if ( isFullscreen == b ) { | 119 | if ( isFullscreen == b ) { |
120 | return; | 120 | return; |
121 | } | 121 | } |
122 | isFullscreen = b; | 122 | isFullscreen = b; |
123 | emit fullscreenToggled(b); | 123 | emit fullscreenToggled(b); |
124 | } | 124 | } |
125 | 125 | ||
126 | 126 | ||
127 | void MediaPlayerState::setFullscreen( bool b ) { | 127 | void MediaPlayerState::setBlanked( bool b ) { |
128 | if ( isBlanked == b ) { | 128 | if ( isBlanked == b ) { |
129 | return; | 129 | return; |
130 | } | 130 | } |
131 | isBlanked = b; | 131 | isBlanked = b; |
132 | emit blankToggled(b); | 132 | emit blankToggled(b); |
133 | } | 133 | } |
134 | 134 | ||
135 | 135 | ||
136 | void MediaPlayerState::setScaled( bool b ) { | 136 | void MediaPlayerState::setScaled( bool b ) { |
137 | if ( isScaled == b ) { | 137 | if ( isScaled == b ) { |
138 | return; | 138 | return; |
139 | } | 139 | } |
140 | isScaled = b; | 140 | isScaled = b; |
141 | emit scaledToggled(b); | 141 | emit scaledToggled(b); |
142 | } | 142 | } |
143 | 143 | ||
144 | void MediaPlayerState::setLooping( bool b ) { | 144 | void MediaPlayerState::setLooping( bool b ) { |
145 | if ( isLooping == b ) { | 145 | if ( isLooping == b ) { |
146 | return; | 146 | return; |
147 | } | 147 | } |
148 | isLooping = b; | 148 | isLooping = b; |
149 | emit loopingToggled(b); | 149 | emit loopingToggled(b); |
150 | } | 150 | } |
151 | 151 | ||
152 | void MediaPlayerState::setShuffled( bool b ) { | 152 | void MediaPlayerState::setShuffled( bool b ) { |
153 | if ( isShuffled == b ) { | 153 | if ( isShuffled == b ) { |
154 | return; | 154 | return; |
155 | } | 155 | } |
156 | isShuffled = b; | 156 | isShuffled = b; |
157 | emit shuffledToggled(b); | 157 | emit shuffledToggled(b); |
158 | } | 158 | } |
159 | 159 | ||
@@ -245,37 +245,37 @@ void MediaPlayerState::setAudio() { | |||
245 | setView('a'); | 245 | setView('a'); |
246 | } | 246 | } |
247 | 247 | ||
248 | void MediaPlayerState::toggleFullscreen() { | 248 | void MediaPlayerState::toggleFullscreen() { |
249 | setFullscreen( !isFullscreen ); | 249 | setFullscreen( !isFullscreen ); |
250 | } | 250 | } |
251 | 251 | ||
252 | void MediaPlayerState::toggleScaled() { | 252 | void MediaPlayerState::toggleScaled() { |
253 | setScaled( !isScaled); | 253 | setScaled( !isScaled); |
254 | } | 254 | } |
255 | 255 | ||
256 | void MediaPlayerState::toggleLooping() { | 256 | void MediaPlayerState::toggleLooping() { |
257 | setLooping( !isLooping); | 257 | setLooping( !isLooping); |
258 | } | 258 | } |
259 | 259 | ||
260 | void MediaPlayerState::toggleShuffled() { | 260 | void MediaPlayerState::toggleShuffled() { |
261 | setShuffled( !isShuffled); | 261 | setShuffled( !isShuffled); |
262 | } | 262 | } |
263 | 263 | ||
264 | void MediaPlayerState::togglePlaylist() { | 264 | void MediaPlayerState::togglePlaylist() { |
265 | setPlaylist( !usePlaylist); | 265 | setPlaylist( !usePlaylist); |
266 | } | 266 | } |
267 | 267 | ||
268 | void MediaPlayerState::togglePaused() { | 268 | void MediaPlayerState::togglePaused() { |
269 | setPaused( !isPaused); | 269 | setPaused( !isPaused); |
270 | } | 270 | } |
271 | 271 | ||
272 | void MediaPlayerState::togglePlaying() { | 272 | void MediaPlayerState::togglePlaying() { |
273 | setPlaying( !isPlaying); | 273 | setPlaying( !isPlaying); |
274 | } | 274 | } |
275 | 275 | ||
276 | void MediaPlayerState::toggleBlank() { | 276 | void MediaPlayerState::toggleBlank() { |
277 | setBlank( !isBlanked); | 277 | setBlanked( !isBlanked); |
278 | } | 278 | } |
279 | 279 | ||
280 | 280 | ||
281 | 281 | ||
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h index 3baffd3..b3431d7 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.h +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h | |||
@@ -49,65 +49,65 @@ public: | |||
49 | ~MediaPlayerState(); | 49 | ~MediaPlayerState(); |
50 | 50 | ||
51 | bool isPaused; | 51 | bool isPaused; |
52 | bool isPlaying; | 52 | bool isPlaying; |
53 | bool isStoped; | 53 | bool isStoped; |
54 | bool streaming(); | 54 | bool streaming(); |
55 | bool fullscreen(); | 55 | bool fullscreen(); |
56 | bool scaled(); | 56 | bool scaled(); |
57 | bool looping(); | 57 | bool looping(); |
58 | bool shuffled(); | 58 | bool shuffled(); |
59 | bool playlist(); | 59 | bool playlist(); |
60 | bool paused(); | 60 | bool paused(); |
61 | bool playing(); | 61 | bool playing(); |
62 | bool stop(); | 62 | bool stop(); |
63 | long position(); | 63 | long position(); |
64 | long length(); | 64 | long length(); |
65 | char view(); | 65 | char view(); |
66 | 66 | ||
67 | public slots: | 67 | public slots: |
68 | void setIsStreaming( bool b ); | 68 | void setIsStreaming( bool b ); |
69 | void setFullscreen( bool b ); | 69 | void setFullscreen( bool b ); |
70 | void setScaled( bool b ); | 70 | void setScaled( bool b ); |
71 | void setLooping( bool b ); | 71 | void setLooping( bool b ); |
72 | void setShuffled( bool b ); | 72 | void setShuffled( bool b ); |
73 | void setPlaylist( bool b ); | 73 | void setPlaylist( bool b ); |
74 | void setPaused( bool b ); | 74 | void setPaused( bool b ); |
75 | void setPlaying( bool b ); | 75 | void setPlaying( bool b ); |
76 | void setStop( bool b ); | 76 | void setStop( bool b ); |
77 | void setPosition( long p ); | 77 | void setPosition( long p ); |
78 | void updatePosition( long p ); | 78 | void updatePosition( long p ); |
79 | void setLength( long l ); | 79 | void setLength( long l ); |
80 | void setView( char v ); | 80 | void setView( char v ); |
81 | void setBlank( bool b ); | 81 | void setBlanked( bool b ); |
82 | 82 | ||
83 | void setPrev(); | 83 | void setPrev(); |
84 | void setNext(); | 84 | void setNext(); |
85 | void setList(); | 85 | void setList(); |
86 | void setVideo(); | 86 | void setVideo(); |
87 | void setAudio(); | 87 | void setAudio(); |
88 | 88 | ||
89 | void toggleFullscreen(); | 89 | void toggleFullscreen(); |
90 | void toggleScaled(); | 90 | void toggleScaled(); |
91 | void toggleLooping(); | 91 | void toggleLooping(); |
92 | void toggleShuffled(); | 92 | void toggleShuffled(); |
93 | void togglePlaylist(); | 93 | void togglePlaylist(); |
94 | void togglePaused(); | 94 | void togglePaused(); |
95 | void togglePlaying(); | 95 | void togglePlaying(); |
96 | void toggleBlank(); | 96 | void toggleBlank(); |
97 | 97 | ||
98 | signals: | 98 | signals: |
99 | void fullscreenToggled( bool ); | 99 | void fullscreenToggled( bool ); |
100 | void scaledToggled( bool ); | 100 | void scaledToggled( bool ); |
101 | void loopingToggled( bool ); | 101 | void loopingToggled( bool ); |
102 | void shuffledToggled( bool ); | 102 | void shuffledToggled( bool ); |
103 | void playlistToggled( bool ); | 103 | void playlistToggled( bool ); |
104 | void pausedToggled( bool ); | 104 | void pausedToggled( bool ); |
105 | void playingToggled( bool ); | 105 | void playingToggled( bool ); |
106 | void stopToggled( bool ); | 106 | void stopToggled( bool ); |
107 | void positionChanged( long ); // When the slider is moved | 107 | void positionChanged( long ); // When the slider is moved |
108 | void positionUpdated( long ); // When the media file progresses | 108 | void positionUpdated( long ); // When the media file progresses |
109 | void lengthChanged( long ); | 109 | void lengthChanged( long ); |
110 | void viewChanged( char ); | 110 | void viewChanged( char ); |
111 | void blankToggled( bool ); | 111 | void blankToggled( bool ); |
112 | void prev(); | 112 | void prev(); |
113 | void next(); | 113 | void next(); |