summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/videowidget.cpp
Side-by-side diff
Diffstat (limited to 'core/multimedia/opieplayer/videowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/videowidget.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/multimedia/opieplayer/videowidget.cpp b/core/multimedia/opieplayer/videowidget.cpp
index 1f128a4..12ae4fd 100644
--- a/core/multimedia/opieplayer/videowidget.cpp
+++ b/core/multimedia/opieplayer/videowidget.cpp
@@ -1,93 +1,94 @@
/**********************************************************************
-** Copyright (C) 2000 Trolltech AS. All rights reserved.
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
-** This file is part of Qtopia Environment.
+** This file is part of the Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
+
#include <qpe/resource.h>
-#include "mediaplayerplugininterface.h"
+#include <qpe/mediaplayerplugininterface.h>
#include <qwidget.h>
#include <qpainter.h>
#include <qpixmap.h>
#include <qslider.h>
#include <qdrawutil.h>
#include "videowidget.h"
#include "mediaplayerstate.h"
#ifdef Q_WS_QWS
# define USE_DIRECT_PAINTER
# include <qdirectpainter_qws.h>
# include <qgfxraster_qws.h>
#endif
extern MediaPlayerState *mediaPlayerState;
static const int xo = 2; // movable x offset
static const int yo = 0; // movable y offset
struct MediaButton {
int xPos, yPos;
bool isToggle, isHeld, isDown;
int controlType;
};
// Layout information for the videoButtons (and if it is a toggle button or not)
MediaButton videoButtons[] = {
{ 5+0*32+xo, 200+yo, FALSE, FALSE, FALSE, 4 }, // previous
{ 5+1*32+xo, 200+yo, FALSE, FALSE, FALSE, 1 }, // stop
{ 5+2*32+xo, 200+yo, TRUE, FALSE, FALSE, 0 }, // play
{ 5+3*32+xo, 200+yo, TRUE, FALSE, FALSE, 2 }, // pause
{ 5+4*32+xo, 200+yo, FALSE, FALSE, FALSE, 3 }, // next
{ 5+5*32+xo, 200+yo, FALSE, FALSE, FALSE, 8 }, // playlist
{ 5+6*32+xo, 200+yo, TRUE, FALSE, FALSE, 9 } // fullscreen
};
static const int numButtons = (sizeof(videoButtons)/sizeof(MediaButton));
VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) :
QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) {
- setCaption( tr("OpiePlayer") );
+ setCaption( tr("MediaPlayer") );
setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/metalFinish" ) );
pixmaps[0] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaButton0a" ) );
pixmaps[1] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaButton0b" ) );
pixmaps[2] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaControls0" ) );
currentFrame = new QImage( 220 + 2, 160, (QPixmap::defaultDepth() == 16) ? 16 : 32 );
slider = new QSlider( Qt::Horizontal, this );
slider->setMinValue( 0 );
slider->setMaxValue( 1 );
slider->setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/metalFinish" ) );
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