-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 0526c2a..5503705 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp | |||
@@ -272,30 +272,30 @@ void MediaPlayer::blank( bool b ) { | |||
272 | 272 | ||
273 | void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { | 273 | void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { |
274 | switch ( e->key() ) { | 274 | switch ( e->key() ) { |
275 | ////////////////////////////// Zaurus keys | 275 | ////////////////////////////// Zaurus keys |
276 | case Key_Home: | 276 | case Key_Home: |
277 | break; | 277 | break; |
278 | case Key_F9: //activity | 278 | case Key_F9: //activity |
279 | break; | 279 | break; |
280 | case Key_F10: //contacts | 280 | case Key_F10: //contacts |
281 | break; | 281 | break; |
282 | case Key_F11: //menu | 282 | case Key_F11: //menu |
283 | break; | 283 | break; |
284 | case Key_F12: //home | 284 | case Key_F12: //home |
285 | qDebug("Blank here"); | 285 | qDebug("Blank here"); |
286 | // mediaPlayerState->toggleBlank(); | 286 | // mediaPlayerState->toggleBlank(); |
287 | break; | 287 | break; |
288 | case Key_F13: //mail | 288 | case Key_F13: //mail |
289 | qDebug("Blank here"); | 289 | qDebug("Blank here"); |
290 | // mediaPlayerState->toggleBlank(); | 290 | // mediaPlayerState->toggleBlank(); |
291 | break; | 291 | break; |
292 | } | 292 | } |
293 | } | 293 | } |
294 | 294 | ||
295 | void MediaPlayer::cleanUp() {// this happens on closing | 295 | void MediaPlayer::cleanUp() {// this happens on closing |
296 | Config cfg( "OpiePlayer" ); | 296 | Config cfg( "OpiePlayer" ); |
297 | playList->writeConfig( cfg ); | 297 | playList->writeConfig( cfg ); |
298 | 298 | ||
299 | // QPEApplication::grabKeyboard(); | 299 | // QPEApplication::grabKeyboard(); |
300 | // QPEApplication::ungrabKeyboard(); | 300 | // QPEApplication::ungrabKeyboard(); |
301 | } | 301 | } |
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp index eaedaa5..d984022 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp | |||
@@ -1,49 +1,49 @@ | |||
1 | #include <qpe/qpeapplication.h> | 1 | #include <qpe/qpeapplication.h> |
2 | #include <qpe/qlibrary.h> | 2 | #include <qpe/qlibrary.h> |
3 | #include <qpe/config.h> | 3 | #include <qpe/config.h> |
4 | #include <qvaluelist.h> | 4 | #include <qvaluelist.h> |
5 | #include <qobject.h> | 5 | #include <qobject.h> |
6 | #include <qdir.h> | 6 | #include <qdir.h> |
7 | #include "mediaplayerstate.h" | 7 | #include "mediaplayerstate.h" |
8 | 8 | ||
9 | 9 | ||
10 | 10 | ||
11 | //#define MediaPlayerDebug(x) qDebug x | 11 | //#define MediaPlayerDebug(x) qDebug x |
12 | #define MediaPlayerDebug(x) | 12 | #define MediaPlayerDebug(x) |
13 | 13 | ||
14 | 14 | ||
15 | MediaPlayerState::MediaPlayerState( QObject *parent, const char *name ) | 15 | MediaPlayerState::MediaPlayerState( QObject *parent, const char *name ) |
16 | : QObject( parent, name ) { | 16 | : QObject( parent, name ) { |
17 | Config cfg( "OpiePlayer" ); | 17 | Config cfg( "OpiePlayer" ); |
18 | readConfig( cfg ); | 18 | readConfig( cfg ); |
19 | isStreaming = false; | 19 | isStreaming = false; |
20 | } | 20 | } |
21 | 21 | ||
22 | 22 | ||
23 | MediaPlayerState::~MediaPlayerState() { | 23 | MediaPlayerState::~MediaPlayerState() { |
24 | Config cfg( "OpiePlayer" ); | 24 | // Config cfg( "OpiePlayer" ); |
25 | writeConfig( cfg ); | 25 | // writeConfig( cfg ); |
26 | 26 | ||
27 | } | 27 | } |
28 | 28 | ||
29 | 29 | ||
30 | void MediaPlayerState::readConfig( Config& cfg ) { | 30 | void MediaPlayerState::readConfig( Config& cfg ) { |
31 | cfg.setGroup("Options"); | 31 | cfg.setGroup("Options"); |
32 | isFullscreen = cfg.readBoolEntry( "FullScreen" ); | 32 | isFullscreen = cfg.readBoolEntry( "FullScreen" ); |
33 | isScaled = cfg.readBoolEntry( "Scaling" ); | 33 | isScaled = cfg.readBoolEntry( "Scaling" ); |
34 | isLooping = cfg.readBoolEntry( "Looping" ); | 34 | isLooping = cfg.readBoolEntry( "Looping" ); |
35 | isShuffled = cfg.readBoolEntry( "Shuffle" ); | 35 | isShuffled = cfg.readBoolEntry( "Shuffle" ); |
36 | usePlaylist = cfg.readBoolEntry( "UsePlayList" ); | 36 | usePlaylist = cfg.readBoolEntry( "UsePlayList" ); |
37 | usePlaylist = TRUE; | 37 | usePlaylist = TRUE; |
38 | isPlaying = FALSE; | 38 | isPlaying = FALSE; |
39 | isStreaming = FALSE; | 39 | isStreaming = FALSE; |
40 | isPaused = FALSE; | 40 | isPaused = FALSE; |
41 | curPosition = 0; | 41 | curPosition = 0; |
42 | curLength = 0; | 42 | curLength = 0; |
43 | curView = 'l'; | 43 | curView = 'l'; |
44 | } | 44 | } |
45 | 45 | ||
46 | 46 | ||
47 | void MediaPlayerState::writeConfig( Config& cfg ) const { | 47 | void MediaPlayerState::writeConfig( Config& cfg ) const { |
48 | cfg.setGroup("Options"); | 48 | cfg.setGroup("Options"); |
49 | cfg.writeEntry("FullScreen", isFullscreen ); | 49 | cfg.writeEntry("FullScreen", isFullscreen ); |
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index bc9b166..75e2979 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -286,52 +286,52 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
286 | this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) ); | 286 | this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) ); |
287 | connect( videoView, SIGNAL( returnPressed( QListViewItem *)), | 287 | connect( videoView, SIGNAL( returnPressed( QListViewItem *)), |
288 | this,SLOT( playIt( QListViewItem *)) ); | 288 | this,SLOT( playIt( QListViewItem *)) ); |
289 | connect( videoView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) ); | 289 | connect( videoView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) ); |
290 | connect( playLists, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( loadList( const DocLnk & ) ) ); | 290 | connect( playLists, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( loadList( const DocLnk & ) ) ); |
291 | connect( tabWidget, SIGNAL (currentChanged(QWidget*)),this,SLOT(tabChanged(QWidget*))); | 291 | connect( tabWidget, SIGNAL (currentChanged(QWidget*)),this,SLOT(tabChanged(QWidget*))); |
292 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), d->tbPlay, SLOT( setOn( bool ) ) ); | 292 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), d->tbPlay, SLOT( setOn( bool ) ) ); |
293 | connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), d->tbLoop, SLOT( setOn( bool ) ) ); | 293 | connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), d->tbLoop, SLOT( setOn( bool ) ) ); |
294 | connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), d->tbShuffle, SLOT( setOn( bool ) ) ); | 294 | connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), d->tbShuffle, SLOT( setOn( bool ) ) ); |
295 | connect( mediaPlayerState, SIGNAL( playlistToggled( bool ) ), this, SLOT( setPlaylist( bool ) ) ); | 295 | connect( mediaPlayerState, SIGNAL( playlistToggled( bool ) ), this, SLOT( setPlaylist( bool ) ) ); |
296 | connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( playIt( QListViewItem *) ) ); | 296 | connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( playIt( QListViewItem *) ) ); |
297 | 297 | ||
298 | setCentralWidget( vbox5 ); | 298 | setCentralWidget( vbox5 ); |
299 | 299 | ||
300 | readConfig( cfg ); | 300 | readConfig( cfg ); |
301 | QString currentPlaylist = cfg.readEntry("CurrentPlaylist",""); | 301 | QString currentPlaylist = cfg.readEntry("CurrentPlaylist",""); |
302 | loadList(DocLnk( currentPlaylist)); | 302 | loadList(DocLnk( currentPlaylist)); |
303 | setCaption(tr("OpiePlayer: ")+ currentPlaylist ); | 303 | setCaption(tr("OpiePlayer: ")+ currentPlaylist ); |
304 | 304 | ||
305 | initializeStates(); | 305 | initializeStates(); |
306 | } | 306 | } |
307 | 307 | ||
308 | 308 | ||
309 | PlayListWidget::~PlayListWidget() { | 309 | PlayListWidget::~PlayListWidget() { |
310 | if ( d->current ) { | 310 | if ( d->current ) { |
311 | delete d->current; | 311 | delete d->current; |
312 | } | 312 | } |
313 | delete d; | 313 | delete d; |
314 | } | 314 | } |
315 | 315 | ||
316 | 316 | ||
317 | void PlayListWidget::initializeStates() { | 317 | void PlayListWidget::initializeStates() { |
318 | 318 | ||
319 | d->tbPlay->setOn( mediaPlayerState->playing() ); | 319 | d->tbPlay->setOn( mediaPlayerState->playing() ); |
320 | d->tbLoop->setOn( mediaPlayerState->looping() ); | 320 | d->tbLoop->setOn( mediaPlayerState->looping() ); |
321 | d->tbShuffle->setOn( mediaPlayerState->shuffled() ); | 321 | d->tbShuffle->setOn( mediaPlayerState->shuffled() ); |
322 | setPlaylist( true); | 322 | setPlaylist( true); |
323 | } | 323 | } |
324 | 324 | ||
325 | 325 | ||
326 | void PlayListWidget::readConfig( Config& cfg ) { | 326 | void PlayListWidget::readConfig( Config& cfg ) { |
327 | cfg.setGroup("PlayList"); | 327 | cfg.setGroup("PlayList"); |
328 | QString currentString = cfg.readEntry("current", "" ); | 328 | QString currentString = cfg.readEntry("current", "" ); |
329 | int noOfFiles = cfg.readNumEntry("NumberOfFiles", 0 ); | 329 | int noOfFiles = cfg.readNumEntry("NumberOfFiles", 0 ); |
330 | for ( int i = 0; i < noOfFiles; i++ ) { | 330 | for ( int i = 0; i < noOfFiles; i++ ) { |
331 | QString entryName; | 331 | QString entryName; |
332 | entryName.sprintf( "File%i", i + 1 ); | 332 | entryName.sprintf( "File%i", i + 1 ); |
333 | QString linkFile = cfg.readEntry( entryName ); | 333 | QString linkFile = cfg.readEntry( entryName ); |
334 | if(QFileInfo( linkFile).exists() ) { | 334 | if(QFileInfo( linkFile).exists() ) { |
335 | DocLnk lnk( linkFile ); | 335 | DocLnk lnk( linkFile ); |
336 | if ( QFileInfo( lnk.file()).exists() || linkFile.find("http",0,TRUE) != -1) { | 336 | if ( QFileInfo( lnk.file()).exists() || linkFile.find("http",0,TRUE) != -1) { |
337 | d->selectedFiles->addToSelection( lnk ); | 337 | d->selectedFiles->addToSelection( lnk ); |