summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/mediaplayer.cpp
authorharlekin <harlekin>2002-07-06 23:21:45 (UTC)
committer harlekin <harlekin>2002-07-06 23:21:45 (UTC)
commitf975653aeec521ec473ed27eba1fc4d7648c0dd3 (patch) (unidiff)
tree3273440fc22fba619a90846e71ce8fde54dcd980 /noncore/multimedia/opieplayer2/mediaplayer.cpp
parent345c2059bdcfcde8c03c7ae6332b075705ac0a6f (diff)
downloadopie-f975653aeec521ec473ed27eba1fc4d7648c0dd3.zip
opie-f975653aeec521ec473ed27eba1fc4d7648c0dd3.tar.gz
opie-f975653aeec521ec473ed27eba1fc4d7648c0dd3.tar.bz2
first try to get stuff together
Diffstat (limited to 'noncore/multimedia/opieplayer2/mediaplayer.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index 87184ba..be59d8d 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -15,6 +15,7 @@
15#include "mediaplayerstate.h" 15#include "mediaplayerstate.h"
16 16
17 17
18
18extern AudioWidget *audioUI; 19extern AudioWidget *audioUI;
19extern PlayListWidget *playList; 20extern PlayListWidget *playList;
20extern MediaPlayerState *mediaPlayerState; 21extern MediaPlayerState *mediaPlayerState;
@@ -24,6 +25,7 @@ MediaPlayer::MediaPlayer( QObject *parent, const char *name )
24 : QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) { 25 : QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) {
25 26
26 27
28 xineControl = new XineControl();
27// QPEApplication::grabKeyboard(); // EVIL 29// QPEApplication::grabKeyboard(); // EVIL
28 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 30 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
29 31
@@ -36,6 +38,7 @@ MediaPlayer::MediaPlayer( QObject *parent, const char *name )
36 connect( audioUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) ); 38 connect( audioUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) );
37 connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); 39 connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) );
38 connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); 40 connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) );
41
39} 42}
40 43
41MediaPlayer::~MediaPlayer() { 44MediaPlayer::~MediaPlayer() {
@@ -43,9 +46,10 @@ MediaPlayer::~MediaPlayer() {
43 46
44void MediaPlayer::pauseCheck( bool b ) { 47void MediaPlayer::pauseCheck( bool b ) {
45 // Only pause if playing 48 // Only pause if playing
46 if ( b && !mediaPlayerState->playing() ) 49 if ( b && !mediaPlayerState->playing() ) {
47 mediaPlayerState->setPaused( FALSE ); 50 mediaPlayerState->setPaused( FALSE );
48} 51}
52}
49 53
50void MediaPlayer::play() { 54void MediaPlayer::play() {
51 mediaPlayerState->setPlaying( FALSE ); 55 mediaPlayerState->setPlaying( FALSE );
@@ -70,6 +74,7 @@ void MediaPlayer::setPlaying( bool play ) {
70 74
71 audioUI->setTickerText( currentFile->file() ); 75 audioUI->setTickerText( currentFile->file() );
72 76
77 xineControl->play( currentFile->file() );
73 78
74 // alles nicht nötig, xine kümmert sich drum, man muss nur den return andio oder video gui geben 79 // alles nicht nötig, xine kümmert sich drum, man muss nur den return andio oder video gui geben
75 80