author | chicken <chicken> | 2003-11-17 19:28:21 (UTC) |
---|---|---|
committer | chicken <chicken> | 2003-11-17 19:28:21 (UTC) |
commit | 56f2b27abab0cbae7548b43be4509965b37e3a92 (patch) (unidiff) | |
tree | 210dc84c5dbb1a93aaa5ae358a38a3de3510f493 | |
parent | 8515000ba00ec666ee5e68fdd3c2786186093b93 (diff) | |
download | opie-56f2b27abab0cbae7548b43be4509965b37e3a92.zip opie-56f2b27abab0cbae7548b43be4509965b37e3a92.tar.gz opie-56f2b27abab0cbae7548b43be4509965b37e3a92.tar.bz2 |
merge branch with head
-rw-r--r-- | noncore/multimedia/opieplayer2/config.in | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 6 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/main.cpp | 9 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 1 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/opie-mediaplayer2.control | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/opieplayer2.pro | 9 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 69 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.h | 7 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidgetgui.cpp | 10 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidgetgui.h | 4 |
11 files changed, 67 insertions, 58 deletions
diff --git a/noncore/multimedia/opieplayer2/config.in b/noncore/multimedia/opieplayer2/config.in index 27142a8..2272a9b 100644 --- a/noncore/multimedia/opieplayer2/config.in +++ b/noncore/multimedia/opieplayer2/config.in | |||
@@ -1,6 +1,4 @@ | |||
1 | config OPIEPLAYER2 | 1 | config OPIEPLAYER2 |
2 | boolean "opie-mediaplayer2 (streaming capable media player for mp3, mpeg, wav, ogg, quicktime, divx and more)" | 2 | boolean "opieplayer2" |
3 | default "n" | 3 | default "n" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE |
5 | comment "opie-mediaplayer2-skin-default-landscape automatically selected" | ||
6 | depends OPIEPLAYER2 | ||
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp index 11ad745..00cfa33 100644 --- a/noncore/multimedia/opieplayer2/lib.cpp +++ b/noncore/multimedia/opieplayer2/lib.cpp | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | ||
4 | Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> | 4 | Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> |
@@ -87,7 +87,7 @@ Lib::Lib( InitializationMode initMode, XineVideoWidget* widget ) | |||
87 | ts << "# uncomment if you experience double speed audio \n #audio.oss_sync_method:softsync\n"; | 87 | ts << "# uncomment if you experience double speed audio \n #audio.oss_sync_method:softsync\n"; |
88 | ts << "codec.ffmpeg_pp_quality:3\n"; | 88 | ts << "codec.ffmpeg_pp_quality:3\n"; |
89 | ts << "audio.num_buffers:50\n"; | 89 | ts << "audio.num_buffers:50\n"; |
90 | ts << "audio.size_buffers:4160\n"; | 90 | ts << "audio.size_buffers:4096\n"; |
91 | ts << "video.num_buffers:20\n"; | 91 | ts << "video.num_buffers:20\n"; |
92 | ts << "video.size_buffers:4096\n"; | 92 | ts << "video.size_buffers:4096\n"; |
93 | ts << "audio.out_num_audio_buf:16\n"; | 93 | ts << "audio.out_num_audio_buf:16\n"; |
@@ -270,7 +270,7 @@ int Lib::length() const { | |||
270 | int pos, time, length; | 270 | int pos, time, length; |
271 | /* dilb: patch to solve the wrong stream length reported to the GUI*/ | 271 | /* dilb: patch to solve the wrong stream length reported to the GUI*/ |
272 | int iRetVal=0, iTestLoop=0; | 272 | int iRetVal=0, iTestLoop=0; |
273 | 273 | ||
274 | do | 274 | do |
275 | { | 275 | { |
276 | iRetVal = xine_get_pos_length( m_stream, &pos, &time, &length ); | 276 | iRetVal = xine_get_pos_length( m_stream, &pos, &time, &length ); |
diff --git a/noncore/multimedia/opieplayer2/main.cpp b/noncore/multimedia/opieplayer2/main.cpp index f87cee8..b0a22b2 100644 --- a/noncore/multimedia/opieplayer2/main.cpp +++ b/noncore/multimedia/opieplayer2/main.cpp | |||
@@ -4,6 +4,13 @@ | |||
4 | #include "playlistwidget.h" | 4 | #include "playlistwidget.h" |
5 | #include "mediaplayer.h" | 5 | #include "mediaplayer.h" |
6 | 6 | ||
7 | |||
8 | |||
9 | #include <opie/oapplicationfactory.h> | ||
10 | |||
11 | OPIE_EXPORT_APP( OApplicationFactory<PlayListWidget> ) | ||
12 | |||
13 | #if 0 | ||
7 | int main(int argc, char **argv) { | 14 | int main(int argc, char **argv) { |
8 | QPEApplication a(argc,argv); | 15 | QPEApplication a(argc,argv); |
9 | 16 | ||
@@ -18,5 +25,5 @@ int main(int argc, char **argv) { | |||
18 | 25 | ||
19 | return a.exec(); | 26 | return a.exec(); |
20 | } | 27 | } |
21 | 28 | #endif | |
22 | 29 | ||
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 4c9afca..9f51006 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp | |||
@@ -283,7 +283,6 @@ void MediaPlayer::timerEvent( QTimerEvent * ) { | |||
283 | 283 | ||
284 | 284 | ||
285 | void MediaPlayer::blank( bool b ) { | 285 | void MediaPlayer::blank( bool b ) { |
286 | // ### FIXME use ODevice::inst()->setDisplayStatus( b ); | ||
287 | fd=open("/dev/fb0",O_RDWR); | 286 | fd=open("/dev/fb0",O_RDWR); |
288 | #ifdef QT_QWS_SL5XXX | 287 | #ifdef QT_QWS_SL5XXX |
289 | fl= open( "/dev/fl", O_RDWR ); | 288 | fl= open( "/dev/fl", O_RDWR ); |
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp index b1f88c9..f193001 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.cpp +++ b/noncore/multimedia/opieplayer2/mediawidget.cpp | |||
@@ -26,8 +26,6 @@ | |||
26 | #include "playlistwidget.h" | 26 | #include "playlistwidget.h" |
27 | #include "skin.h" | 27 | #include "skin.h" |
28 | 28 | ||
29 | #include <assert.h> | ||
30 | |||
31 | MediaWidget::MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent, const char *name ) | 29 | MediaWidget::MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent, const char *name ) |
32 | : QWidget( parent, name ), mediaPlayerState( _mediaPlayerState ), playList( _playList ) | 30 | : QWidget( parent, name ), mediaPlayerState( _mediaPlayerState ), playList( _playList ) |
33 | { | 31 | { |
diff --git a/noncore/multimedia/opieplayer2/opie-mediaplayer2.control b/noncore/multimedia/opieplayer2/opie-mediaplayer2.control index 8e68c57..3e3e856 100644 --- a/noncore/multimedia/opieplayer2/opie-mediaplayer2.control +++ b/noncore/multimedia/opieplayer2/opie-mediaplayer2.control | |||
@@ -4,8 +4,8 @@ Priority: optional | |||
4 | Section: opie/applications | 4 | Section: opie/applications |
5 | Maintainer: L.J.Potter <ljp@llornkcor.com>, Maximilian Reiss <harlekin@handhelds.org> | 5 | Maintainer: L.J.Potter <ljp@llornkcor.com>, Maximilian Reiss <harlekin@handhelds.org> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Depends: task-opie-minimal, libopie1, zlib1g, opie-mediaplayer2-skin-default | opie-mediaplayer2-skin-default-landscape , libxine1 | opie-mediaplayer2-codecs | 7 | Depends: task-opie-minimal, libopie1, zlib1g, libstdc++2.10-glibc2.2, opie-mediaplayer2-skin-default | opie-mediaplayer2-skin-default-landscape , libxine1 | opie-mediaplayer2-codecs |
8 | Description: The Opie media player II | 8 | Description: The Opie media player |
9 | The mediaplayer for Opie. It plays mp3, mpeg, wav, ogg, quicktime, divx and | 9 | The mediaplayer for Opie. It plays mp3, mpeg, wav, ogg, quicktime, divx and |
10 | more. Also it is streaming capable. | 10 | more. Also it is streaming capable. |
11 | Version: $QPE_VERSION$EXTRAVERSION | 11 | Version: $QPE_VERSION$EXTRAVERSION |
diff --git a/noncore/multimedia/opieplayer2/opieplayer2.pro b/noncore/multimedia/opieplayer2/opieplayer2.pro index 5dabbab..46e14a0 100644 --- a/noncore/multimedia/opieplayer2/opieplayer2.pro +++ b/noncore/multimedia/opieplayer2/opieplayer2.pro | |||
@@ -1,6 +1,4 @@ | |||
1 | TEMPLATE = app | 1 | CONFIG = qt warn_on release quick-app |
2 | CONFIG = qt warn_on release | ||
3 | DESTDIR = $(OPIEDIR)/bin | ||
4 | HEADERS = playlistselection.h mediaplayerstate.h xinecontrol.h \ | 2 | HEADERS = playlistselection.h mediaplayerstate.h xinecontrol.h \ |
5 | videowidget.h audiowidget.h playlistwidget.h om3u.h mediaplayer.h inputDialog.h \ | 3 | videowidget.h audiowidget.h playlistwidget.h om3u.h mediaplayer.h inputDialog.h \ |
6 | frame.h lib.h xinevideowidget.h volumecontrol.h playlistwidgetgui.h\ | 4 | frame.h lib.h xinevideowidget.h volumecontrol.h playlistwidgetgui.h\ |
@@ -21,11 +19,6 @@ LIBS += -lqpe -lpthread -lopie -lxine -lstdc++ | |||
21 | MOC_DIR = qpeobj | 19 | MOC_DIR = qpeobj |
22 | OBJECTS_DIR = qpeobj | 20 | OBJECTS_DIR = qpeobj |
23 | 21 | ||
24 | #INCLUDEPATH += $(OPIEDIR)/include | ||
25 | #DEPENDPATH += $(OPIEDIR)/include | ||
26 | |||
27 | |||
28 | |||
29 | TRANSLATIONS = ../../../i18n/de/opieplayer2.ts \ | 22 | TRANSLATIONS = ../../../i18n/de/opieplayer2.ts \ |
30 | ../../../i18n/nl/opieplayer2.ts \ | 23 | ../../../i18n/nl/opieplayer2.ts \ |
31 | ../../../i18n/da/opieplayer2.ts \ | 24 | ../../../i18n/da/opieplayer2.ts \ |
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index a1a1016..9a9e1ec 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -39,6 +39,7 @@ | |||
39 | 39 | ||
40 | #include "playlistselection.h" | 40 | #include "playlistselection.h" |
41 | #include "playlistwidget.h" | 41 | #include "playlistwidget.h" |
42 | #include "mediaplayer.h" | ||
42 | #include "mediaplayerstate.h" | 43 | #include "mediaplayerstate.h" |
43 | #include "inputDialog.h" | 44 | #include "inputDialog.h" |
44 | #include "om3u.h" | 45 | #include "om3u.h" |
@@ -47,9 +48,13 @@ | |||
47 | //only needed for the random play | 48 | //only needed for the random play |
48 | #include <assert.h> | 49 | #include <assert.h> |
49 | 50 | ||
50 | PlayListWidget::PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name ) | 51 | PlayListWidget::PlayListWidget(QWidget* parent, const char* name, WFlags fl ) |
51 | : PlayListWidgetGui( mediaPlayerState, parent, name ) , currentFileListView( 0 ) | 52 | : PlayListWidgetGui( parent, "playList" ) , currentFileListView( 0 ) |
52 | { | 53 | { |
54 | mediaPlayerState = new MediaPlayerState(0, "mediaPlayerState" ); | ||
55 | m_mp = new MediaPlayer(*this, *mediaPlayerState, 0, "mediaPlayer"); | ||
56 | |||
57 | |||
53 | 58 | ||
54 | d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), | 59 | d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), |
55 | "opieplayer2/add_to_playlist", | 60 | "opieplayer2/add_to_playlist", |
@@ -60,9 +65,9 @@ PlayListWidget::PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* par | |||
60 | d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer2/play", | 65 | d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer2/play", |
61 | this , SLOT( btnPlay( bool) ), TRUE ); | 66 | this , SLOT( btnPlay( bool) ), TRUE ); |
62 | d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"opieplayer2/shuffle", | 67 | d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"opieplayer2/shuffle", |
63 | &mediaPlayerState, SLOT( setShuffled( bool ) ), TRUE ); | 68 | mediaPlayerState, SLOT( setShuffled( bool ) ), TRUE ); |
64 | d->tbLoop = new ToolButton( bar, tr( "Loop" ), "opieplayer2/loop", | 69 | d->tbLoop = new ToolButton( bar, tr( "Loop" ), "opieplayer2/loop", |
65 | &mediaPlayerState, SLOT( setLooping( bool ) ), TRUE ); | 70 | mediaPlayerState, SLOT( setLooping( bool ) ), TRUE ); |
66 | 71 | ||
67 | (void)new MenuItem( pmPlayList, tr( "Clear List" ), this, SLOT( clearList() ) ); | 72 | (void)new MenuItem( pmPlayList, tr( "Clear List" ), this, SLOT( clearList() ) ); |
68 | (void)new MenuItem( pmPlayList, tr( "Add all audio files" ), | 73 | (void)new MenuItem( pmPlayList, tr( "Add all audio files" ), |
@@ -86,11 +91,11 @@ PlayListWidget::PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* par | |||
86 | videoView, SLOT( scanFiles() ) ); | 91 | videoView, SLOT( scanFiles() ) ); |
87 | 92 | ||
88 | pmView->insertItem( Resource::loadPixmap("fullscreen") , tr( "Full Screen"), | 93 | pmView->insertItem( Resource::loadPixmap("fullscreen") , tr( "Full Screen"), |
89 | &mediaPlayerState, SLOT( toggleFullscreen() ) ); | 94 | mediaPlayerState, SLOT( toggleFullscreen() ) ); |
90 | 95 | ||
91 | Config cfg( "OpiePlayer" ); | 96 | Config cfg( "OpiePlayer" ); |
92 | bool b= cfg.readBoolEntry("FullScreen", 0); | 97 | bool b= cfg.readBoolEntry("FullScreen", 0); |
93 | mediaPlayerState.setFullscreen( b ); | 98 | mediaPlayerState->setFullscreen( b ); |
94 | pmView->setItemChecked( -16, b ); | 99 | pmView->setItemChecked( -16, b ); |
95 | 100 | ||
96 | (void)new ToolButton( vbox1, tr( "Move Up" ), "opieplayer2/up", | 101 | (void)new ToolButton( vbox1, tr( "Move Up" ), "opieplayer2/up", |
@@ -125,16 +130,19 @@ PlayListWidget::PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* par | |||
125 | this, SLOT( loadList( const DocLnk & ) ) ); | 130 | this, SLOT( loadList( const DocLnk & ) ) ); |
126 | connect( tabWidget, SIGNAL ( currentChanged(QWidget*) ), | 131 | connect( tabWidget, SIGNAL ( currentChanged(QWidget*) ), |
127 | this, SLOT( tabChanged( QWidget* ) ) ); | 132 | this, SLOT( tabChanged( QWidget* ) ) ); |
128 | connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ), | 133 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), |
129 | d->tbPlay, SLOT( setOn( bool ) ) ); | 134 | d->tbPlay, SLOT( setOn( bool ) ) ); |
130 | connect( &mediaPlayerState, SIGNAL( loopingToggled( bool ) ), | 135 | connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), |
131 | d->tbLoop, SLOT( setOn( bool ) ) ); | 136 | d->tbLoop, SLOT( setOn( bool ) ) ); |
132 | connect( &mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), | 137 | connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), |
133 | d->tbShuffle, SLOT( setOn( bool ) ) ); | 138 | d->tbShuffle, SLOT( setOn( bool ) ) ); |
134 | connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), | 139 | connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), |
135 | this, SLOT( playIt( QListViewItem *) ) ); | 140 | this, SLOT( playIt( QListViewItem *) ) ); |
136 | connect ( gammaSlider, SIGNAL( valueChanged( int ) ), | 141 | connect ( gammaSlider, SIGNAL( valueChanged( int ) ), |
137 | &mediaPlayerState, SLOT( setVideoGamma( int ) ) ); | 142 | mediaPlayerState, SLOT( setVideoGamma( int ) ) ); |
143 | |||
144 | connect( this, SIGNAL(skinSelected() ), | ||
145 | m_mp, SLOT( reloadSkins() ) ); | ||
138 | 146 | ||
139 | // see which skins are installed | 147 | // see which skins are installed |
140 | populateSkinsMenu(); | 148 | populateSkinsMenu(); |
@@ -155,13 +163,14 @@ PlayListWidget::PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* par | |||
155 | 163 | ||
156 | PlayListWidget::~PlayListWidget() { | 164 | PlayListWidget::~PlayListWidget() { |
157 | delete d; | 165 | delete d; |
166 | delete m_mp; | ||
158 | } | 167 | } |
159 | 168 | ||
160 | 169 | ||
161 | void PlayListWidget::initializeStates() { | 170 | void PlayListWidget::initializeStates() { |
162 | d->tbPlay->setOn( mediaPlayerState.isPlaying() ); | 171 | d->tbPlay->setOn( mediaPlayerState->isPlaying() ); |
163 | d->tbLoop->setOn( mediaPlayerState.isLooping() ); | 172 | d->tbLoop->setOn( mediaPlayerState->isLooping() ); |
164 | d->tbShuffle->setOn( mediaPlayerState.isShuffled() ); | 173 | d->tbShuffle->setOn( mediaPlayerState->isShuffled() ); |
165 | d->playListFrame->show(); | 174 | d->playListFrame->show(); |
166 | } | 175 | } |
167 | 176 | ||
@@ -341,8 +350,8 @@ void PlayListWidget::setDocument( const QString& fileref ) { | |||
341 | writeCurrentM3u(); | 350 | writeCurrentM3u(); |
342 | 351 | ||
343 | d->setDocumentUsed = TRUE; | 352 | d->setDocumentUsed = TRUE; |
344 | mediaPlayerState.setPlaying( FALSE ); | 353 | mediaPlayerState->setPlaying( FALSE ); |
345 | mediaPlayerState.setPlaying( TRUE ); | 354 | mediaPlayerState->setPlaying( TRUE ); |
346 | } | 355 | } |
347 | } | 356 | } |
348 | 357 | ||
@@ -366,7 +375,7 @@ const DocLnk *PlayListWidget::current() const { // this is fugly | |||
366 | 375 | ||
367 | 376 | ||
368 | bool PlayListWidget::prev() { | 377 | bool PlayListWidget::prev() { |
369 | if ( mediaPlayerState.isShuffled() ) { | 378 | if ( mediaPlayerState->isShuffled() ) { |
370 | const DocLnk *cur = current(); | 379 | const DocLnk *cur = current(); |
371 | int j = 1 + (int)(97.0 * rand() / (RAND_MAX + 1.0)); | 380 | int j = 1 + (int)(97.0 * rand() / (RAND_MAX + 1.0)); |
372 | for ( int i = 0; i < j; i++ ) { | 381 | for ( int i = 0; i < j; i++ ) { |
@@ -380,7 +389,7 @@ bool PlayListWidget::prev() { | |||
380 | return TRUE; | 389 | return TRUE; |
381 | } else { | 390 | } else { |
382 | if ( !d->selectedFiles->prev() ) { | 391 | if ( !d->selectedFiles->prev() ) { |
383 | if ( mediaPlayerState.isLooping() ) { | 392 | if ( mediaPlayerState->isLooping() ) { |
384 | return d->selectedFiles->last(); | 393 | return d->selectedFiles->last(); |
385 | } else { | 394 | } else { |
386 | return FALSE; | 395 | return FALSE; |
@@ -393,11 +402,11 @@ bool PlayListWidget::prev() { | |||
393 | 402 | ||
394 | bool PlayListWidget::next() { | 403 | bool PlayListWidget::next() { |
395 | //qDebug("<<<<<<<<<<<<next()"); | 404 | //qDebug("<<<<<<<<<<<<next()"); |
396 | if ( mediaPlayerState.isShuffled() ) { | 405 | if ( mediaPlayerState->isShuffled() ) { |
397 | return prev(); | 406 | return prev(); |
398 | } else { | 407 | } else { |
399 | if ( !d->selectedFiles->next() ) { | 408 | if ( !d->selectedFiles->next() ) { |
400 | if ( mediaPlayerState.isLooping() ) { | 409 | if ( mediaPlayerState->isLooping() ) { |
401 | return d->selectedFiles->first(); | 410 | return d->selectedFiles->first(); |
402 | } else { | 411 | } else { |
403 | return FALSE; | 412 | return FALSE; |
@@ -463,8 +472,8 @@ void PlayListWidget::removeSelected() { | |||
463 | 472 | ||
464 | void PlayListWidget::playIt( QListViewItem *it) { | 473 | void PlayListWidget::playIt( QListViewItem *it) { |
465 | if(!it) return; | 474 | if(!it) return; |
466 | mediaPlayerState.setPlaying(FALSE); | 475 | mediaPlayerState->setPlaying(FALSE); |
467 | mediaPlayerState.setPlaying(TRUE); | 476 | mediaPlayerState->setPlaying(TRUE); |
468 | d->selectedFiles->unSelect(); | 477 | d->selectedFiles->unSelect(); |
469 | } | 478 | } |
470 | 479 | ||
@@ -565,7 +574,7 @@ void PlayListWidget::tabChanged(QWidget *) { | |||
565 | 574 | ||
566 | void PlayListWidget::btnPlay(bool b) { | 575 | void PlayListWidget::btnPlay(bool b) { |
567 | // mediaPlayerState->setPlaying(false); | 576 | // mediaPlayerState->setPlaying(false); |
568 | mediaPlayerState.setPlaying(b); | 577 | mediaPlayerState->setPlaying(b); |
569 | insanityBool=FALSE; | 578 | insanityBool=FALSE; |
570 | } | 579 | } |
571 | 580 | ||
@@ -909,8 +918,8 @@ void PlayListWidget::pmViewActivated(int index) { | |||
909 | switch(index) { | 918 | switch(index) { |
910 | case -16: | 919 | case -16: |
911 | { | 920 | { |
912 | mediaPlayerState.toggleFullscreen(); | 921 | mediaPlayerState->toggleFullscreen(); |
913 | bool b=mediaPlayerState.isFullscreen(); | 922 | bool b=mediaPlayerState->isFullscreen(); |
914 | pmView->setItemChecked( index, b); | 923 | pmView->setItemChecked( index, b); |
915 | Config cfg( "OpiePlayer" ); | 924 | Config cfg( "OpiePlayer" ); |
916 | cfg.writeEntry( "FullScreen", b ); | 925 | cfg.writeEntry( "FullScreen", b ); |
@@ -996,17 +1005,17 @@ void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) { | |||
996 | if ( msg == "play()" ) { //plays current selection | 1005 | if ( msg == "play()" ) { //plays current selection |
997 | btnPlay( true); | 1006 | btnPlay( true); |
998 | } else if ( msg == "stop()" ) { | 1007 | } else if ( msg == "stop()" ) { |
999 | mediaPlayerState.setPlaying( false); | 1008 | mediaPlayerState->setPlaying( false); |
1000 | } else if ( msg == "togglePause()" ) { | 1009 | } else if ( msg == "togglePause()" ) { |
1001 | mediaPlayerState.togglePaused(); | 1010 | mediaPlayerState->togglePaused(); |
1002 | } else if ( msg == "next()" ) { //select next in list | 1011 | } else if ( msg == "next()" ) { //select next in list |
1003 | mediaPlayerState.setNext(); | 1012 | mediaPlayerState->setNext(); |
1004 | } else if ( msg == "prev()" ) { //select previous in list | 1013 | } else if ( msg == "prev()" ) { //select previous in list |
1005 | mediaPlayerState.setPrev(); | 1014 | mediaPlayerState->setPrev(); |
1006 | } else if ( msg == "toggleLooping()" ) { //loop or not loop | 1015 | } else if ( msg == "toggleLooping()" ) { //loop or not loop |
1007 | mediaPlayerState.toggleLooping(); | 1016 | mediaPlayerState->toggleLooping(); |
1008 | } else if ( msg == "toggleShuffled()" ) { //shuffled or not shuffled | 1017 | } else if ( msg == "toggleShuffled()" ) { //shuffled or not shuffled |
1009 | mediaPlayerState.toggleShuffled(); | 1018 | mediaPlayerState->toggleShuffled(); |
1010 | } else if ( msg == "volUp()" ) { //volume more | 1019 | } else if ( msg == "volUp()" ) { //volume more |
1011 | // emit moreClicked(); | 1020 | // emit moreClicked(); |
1012 | // emit moreReleased(); | 1021 | // emit moreReleased(); |
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h index fc305cd..29f3e8d 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.h +++ b/noncore/multimedia/opieplayer2/playlistwidget.h | |||
@@ -47,6 +47,8 @@ class QListView; | |||
47 | class QPoint; | 47 | class QPoint; |
48 | class QAction; | 48 | class QAction; |
49 | class QLabel; | 49 | class QLabel; |
50 | class MediaPlayerState; | ||
51 | class MediaPlayer; | ||
50 | 52 | ||
51 | class PlayListWidget : public PlayListWidgetGui { | 53 | class PlayListWidget : public PlayListWidgetGui { |
52 | Q_OBJECT | 54 | Q_OBJECT |
@@ -65,7 +67,8 @@ public: | |||
65 | QString file; | 67 | QString file; |
66 | }; | 68 | }; |
67 | 69 | ||
68 | PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* parent=0, const char* name=0 ); | 70 | static QString appName() { return QString::fromLatin1("opieplayer2"); } |
71 | PlayListWidget( QWidget* parent=0, const char* name=0, WFlags = 0 ); | ||
69 | ~PlayListWidget(); | 72 | ~PlayListWidget(); |
70 | 73 | ||
71 | // retrieve the current playlist entry (media file link) | 74 | // retrieve the current playlist entry (media file link) |
@@ -132,6 +135,8 @@ private: | |||
132 | QString setDocFileRef, currentPlayList; | 135 | QString setDocFileRef, currentPlayList; |
133 | int selected; | 136 | int selected; |
134 | QListView *currentFileListView; | 137 | QListView *currentFileListView; |
138 | |||
139 | MediaPlayer *m_mp; | ||
135 | }; | 140 | }; |
136 | 141 | ||
137 | #endif // PLAY_LIST_WIDGET_H | 142 | #endif // PLAY_LIST_WIDGET_H |
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp index 293bf45..fec91ea 100644 --- a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp | |||
@@ -46,8 +46,8 @@ | |||
46 | 46 | ||
47 | #include "mediaplayerstate.h" | 47 | #include "mediaplayerstate.h" |
48 | 48 | ||
49 | PlayListWidgetGui::PlayListWidgetGui( MediaPlayerState &_mediaPlayerState, QWidget* parent, const char* name ) | 49 | PlayListWidgetGui::PlayListWidgetGui(QWidget* parent, const char* name ) |
50 | : QMainWindow( parent, name ), mediaPlayerState( _mediaPlayerState ) { | 50 | : QMainWindow( parent, name ) { |
51 | 51 | ||
52 | d = new PlayListWidgetPrivate; | 52 | d = new PlayListWidgetPrivate; |
53 | d->setDocumentUsed = FALSE; | 53 | d->setDocumentUsed = FALSE; |
@@ -186,9 +186,9 @@ void PlayListWidgetGui::setView( char view ) { | |||
186 | void PlayListWidgetGui::setActiveWindow() { | 186 | void PlayListWidgetGui::setActiveWindow() { |
187 | // qDebug("SETTING active window"); | 187 | // qDebug("SETTING active window"); |
188 | // When we get raised we need to ensure that it switches views | 188 | // When we get raised we need to ensure that it switches views |
189 | MediaPlayerState::DisplayType origDisplayType = mediaPlayerState.displayType(); | 189 | MediaPlayerState::DisplayType origDisplayType = mediaPlayerState->displayType(); |
190 | mediaPlayerState.setDisplayType( MediaPlayerState::MediaSelection ); // invalidate | 190 | mediaPlayerState->setDisplayType( MediaPlayerState::MediaSelection ); // invalidate |
191 | mediaPlayerState.setDisplayType( origDisplayType ); // now switch back | 191 | mediaPlayerState->setDisplayType( origDisplayType ); // now switch back |
192 | } | 192 | } |
193 | 193 | ||
194 | 194 | ||
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.h b/noncore/multimedia/opieplayer2/playlistwidgetgui.h index c0cd37a..5706d14 100644 --- a/noncore/multimedia/opieplayer2/playlistwidgetgui.h +++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.h | |||
@@ -93,7 +93,7 @@ public: | |||
93 | class PlayListWidgetGui : public QMainWindow { | 93 | class PlayListWidgetGui : public QMainWindow { |
94 | Q_OBJECT | 94 | Q_OBJECT |
95 | public: | 95 | public: |
96 | PlayListWidgetGui( MediaPlayerState &_mediaPlayerState, QWidget* parent=0, const char* name=0 ); | 96 | PlayListWidgetGui( QWidget* parent=0, const char* name=0 ); |
97 | ~PlayListWidgetGui(); | 97 | ~PlayListWidgetGui(); |
98 | 98 | ||
99 | protected: | 99 | protected: |
@@ -122,7 +122,7 @@ protected: | |||
122 | void setActiveWindow(); // need to handle this to show the right view | 122 | void setActiveWindow(); // need to handle this to show the right view |
123 | void setView( char ); | 123 | void setView( char ); |
124 | 124 | ||
125 | MediaPlayerState &mediaPlayerState; | 125 | MediaPlayerState *mediaPlayerState; |
126 | }; | 126 | }; |
127 | 127 | ||
128 | #endif | 128 | #endif |