summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-07-09 01:02:37 (UTC)
committer harlekin <harlekin>2002-07-09 01:02:37 (UTC)
commit577841e20b5657411194d74a143b0319fc05cda3 (patch) (side-by-side diff)
tree0e41da19fff8e2f47d43612a96d503b49b6a6a0b
parent56554891922367c5d4e7d0f6965daa1026c0cc54 (diff)
downloadopie-577841e20b5657411194d74a143b0319fc05cda3.zip
opie-577841e20b5657411194d74a143b0319fc05cda3.tar.gz
opie-577841e20b5657411194d74a143b0319fc05cda3.tar.bz2
more gui updates
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
@@ -125,7 +125,7 @@ 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];
}
@@ -161,7 +161,7 @@ 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) ) );
disconnect( mediaPlayerState, SIGNAL( positionUpdated(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
@@ -75,13 +75,6 @@ void MediaPlayer::setPlaying( bool play ) {
audioUI->setTickerText( currentFile->file( ) );
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
@@ -56,6 +56,12 @@ void MediaPlayerState::writeConfig( Config& cfg ) const {
// public stuff
+
+
+bool MediaPlayerState::streaming() {
+ return isStreaming;
+}
+
bool MediaPlayerState::fullscreen() {
return isFullscreen;
}
@@ -85,6 +91,10 @@ bool MediaPlayerState::playing() {
return isPlaying;
}
+bool MediaPlayerState::stop() {
+ return isStoped;
+}
+
long MediaPlayerState::position() {
return curPosition;
}
@@ -98,6 +108,14 @@ char MediaPlayerState::view() {
}
// slots
+void MediaPlayerState::setIsStreaming( bool b ) {
+ if ( isStreaming == b ) {
+ return;
+ }
+ isStreaming = b;
+}
+
+
void MediaPlayerState::setFullscreen( bool b ) {
if ( isFullscreen == b ) {
return;
@@ -152,9 +170,18 @@ void MediaPlayerState::setPlaying( bool b ) {
return;
}
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 ) {
return;
@@ -208,8 +235,6 @@ void MediaPlayerState::setAudio() {
setView('a');
}
-
-
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
@@ -16,7 +16,7 @@ public:
MediaPlayerState( QObject *parent, const char *name );
~MediaPlayerState();
- bool isStreaming;
+ bool streaming();
bool fullscreen();
bool scaled();
bool looping();
@@ -24,11 +24,13 @@ public:
bool playlist();
bool paused();
bool playing();
+ bool stop();
long position();
long length();
char view();
public slots:
+ void setIsStreaming( bool b );
void setFullscreen( bool b );
void setScaled( bool b );
void setLooping( bool b );
@@ -36,6 +38,7 @@ public slots:
void setPlaylist( bool b );
void setPaused( bool b );
void setPlaying( bool b );
+ void setStop( bool b );
void setPosition( long p );
void updatePosition( long p );
void setLength( long l );
@@ -63,6 +66,7 @@ signals:
void playlistToggled( bool );
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
void lengthChanged( long );
@@ -72,6 +76,7 @@ signals:
void next();
private:
+ bool isStreaming;
bool isFullscreen;
bool isScaled;
bool isLooping;
@@ -79,6 +84,7 @@ private:
bool usePlaylist;
bool isPaused;
bool isPlaying;
+ bool isStoped;
long curPosition;
long curLength;
char curView;
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
@@ -24,15 +24,18 @@ void XineControl::play( const QString& fileName ) {
// default to audio view until we know how to handle video
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 );
}
void XineControl::pause( bool isSet) {