summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-09 16:39:32 (UTC)
committer simon <simon>2002-12-09 16:39:32 (UTC)
commit1bb6aa52f2db85f65f75278310c328218caeae65 (patch) (side-by-side diff)
tree1983547bac0da80bde93554038a57713feb715c1
parent1ae041fba55e218a2523de441bec6ec3a1eecf02 (diff)
downloadopie-1bb6aa52f2db85f65f75278310c328218caeae65.zip
opie-1bb6aa52f2db85f65f75278310c328218caeae65.tar.gz
opie-1bb6aa52f2db85f65f75278310c328218caeae65.tar.bz2
- removing duplicated code in VideoWidget
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.cpp5
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h2
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp25
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.h4
4 files changed, 9 insertions, 27 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp
index c0ebd63..7eb75e6 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.cpp
+++ b/noncore/multimedia/opieplayer2/mediawidget.cpp
@@ -71,2 +71,6 @@ void MediaWidget::paintEvent( QPaintEvent *pe )
+void MediaWidget::makeVisible()
+{
+}
+
void MediaWidget::handleCommand( Command command, bool buttonDown )
@@ -84,2 +88,3 @@ void MediaWidget::handleCommand( Command command, bool buttonDown )
case Back: emit backReleased(); return;
+ case FullScreen: mediaPlayerState.setFullscreen( true ); makeVisible(); return;
default: assert( false );
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index caae0a7..3f4c45d 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -85,2 +85,4 @@ protected:
+ virtual void makeVisible();
+
void handleCommand( Command command, bool buttonDown );
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 12316f8..cc586cc 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -279,26 +279,3 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
- switch( command ) {
-
- case Play: {
- if( mediaPlayerState.isPaused() ) {
- setToggleButton( button, FALSE );
- mediaPlayerState.setPaused( FALSE );
- return;
- } else if( !mediaPlayerState.isPaused() ) {
- setToggleButton( button, TRUE );
- mediaPlayerState.setPaused( TRUE );
- return;
- } else {
- return;
- }
- }
-
- case Stop: mediaPlayerState.setPlaying( FALSE ); return;
- case Next: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setNext(); return;
- case Previous: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setPrev(); return;
- case VolumeUp: emit moreReleased(); return;
- case VolumeDown: emit lessReleased(); return;
- case FullScreen: mediaPlayerState.setFullscreen( TRUE ); makeVisible(); return;
- default: break;
- }
+ handleCommand( command, button.isDown );
}
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h
index c3bc131..ef88186 100644
--- a/noncore/multimedia/opieplayer2/videowidget.h
+++ b/noncore/multimedia/opieplayer2/videowidget.h
@@ -59,3 +59,3 @@ public slots:
void setFullscreen( bool b );
- void makeVisible();
+ virtual void makeVisible();
void backToNormal();
@@ -71,4 +71,2 @@ signals:
void lessClicked();
- void moreReleased();
- void lessReleased();
void sliderMoved( long );