summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp12
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h4
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp12
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.h2
4 files changed, 28 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 78079dd..4db444a 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -102,24 +102,34 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
102 setLength( mediaPlayerState.length() ); 102 setLength( mediaPlayerState.length() );
103 setPosition( mediaPlayerState.position() ); 103 setPosition( mediaPlayerState.position() );
104 setLooping( mediaPlayerState.isFullscreen() ); 104 setLooping( mediaPlayerState.isFullscreen() );
105 // setPaused( mediaPlayerState->paused() ); 105 // setPaused( mediaPlayerState->paused() );
106 setPlaying( mediaPlayerState.isPlaying() ); 106 setPlaying( mediaPlayerState.isPlaying() );
107} 107}
108 108
109AudioWidget::~AudioWidget() { 109AudioWidget::~AudioWidget() {
110 110
111// mediaPlayerState->setPlaying(false); 111// mediaPlayerState->setPlaying(false);
112} 112}
113 113
114const MediaWidget::SkinButtonInfo *AudioWidget::skinInfo()
115{
116 return ::skinInfo;
117}
118
119const uint AudioWidget::buttonCount()
120{
121 return ::buttonCount;
122}
123
114void AudioWidget::resizeEvent( QResizeEvent *e ) { 124void AudioWidget::resizeEvent( QResizeEvent *e ) {
115 int h = height(); 125 int h = height();
116 int w = width(); 126 int w = width();
117 127
118 songInfo.setGeometry( QRect( 2, 2, w - 4, 20 ) ); 128 songInfo.setGeometry( QRect( 2, 2, w - 4, 20 ) );
119 slider.setFixedWidth( w - 110 ); 129 slider.setFixedWidth( w - 110 );
120 slider.setGeometry( QRect( 15, h - 22, w - 90, 20 ) ); 130 slider.setGeometry( QRect( 15, h - 22, w - 90, 20 ) );
121 slider.setBackgroundOrigin( QWidget::ParentOrigin ); 131 slider.setBackgroundOrigin( QWidget::ParentOrigin );
122 time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) ); 132 time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) );
123 133
124 upperLeftOfButtonMask.rx() = ( w - buttonUpImage.width() ) / 2; 134 upperLeftOfButtonMask.rx() = ( w - buttonUpImage.width() ) / 2;
125 upperLeftOfButtonMask.ry() = (( h - buttonUpImage.height() ) / 2) - 10; 135 upperLeftOfButtonMask.ry() = (( h - buttonUpImage.height() ) / 2) - 10;
@@ -155,25 +165,25 @@ void AudioWidget::setDisplayType( MediaPlayerState::DisplayType mediaType ) {
155 if ( mediaType == MediaPlayerState::Audio ) { 165 if ( mediaType == MediaPlayerState::Audio ) {
156 // startTimer( 150 ); 166 // startTimer( 150 );
157 showMaximized(); 167 showMaximized();
158 return; 168 return;
159 } 169 }
160 170
161 killTimers(); 171 killTimers();
162 hide(); 172 hide();
163} 173}
164 174
165void AudioWidget::loadSkin() 175void AudioWidget::loadSkin()
166{ 176{
167 loadDefaultSkin( skinInfo, buttonCount ); 177 loadDefaultSkin( ::skinInfo, ::buttonCount );
168 178
169 setBackgroundPixmap( backgroundPixmap ); 179 setBackgroundPixmap( backgroundPixmap );
170 180
171 songInfo.setFocusPolicy( QWidget::NoFocus ); 181 songInfo.setFocusPolicy( QWidget::NoFocus );
172// changeTextColor( &songInfo ); 182// changeTextColor( &songInfo );
173// songInfo.setBackgroundColor( QColor( 167, 212, 167 )); 183// songInfo.setBackgroundColor( QColor( 167, 212, 167 ));
174// songInfo.setFrameStyle( QFrame::NoFrame); 184// songInfo.setFrameStyle( QFrame::NoFrame);
175 songInfo.setFrameStyle( QFrame::WinPanel | QFrame::Sunken ); 185 songInfo.setFrameStyle( QFrame::WinPanel | QFrame::Sunken );
176// songInfo.setForegroundColor(Qt::white); 186// songInfo.setForegroundColor(Qt::white);
177 187
178 slider.setFixedHeight( 20 ); 188 slider.setFixedHeight( 20 );
179 slider.setMinValue( 0 ); 189 slider.setMinValue( 0 );
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h
index 670fb45..75d4857 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.h
+++ b/noncore/multimedia/opieplayer2/audiowidget.h
@@ -46,24 +46,28 @@
46#include <opie/oticker.h> 46#include <opie/oticker.h>
47 47
48#include "mediawidget.h" 48#include "mediawidget.h"
49 49
50class QPixmap; 50class QPixmap;
51 51
52class AudioWidget : public MediaWidget { 52class AudioWidget : public MediaWidget {
53 Q_OBJECT 53 Q_OBJECT
54public: 54public:
55 AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent=0, const char* name=0 ); 55 AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent=0, const char* name=0 );
56 ~AudioWidget(); 56 ~AudioWidget();
57 void setTickerText( const QString &text ) { songInfo.setText( text ); } 57 void setTickerText( const QString &text ) { songInfo.setText( text ); }
58
59 static const MediaWidget::SkinButtonInfo *skinInfo();
60 static const uint buttonCount();
61
58public slots: 62public slots:
59 void updateSlider( long, long ); 63 void updateSlider( long, long );
60 void sliderPressed( ); 64 void sliderPressed( );
61 void sliderReleased( ); 65 void sliderReleased( );
62 void setLooping( bool b) { setToggleButton( Loop, b ); } 66 void setLooping( bool b) { setToggleButton( Loop, b ); }
63 void setPosition( long ); 67 void setPosition( long );
64 void setSeekable( bool ); 68 void setSeekable( bool );
65 69
66public: 70public:
67 virtual void setLength( long ); 71 virtual void setLength( long );
68 virtual void setPlaying( bool b) { setToggleButton( Play, b ); } 72 virtual void setPlaying( bool b) { setToggleButton( Play, b ); }
69 virtual void setDisplayType( MediaPlayerState::DisplayType displayType ); 73 virtual void setDisplayType( MediaPlayerState::DisplayType displayType );
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index a8ff540..058730f 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -90,24 +90,34 @@ VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
90 90
91 setLength( mediaPlayerState.length() ); 91 setLength( mediaPlayerState.length() );
92 setPosition( mediaPlayerState.position() ); 92 setPosition( mediaPlayerState.position() );
93 setFullscreen( mediaPlayerState.isFullscreen() ); 93 setFullscreen( mediaPlayerState.isFullscreen() );
94 setPlaying( mediaPlayerState.isPlaying() ); 94 setPlaying( mediaPlayerState.isPlaying() );
95} 95}
96 96
97 97
98VideoWidget::~VideoWidget() 98VideoWidget::~VideoWidget()
99{ 99{
100} 100}
101 101
102const MediaWidget::SkinButtonInfo *VideoWidget::skinInfo()
103{
104 return ::skinInfo;
105}
106
107const uint VideoWidget::buttonCount()
108{
109 return ::buttonCount;
110}
111
102void VideoWidget::resizeEvent( QResizeEvent *e ) { 112void VideoWidget::resizeEvent( QResizeEvent *e ) {
103 int h = height(); 113 int h = height();
104 int w = width(); 114 int w = width();
105 //int Vh = 160; 115 //int Vh = 160;
106 //int Vw = 220; 116 //int Vw = 220;
107 117
108 slider->setFixedWidth( w - 20 ); 118 slider->setFixedWidth( w - 20 );
109 slider->setGeometry( QRect( 15, h - 22, w - 90, 20 ) ); 119 slider->setGeometry( QRect( 15, h - 22, w - 90, 20 ) );
110 slider->setBackgroundOrigin( QWidget::ParentOrigin ); 120 slider->setBackgroundOrigin( QWidget::ParentOrigin );
111 slider->setFocusPolicy( QWidget::NoFocus ); 121 slider->setFocusPolicy( QWidget::NoFocus );
112 slider->setBackgroundPixmap( backgroundPixmap ); 122 slider->setBackgroundPixmap( backgroundPixmap );
113 123
@@ -148,25 +158,25 @@ void VideoWidget::setDisplayType( MediaPlayerState::DisplayType displayType )
148 makeVisible(); 158 makeVisible();
149 return; 159 return;
150 } 160 }
151 161
152 // Effectively blank the view next time we show it so it looks nicer 162 // Effectively blank the view next time we show it so it looks nicer
153 scaledWidth = 0; 163 scaledWidth = 0;
154 scaledHeight = 0; 164 scaledHeight = 0;
155 hide(); 165 hide();
156} 166}
157 167
158void VideoWidget::loadSkin() 168void VideoWidget::loadSkin()
159{ 169{
160 loadDefaultSkin( skinInfo, buttonCount, "V" ); 170 loadDefaultSkin( ::skinInfo, ::buttonCount, "V" );
161 171
162 setBackgroundPixmap( backgroundPixmap ); 172 setBackgroundPixmap( backgroundPixmap );
163 173
164 delete slider; 174 delete slider;
165 slider = new QSlider( Qt::Horizontal, this ); 175 slider = new QSlider( Qt::Horizontal, this );
166 slider->setMinValue( 0 ); 176 slider->setMinValue( 0 );
167 slider->setMaxValue( 1 ); 177 slider->setMaxValue( 1 );
168 slider->setBackgroundPixmap( backgroundPixmap ); 178 slider->setBackgroundPixmap( backgroundPixmap );
169 //slider->setFocusPolicy( QWidget::NoFocus ); 179 //slider->setFocusPolicy( QWidget::NoFocus );
170 180
171 resizeEvent( 0 ); 181 resizeEvent( 0 );
172} 182}
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h
index f434945..80e9356 100644
--- a/noncore/multimedia/opieplayer2/videowidget.h
+++ b/noncore/multimedia/opieplayer2/videowidget.h
@@ -41,24 +41,26 @@
41 41
42#include "mediawidget.h" 42#include "mediawidget.h"
43 43
44class QPixmap; 44class QPixmap;
45class QSlider; 45class QSlider;
46 46
47class VideoWidget : public MediaWidget { 47class VideoWidget : public MediaWidget {
48 Q_OBJECT 48 Q_OBJECT
49public: 49public:
50 VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent=0, const char* name=0 ); 50 VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent=0, const char* name=0 );
51 ~VideoWidget(); 51 ~VideoWidget();
52 52
53 static const MediaWidget::SkinButtonInfo *skinInfo();
54 static const uint buttonCount();
53 55
54 XineVideoWidget* vidWidget(); 56 XineVideoWidget* vidWidget();
55public slots: 57public slots:
56 void updateSlider( long, long ); 58 void updateSlider( long, long );
57 void sliderPressed( ); 59 void sliderPressed( );
58 void sliderReleased( ); 60 void sliderReleased( );
59 void setFullscreen( bool b ); 61 void setFullscreen( bool b );
60 virtual void makeVisible(); 62 virtual void makeVisible();
61 void backToNormal(); 63 void backToNormal();
62 void setPosition( long ); 64 void setPosition( long );
63 65
64public: 66public: