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