-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 22 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.h | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 14 |
3 files changed, 1 insertions, 39 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 4172da0..7fb3781 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp @@ -43,66 +43,44 @@ #include <qframe.h> #include <qlayout.h> #include <qdir.h> #include <stdlib.h> #include <stdio.h> #include "audiowidget.h" #include "mediaplayerstate.h" #include "playlistwidget.h" namespace { const int xo = -2; // movable x offset const int yo = 22; // movable y offset -struct MediaButton { - bool isToggle, isHeld, isDown; -}; - -//Layout information for the audioButtons (and if it is a toggle button or not) -/* -MediaWidget::Button audioButtons[] = { - { TRUE, FALSE, FALSE }, // play - { FALSE, FALSE, FALSE }, // stop - { FALSE, FALSE, FALSE }, // next - { FALSE, FALSE, FALSE }, // previous - { FALSE, FALSE, FALSE }, // volume up - { FALSE, FALSE, FALSE }, // volume down - { TRUE, FALSE, FALSE }, // repeat/loop - { FALSE, FALSE, FALSE }, // playlist - { FALSE, FALSE, FALSE }, // forward - { FALSE, FALSE, FALSE } // back -}; -*/ - const char * const skin_mask_file_names[10] = { "play", "stop", "next", "prev", "up", "down", "loop", "playlist", "forward", "back" }; void changeTextColor( QWidget * w) { QPalette p = w->palette(); p.setBrush( QColorGroup::Background, QColor( 167, 212, 167 ) ); p.setBrush( QColorGroup::Base, QColor( 167, 212, 167 ) ); w->setPalette( p ); } -//const int numButtons = (sizeof(audioButtons)/sizeof(MediaWidget::Button)); - } AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name) : MediaWidget( playList, mediaPlayerState, parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) { Button defaultButton; defaultButton.isToggle = defaultButton.isHeld = defaultButton.isDown = false; Button toggleButton; toggleButton.isToggle = true; toggleButton.isHeld = toggleButton.isDown = false; audioButtons.reserve( 10 ); audioButtons.push_back( toggleButton ); // play audioButtons.push_back( defaultButton ); // stop audioButtons.push_back( defaultButton ); // next diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h index 9cb75ae..8b0d48c 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.h +++ b/noncore/multimedia/opieplayer2/mediawidget.h @@ -22,35 +22,33 @@ #include <qwidget.h> #include "mediaplayerstate.h" #include "playlistwidget.h" #include <vector> class MediaWidget : public QWidget { Q_OBJECT public: enum Command { Play = 0, Stop, Next, Previous, VolumeUp, VolumeDown, Loop, PlayList, Forward, Back }; struct Button { - //Button() : isToggle( false ), isHeld( false ), isDown( false ) {} -// Button( bool toggle, bool held, bool down ) -// : isToggle( toggle ), isHeld( held ), isDown( down ) {} + Button() : isToggle( false ), isHeld( false ), isDown( false ) {} bool isToggle : 1; bool isHeld : 1; bool isDown : 1; }; typedef std::vector<Button> ButtonVector; MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPlayerState, QWidget *parent = 0, const char *name = 0 ); virtual ~MediaWidget(); public slots: virtual void setDisplayType( MediaPlayerState::DisplayType displayType ) = 0; virtual void setLength( long length ) = 0; virtual void setPlaying( bool playing ) = 0; signals: diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index efd756c..6e2e03e 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp @@ -46,50 +46,36 @@ #include "playlistwidget.h" #ifdef Q_WS_QWS # define USE_DIRECT_PAINTER # include <qdirectpainter_qws.h> # include <qgfxraster_qws.h> #endif namespace { const int xo = 2; // movable x offset const int yo = 0; // movable y offset -/* -MediaWidget::Button videoButtons[] = { - { FALSE, FALSE, FALSE }, // stop - { TRUE, FALSE, FALSE }, // play - { FALSE, FALSE, FALSE }, // previous - { FALSE, FALSE, FALSE }, // next - { FALSE, FALSE, FALSE }, // volUp - { FALSE, FALSE, FALSE }, // volDown - { TRUE, FALSE, FALSE } // fullscreen -}; -*/ - const char * const skinV_mask_file_names[7] = { "stop","play","back","fwd","up","down","full" }; -//const int numVButtons = (sizeof(videoButtons)/sizeof(MediaWidget::Button)); - } VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name ) : MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 ) { setCaption( tr("OpiePlayer - Video") ); Button defaultButton; defaultButton.isToggle = defaultButton.isHeld = defaultButton.isDown = false; Button toggleButton; toggleButton.isToggle = true; toggleButton.isHeld = toggleButton.isDown = false; videoButtons.reserve( 7 ); videoButtons.push_back( defaultButton ); // stop videoButtons.push_back( toggleButton ); // play |