author | llornkcor <llornkcor> | 2002-11-10 16:03:09 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-10 16:03:09 (UTC) |
commit | cb4821802897bbf6e06be3b2608656e05db68b96 (patch) (unidiff) | |
tree | 672351f10dfb9a6bd13f753d876c975a39b74270 | |
parent | ee6938139a5f8f24da901ab5a41930a98af00d44 (diff) | |
download | opie-cb4821802897bbf6e06be3b2608656e05db68b96.zip opie-cb4821802897bbf6e06be3b2608656e05db68b96.tar.gz opie-cb4821802897bbf6e06be3b2608656e05db68b96.tar.bz2 |
display loaded playlist in caption at start
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 8b0f501..1f19b30 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp | |||
@@ -41,49 +41,52 @@ MediaPlayer::MediaPlayer( QObject *parent, const char *name ) | |||
41 | qApp->processEvents(); | 41 | qApp->processEvents(); |
42 | // QPEApplication::grabKeyboard(); // EVIL | 42 | // QPEApplication::grabKeyboard(); // EVIL |
43 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 43 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
44 | 44 | ||
45 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) ); | 45 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) ); |
46 | 46 | ||
47 | connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) ); | 47 | connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) ); |
48 | 48 | ||
49 | connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); | 49 | connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); |
50 | connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); | 50 | connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); |
51 | connect( mediaPlayerState, SIGNAL( blankToggled( bool ) ), this, SLOT ( blank( bool ) ) ); | 51 | connect( mediaPlayerState, SIGNAL( blankToggled( bool ) ), this, SLOT ( blank( bool ) ) ); |
52 | 52 | ||
53 | connect( audioUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) ); | 53 | connect( audioUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) ); |
54 | connect( audioUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) ); | 54 | connect( audioUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) ); |
55 | connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); | 55 | connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); |
56 | connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); | 56 | connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); |
57 | 57 | ||
58 | connect( videoUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) ); | 58 | connect( videoUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) ); |
59 | connect( videoUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) ); | 59 | connect( videoUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) ); |
60 | connect( videoUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); | 60 | connect( videoUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); |
61 | connect( videoUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); | 61 | connect( videoUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); |
62 | 62 | ||
63 | volControl = new VolumeControl; | 63 | volControl = new VolumeControl; |
64 | xineControl = new XineControl(); | 64 | xineControl = new XineControl(); |
65 | playList->setCaption(tr("OpiePlayer")); | 65 | Config cfg( "OpiePlayer" ); |
66 | cfg.setGroup("PlayList"); | ||
67 | QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "default"); | ||
68 | playList->setCaption( tr( "OpiePlayer: " ) + QFileInfo(currentPlaylist).baseName() ); | ||
66 | } | 69 | } |
67 | 70 | ||
68 | MediaPlayer::~MediaPlayer() { | 71 | MediaPlayer::~MediaPlayer() { |
69 | delete xineControl; | 72 | delete xineControl; |
70 | delete volControl; | 73 | delete volControl; |
71 | } | 74 | } |
72 | 75 | ||
73 | void MediaPlayer::pauseCheck( bool b ) { | 76 | void MediaPlayer::pauseCheck( bool b ) { |
74 | if ( b && !mediaPlayerState->playing() ) { | 77 | if ( b && !mediaPlayerState->playing() ) { |
75 | mediaPlayerState->setPaused( FALSE ); | 78 | mediaPlayerState->setPaused( FALSE ); |
76 | } | 79 | } |
77 | } | 80 | } |
78 | 81 | ||
79 | void MediaPlayer::play() { | 82 | void MediaPlayer::play() { |
80 | mediaPlayerState->setPlaying( FALSE ); | 83 | mediaPlayerState->setPlaying( FALSE ); |
81 | mediaPlayerState->setPlaying( TRUE ); | 84 | mediaPlayerState->setPlaying( TRUE ); |
82 | } | 85 | } |
83 | 86 | ||
84 | void MediaPlayer::setPlaying( bool play ) { | 87 | void MediaPlayer::setPlaying( bool play ) { |
85 | if ( !play ) { | 88 | if ( !play ) { |
86 | return; | 89 | return; |
87 | } | 90 | } |
88 | 91 | ||
89 | if ( mediaPlayerState->paused() ) { | 92 | if ( mediaPlayerState->paused() ) { |