-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 15 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.h | 4 |
2 files changed, 10 insertions, 9 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 46d374d..74bc390 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -155,17 +155,17 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
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( viewChanged(char) ), this, SLOT( setView(char) ) ); | 163 | connect( mediaPlayerState, SIGNAL( mediaTypeChanged(MediaPlayerState::MediaType) ), this, SLOT( setMediaType(MediaPlayerState::MediaType) ) ); |
164 | connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); | 164 | connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); |
165 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); | 165 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); |
166 | connect( mediaPlayerState, SIGNAL( isSeekableToggled( bool ) ), this, SLOT( setSeekable( bool ) ) ); | 166 | connect( mediaPlayerState, SIGNAL( isSeekableToggled( bool ) ), this, SLOT( setSeekable( bool ) ) ); |
167 | 167 | ||
168 | connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) ); | 168 | connect( this, SIGNAL( forwardClicked() ), this, SLOT( skipFor() ) ); |
169 | connect( this, SIGNAL( backClicked() ), this, SLOT( skipBack() ) ); | 169 | connect( this, SIGNAL( backClicked() ), this, SLOT( skipBack() ) ); |
170 | connect( this, SIGNAL( forwardReleased() ), this, SLOT( stopSkip() ) ); | 170 | connect( this, SIGNAL( forwardReleased() ), this, SLOT( stopSkip() ) ); |
171 | connect( this, SIGNAL( backReleased() ), this, SLOT( stopSkip() ) ); | 171 | connect( this, SIGNAL( backReleased() ), this, SLOT( stopSkip() ) ); |
@@ -259,26 +259,25 @@ void AudioWidget::setPosition( long i ) { | |||
259 | } | 259 | } |
260 | 260 | ||
261 | 261 | ||
262 | void AudioWidget::setLength( long max ) { | 262 | void AudioWidget::setLength( long max ) { |
263 | updateSlider( mediaPlayerState->position(), max ); | 263 | updateSlider( mediaPlayerState->position(), max ); |
264 | } | 264 | } |
265 | 265 | ||
266 | 266 | ||
267 | void AudioWidget::setView( char view ) { | 267 | void AudioWidget::setMediaType( MediaPlayerState::MediaType mediaType ) { |
268 | 268 | if ( mediaType == MediaPlayerState::Video ) { | |
269 | if ( view == 'a' ) { | ||
270 | // startTimer( 150 ); | ||
271 | showMaximized(); | ||
272 | } else { | ||
273 | killTimers(); | 269 | killTimers(); |
274 | hide(); | 270 | hide(); |
271 | return; | ||
275 | } | 272 | } |
276 | // qApp->processEvents(); | 273 | |
274 | // startTimer( 150 ); | ||
275 | showMaximized(); | ||
277 | } | 276 | } |
278 | 277 | ||
279 | 278 | ||
280 | void AudioWidget::setSeekable( bool isSeekable ) { | 279 | void AudioWidget::setSeekable( bool isSeekable ) { |
281 | 280 | ||
282 | if ( !isSeekable ) { | 281 | if ( !isSeekable ) { |
283 | qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>"); | 282 | qDebug("<<<<<<<<<<<<<<file is STREAMING>>>>>>>>>>>>>>>>>>>"); |
284 | if( !slider.isHidden()) { | 283 | if( !slider.isHidden()) { |
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h index 54adb36..3f0c059 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.h +++ b/noncore/multimedia/opieplayer2/audiowidget.h | |||
@@ -41,16 +41,18 @@ | |||
41 | #include <qstring.h> | 41 | #include <qstring.h> |
42 | #include <qslider.h> | 42 | #include <qslider.h> |
43 | #include <qframe.h> | 43 | #include <qframe.h> |
44 | #include <qlineedit.h> | 44 | #include <qlineedit.h> |
45 | #include <qimage.h> | 45 | #include <qimage.h> |
46 | 46 | ||
47 | #include <opie/oticker.h> | 47 | #include <opie/oticker.h> |
48 | 48 | ||
49 | #include "mediaplayerstate.h" | ||
50 | |||
49 | class QPixmap; | 51 | class QPixmap; |
50 | 52 | ||
51 | namespace { | 53 | namespace { |
52 | 54 | ||
53 | enum AudioButtons { | 55 | enum AudioButtons { |
54 | AudioPlay=0, | 56 | AudioPlay=0, |
55 | AudioStop, | 57 | AudioStop, |
56 | AudioNext, | 58 | AudioNext, |
@@ -74,17 +76,17 @@ public slots: | |||
74 | void updateSlider( long, long ); | 76 | void updateSlider( long, long ); |
75 | void sliderPressed( ); | 77 | void sliderPressed( ); |
76 | void sliderReleased( ); | 78 | void sliderReleased( ); |
77 | void setLooping( bool b) { setToggleButton( AudioLoop, b ); } | 79 | void setLooping( bool b) { setToggleButton( AudioLoop, b ); } |
78 | void setPlaying( bool b) { setToggleButton( AudioPlay, b ); } | 80 | void setPlaying( bool b) { setToggleButton( AudioPlay, b ); } |
79 | void setPosition( long ); | 81 | void setPosition( long ); |
80 | void setLength( long ); | 82 | void setLength( long ); |
81 | void setSeekable( bool ); | 83 | void setSeekable( bool ); |
82 | void setView( char ); | 84 | void setMediaType( MediaPlayerState::MediaType mediaType ); |
83 | 85 | ||
84 | signals: | 86 | signals: |
85 | void moreClicked(); | 87 | void moreClicked(); |
86 | void lessClicked(); | 88 | void lessClicked(); |
87 | void moreReleased(); | 89 | void moreReleased(); |
88 | void lessReleased(); | 90 | void lessReleased(); |
89 | void forwardClicked(); | 91 | void forwardClicked(); |
90 | void backClicked(); | 92 | void backClicked(); |