summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-02 23:33:37 (UTC)
committer simon <simon>2002-12-02 23:33:37 (UTC)
commitc3c95ff297355f7024c15134bbc1d15d340bf8fd (patch) (unidiff)
treead5ed1eef8ad82d53aef634bfa4b247210200c20
parent22e232bdb4bae5e28013a4d14bfda3c068827557 (diff)
downloadopie-c3c95ff297355f7024c15134bbc1d15d340bf8fd.zip
opie-c3c95ff297355f7024c15134bbc1d15d340bf8fd.tar.gz
opie-c3c95ff297355f7024c15134bbc1d15d340bf8fd.tar.bz2
- I better be a good boy and delete what I allocate :)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index 8acc488..06b1a04 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -39,48 +39,50 @@ MediaPlayer::MediaPlayer( PlayListWidget &_playList, MediaPlayerState &_mediaPla
39 fd=-1;fl=-1; 39 fd=-1;fl=-1;
40 playList.setCaption( tr( "OpiePlayer: Initializating" ) ); 40 playList.setCaption( tr( "OpiePlayer: Initializating" ) );
41 41
42 qApp->processEvents(); 42 qApp->processEvents();
43 // QPEApplication::grabKeyboard(); // EVIL 43 // QPEApplication::grabKeyboard(); // EVIL
44 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 44 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
45 45
46 connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) ); 46 connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) );
47 47
48 connect( &mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) ); 48 connect( &mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) );
49 49
50 connect( &mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); 50 connect( &mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) );
51 connect( &mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); 51 connect( &mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) );
52 connect( &mediaPlayerState, SIGNAL( blankToggled( bool ) ), this, SLOT ( blank( bool ) ) ); 52 connect( &mediaPlayerState, SIGNAL( blankToggled( bool ) ), this, SLOT ( blank( bool ) ) );
53 53
54 volControl = new VolumeControl; 54 volControl = new VolumeControl;
55 Config cfg( "OpiePlayer" ); 55 Config cfg( "OpiePlayer" );
56 cfg.setGroup("PlayList"); 56 cfg.setGroup("PlayList");
57 QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "default"); 57 QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "default");
58 playList.setCaption( tr( "OpiePlayer: " ) + QFileInfo(currentPlaylist).baseName() ); 58 playList.setCaption( tr( "OpiePlayer: " ) + QFileInfo(currentPlaylist).baseName() );
59} 59}
60 60
61MediaPlayer::~MediaPlayer() { 61MediaPlayer::~MediaPlayer() {
62 delete xineControl; 62 delete xineControl;
63 delete audioUI;
64 delete videoUI;
63 delete volControl; 65 delete volControl;
64} 66}
65 67
66void MediaPlayer::pauseCheck( bool b ) { 68void MediaPlayer::pauseCheck( bool b ) {
67 if ( b && !mediaPlayerState.isPlaying() ) { 69 if ( b && !mediaPlayerState.isPlaying() ) {
68 mediaPlayerState.setPaused( FALSE ); 70 mediaPlayerState.setPaused( FALSE );
69 } 71 }
70} 72}
71 73
72void MediaPlayer::play() { 74void MediaPlayer::play() {
73 mediaPlayerState.setPlaying( FALSE ); 75 mediaPlayerState.setPlaying( FALSE );
74 mediaPlayerState.setPlaying( TRUE ); 76 mediaPlayerState.setPlaying( TRUE );
75} 77}
76 78
77void MediaPlayer::setPlaying( bool play ) { 79void MediaPlayer::setPlaying( bool play ) {
78 if ( !play ) { 80 if ( !play ) {
79 return; 81 return;
80 } 82 }
81 83
82 if ( mediaPlayerState.isPaused() ) { 84 if ( mediaPlayerState.isPaused() ) {
83 mediaPlayerState.setPaused( FALSE ); 85 mediaPlayerState.setPaused( FALSE );
84 return; 86 return;
85 } 87 }
86 88