summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-08-16 15:42:44 (UTC)
committer harlekin <harlekin>2002-08-16 15:42:44 (UTC)
commitfec49e4f9f8d016e335eaca1630f4108801cc3ce (patch) (side-by-side diff)
tree271c4dda3b4b634e0946528e4a4b2c9e6746d25c
parentaa9eba407a8236c72822d24643b58d4d48ae80c0 (diff)
downloadopie-fec49e4f9f8d016e335eaca1630f4108801cc3ce.zip
opie-fec49e4f9f8d016e335eaca1630f4108801cc3ce.tar.gz
opie-fec49e4f9f8d016e335eaca1630f4108801cc3ce.tar.bz2
hide slider when streaming videos
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp19
1 files changed, 4 insertions, 15 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 5a69bf5..956789f 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -225,39 +225,24 @@ void VideoWidget::sliderReleased() {
void VideoWidget::setPosition( long i ) {
updateSlider( i, mediaPlayerState->length() );
}
void VideoWidget::setLength( long max ) {
updateSlider( mediaPlayerState->position(), max );
}
void VideoWidget::setView( char view ) {
- if ( mediaPlayerState->streaming() ) {
- qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>");
- if( !slider->isHidden()) {
- slider->hide();
- }
- disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
- disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
- } else {
- // this stops the slider from being moved, thus
- // does not stop stream when it reaches the end
- slider->show();
- connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
- connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
- }
-
if ( view == 'v' ) {
makeVisible();
} else {
// Effectively blank the view next time we show it so it looks nicer
scaledWidth = 0;
scaledHeight = 0;
hide();
}
}
void VideoWidget::updateSlider( long i, long max ) {
// Will flicker too much if we don't do this
@@ -385,25 +370,29 @@ void VideoWidget::showEvent( QShowEvent* ) {
void VideoWidget::makeVisible() {
if ( mediaPlayerState->fullscreen() ) {
setBackgroundMode( QWidget::NoBackground );
showFullScreen();
resize( qApp->desktop()->size() );
slider->hide();
videoFrame-> setGeometry ( 0, 0, width ( ), height ( ));
} else {
showMaximized();
setBackgroundPixmap( *pixBg );
+ if ( mediaPlayerState->streaming() ) {
+ slider->hide();
+ } else {
slider->show();
+ }
videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) );
qApp->processEvents();
}
}
void VideoWidget::paintEvent( QPaintEvent * pe) {
QPainter p( this );
if ( mediaPlayerState->fullscreen() ) {
// Clear the background
p.setBrush( QBrush( Qt::black ) );