author | harlekin <harlekin> | 2002-07-09 14:00:53 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-07-09 14:00:53 (UTC) |
commit | f9e07dc2c8e489c48debb31a6ae5afd46b77faee (patch) (side-by-side diff) | |
tree | a35a5d7eb9cf1e9f1e3f2dfb1e7086929b27636d | |
parent | 87bb55055c826b6c75d4a66a7ff6e21058cf6361 (diff) | |
download | opie-f9e07dc2c8e489c48debb31a6ae5afd46b77faee.zip opie-f9e07dc2c8e489c48debb31a6ae5afd46b77faee.tar.gz opie-f9e07dc2c8e489c48debb31a6ae5afd46b77faee.tar.bz2 |
fullscreen toogle connected
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 16 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.h | 2 |
2 files changed, 12 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 7407e4e..497636a 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp @@ -1,49 +1,50 @@ - +#include <qtimer.h> #include "xinecontrol.h" #include "mediaplayerstate.h" extern MediaPlayerState *mediaPlayerState; XineControl::XineControl( QObject *parent, const char *name ) : QObject( parent, name ) { libXine = new XINE::Lib(); connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( pause(bool) ) ); connect( this, SIGNAL( positionChanged( int position ) ), mediaPlayerState, SLOT( updatePosition( long p ) ) ); connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) ); - + connect( mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) ); } XineControl::~XineControl() { delete libXine; } void XineControl::play( const QString& fileName ) { libXine->play( fileName ); mediaPlayerState->setPlaying( true ); // default to audio view until we know how to handle video // MediaDetect mdetect; char whichGui = mdetect.videoOrAudio( fileName ); if (whichGui == 'f') { qDebug("Nicht erkannter Dateityp"); return; } - // which gui (video / audio) - mediaPlayerState->setView( whichGui ); - // determine if slider is shown mediaPlayerState->setIsStreaming( mdetect.isStreaming( fileName ) ); + + // which gui (video / audio) + mediaPlayerState->setView( whichGui ); + } void XineControl::stop( bool isSet ) { if ( !isSet) { libXine->stop(); mediaPlayerState->setList(); //mediaPlayerState->setPlaying( false ); } else { // play again } } @@ -58,13 +59,18 @@ int XineControl::currentTime() { } void XineControl::length() { m_length = libXine->length(); mediaPlayerState->setLength( m_length ); } int XineControl::position() { m_position = (m_currentTime/m_length*100); mediaPlayerState->setPosition( m_position ); return m_position; emit positionChanged( m_position ); + QTimer::singleShot( 1000, this, SLOT( position ) ); +} + +void XineControl::setFullscreen( bool isSet ) { + libXine-> showVideoFullScreen( isSet); } diff --git a/noncore/multimedia/opieplayer2/xinecontrol.h b/noncore/multimedia/opieplayer2/xinecontrol.h index aab00cd..145cd0c 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.h +++ b/noncore/multimedia/opieplayer2/xinecontrol.h @@ -7,25 +7,25 @@ #include <qobject.h> class XineControl : public QObject { Q_OBJECT public: XineControl( QObject *parent = 0, const char *name =0 ); ~XineControl(); public slots: void play( const QString& fileName ); void stop( bool ); void pause( bool ); - + void setFullscreen( bool ); int currentTime(); // get length of media file and set it void length(); int position(); private: XINE::Lib *libXine; MediaDetect mdetect; int m_length; int m_currentTime; |