summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp4
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp7
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.cpp29
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.h8
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp9
5 files changed, 42 insertions, 15 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 125fd72..303e56e 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -126,5 +126,5 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
AudioWidget::~AudioWidget() {
- mediaPlayerState->isStreaming = FALSE;
+ mediaPlayerState->setIsStreaming( FALSE );
for ( int i = 0; i < 3; i++ ) {
delete pixmaps[i];
@@ -162,5 +162,5 @@ void AudioWidget::setLength( long max ) {
void AudioWidget::setView( char view ) {
- if (mediaPlayerState->isStreaming) {
+ if (mediaPlayerState->streaming() ) {
if( !slider->isHidden()) slider->hide();
disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index 0ab0124..38ba08f 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -76,11 +76,4 @@ void MediaPlayer::setPlaying( bool play ) {
xineControl->play( currentFile->file() );
-
- // alles nicht nötig, xine kümmert sich drum, man muss nur den return andio oder video gui geben
-
- // Ob auch video 'v' : 'a'
- // mediaPlayerState->setView( 'v' );
-
- // abspielen starten.
}
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
index 3090b08..778cd1e 100644
--- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
@@ -57,4 +57,10 @@ void MediaPlayerState::writeConfig( Config& cfg ) const {
// public stuff
+
+
+bool MediaPlayerState::streaming() {
+ return isStreaming;
+}
+
bool MediaPlayerState::fullscreen() {
return isFullscreen;
@@ -86,4 +92,8 @@ bool MediaPlayerState::playing() {
}
+bool MediaPlayerState::stop() {
+ return isStoped;
+}
+
long MediaPlayerState::position() {
return curPosition;
@@ -99,4 +109,12 @@ char MediaPlayerState::view() {
// slots
+void MediaPlayerState::setIsStreaming( bool b ) {
+ if ( isStreaming == b ) {
+ return;
+ }
+ isStreaming = b;
+}
+
+
void MediaPlayerState::setFullscreen( bool b ) {
if ( isFullscreen == b ) {
@@ -153,7 +171,16 @@ void MediaPlayerState::setPlaying( bool b ) {
}
isPlaying = b;
+ isStoped = !b;
emit playingToggled(b);
}
+void MediaPlayerState::setStop( bool b ) {
+ if ( isStoped == b ) {
+ return;
+ }
+ isStoped = b;
+ emit stopToggled(b);
+}
+
void MediaPlayerState::setPosition( long p ) {
if ( curPosition == p ) {
@@ -209,6 +236,4 @@ void MediaPlayerState::setAudio() {
}
-
-
void MediaPlayerState::toggleFullscreen() {
setFullscreen( !isFullscreen );
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h
index dbbb0f2..20e3552 100644
--- a/noncore/multimedia/opieplayer2/mediaplayerstate.h
+++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h
@@ -17,5 +17,5 @@ public:
~MediaPlayerState();
- bool isStreaming;
+ bool streaming();
bool fullscreen();
bool scaled();
@@ -25,4 +25,5 @@ public:
bool paused();
bool playing();
+ bool stop();
long position();
long length();
@@ -30,4 +31,5 @@ public:
public slots:
+ void setIsStreaming( bool b );
void setFullscreen( bool b );
void setScaled( bool b );
@@ -37,4 +39,5 @@ public slots:
void setPaused( bool b );
void setPlaying( bool b );
+ void setStop( bool b );
void setPosition( long p );
void updatePosition( long p );
@@ -64,4 +67,5 @@ signals:
void pausedToggled( bool );
void playingToggled( bool );
+ void stopToggled( bool );
void positionChanged( long ); // When the slider is moved
void positionUpdated( long ); // When the media file progresses
@@ -73,4 +77,5 @@ signals:
private:
+ bool isStreaming;
bool isFullscreen;
bool isScaled;
@@ -80,4 +85,5 @@ private:
bool isPaused;
bool isPlaying;
+ bool isStoped;
long curPosition;
long curLength;
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index cda9be2..5b674f8 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -25,13 +25,16 @@ void XineControl::play( const QString& fileName ) {
mediaPlayerState->setView('a');
// determines of slider is shown
- mediaPlayerState->isStreaming = false;
+ // mediaPlayerState->setIsStreaming( false );
// hier dann schaun welcher view
}
void XineControl::stop( bool isSet ) {
- if ( isSet) {
+ if ( !isSet) {
libXine->stop();
+ mediaPlayerState->setNext();
+ //mediaPlayerState->setPlaying( false );
+ } else {
+ // play again
}
- // mediaPlayerState->setPlaying( false );
}