summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/mediaplayer.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/mediaplayer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index 9f51006..1e6bc4d 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -14,56 +14,56 @@
14 14
15 // for setBacklight() 15 // for setBacklight()
16#include <linux/fb.h> 16#include <linux/fb.h>
17#include <sys/file.h> 17#include <sys/file.h>
18#include <sys/ioctl.h> 18#include <sys/ioctl.h>
19 19
20 20
21#define FBIOBLANK 0x4611 21#define FBIOBLANK 0x4611
22 22
23MediaPlayer::MediaPlayer( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QObject *parent, const char *name ) 23MediaPlayer::MediaPlayer( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QObject *parent, const char *name )
24 : QObject( parent, name ), volumeDirection( 0 ), mediaPlayerState( _mediaPlayerState ), playList( _playList ) { 24 : QObject( parent, name ), volumeDirection( 0 ), mediaPlayerState( _mediaPlayerState ), playList( _playList ) {
25 25
26 m_audioUI = 0; 26 m_audioUI = 0;
27 m_videoUI = 0; 27 m_videoUI = 0;
28 m_xineControl = 0; 28 m_xineControl = 0;
29 xine = new XINE::Lib( XINE::Lib::InitializeInThread ); 29 xine = new XINE::Lib( XINE::Lib::InitializeInThread );
30 30
31 fd=-1;fl=-1; 31 fd=-1;fl=-1;
32 playList.setCaption( tr( "OpiePlayer: Initializating" ) ); 32 playList.setCaption( tr( "OpiePlayer: Initializating" ) );
33 33
34 qApp->processEvents(); 34 qApp->processEvents();
35 // QPEApplication::grabKeyboard(); // EVIL 35 // QPEApplication::grabKeyboard(); // EVIL
36 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 36 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
37 37
38 connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) ); 38 connect( &mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) );
39 39
40// What is pauseCheck good for? (Simon) 40// What is pauseCheck good for? (Simon)
41// connect( &mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) ); 41// connect( &mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( pauseCheck(bool) ) );
42 42
43 connect( &mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); 43 connect( &mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) );
44 connect( &mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); 44 connect( &mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) );
45 connect( &mediaPlayerState, SIGNAL( blankToggled( bool ) ), this, SLOT ( blank( bool ) ) ); 45 connect( &mediaPlayerState, SIGNAL( blankToggled(bool) ), this, SLOT ( blank(bool) ) );
46 46
47 volControl = new VolumeControl; 47 volControl = new VolumeControl;
48 Config cfg( "OpiePlayer" ); 48 Config cfg( "OpiePlayer" );
49 cfg.setGroup("PlayList"); 49 cfg.setGroup("PlayList");
50 QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "default"); 50 QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "default");
51 playList.setCaption( tr( "OpiePlayer: " ) + QFileInfo(currentPlaylist).baseName() ); 51 playList.setCaption( tr( "OpiePlayer: " ) + QFileInfo(currentPlaylist).baseName() );
52 52
53 m_skinLoader = new SkinLoader; 53 m_skinLoader = new SkinLoader;
54 m_skinLoader->schedule( AudioWidget::guiInfo() ); 54 m_skinLoader->schedule( AudioWidget::guiInfo() );
55 m_skinLoader->schedule( VideoWidget::guiInfo() ); 55 m_skinLoader->schedule( VideoWidget::guiInfo() );
56 m_skinLoader->start(); 56 m_skinLoader->start();
57} 57}
58 58
59MediaPlayer::~MediaPlayer() { 59MediaPlayer::~MediaPlayer() {
60 // this shold never happen, but one never knows... 60 // this shold never happen, but one never knows...
61 if ( xine ) { 61 if ( xine ) {
62 xine->ensureInitialized(); 62 xine->ensureInitialized();
63 delete xine; 63 delete xine;
64 } 64 }
65 delete m_xineControl; 65 delete m_xineControl;
66 delete m_audioUI; 66 delete m_audioUI;
67 delete m_videoUI; 67 delete m_videoUI;
68 delete volControl; 68 delete volControl;
69} 69}