summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-02 19:46:48 (UTC)
committer simon <simon>2002-12-02 19:46:48 (UTC)
commite77f4914311d8a623c084d01a287798440abf01f (patch) (unidiff)
tree673375b737c4b1435929cdc804641b08d20e62c8
parent1706751f05c1d4312beb1ca939a156b090c7b5f6 (diff)
downloadopie-e77f4914311d8a623c084d01a287798440abf01f.zip
opie-e77f4914311d8a623c084d01a287798440abf01f.tar.gz
opie-e77f4914311d8a623c084d01a287798440abf01f.tar.bz2
- inherit from MediaWidget
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp5
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h9
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp5
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.h6
4 files changed, 12 insertions, 13 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 1600320..0b7d470 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -29,199 +29,198 @@
29 Inc., 59 Temple Place - Suite 330, 29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA. 30 Boston, MA 02111-1307, USA.
31 31
32*/ 32*/
33 33
34#include <qpe/qpeapplication.h> 34#include <qpe/qpeapplication.h>
35#include <qpe/resource.h> 35#include <qpe/resource.h>
36#include <qpe/config.h> 36#include <qpe/config.h>
37#include <opie/oticker.h> 37#include <opie/oticker.h>
38 38
39#include <qwidget.h> 39#include <qwidget.h>
40#include <qpixmap.h> 40#include <qpixmap.h>
41#include <qbutton.h> 41#include <qbutton.h>
42#include <qpainter.h> 42#include <qpainter.h>
43#include <qframe.h> 43#include <qframe.h>
44#include <qlayout.h> 44#include <qlayout.h>
45#include <qdir.h> 45#include <qdir.h>
46#include <stdlib.h> 46#include <stdlib.h>
47#include <stdio.h> 47#include <stdio.h>
48 48
49#include "audiowidget.h" 49#include "audiowidget.h"
50#include "mediaplayerstate.h" 50#include "mediaplayerstate.h"
51#include "playlistwidget.h" 51#include "playlistwidget.h"
52 52
53extern MediaPlayerState *mediaPlayerState; 53extern MediaPlayerState *mediaPlayerState;
54extern PlayListWidget *playList; 54extern PlayListWidget *playList;
55 55
56static const int xo = -2; // movable x offset 56static const int xo = -2; // movable x offset
57static const int yo = 22; // movable y offset 57static const int yo = 22; // movable y offset
58 58
59struct MediaButton { 59struct MediaButton {
60 bool isToggle, isHeld, isDown; 60 bool isToggle, isHeld, isDown;
61}; 61};
62 62
63//Layout information for the audioButtons (and if it is a toggle button or not) 63//Layout information for the audioButtons (and if it is a toggle button or not)
64MediaButton audioButtons[] = { 64MediaButton audioButtons[] = {
65 { TRUE, FALSE, FALSE }, // play 65 { TRUE, FALSE, FALSE }, // play
66 { FALSE, FALSE, FALSE }, // stop 66 { FALSE, FALSE, FALSE }, // stop
67 { FALSE, FALSE, FALSE }, // next 67 { FALSE, FALSE, FALSE }, // next
68 { FALSE, FALSE, FALSE }, // previous 68 { FALSE, FALSE, FALSE }, // previous
69 { FALSE, FALSE, FALSE }, // volume up 69 { FALSE, FALSE, FALSE }, // volume up
70 { FALSE, FALSE, FALSE }, // volume down 70 { FALSE, FALSE, FALSE }, // volume down
71 { TRUE, FALSE, FALSE }, // repeat/loop 71 { TRUE, FALSE, FALSE }, // repeat/loop
72 { FALSE, FALSE, FALSE }, // playlist 72 { FALSE, FALSE, FALSE }, // playlist
73 { FALSE, FALSE, FALSE }, // forward 73 { FALSE, FALSE, FALSE }, // forward
74 { FALSE, FALSE, FALSE } // back 74 { FALSE, FALSE, FALSE } // back
75}; 75};
76 76
77const char * const skin_mask_file_names[10] = { 77const char * const skin_mask_file_names[10] = {
78 "play", "stop", "next", "prev", "up", 78 "play", "stop", "next", "prev", "up",
79 "down", "loop", "playlist", "forward", "back" 79 "down", "loop", "playlist", "forward", "back"
80}; 80};
81 81
82 82
83static void changeTextColor( QWidget *w ) { 83static void changeTextColor( QWidget *w ) {
84 QPalette p = w->palette(); 84 QPalette p = w->palette();
85 p.setBrush( QColorGroup::Background, QColor( 167, 212, 167 ) ); 85 p.setBrush( QColorGroup::Background, QColor( 167, 212, 167 ) );
86 p.setBrush( QColorGroup::Base, QColor( 167, 212, 167 ) ); 86 p.setBrush( QColorGroup::Base, QColor( 167, 212, 167 ) );
87 w->setPalette( p ); 87 w->setPalette( p );
88} 88}
89 89
90static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton)); 90static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton));
91 91
92 92
93AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : 93AudioWidget::AudioWidget(QWidget* parent, const char* name) :
94 94
95 QWidget( parent, name, f ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) { 95 MediaWidget( parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) {
96 96
97 setCaption( tr("OpiePlayer") ); 97 setCaption( tr("OpiePlayer") );
98 98
99 Config cfg("OpiePlayer"); 99 Config cfg("OpiePlayer");
100 cfg.setGroup("Options"); 100 cfg.setGroup("Options");
101 skin = cfg.readEntry("Skin","default"); 101 skin = cfg.readEntry("Skin","default");
102 //skin = "scaleTest"; 102 //skin = "scaleTest";
103 // color of background, frame, degree of transparency 103 // color of background, frame, degree of transparency
104 104
105 QString skinPath = "opieplayer2/skins/" + skin; 105 QString skinPath = "opieplayer2/skins/" + skin;
106 pixBg = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); 106 pixBg = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
107 imgUp = QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); 107 imgUp = QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) );
108 imgDn = QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) ); 108 imgDn = QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) );
109 109
110 imgButtonMask = QImage( imgUp.width(), imgUp.height(), 8, 255 ); 110 imgButtonMask = QImage( imgUp.width(), imgUp.height(), 8, 255 );
111 imgButtonMask.fill( 0 ); 111 imgButtonMask.fill( 0 );
112 112
113 for ( int i = 0; i < 10; i++ ) { 113 for ( int i = 0; i < 10; i++ ) {
114 QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skin_mask_" + skin_mask_file_names[i] + ".png" ); 114 QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skin_mask_" + skin_mask_file_names[i] + ".png" );
115 masks[i] = new QBitmap( filename ); 115 masks[i] = new QBitmap( filename );
116 116
117 if ( !masks[i]->isNull() ) { 117 if ( !masks[i]->isNull() ) {
118 QImage imgMask = masks[i]->convertToImage(); 118 QImage imgMask = masks[i]->convertToImage();
119 uchar **dest = imgButtonMask.jumpTable(); 119 uchar **dest = imgButtonMask.jumpTable();
120 for ( int y = 0; y < imgUp.height(); y++ ) { 120 for ( int y = 0; y < imgUp.height(); y++ ) {
121 uchar *line = dest[y]; 121 uchar *line = dest[y];
122 for ( int x = 0; x < imgUp.width(); x++ ) 122 for ( int x = 0; x < imgUp.width(); x++ )
123 if ( !qRed( imgMask.pixel( x, y ) ) ) 123 if ( !qRed( imgMask.pixel( x, y ) ) )
124 line[x] = i + 1; 124 line[x] = i + 1;
125 } 125 }
126 } 126 }
127 127
128 } 128 }
129 129
130 for ( int i = 0; i < 10; i++ ) { 130 for ( int i = 0; i < 10; i++ ) {
131 buttonPixUp[i] = 0l; 131 buttonPixUp[i] = 0l;
132 buttonPixDown[i] = 0l; 132 buttonPixDown[i] = 0l;
133 } 133 }
134 134
135 setBackgroundPixmap( pixBg ); 135 setBackgroundPixmap( pixBg );
136 136
137 songInfo.setFocusPolicy( QWidget::NoFocus ); 137 songInfo.setFocusPolicy( QWidget::NoFocus );
138// changeTextColor( &songInfo ); 138// changeTextColor( &songInfo );
139// songInfo.setBackgroundColor( QColor( 167, 212, 167 )); 139// songInfo.setBackgroundColor( QColor( 167, 212, 167 ));
140// songInfo.setFrameStyle( QFrame::NoFrame); 140// songInfo.setFrameStyle( QFrame::NoFrame);
141 songInfo.setFrameStyle( QFrame::WinPanel | QFrame::Sunken ); 141 songInfo.setFrameStyle( QFrame::WinPanel | QFrame::Sunken );
142// songInfo.setForegroundColor(Qt::white); 142// songInfo.setForegroundColor(Qt::white);
143 143
144 slider.setFixedHeight( 20 ); 144 slider.setFixedHeight( 20 );
145 slider.setMinValue( 0 ); 145 slider.setMinValue( 0 );
146 slider.setMaxValue( 1 ); 146 slider.setMaxValue( 1 );
147 slider.setFocusPolicy( QWidget::NoFocus ); 147 slider.setFocusPolicy( QWidget::NoFocus );
148 slider.setBackgroundPixmap( pixBg ); 148 slider.setBackgroundPixmap( pixBg );
149 149
150// Config cofg("qpe"); 150// Config cofg("qpe");
151// cofg.setGroup("Appearance"); 151// cofg.setGroup("Appearance");
152// QColor backgroundcolor = QColor( cofg.readEntry( "Background", "#E5E1D5" ) ); 152// QColor backgroundcolor = QColor( cofg.readEntry( "Background", "#E5E1D5" ) );
153 153
154 time.setFocusPolicy( QWidget::NoFocus ); 154 time.setFocusPolicy( QWidget::NoFocus );
155 time.setAlignment( Qt::AlignCenter ); 155 time.setAlignment( Qt::AlignCenter );
156 156
157// time.setFrame(FALSE); 157// time.setFrame(FALSE);
158// changeTextColor( &time ); 158// changeTextColor( &time );
159 159
160 resizeEvent( NULL ); 160 resizeEvent( NULL );
161 161
162 connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); 162 connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) );
163 connect( mediaPlayerState, SIGNAL( displayTypeChanged(MediaPlayerState::DisplayType) ), this, SLOT( setDisplayType(MediaPlayerState::DisplayType) ) );
164 connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); 163 connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) );
165 connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); 164 connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) );
166 connect( mediaPlayerState, SIGNAL( isSeekableToggled( bool ) ), this, SLOT( setSeekable( bool ) ) ); 165 connect( mediaPlayerState, SIGNAL( isSeekableToggled( bool ) ), this, SLOT( setSeekable( bool ) ) );
167 166
168 connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) ); 167 connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) );
169 connect( this, SIGNAL( backClicked() ), this, SLOT( skipBack() ) ); 168 connect( this, SIGNAL( backClicked() ), this, SLOT( skipBack() ) );
170 connect( this, SIGNAL( forwardReleased() ), this, SLOT( stopSkip() ) ); 169 connect( this, SIGNAL( forwardReleased() ), this, SLOT( stopSkip() ) );
171 connect( this, SIGNAL( backReleased() ), this, SLOT( stopSkip() ) ); 170 connect( this, SIGNAL( backReleased() ), this, SLOT( stopSkip() ) );
172 171
173 // Intialise state 172 // Intialise state
174 setLength( mediaPlayerState->length() ); 173 setLength( mediaPlayerState->length() );
175 setPosition( mediaPlayerState->position() ); 174 setPosition( mediaPlayerState->position() );
176 setLooping( mediaPlayerState->isFullscreen() ); 175 setLooping( mediaPlayerState->isFullscreen() );
177 // setPaused( mediaPlayerState->paused() ); 176 // setPaused( mediaPlayerState->paused() );
178 setPlaying( mediaPlayerState->isPlaying() ); 177 setPlaying( mediaPlayerState->isPlaying() );
179 178
180} 179}
181 180
182AudioWidget::~AudioWidget() { 181AudioWidget::~AudioWidget() {
183 182
184 for ( int i = 0; i < 10; i++ ) { 183 for ( int i = 0; i < 10; i++ ) {
185 delete buttonPixUp[i]; 184 delete buttonPixUp[i];
186 delete buttonPixDown[i]; 185 delete buttonPixDown[i];
187 } 186 }
188 for ( int i = 0; i < 10; i++ ) { 187 for ( int i = 0; i < 10; i++ ) {
189 delete masks[i]; 188 delete masks[i];
190 } 189 }
191// mediaPlayerState->setPlaying(false); 190// mediaPlayerState->setPlaying(false);
192} 191}
193 192
194namespace { 193namespace {
195 194
196QPixmap combineImageWithBackground( QImage img, QPixmap bg, QPoint offset ) { 195QPixmap combineImageWithBackground( QImage img, QPixmap bg, QPoint offset ) {
197 QPixmap pix( img.width(), img.height() ); 196 QPixmap pix( img.width(), img.height() );
198 QPainter p( &pix ); 197 QPainter p( &pix );
199 p.drawTiledPixmap( pix.rect(), bg, offset ); 198 p.drawTiledPixmap( pix.rect(), bg, offset );
200 p.drawImage( 0, 0, img ); 199 p.drawImage( 0, 0, img );
201 return pix; 200 return pix;
202} 201}
203 202
204 203
205QPixmap *maskPixToMask( QPixmap pix, QBitmap mask ) { 204QPixmap *maskPixToMask( QPixmap pix, QBitmap mask ) {
206 QPixmap *pixmap = new QPixmap( pix ); 205 QPixmap *pixmap = new QPixmap( pix );
207 pixmap->setMask( mask ); 206 pixmap->setMask( mask );
208 return pixmap; 207 return pixmap;
209} 208}
210 209
211}; 210};
212 211
213void AudioWidget::resizeEvent( QResizeEvent * ) { 212void AudioWidget::resizeEvent( QResizeEvent * ) {
214 int h = height(); 213 int h = height();
215 int w = width(); 214 int w = width();
216 215
217 songInfo.setGeometry( QRect( 2, 2, w - 4, 20 ) ); 216 songInfo.setGeometry( QRect( 2, 2, w - 4, 20 ) );
218 slider.setFixedWidth( w - 110 ); 217 slider.setFixedWidth( w - 110 );
219 slider.setGeometry( QRect( 15, h - 22, w - 90, 20 ) ); 218 slider.setGeometry( QRect( 15, h - 22, w - 90, 20 ) );
220 slider.setBackgroundOrigin( QWidget::ParentOrigin ); 219 slider.setBackgroundOrigin( QWidget::ParentOrigin );
221 time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) ); 220 time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) );
222 221
223 xoff = ( w - imgUp.width() ) / 2; 222 xoff = ( w - imgUp.width() ) / 2;
224 yoff = (( h - imgUp.height() ) / 2) - 10; 223 yoff = (( h - imgUp.height() ) / 2) - 10;
225 QPoint p( xoff, yoff ); 224 QPoint p( xoff, yoff );
226 225
227 QPixmap pixUp = combineImageWithBackground( imgUp, pixBg, p ); 226 QPixmap pixUp = combineImageWithBackground( imgUp, pixBg, p );
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h
index 91fcbc5..74c5b0e 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.h
+++ b/noncore/multimedia/opieplayer2/audiowidget.h
@@ -1,137 +1,138 @@
1/* 1/*
2                This file is part of the Opie Project 2                This file is part of the Opie Project
3 3
4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> 4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
5 Copyright (c) 2002 L. Potter <ljp@llornkcor.com> 5 Copyright (c) 2002 L. Potter <ljp@llornkcor.com>
6 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> 6 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
7 =. 7 =.
8 .=l. 8 .=l.
9           .>+-= 9           .>+-=
10 _;:,     .>    :=|. This program is free software; you can 10 _;:,     .>    :=|. This program is free software; you can
11.> <`_,   >  .   <= redistribute it and/or modify it under 11.> <`_,   >  .   <= redistribute it and/or modify it under
12:`=1 )Y*s>-.--   : the terms of the GNU General Public 12:`=1 )Y*s>-.--   : the terms of the GNU General Public
13.="- .-=="i,     .._ License as published by the Free Software 13.="- .-=="i,     .._ License as published by the Free Software
14 - .   .-<_>     .<> Foundation; either version 2 of the License, 14 - .   .-<_>     .<> Foundation; either version 2 of the License,
15     ._= =}       : or (at your option) any later version. 15     ._= =}       : or (at your option) any later version.
16    .%`+i>       _;_. 16    .%`+i>       _;_.
17    .i_,=:_.      -<s. This program is distributed in the hope that 17    .i_,=:_.      -<s. This program is distributed in the hope that
18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
19    : ..    .:,     . . . without even the implied warranty of 19    : ..    .:,     . . . without even the implied warranty of
20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; Library General Public License for more 22..}^=.=       =       ; Library General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
24 :     =  ...= . :.=- 24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with 26  -_. . .   )=.  = Library General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation, 28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330, 29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA. 30 Boston, MA 02111-1307, USA.
31 31
32*/ 32*/
33 33
34#ifndef AUDIO_WIDGET_H 34#ifndef AUDIO_WIDGET_H
35#define AUDIO_WIDGET_H 35#define AUDIO_WIDGET_H
36 36
37#include <qwidget.h>
38#include <qpainter.h> 37#include <qpainter.h>
39#include <qdrawutil.h> 38#include <qdrawutil.h>
40#include <qpixmap.h> 39#include <qpixmap.h>
41#include <qstring.h> 40#include <qstring.h>
42#include <qslider.h> 41#include <qslider.h>
43#include <qframe.h> 42#include <qframe.h>
44#include <qlineedit.h> 43#include <qlineedit.h>
45#include <qimage.h> 44#include <qimage.h>
46 45
47#include <opie/oticker.h> 46#include <opie/oticker.h>
48 47
49#include "mediaplayerstate.h" 48#include "mediawidget.h"
50 49
51class QPixmap; 50class QPixmap;
52 51
53namespace { 52namespace {
54 53
55enum AudioButtons { 54enum AudioButtons {
56 AudioPlay=0, 55 AudioPlay=0,
57 AudioStop, 56 AudioStop,
58 AudioNext, 57 AudioNext,
59 AudioPrevious, 58 AudioPrevious,
60 AudioVolumeUp, 59 AudioVolumeUp,
61 AudioVolumeDown, 60 AudioVolumeDown,
62 AudioLoop, 61 AudioLoop,
63 AudioPlayList, 62 AudioPlayList,
64 AudioForward, 63 AudioForward,
65 AudioBack 64 AudioBack
66}; 65};
67}; 66};
68 67
69class AudioWidget : public QWidget { 68class AudioWidget : public MediaWidget {
70 Q_OBJECT 69 Q_OBJECT
71public: 70public:
72 AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); 71 AudioWidget( QWidget* parent=0, const char* name=0 );
73 ~AudioWidget(); 72 ~AudioWidget();
74 void setTickerText( const QString &text ) { songInfo.setText( text ); } 73 void setTickerText( const QString &text ) { songInfo.setText( text ); }
75public slots: 74public slots:
76 void updateSlider( long, long ); 75 void updateSlider( long, long );
77 void sliderPressed( ); 76 void sliderPressed( );
78 void sliderReleased( ); 77 void sliderReleased( );
79 void setLooping( bool b) { setToggleButton( AudioLoop, b ); } 78 void setLooping( bool b) { setToggleButton( AudioLoop, b ); }
80 void setPlaying( bool b) { setToggleButton( AudioPlay, b ); } 79 void setPlaying( bool b) { setToggleButton( AudioPlay, b ); }
81 void setPosition( long ); 80 void setPosition( long );
82 void setLength( long ); 81 void setLength( long );
83 void setSeekable( bool ); 82 void setSeekable( bool );
83
84public:
84 void setDisplayType( MediaPlayerState::DisplayType displayType ); 85 void setDisplayType( MediaPlayerState::DisplayType displayType );
85 86
86signals: 87signals:
87 void moreClicked(); 88 void moreClicked();
88 void lessClicked(); 89 void lessClicked();
89 void moreReleased(); 90 void moreReleased();
90 void lessReleased(); 91 void lessReleased();
91 void forwardClicked(); 92 void forwardClicked();
92 void backClicked(); 93 void backClicked();
93 void forwardReleased(); 94 void forwardReleased();
94 void backReleased(); 95 void backReleased();
95 void sliderMoved(long); 96 void sliderMoved(long);
96 97
97protected: 98protected:
98 void doBlank(); 99 void doBlank();
99 void doUnblank(); 100 void doUnblank();
100 void paintEvent( QPaintEvent *pe ); 101 void paintEvent( QPaintEvent *pe );
101 void showEvent( QShowEvent *se ); 102 void showEvent( QShowEvent *se );
102 void resizeEvent( QResizeEvent *re ); 103 void resizeEvent( QResizeEvent *re );
103 void mouseMoveEvent( QMouseEvent *event ); 104 void mouseMoveEvent( QMouseEvent *event );
104 void mousePressEvent( QMouseEvent *event ); 105 void mousePressEvent( QMouseEvent *event );
105 void mouseReleaseEvent( QMouseEvent *event ); 106 void mouseReleaseEvent( QMouseEvent *event );
106 void timerEvent( QTimerEvent *event ); 107 void timerEvent( QTimerEvent *event );
107 void closeEvent( QCloseEvent *event ); 108 void closeEvent( QCloseEvent *event );
108 void keyReleaseEvent( QKeyEvent *e); 109 void keyReleaseEvent( QKeyEvent *e);
109private slots: 110private slots:
110 void skipFor(); 111 void skipFor();
111 void skipBack(); 112 void skipBack();
112 void stopSkip(); 113 void stopSkip();
113private: 114private:
114 void toggleButton( int ); 115 void toggleButton( int );
115 void setToggleButton( int, bool ); 116 void setToggleButton( int, bool );
116 void paintButton( QPainter *p, int i ); 117 void paintButton( QPainter *p, int i );
117 int skipDirection; 118 int skipDirection;
118 QString skin; 119 QString skin;
119 QPixmap pixBg; 120 QPixmap pixBg;
120 QImage imgUp; 121 QImage imgUp;
121 QImage imgDn; 122 QImage imgDn;
122 QImage imgButtonMask; 123 QImage imgButtonMask;
123 QBitmap *masks[10]; 124 QBitmap *masks[10];
124 QPixmap *buttonPixUp[10]; 125 QPixmap *buttonPixUp[10];
125 QPixmap *buttonPixDown[10]; 126 QPixmap *buttonPixDown[10];
126 127
127 QPixmap *pixmaps[4]; 128 QPixmap *pixmaps[4];
128 OTicker songInfo; 129 OTicker songInfo;
129 QSlider slider; 130 QSlider slider;
130 QLineEdit time; 131 QLineEdit time;
131 int xoff, yoff; 132 int xoff, yoff;
132 bool isStreaming : 1; 133 bool isStreaming : 1;
133}; 134};
134 135
135 136
136#endif // AUDIO_WIDGET_H 137#endif // AUDIO_WIDGET_H
137 138
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 9ce2b57..8a0016e 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -22,185 +22,184 @@
22..}^=.=       =       ; Library General Public License for more 22..}^=.=       =       ; Library General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
24 :     =  ...= . :.=- 24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with 26  -_. . .   )=.  = Library General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation, 28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330, 29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA. 30 Boston, MA 02111-1307, USA.
31 31
32*/ 32*/
33 33
34#include <qpe/qpeapplication.h> 34#include <qpe/qpeapplication.h>
35#include <qpe/resource.h> 35#include <qpe/resource.h>
36#include <qpe/mediaplayerplugininterface.h> 36#include <qpe/mediaplayerplugininterface.h>
37#include <qpe/config.h> 37#include <qpe/config.h>
38 38
39 39
40#include <qwidget.h> 40#include <qwidget.h>
41#include <qpainter.h> 41#include <qpainter.h>
42#include <qpixmap.h> 42#include <qpixmap.h>
43#include <qslider.h> 43#include <qslider.h>
44#include <qdrawutil.h> 44#include <qdrawutil.h>
45#include "videowidget.h" 45#include "videowidget.h"
46#include "mediaplayerstate.h" 46#include "mediaplayerstate.h"
47#include "playlistwidget.h" 47#include "playlistwidget.h"
48 48
49 49
50#ifdef Q_WS_QWS 50#ifdef Q_WS_QWS
51# define USE_DIRECT_PAINTER 51# define USE_DIRECT_PAINTER
52# include <qdirectpainter_qws.h> 52# include <qdirectpainter_qws.h>
53# include <qgfxraster_qws.h> 53# include <qgfxraster_qws.h>
54#endif 54#endif
55 55
56 56
57extern MediaPlayerState *mediaPlayerState; 57extern MediaPlayerState *mediaPlayerState;
58extern PlayListWidget *playList; 58extern PlayListWidget *playList;
59 59
60 60
61static const int xo = 2; // movable x offset 61static const int xo = 2; // movable x offset
62static const int yo = 0; // movable y offset 62static const int yo = 0; // movable y offset
63 63
64 64
65struct MediaButton { 65struct MediaButton {
66 bool isToggle, isHeld, isDown; 66 bool isToggle, isHeld, isDown;
67}; 67};
68 68
69MediaButton videoButtons[] = { 69MediaButton videoButtons[] = {
70 { FALSE, FALSE, FALSE }, // stop 70 { FALSE, FALSE, FALSE }, // stop
71 { TRUE, FALSE, FALSE }, // play 71 { TRUE, FALSE, FALSE }, // play
72 { FALSE, FALSE, FALSE }, // previous 72 { FALSE, FALSE, FALSE }, // previous
73 { FALSE, FALSE, FALSE }, // next 73 { FALSE, FALSE, FALSE }, // next
74 { FALSE, FALSE, FALSE }, // volUp 74 { FALSE, FALSE, FALSE }, // volUp
75 { FALSE, FALSE, FALSE }, // volDown 75 { FALSE, FALSE, FALSE }, // volDown
76 { TRUE, FALSE, FALSE } // fullscreen 76 { TRUE, FALSE, FALSE } // fullscreen
77}; 77};
78 78
79const char *skinV_mask_file_names[7] = { 79const char *skinV_mask_file_names[7] = {
80"stop","play","back","fwd","up","down","full" 80"stop","play","back","fwd","up","down","full"
81}; 81};
82 82
83static const int numVButtons = (sizeof(videoButtons)/sizeof(MediaButton)); 83static const int numVButtons = (sizeof(videoButtons)/sizeof(MediaButton));
84 84
85 85
86VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : 86VideoWidget::VideoWidget(QWidget* parent, const char* name) :
87QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { 87MediaWidget( parent, name ), scaledWidth( 0 ), scaledHeight( 0 ) {
88 88
89 89
90 setCaption( tr("OpiePlayer - Video") ); 90 setCaption( tr("OpiePlayer - Video") );
91 91
92 videoFrame = new XineVideoWidget ( this, "Video frame" ); 92 videoFrame = new XineVideoWidget ( this, "Video frame" );
93 93
94 connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & ))); 94 connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & )));
95 connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) ); 95 connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) );
96 96
97 Config cfg("OpiePlayer"); 97 Config cfg("OpiePlayer");
98 cfg.setGroup("Options"); 98 cfg.setGroup("Options");
99 skin = cfg.readEntry("Skin","default"); 99 skin = cfg.readEntry("Skin","default");
100 100
101 QString skinPath = "opieplayer2/skins/" + skin; 101 QString skinPath = "opieplayer2/skins/" + skin;
102 pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); 102 pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
103 imgUp = new QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) ); 103 imgUp = new QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) );
104 imgDn = new QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) ); 104 imgDn = new QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) );
105 105
106 imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 ); 106 imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 );
107 imgButtonMask->fill( 0 ); 107 imgButtonMask->fill( 0 );
108 108
109 for ( int i = 0; i < 7; i++ ) { 109 for ( int i = 0; i < 7; i++ ) {
110 QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skinV_mask_" + skinV_mask_file_names[i] + ".png" ); 110 QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skinV_mask_" + skinV_mask_file_names[i] + ".png" );
111 masks[i] = new QBitmap( filename ); 111 masks[i] = new QBitmap( filename );
112 112
113 if ( !masks[i]->isNull() ) { 113 if ( !masks[i]->isNull() ) {
114 QImage imgMask = masks[i]->convertToImage(); 114 QImage imgMask = masks[i]->convertToImage();
115 uchar **dest = imgButtonMask->jumpTable(); 115 uchar **dest = imgButtonMask->jumpTable();
116 for ( int y = 0; y < imgUp->height(); y++ ) { 116 for ( int y = 0; y < imgUp->height(); y++ ) {
117 uchar *line = dest[y]; 117 uchar *line = dest[y];
118 for ( int x = 0; x < imgUp->width(); x++ ) { 118 for ( int x = 0; x < imgUp->width(); x++ ) {
119 if ( !qRed( imgMask.pixel( x, y ) ) ) 119 if ( !qRed( imgMask.pixel( x, y ) ) )
120 line[x] = i + 1; 120 line[x] = i + 1;
121 } 121 }
122 } 122 }
123 } 123 }
124 } 124 }
125 125
126 for ( int i = 0; i < 7; i++ ) { 126 for ( int i = 0; i < 7; i++ ) {
127 buttonPixUp[i] = NULL; 127 buttonPixUp[i] = NULL;
128 buttonPixDown[i] = NULL; 128 buttonPixDown[i] = NULL;
129 } 129 }
130 130
131 setBackgroundPixmap( *pixBg ); 131 setBackgroundPixmap( *pixBg );
132 132
133 slider = new QSlider( Qt::Horizontal, this ); 133 slider = new QSlider( Qt::Horizontal, this );
134 slider->setMinValue( 0 ); 134 slider->setMinValue( 0 );
135 slider->setMaxValue( 1 ); 135 slider->setMaxValue( 1 );
136 slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) ); 136 slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) );
137 //slider->setFocusPolicy( QWidget::NoFocus ); 137 //slider->setFocusPolicy( QWidget::NoFocus );
138 138
139 resizeEvent( NULL ); 139 resizeEvent( NULL );
140 140
141 connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); 141 connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) );
142 connect( mediaPlayerState, SIGNAL( displayTypeChanged(MediaPlayerState::DisplayType) ), this, SLOT( setDisplayType(MediaPlayerState::DisplayType) ) );
143 connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); 142 connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) );
144 143
145 setLength( mediaPlayerState->length() ); 144 setLength( mediaPlayerState->length() );
146 setPosition( mediaPlayerState->position() ); 145 setPosition( mediaPlayerState->position() );
147 setFullscreen( mediaPlayerState->isFullscreen() ); 146 setFullscreen( mediaPlayerState->isFullscreen() );
148 setPlaying( mediaPlayerState->isPlaying() ); 147 setPlaying( mediaPlayerState->isPlaying() );
149} 148}
150 149
151 150
152VideoWidget::~VideoWidget() { 151VideoWidget::~VideoWidget() {
153 152
154 for ( int i = 0; i < 7; i++ ) { 153 for ( int i = 0; i < 7; i++ ) {
155 delete buttonPixUp[i]; 154 delete buttonPixUp[i];
156 delete buttonPixDown[i]; 155 delete buttonPixDown[i];
157 } 156 }
158 157
159 delete pixBg; 158 delete pixBg;
160 delete imgUp; 159 delete imgUp;
161 delete imgDn; 160 delete imgDn;
162 delete imgButtonMask; 161 delete imgButtonMask;
163 for ( int i = 0; i < 7; i++ ) { 162 for ( int i = 0; i < 7; i++ ) {
164 delete masks[i]; 163 delete masks[i];
165 } 164 }
166 165
167} 166}
168 167
169QPixmap *combineVImageWithBackground( QImage img, QPixmap bg, QPoint offset ) { 168QPixmap *combineVImageWithBackground( QImage img, QPixmap bg, QPoint offset ) {
170 QPixmap pix( img.width(), img.height() ); 169 QPixmap pix( img.width(), img.height() );
171 QPainter p( &pix ); 170 QPainter p( &pix );
172 p.drawTiledPixmap( pix.rect(), bg, offset ); 171 p.drawTiledPixmap( pix.rect(), bg, offset );
173 p.drawImage( 0, 0, img ); 172 p.drawImage( 0, 0, img );
174 return new QPixmap( pix ); 173 return new QPixmap( pix );
175} 174}
176 175
177QPixmap *maskVPixToMask( QPixmap pix, QBitmap mask ) { 176QPixmap *maskVPixToMask( QPixmap pix, QBitmap mask ) {
178 QPixmap *pixmap = new QPixmap( pix ); 177 QPixmap *pixmap = new QPixmap( pix );
179 pixmap->setMask( mask ); 178 pixmap->setMask( mask );
180 return pixmap; 179 return pixmap;
181} 180}
182 181
183void VideoWidget::resizeEvent( QResizeEvent * ) { 182void VideoWidget::resizeEvent( QResizeEvent * ) {
184 int h = height(); 183 int h = height();
185 int w = width(); 184 int w = width();
186 //int Vh = 160; 185 //int Vh = 160;
187 //int Vw = 220; 186 //int Vw = 220;
188 187
189 slider->setFixedWidth( w - 20 ); 188 slider->setFixedWidth( w - 20 );
190 slider->setGeometry( QRect( 15, h - 22, w - 90, 20 ) ); 189 slider->setGeometry( QRect( 15, h - 22, w - 90, 20 ) );
191 slider->setBackgroundOrigin( QWidget::ParentOrigin ); 190 slider->setBackgroundOrigin( QWidget::ParentOrigin );
192 slider->setFocusPolicy( QWidget::NoFocus ); 191 slider->setFocusPolicy( QWidget::NoFocus );
193 slider->setBackgroundPixmap( *pixBg ); 192 slider->setBackgroundPixmap( *pixBg );
194 193
195 xoff = 0;// ( imgUp->width() ) / 2; 194 xoff = 0;// ( imgUp->width() ) / 2;
196 if(w>h) 195 if(w>h)
197 yoff = 0; 196 yoff = 0;
198 else 197 else
199 yoff = 185;//(( Vh - imgUp->height() ) / 2) - 10; 198 yoff = 185;//(( Vh - imgUp->height() ) / 2) - 10;
200 QPoint p( xoff, yoff ); 199 QPoint p( xoff, yoff );
201 200
202 QPixmap *pixUp = combineVImageWithBackground( *imgUp, *pixBg, p ); 201 QPixmap *pixUp = combineVImageWithBackground( *imgUp, *pixBg, p );
203 QPixmap *pixDn = combineVImageWithBackground( *imgDn, *pixBg, p ); 202 QPixmap *pixDn = combineVImageWithBackground( *imgDn, *pixBg, p );
204 203
205 for ( int i = 0; i < 7; i++ ) { 204 for ( int i = 0; i < 7; i++ ) {
206 if ( !masks[i]->isNull() ) { 205 if ( !masks[i]->isNull() ) {
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h
index 89af646..8e9dd7e 100644
--- a/noncore/multimedia/opieplayer2/videowidget.h
+++ b/noncore/multimedia/opieplayer2/videowidget.h
@@ -1,123 +1,123 @@
1/* 1/*
2                This file is part of the Opie Project 2                This file is part of the Opie Project
3 3
4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> 4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
5 Copyright (c) 2002 L. Potter <ljp@llornkcor.com> 5 Copyright (c) 2002 L. Potter <ljp@llornkcor.com>
6 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> 6 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
7 =. 7 =.
8 .=l. 8 .=l.
9           .>+-= 9           .>+-=
10 _;:,     .>    :=|. This program is free software; you can 10 _;:,     .>    :=|. This program is free software; you can
11.> <`_,   >  .   <= redistribute it and/or modify it under 11.> <`_,   >  .   <= redistribute it and/or modify it under
12:`=1 )Y*s>-.--   : the terms of the GNU General Public 12:`=1 )Y*s>-.--   : the terms of the GNU General Public
13.="- .-=="i,     .._ License as published by the Free Software 13.="- .-=="i,     .._ License as published by the Free Software
14 - .   .-<_>     .<> Foundation; either version 2 of the License, 14 - .   .-<_>     .<> Foundation; either version 2 of the License,
15     ._= =}       : or (at your option) any later version. 15     ._= =}       : or (at your option) any later version.
16    .%`+i>       _;_. 16    .%`+i>       _;_.
17    .i_,=:_.      -<s. This program is distributed in the hope that 17    .i_,=:_.      -<s. This program is distributed in the hope that
18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
19    : ..    .:,     . . . without even the implied warranty of 19    : ..    .:,     . . . without even the implied warranty of
20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; Library General Public License for more 22..}^=.=       =       ; Library General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
24 :     =  ...= . :.=- 24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with 26  -_. . .   )=.  = Library General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation, 28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330, 29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA. 30 Boston, MA 02111-1307, USA.
31 31
32*/ 32*/
33 33
34#ifndef VIDEO_WIDGET_H 34#ifndef VIDEO_WIDGET_H
35#define VIDEO_WIDGET_H 35#define VIDEO_WIDGET_H
36 36
37#include <qwidget.h> 37#include <qwidget.h>
38#include "xinevideowidget.h" 38#include "xinevideowidget.h"
39 39
40#include "mediaplayerstate.h" 40#include "mediawidget.h"
41 41
42class QPixmap; 42class QPixmap;
43class QSlider; 43class QSlider;
44 44
45enum VideoButtons { 45enum VideoButtons {
46 VideoStop = 0, 46 VideoStop = 0,
47 VideoPlay, 47 VideoPlay,
48// VideoPause, 48// VideoPause,
49 VideoPrevious, 49 VideoPrevious,
50 VideoNext, 50 VideoNext,
51 VideoVolUp, 51 VideoVolUp,
52 VideoVolDown, 52 VideoVolDown,
53 VideoFullscreen 53 VideoFullscreen
54}; 54};
55 55
56class VideoWidget : public QWidget { 56class VideoWidget : public MediaWidget {
57 Q_OBJECT 57 Q_OBJECT
58public: 58public:
59 VideoWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); 59 VideoWidget( QWidget* parent=0, const char* name=0 );
60 ~VideoWidget(); 60 ~VideoWidget();
61 61
62 62
63 XineVideoWidget* vidWidget(); 63 XineVideoWidget* vidWidget();
64public slots: 64public slots:
65 void updateSlider( long, long ); 65 void updateSlider( long, long );
66 void sliderPressed( ); 66 void sliderPressed( );
67 void sliderReleased( ); 67 void sliderReleased( );
68 void setPlaying( bool b); 68 void setPlaying( bool b);
69 void setFullscreen( bool b ); 69 void setFullscreen( bool b );
70 void makeVisible(); 70 void makeVisible();
71 void backToNormal(); 71 void backToNormal();
72 void setPosition( long ); 72 void setPosition( long );
73 void setLength( long ); 73 void setLength( long );
74 void setDisplayType( MediaPlayerState::DisplayType displayType ); 74 void setDisplayType( MediaPlayerState::DisplayType displayType );
75 75
76signals: 76signals:
77 void moreClicked(); 77 void moreClicked();
78 void lessClicked(); 78 void lessClicked();
79 void moreReleased(); 79 void moreReleased();
80 void lessReleased(); 80 void lessReleased();
81 void sliderMoved( long ); 81 void sliderMoved( long );
82 void videoResized ( const QSize &s ); 82 void videoResized ( const QSize &s );
83 83
84protected: 84protected:
85 85
86 void resizeEvent( QResizeEvent * ); 86 void resizeEvent( QResizeEvent * );
87 void paintEvent( QPaintEvent *pe ); 87 void paintEvent( QPaintEvent *pe );
88 void showEvent( QShowEvent *se ); 88 void showEvent( QShowEvent *se );
89 void mouseMoveEvent( QMouseEvent *event ); 89 void mouseMoveEvent( QMouseEvent *event );
90 void mousePressEvent( QMouseEvent *event ); 90 void mousePressEvent( QMouseEvent *event );
91 void mouseReleaseEvent( QMouseEvent *event ); 91 void mouseReleaseEvent( QMouseEvent *event );
92 void closeEvent( QCloseEvent *event ); 92 void closeEvent( QCloseEvent *event );
93 void keyReleaseEvent( QKeyEvent *e); 93 void keyReleaseEvent( QKeyEvent *e);
94 94
95private: 95private:
96// Ticker songInfo; 96// Ticker songInfo;
97 QPixmap *pixBg; 97 QPixmap *pixBg;
98 QImage *imgUp; 98 QImage *imgUp;
99 QImage *imgDn; 99 QImage *imgDn;
100 QImage *imgButtonMask; 100 QImage *imgButtonMask;
101 QBitmap *masks[7]; 101 QBitmap *masks[7];
102 QPixmap *buttonPixUp[7]; 102 QPixmap *buttonPixUp[7];
103 QPixmap *buttonPixDown[7]; 103 QPixmap *buttonPixDown[7];
104 QString skin; 104 QString skin;
105// QPixmap *pixmaps[4]; 105// QPixmap *pixmaps[4];
106 int xoff, yoff; 106 int xoff, yoff;
107 107
108 108
109 void paintButton( QPainter *p, int i ); 109 void paintButton( QPainter *p, int i );
110 void toggleButton( int ); 110 void toggleButton( int );
111 void setToggleButton( int, bool ); 111 void setToggleButton( int, bool );
112 112
113 QString backgroundPix; 113 QString backgroundPix;
114 QSlider *slider; 114 QSlider *slider;
115 QPixmap *pixmaps[3]; 115 QPixmap *pixmaps[3];
116 QImage *currentFrame; 116 QImage *currentFrame;
117 int scaledWidth; 117 int scaledWidth;
118 int scaledHeight; 118 int scaledHeight;
119 XineVideoWidget* videoFrame; 119 XineVideoWidget* videoFrame;
120}; 120};
121 121
122#endif // VIDEO_WIDGET_H 122#endif // VIDEO_WIDGET_H
123 123