summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-08-02 10:47:50 (UTC)
committer harlekin <harlekin>2002-08-02 10:47:50 (UTC)
commit471dc69956af37e7c5f481c10482f280db853491 (patch) (side-by-side diff)
tree48d05dfe1c626d277181cf76ee051047b2522483
parentca057e02c3bacb8226d5209fcd9aa24009cdb78e (diff)
downloadopie-471dc69956af37e7c5f481c10482f280db853491.zip
opie-471dc69956af37e7c5f481c10482f280db853491.tar.gz
opie-471dc69956af37e7c5f481c10482f280db853491.tar.bz2
cleanups
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp1
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp20
2 files changed, 4 insertions, 17 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index cd53748..cce445b 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -1,26 +1,25 @@
-// code added by L. J. Potter Sat 03-02-2002 06:17:54
#define QTOPIA_INTERNAL_FSLP
#include <qpe/qcopenvelope_qws.h>
#include <qpe/qpemenubar.h>
#include <qpe/qpetoolbar.h>
#include <qpe/fileselector.h>
#include <qpe/qpeapplication.h>
#include <qpe/lnkproperties.h>
#include <qpe/storage.h>
#include <qpe/applnk.h>
#include <qpe/config.h>
#include <qpe/global.h>
#include <qpe/resource.h>
#include <qaction.h>
#include <qcursor.h>
#include <qimage.h>
#include <qfile.h>
#include <qdir.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qlist.h>
#include <qlistbox.h>
#include <qmainwindow.h>
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index d3898a0..bce6b89 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -101,50 +101,50 @@ VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
slider = new QSlider( Qt::Horizontal, this );
slider->setMinValue( 0 );
slider->setMaxValue( 1 );
slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) );
slider->setFocusPolicy( QWidget::NoFocus );
slider->setGeometry( QRect( 7, 250, 220, 20 ) );
connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) );
connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) );
connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) );
connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) );
// Intialise state
setLength( mediaPlayerState->length() );
setPosition( mediaPlayerState->position() );
setFullscreen( mediaPlayerState->fullscreen() );
setPaused( mediaPlayerState->paused() );
setPlaying( mediaPlayerState->playing() );
- videoFrame = new XineVideoWidget( 200, 150 ,this, "Video frame" );
- videoFrame->setGeometry( QRect( 10, 20, 220, 160 ) );
+ videoFrame = new XineVideoWidget( 240, 155 ,this, "Video frame" );
+ videoFrame->setGeometry( QRect( 0, 15 , 240 ,170 ) );
}
VideoWidget::~VideoWidget() {
for ( int i = 0; i < 3; i++ ) {
delete pixmaps[i];
}
delete currentFrame;
}
static bool videoSliderBeingMoved = FALSE;
void VideoWidget::sliderPressed() {
videoSliderBeingMoved = TRUE;
}
void VideoWidget::sliderReleased() {
videoSliderBeingMoved = FALSE;
if ( slider->width() == 0 ) {
return;
}
@@ -267,70 +267,58 @@ void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) {
}
}
void VideoWidget::makeVisible() {
if ( mediaPlayerState->fullscreen() ) {
setBackgroundMode( QWidget::NoBackground );
showFullScreen();
resize( qApp->desktop()->size() );
slider->hide();
} else {
setBackgroundPixmap( Resource::loadPixmap( "opieplayer/metalFinish" ) );
showNormal();
showMaximized();
slider->show();
}
}
void VideoWidget::paintEvent( QPaintEvent * ) {
QPainter p( this );
if ( mediaPlayerState->fullscreen() ) {
// Clear the background
-// p.setBrush( QBrush( Qt::black ) );
- //p.drawRect( rect() );
+ p.setBrush( QBrush( Qt::black ) );
+ videoFrame->setGeometry( QRect( 0, 0 , 240 ,340 ) );
} else {
- // draw border
- qDrawShadePanel( &p, 4, 15, 230, 170, colorGroup(), TRUE, 5, NULL );
-
- // Clear the movie screen first
-// p.setBrush( QBrush( Qt::black ) );
-// p.drawRect( 9, 20, 220, 160 );
-
- // draw current frame (centrally positioned from scaling to maintain aspect ratio)
- //p.drawImage( 9 + (220 - scaledWidth) / 2, 20 + (160 - scaledHeight) / 2, *currentFrame, 0, 0, scaledWidth, scaledHeight );
-
// draw the buttons
for ( int i = 0; i < numButtons; i++ ) {
paintButton( &p, i );
}
-
// draw the slider
slider->repaint( TRUE );
-// videoFrame->repaint( TRUE );
}
}
void VideoWidget::closeEvent( QCloseEvent* ) {
mediaPlayerState->setList();
}
bool VideoWidget::playVideo() {
bool result = FALSE;
int stream = 0;
int sw = 240;
int sh = 320;
int dd = QPixmap::defaultDepth();
int w = height();
int h = width();
return true;
}