summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/main.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp48
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.h3
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidgetgui.cpp12
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidgetgui.h4
5 files changed, 35 insertions, 34 deletions
diff --git a/noncore/multimedia/opieplayer2/main.cpp b/noncore/multimedia/opieplayer2/main.cpp
index 24aba6c..02fdbf3 100644
--- a/noncore/multimedia/opieplayer2/main.cpp
+++ b/noncore/multimedia/opieplayer2/main.cpp
@@ -18,3 +18,3 @@ int main(int argc, char **argv) {
18 mediaPlayerState = &st; 18 mediaPlayerState = &st;
19 PlayListWidget pl( 0, "playList" ); 19 PlayListWidget pl( st, 0, "playList" );
20 playList = &pl; 20 playList = &pl;
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index b08204e..7ba342b 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -66,4 +66,4 @@ QString audioMimes ="audio/mpeg;audio/x-wav;audio/x-ogg";
66 66
67PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) 67PlayListWidget::PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name )
68 : PlayListWidgetGui( parent, name, fl ) { 68 : PlayListWidgetGui( mediaPlayerState, parent, name ) {
69 69
@@ -78,5 +78,5 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
78 d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"opieplayer2/shuffle", 78 d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"opieplayer2/shuffle",
79 mediaPlayerState, SLOT( setShuffled( bool ) ), TRUE ); 79 &mediaPlayerState, SLOT( setShuffled( bool ) ), TRUE );
80 d->tbLoop = new ToolButton( bar, tr( "Loop" ), "opieplayer2/loop", 80 d->tbLoop = new ToolButton( bar, tr( "Loop" ), "opieplayer2/loop",
81 mediaPlayerState, SLOT( setLooping( bool ) ), TRUE ); 81 &mediaPlayerState, SLOT( setLooping( bool ) ), TRUE );
82 82
@@ -104,3 +104,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
104 pmView->insertItem( Resource::loadPixmap("fullscreen") , tr( "Full Screen"), 104 pmView->insertItem( Resource::loadPixmap("fullscreen") , tr( "Full Screen"),
105 mediaPlayerState, SLOT( toggleFullscreen() ) ); 105 &mediaPlayerState, SLOT( toggleFullscreen() ) );
106 106
@@ -108,3 +108,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
108 bool b= cfg.readBoolEntry("FullScreen", 0); 108 bool b= cfg.readBoolEntry("FullScreen", 0);
109 mediaPlayerState->setFullscreen( b ); 109 mediaPlayerState.setFullscreen( b );
110 pmView->setItemChecked( -16, b ); 110 pmView->setItemChecked( -16, b );
@@ -143,7 +143,7 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
143 this, SLOT( tabChanged( QWidget* ) ) ); 143 this, SLOT( tabChanged( QWidget* ) ) );
144 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), 144 connect( &mediaPlayerState, SIGNAL( playingToggled( bool ) ),
145 d->tbPlay, SLOT( setOn( bool ) ) ); 145 d->tbPlay, SLOT( setOn( bool ) ) );
146 connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), 146 connect( &mediaPlayerState, SIGNAL( loopingToggled( bool ) ),
147 d->tbLoop, SLOT( setOn( bool ) ) ); 147 d->tbLoop, SLOT( setOn( bool ) ) );
148 connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), 148 connect( &mediaPlayerState, SIGNAL( shuffledToggled( bool ) ),
149 d->tbShuffle, SLOT( setOn( bool ) ) ); 149 d->tbShuffle, SLOT( setOn( bool ) ) );
@@ -152,3 +152,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
152 connect ( gammaSlider, SIGNAL( valueChanged( int ) ), 152 connect ( gammaSlider, SIGNAL( valueChanged( int ) ),
153 mediaPlayerState, SLOT( setVideoGamma( int ) ) ); 153 &mediaPlayerState, SLOT( setVideoGamma( int ) ) );
154 154
@@ -174,5 +174,5 @@ PlayListWidget::~PlayListWidget() {
174void PlayListWidget::initializeStates() { 174void PlayListWidget::initializeStates() {
175 d->tbPlay->setOn( mediaPlayerState->isPlaying() ); 175 d->tbPlay->setOn( mediaPlayerState.isPlaying() );
176 d->tbLoop->setOn( mediaPlayerState->isLooping() ); 176 d->tbLoop->setOn( mediaPlayerState.isLooping() );
177 d->tbShuffle->setOn( mediaPlayerState->isShuffled() ); 177 d->tbShuffle->setOn( mediaPlayerState.isShuffled() );
178 d->playListFrame->show(); 178 d->playListFrame->show();
@@ -406,4 +406,4 @@ void PlayListWidget::setDocument( const QString& fileref ) {
406 d->setDocumentUsed = TRUE; 406 d->setDocumentUsed = TRUE;
407 mediaPlayerState->setPlaying( FALSE ); 407 mediaPlayerState.setPlaying( FALSE );
408 mediaPlayerState->setPlaying( TRUE ); 408 mediaPlayerState.setPlaying( TRUE );
409 } 409 }
@@ -431,3 +431,3 @@ const DocLnk *PlayListWidget::current() const { // this is fugly
431bool PlayListWidget::prev() { 431bool PlayListWidget::prev() {
432 if ( mediaPlayerState->isShuffled() ) { 432 if ( mediaPlayerState.isShuffled() ) {
433 const DocLnk *cur = current(); 433 const DocLnk *cur = current();
@@ -445,3 +445,3 @@ bool PlayListWidget::prev() {
445 if ( !d->selectedFiles->prev() ) { 445 if ( !d->selectedFiles->prev() ) {
446 if ( mediaPlayerState->isLooping() ) { 446 if ( mediaPlayerState.isLooping() ) {
447 return d->selectedFiles->last(); 447 return d->selectedFiles->last();
@@ -458,3 +458,3 @@ bool PlayListWidget::next() {
458//qDebug("<<<<<<<<<<<<next()"); 458//qDebug("<<<<<<<<<<<<next()");
459 if ( mediaPlayerState->isShuffled() ) { 459 if ( mediaPlayerState.isShuffled() ) {
460 return prev(); 460 return prev();
@@ -462,3 +462,3 @@ bool PlayListWidget::next() {
462 if ( !d->selectedFiles->next() ) { 462 if ( !d->selectedFiles->next() ) {
463 if ( mediaPlayerState->isLooping() ) { 463 if ( mediaPlayerState.isLooping() ) {
464 return d->selectedFiles->first(); 464 return d->selectedFiles->first();
@@ -532,4 +532,4 @@ void PlayListWidget::playIt( QListViewItem *it) {
532 if(!it) return; 532 if(!it) return;
533 mediaPlayerState->setPlaying(FALSE); 533 mediaPlayerState.setPlaying(FALSE);
534 mediaPlayerState->setPlaying(TRUE); 534 mediaPlayerState.setPlaying(TRUE);
535 d->selectedFiles->unSelect(); 535 d->selectedFiles->unSelect();
@@ -616,3 +616,3 @@ void PlayListWidget::btnPlay(bool b) {
616// mediaPlayerState->setPlaying(false); 616// mediaPlayerState->setPlaying(false);
617 mediaPlayerState->setPlaying(b); 617 mediaPlayerState.setPlaying(b);
618 insanityBool=FALSE; 618 insanityBool=FALSE;
@@ -1051,4 +1051,4 @@ void PlayListWidget::pmViewActivated(int index) {
1051 { 1051 {
1052 mediaPlayerState->toggleFullscreen(); 1052 mediaPlayerState.toggleFullscreen();
1053 bool b=mediaPlayerState->isFullscreen(); 1053 bool b=mediaPlayerState.isFullscreen();
1054 pmView->setItemChecked( index, b); 1054 pmView->setItemChecked( index, b);
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h
index fa2837a..3f52e63 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.h
+++ b/noncore/multimedia/opieplayer2/playlistwidget.h
@@ -71,3 +71,3 @@ public:
71 71
72 PlayListWidget( QWidget* parent=0, const char* name=0, WFlags fl=0 ); 72 PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* parent=0, const char* name=0 );
73 ~PlayListWidget(); 73 ~PlayListWidget();
@@ -136,2 +136,3 @@ private slots:
136 void playSelected(); 136 void playSelected();
137
137}; 138};
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
index 8be7a2f..f47ddcc 100644
--- a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
@@ -61,6 +61,4 @@
61 61
62extern MediaPlayerState *mediaPlayerState; 62PlayListWidgetGui::PlayListWidgetGui( MediaPlayerState &_mediaPlayerState, QWidget* parent, const char* name )
63 63 : QMainWindow( parent, name ), mediaPlayerState( _mediaPlayerState ) {
64PlayListWidgetGui::PlayListWidgetGui( QWidget* parent, const char* name, WFlags fl )
65 : QMainWindow( parent, name, fl ) {
66 64
@@ -223,5 +221,5 @@ void PlayListWidgetGui::setActiveWindow() {
223 // When we get raised we need to ensure that it switches views 221 // When we get raised we need to ensure that it switches views
224 MediaPlayerState::DisplayType origDisplayType = mediaPlayerState->displayType(); 222 MediaPlayerState::DisplayType origDisplayType = mediaPlayerState.displayType();
225 mediaPlayerState->setDisplayType( MediaPlayerState::MediaSelection ); // invalidate 223 mediaPlayerState.setDisplayType( MediaPlayerState::MediaSelection ); // invalidate
226 mediaPlayerState->setDisplayType( origDisplayType ); // now switch back 224 mediaPlayerState.setDisplayType( origDisplayType ); // now switch back
227} 225}
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.h b/noncore/multimedia/opieplayer2/playlistwidgetgui.h
index 4eefb93..9b5252a 100644
--- a/noncore/multimedia/opieplayer2/playlistwidgetgui.h
+++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.h
@@ -51,2 +51,3 @@ class PlayListWidgetPrivate;
51class PlayListSelection; 51class PlayListSelection;
52class MediaPlayerState;
52 53
@@ -97,3 +98,3 @@ class PlayListWidgetGui : public QMainWindow {
97public: 98public:
98 PlayListWidgetGui( QWidget* parent=0, const char* name=0, WFlags fl=0 ); 99 PlayListWidgetGui( MediaPlayerState &_mediaPlayerState, QWidget* parent=0, const char* name=0 );
99 ~PlayListWidgetGui(); 100 ~PlayListWidgetGui();
@@ -124,2 +125,3 @@ protected:
124 125
126 MediaPlayerState &mediaPlayerState;
125}; 127};