author | zecke <zecke> | 2004-09-23 21:38:02 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-23 21:38:02 (UTC) |
commit | 97ab73d99688443d02086b4f00d1de7c81faa3c7 (patch) (unidiff) | |
tree | 63864e847abc41442d2ed88ca27a27ad1942c15a /noncore/multimedia/opieplayer2/videowidget.cpp | |
parent | 3080b2095fd9dddc4937cbf74037ce1dbc7fa6b2 (diff) | |
download | opie-97ab73d99688443d02086b4f00d1de7c81faa3c7.zip opie-97ab73d99688443d02086b4f00d1de7c81faa3c7.tar.gz opie-97ab73d99688443d02086b4f00d1de7c81faa3c7.tar.bz2 |
-Remove bogus whitespaces
-Remove stl dependency
-Make switching from fullscreen video to audio work
-Remove debug output
Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 0625376..2b44701 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -136,24 +136,25 @@ void VideoWidget::setLength( long max ) { | |||
136 | } | 136 | } |
137 | 137 | ||
138 | void VideoWidget::setDisplayType( MediaPlayerState::DisplayType displayType ) | 138 | void VideoWidget::setDisplayType( MediaPlayerState::DisplayType displayType ) |
139 | { | 139 | { |
140 | if ( displayType == MediaPlayerState::Video ) { | 140 | if ( displayType == MediaPlayerState::Video ) { |
141 | makeVisible(); | 141 | makeVisible(); |
142 | return; | 142 | return; |
143 | } | 143 | } |
144 | 144 | ||
145 | // Effectively blank the view next time we show it so it looks nicer | 145 | // Effectively blank the view next time we show it so it looks nicer |
146 | scaledWidth = 0; | 146 | scaledWidth = 0; |
147 | scaledHeight = 0; | 147 | scaledHeight = 0; |
148 | videoFrame->hide(); | ||
148 | hide(); | 149 | hide(); |
149 | } | 150 | } |
150 | 151 | ||
151 | void VideoWidget::loadSkin() | 152 | void VideoWidget::loadSkin() |
152 | { | 153 | { |
153 | loadDefaultSkin( guiInfo() ); | 154 | loadDefaultSkin( guiInfo() ); |
154 | 155 | ||
155 | delete slider; | 156 | delete slider; |
156 | slider = new QSlider( Qt::Horizontal, this ); | 157 | slider = new QSlider( Qt::Horizontal, this ); |
157 | slider->setMinValue( 0 ); | 158 | slider->setMinValue( 0 ); |
158 | slider->setMaxValue( 1 ); | 159 | slider->setMaxValue( 1 ); |
159 | slider->setBackgroundPixmap( backgroundPixmap ); | 160 | slider->setBackgroundPixmap( backgroundPixmap ); |
@@ -185,35 +186,35 @@ void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { | |||
185 | makeVisible(); | 186 | makeVisible(); |
186 | } | 187 | } |
187 | MediaWidget::mouseReleaseEvent( event ); | 188 | MediaWidget::mouseReleaseEvent( event ); |
188 | } | 189 | } |
189 | 190 | ||
190 | void VideoWidget::backToNormal() { | 191 | void VideoWidget::backToNormal() { |
191 | mediaPlayerState.setFullscreen( FALSE ); | 192 | mediaPlayerState.setFullscreen( FALSE ); |
192 | makeVisible(); | 193 | makeVisible(); |
193 | setToggleButton( FullScreen, false ); | 194 | setToggleButton( FullScreen, false ); |
194 | } | 195 | } |
195 | 196 | ||
196 | void VideoWidget::makeVisible() { | 197 | void VideoWidget::makeVisible() { |
198 | videoFrame->show(); | ||
197 | if ( mediaPlayerState.isFullscreen() ) { | 199 | if ( mediaPlayerState.isFullscreen() ) { |
198 | showFullScreen(); | 200 | showFullScreen(); |
199 | resize( qApp->desktop()->size() ); | 201 | resize( qApp->desktop()->size() ); |
200 | videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); | 202 | videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); |
201 | 203 | ||
202 | slider->hide(); | 204 | slider->hide(); |
203 | disconnect( &mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | 205 | disconnect( &mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); |
204 | disconnect( &mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 206 | disconnect( &mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
205 | disconnect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); | 207 | disconnect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); |
206 | disconnect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); | 208 | disconnect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); |
207 | |||
208 | } else { | 209 | } else { |
209 | showNormal(); | 210 | showNormal(); |
210 | showMaximized(); | 211 | showMaximized(); |
211 | QWidget *d = QApplication::desktop(); | 212 | QWidget *d = QApplication::desktop(); |
212 | int w = d->width(); | 213 | int w = d->width(); |
213 | int h = d->height(); | 214 | int h = d->height(); |
214 | 215 | ||
215 | if(w>h) { | 216 | if(w>h) { |
216 | int newW=(w/2)-(246/2); //this will only work with 320x240 | 217 | int newW=(w/2)-(246/2); //this will only work with 320x240 |
217 | videoFrame->setGeometry( QRect( newW, 4, 240, 170 ) ); | 218 | videoFrame->setGeometry( QRect( newW, 4, 240, 170 ) ); |
218 | } else { | 219 | } else { |
219 | videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); | 220 | videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); |