summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/audiowidget.cpp
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/audiowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiowidget.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp
index 0d88591..1e0757f 100644
--- a/core/multimedia/opieplayer/audiowidget.cpp
+++ b/core/multimedia/opieplayer/audiowidget.cpp
@@ -1,41 +1,40 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include <qwidget.h> 20#include <qwidget.h>
21#include <qpixmap.h> 21#include <qpixmap.h>
22#include <qbutton.h> 22#include <qbutton.h>
23#include <qpainter.h> 23#include <qpainter.h>
24#include <qframe.h> 24#include <qframe.h>
25#include <qpe/resource.h> 25#include <qpe/resource.h>
26#include "audiowidget.h" 26#include "audiowidget.h"
27#include "mediaplayerstate.h" 27#include "mediaplayerstate.h"
28 28
29
30extern MediaPlayerState *mediaPlayerState; 29extern MediaPlayerState *mediaPlayerState;
31 30
32 31
33static const int xo = -2; // movable x offset 32static const int xo = -2; // movable x offset
34static const int yo = 22; // movable y offset 33static const int yo = 22; // movable y offset
35 34
36 35
37struct MediaButton { 36struct MediaButton {
38 int xPos, yPos; 37 int xPos, yPos;
39 int color; 38 int color;
40 bool isToggle, isBig, isHeld, isDown; 39 bool isToggle, isBig, isHeld, isDown;
41}; 40};
@@ -52,25 +51,25 @@ MediaButton audioButtons[] = {
52 { 3*30+xo, 6*30-5+yo, 3, FALSE, FALSE, FALSE, FALSE }, // volume down 51 { 3*30+xo, 6*30-5+yo, 3, FALSE, FALSE, FALSE, FALSE }, // volume down
53 { 5*30+xo, 1*30+yo, 0, TRUE, FALSE, FALSE, FALSE }, // repeat/loop 52 { 5*30+xo, 1*30+yo, 0, TRUE, FALSE, FALSE, FALSE }, // repeat/loop
54 { 1*30+xo, 1*30+yo, 0, FALSE, FALSE, FALSE, FALSE } // playlist 53 { 1*30+xo, 1*30+yo, 0, FALSE, FALSE, FALSE, FALSE } // playlist
55}; 54};
56 55
57 56
58static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton)); 57static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton));
59 58
60 59
61AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : 60AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
62 QWidget( parent, name, f ) 61 QWidget( parent, name, f )
63{ 62{
64 setCaption( tr("OpiePlayer") ); 63 setCaption( tr("MediaPlayer") );
65 setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/metalFinish" ) ); 64 setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/metalFinish" ) );
66 pixmaps[0] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaButtonsAll" ) ); 65 pixmaps[0] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaButtonsAll" ) );
67 pixmaps[1] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaButtonsBig" ) ); 66 pixmaps[1] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaButtonsBig" ) );
68 pixmaps[2] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaControls" ) ); 67 pixmaps[2] = new QPixmap( Resource::loadPixmap( "mpegplayer/mediaControls" ) );
69 pixmaps[3] = new QPixmap( Resource::loadPixmap( "mpegplayer/animatedButton" ) ); 68 pixmaps[3] = new QPixmap( Resource::loadPixmap( "mpegplayer/animatedButton" ) );
70 69
71 songInfo = new Ticker( this ); 70 songInfo = new Ticker( this );
72 songInfo->setFocusPolicy( QWidget::NoFocus ); 71 songInfo->setFocusPolicy( QWidget::NoFocus );
73 songInfo->setGeometry( QRect( 7, 3, 220, 20 ) ); 72 songInfo->setGeometry( QRect( 7, 3, 220, 20 ) );
74 73
75 slider = new QSlider( Qt::Horizontal, this ); 74 slider = new QSlider( Qt::Horizontal, this );
76 slider->setFixedWidth( 220 ); 75 slider->setFixedWidth( 220 );