Diffstat (limited to 'noncore/multimedia/opieplayer2/mediawidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp index 2992fd6..ed5bc5a 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.cpp +++ b/noncore/multimedia/opieplayer2/mediawidget.cpp | |||
@@ -18,16 +18,14 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | 20 | ||
21 | #include "mediawidget.h" | 21 | #include "mediawidget.h" |
22 | #include "playlistwidget.h" | 22 | #include "playlistwidget.h" |
23 | 23 | ||
24 | extern PlayListWidget *playList; | 24 | MediaWidget::MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent, const char *name ) |
25 | 25 | : QWidget( parent, name ), mediaPlayerState( _mediaPlayerState ), playList( _playList ) | |
26 | MediaWidget::MediaWidget( MediaPlayerState &_mediaPlayerState, QWidget *parent, const char *name ) | ||
27 | : QWidget( parent, name ), mediaPlayerState( _mediaPlayerState ) | ||
28 | { | 26 | { |
29 | connect( &mediaPlayerState, SIGNAL( displayTypeChanged( MediaPlayerState::DisplayType ) ), | 27 | connect( &mediaPlayerState, SIGNAL( displayTypeChanged( MediaPlayerState::DisplayType ) ), |
30 | this, SLOT( setDisplayType( MediaPlayerState::DisplayType ) ) ); | 28 | this, SLOT( setDisplayType( MediaPlayerState::DisplayType ) ) ); |
31 | connect( &mediaPlayerState, SIGNAL( lengthChanged( long ) ), | 29 | connect( &mediaPlayerState, SIGNAL( lengthChanged( long ) ), |
32 | this, SLOT( setLength( long ) ) ); | 30 | this, SLOT( setLength( long ) ) ); |
33 | connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ), | 31 | connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ), |
@@ -45,14 +43,14 @@ void MediaWidget::closeEvent( QCloseEvent * ) | |||
45 | 43 | ||
46 | void MediaWidget::handleCommand( Command command, bool buttonDown ) | 44 | void MediaWidget::handleCommand( Command command, bool buttonDown ) |
47 | { | 45 | { |
48 | switch ( command ) { | 46 | switch ( command ) { |
49 | case Play: mediaPlayerState.togglePaused(); | 47 | case Play: mediaPlayerState.togglePaused(); |
50 | case Stop: mediaPlayerState.setPlaying(FALSE); return; | 48 | case Stop: mediaPlayerState.setPlaying(FALSE); return; |
51 | case Next: if( playList->currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setNext(); return; | 49 | case Next: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setNext(); return; |
52 | case Previous: if( playList->currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setPrev(); return; | 50 | case Previous: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setPrev(); return; |
53 | case Loop: mediaPlayerState.setLooping( buttonDown ); return; | 51 | case Loop: mediaPlayerState.setLooping( buttonDown ); return; |
54 | case VolumeUp: emit moreReleased(); return; | 52 | case VolumeUp: emit moreReleased(); return; |
55 | case VolumeDown: emit lessReleased(); return; | 53 | case VolumeDown: emit lessReleased(); return; |
56 | case PlayList: mediaPlayerState.setList(); return; | 54 | case PlayList: mediaPlayerState.setList(); return; |
57 | case Forward: emit forwardReleased(); return; | 55 | case Forward: emit forwardReleased(); return; |
58 | case Back: emit backReleased(); return; | 56 | case Back: emit backReleased(); return; |