author | simon <simon> | 2002-12-02 19:46:48 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-02 19:46:48 (UTC) |
commit | e77f4914311d8a623c084d01a287798440abf01f (patch) (unidiff) | |
tree | 673375b737c4b1435929cdc804641b08d20e62c8 | |
parent | 1706751f05c1d4312beb1ca939a156b090c7b5f6 (diff) | |
download | opie-e77f4914311d8a623c084d01a287798440abf01f.zip opie-e77f4914311d8a623c084d01a287798440abf01f.tar.gz opie-e77f4914311d8a623c084d01a287798440abf01f.tar.bz2 |
- inherit from MediaWidget
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 5 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.h | 9 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 5 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.h | 6 |
4 files changed, 12 insertions, 13 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 1600320..0b7d470 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -90,9 +90,9 @@ static void changeTextColor( QWidget *w ) { | |||
90 | static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton)); | 90 | static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton)); |
91 | 91 | ||
92 | 92 | ||
93 | AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | 93 | AudioWidget::AudioWidget(QWidget* parent, const char* name) : |
94 | 94 | ||
95 | QWidget( parent, name, f ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) { | 95 | MediaWidget( parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) { |
96 | 96 | ||
97 | setCaption( tr("OpiePlayer") ); | 97 | setCaption( tr("OpiePlayer") ); |
98 | 98 | ||
@@ -160,7 +160,6 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : | |||
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( displayTypeChanged(MediaPlayerState::DisplayType) ), this, SLOT( setDisplayType(MediaPlayerState::DisplayType) ) ); | ||
164 | connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); | 163 | connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), this, SLOT( setLooping(bool) ) ); |
165 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); | 164 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); |
166 | connect( mediaPlayerState, SIGNAL( isSeekableToggled( bool ) ), this, SLOT( setSeekable( bool ) ) ); | 165 | connect( mediaPlayerState, SIGNAL( isSeekableToggled( bool ) ), this, SLOT( setSeekable( bool ) ) ); |
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h index 91fcbc5..74c5b0e 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.h +++ b/noncore/multimedia/opieplayer2/audiowidget.h | |||
@@ -34,7 +34,6 @@ | |||
34 | #ifndef AUDIO_WIDGET_H | 34 | #ifndef AUDIO_WIDGET_H |
35 | #define AUDIO_WIDGET_H | 35 | #define AUDIO_WIDGET_H |
36 | 36 | ||
37 | #include <qwidget.h> | ||
38 | #include <qpainter.h> | 37 | #include <qpainter.h> |
39 | #include <qdrawutil.h> | 38 | #include <qdrawutil.h> |
40 | #include <qpixmap.h> | 39 | #include <qpixmap.h> |
@@ -46,7 +45,7 @@ | |||
46 | 45 | ||
47 | #include <opie/oticker.h> | 46 | #include <opie/oticker.h> |
48 | 47 | ||
49 | #include "mediaplayerstate.h" | 48 | #include "mediawidget.h" |
50 | 49 | ||
51 | class QPixmap; | 50 | class QPixmap; |
52 | 51 | ||
@@ -66,10 +65,10 @@ enum AudioButtons { | |||
66 | }; | 65 | }; |
67 | }; | 66 | }; |
68 | 67 | ||
69 | class AudioWidget : public QWidget { | 68 | class AudioWidget : public MediaWidget { |
70 | Q_OBJECT | 69 | Q_OBJECT |
71 | public: | 70 | public: |
72 | AudioWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); | 71 | AudioWidget( QWidget* parent=0, const char* name=0 ); |
73 | ~AudioWidget(); | 72 | ~AudioWidget(); |
74 | void setTickerText( const QString &text ) { songInfo.setText( text ); } | 73 | void setTickerText( const QString &text ) { songInfo.setText( text ); } |
75 | public slots: | 74 | public slots: |
@@ -81,6 +80,8 @@ public slots: | |||
81 | void setPosition( long ); | 80 | void setPosition( long ); |
82 | void setLength( long ); | 81 | void setLength( long ); |
83 | void setSeekable( bool ); | 82 | void setSeekable( bool ); |
83 | |||
84 | public: | ||
84 | void setDisplayType( MediaPlayerState::DisplayType displayType ); | 85 | void setDisplayType( MediaPlayerState::DisplayType displayType ); |
85 | 86 | ||
86 | signals: | 87 | signals: |
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 9ce2b57..8a0016e 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -83,8 +83,8 @@ const char *skinV_mask_file_names[7] = { | |||
83 | static const int numVButtons = (sizeof(videoButtons)/sizeof(MediaButton)); | 83 | static const int numVButtons = (sizeof(videoButtons)/sizeof(MediaButton)); |
84 | 84 | ||
85 | 85 | ||
86 | VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : | 86 | VideoWidget::VideoWidget(QWidget* parent, const char* name) : |
87 | QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { | 87 | MediaWidget( parent, name ), scaledWidth( 0 ), scaledHeight( 0 ) { |
88 | 88 | ||
89 | 89 | ||
90 | setCaption( tr("OpiePlayer - Video") ); | 90 | setCaption( tr("OpiePlayer - Video") ); |
@@ -139,7 +139,6 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { | |||
139 | resizeEvent( NULL ); | 139 | resizeEvent( NULL ); |
140 | 140 | ||
141 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); | 141 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); |
142 | connect( mediaPlayerState, SIGNAL( displayTypeChanged(MediaPlayerState::DisplayType) ), this, SLOT( setDisplayType(MediaPlayerState::DisplayType) ) ); | ||
143 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); | 142 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); |
144 | 143 | ||
145 | setLength( mediaPlayerState->length() ); | 144 | setLength( mediaPlayerState->length() ); |
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h index 89af646..8e9dd7e 100644 --- a/noncore/multimedia/opieplayer2/videowidget.h +++ b/noncore/multimedia/opieplayer2/videowidget.h | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <qwidget.h> | 37 | #include <qwidget.h> |
38 | #include "xinevideowidget.h" | 38 | #include "xinevideowidget.h" |
39 | 39 | ||
40 | #include "mediaplayerstate.h" | 40 | #include "mediawidget.h" |
41 | 41 | ||
42 | class QPixmap; | 42 | class QPixmap; |
43 | class QSlider; | 43 | class QSlider; |
@@ -53,10 +53,10 @@ enum VideoButtons { | |||
53 | VideoFullscreen | 53 | VideoFullscreen |
54 | }; | 54 | }; |
55 | 55 | ||
56 | class VideoWidget : public QWidget { | 56 | class VideoWidget : public MediaWidget { |
57 | Q_OBJECT | 57 | Q_OBJECT |
58 | public: | 58 | public: |
59 | VideoWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); | 59 | VideoWidget( QWidget* parent=0, const char* name=0 ); |
60 | ~VideoWidget(); | 60 | ~VideoWidget(); |
61 | 61 | ||
62 | 62 | ||