author | harlekin <harlekin> | 2002-08-15 16:46:01 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-08-15 16:46:01 (UTC) |
commit | fc0f625393128d47ef4e2baef4dfcdbe48a18ca7 (patch) (unidiff) | |
tree | 7a73760c9c854819b151834343622a3f88f79e89 | |
parent | 09b410db4f8f0104ada5f76d611b39e49e327670 (diff) | |
download | opie-fc0f625393128d47ef4e2baef4dfcdbe48a18ca7.zip opie-fc0f625393128d47ef4e2baef4dfcdbe48a18ca7.tar.gz opie-fc0f625393128d47ef4e2baef4dfcdbe48a18ca7.tar.bz2 |
update
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 2 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.h | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 5a23d84..8fe572f 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -110,65 +110,65 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { | |||
110 | for ( int x = 0; x < imgUp->width(); x++ ) { | 110 | for ( int x = 0; x < imgUp->width(); x++ ) { |
111 | if ( !qRed( imgMask.pixel( x, y ) ) ) | 111 | if ( !qRed( imgMask.pixel( x, y ) ) ) |
112 | line[x] = i + 1; | 112 | line[x] = i + 1; |
113 | } | 113 | } |
114 | } | 114 | } |
115 | } | 115 | } |
116 | } | 116 | } |
117 | 117 | ||
118 | for ( int i = 0; i < 7; i++ ) { | 118 | for ( int i = 0; i < 7; i++ ) { |
119 | buttonPixUp[i] = NULL; | 119 | buttonPixUp[i] = NULL; |
120 | buttonPixDown[i] = NULL; | 120 | buttonPixDown[i] = NULL; |
121 | } | 121 | } |
122 | 122 | ||
123 | setBackgroundPixmap( *pixBg ); | 123 | setBackgroundPixmap( *pixBg ); |
124 | 124 | ||
125 | slider = new QSlider( Qt::Horizontal, this ); | 125 | slider = new QSlider( Qt::Horizontal, this ); |
126 | slider->setMinValue( 0 ); | 126 | slider->setMinValue( 0 ); |
127 | slider->setMaxValue( 1 ); | 127 | slider->setMaxValue( 1 ); |
128 | slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) ); | 128 | slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) ); |
129 | slider->setFocusPolicy( QWidget::NoFocus ); | 129 | slider->setFocusPolicy( QWidget::NoFocus ); |
130 | 130 | ||
131 | resizeEvent( NULL ); | 131 | resizeEvent( NULL ); |
132 | 132 | ||
133 | connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); | 133 | connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); |
134 | connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); | 134 | connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); |
135 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); | 135 | connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); |
136 | connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); | 136 | connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); |
137 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); | 137 | connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); |
138 | 138 | ||
139 | setLength( mediaPlayerState->length() ); | 139 | setLength( mediaPlayerState->length() ); |
140 | setPosition( mediaPlayerState->position() ); | 140 | setPosition( mediaPlayerState->position() ); |
141 | setFullscreen( mediaPlayerState->fullscreen() ); | 141 | setFullscreen( mediaPlayerState->fullscreen() ); |
142 | setPaused( mediaPlayerState->paused() ); | 142 | // setPaused( mediaPlayerState->paused() ); |
143 | setPlaying( mediaPlayerState->playing() ); | 143 | setPlaying( mediaPlayerState->playing() ); |
144 | } | 144 | } |
145 | 145 | ||
146 | 146 | ||
147 | VideoWidget::~VideoWidget() { | 147 | VideoWidget::~VideoWidget() { |
148 | 148 | ||
149 | for ( int i = 0; i < 7; i++ ) { | 149 | for ( int i = 0; i < 7; i++ ) { |
150 | delete buttonPixUp[i]; | 150 | delete buttonPixUp[i]; |
151 | delete buttonPixDown[i]; | 151 | delete buttonPixDown[i]; |
152 | } | 152 | } |
153 | 153 | ||
154 | delete pixBg; | 154 | delete pixBg; |
155 | delete imgUp; | 155 | delete imgUp; |
156 | delete imgDn; | 156 | delete imgDn; |
157 | delete imgButtonMask; | 157 | delete imgButtonMask; |
158 | for ( int i = 0; i < 7; i++ ) { | 158 | for ( int i = 0; i < 7; i++ ) { |
159 | delete masks[i]; | 159 | delete masks[i]; |
160 | } | 160 | } |
161 | 161 | ||
162 | } | 162 | } |
163 | 163 | ||
164 | QPixmap *combineVImageWithBackground( QImage img, QPixmap bg, QPoint offset ) { | 164 | QPixmap *combineVImageWithBackground( QImage img, QPixmap bg, QPoint offset ) { |
165 | QPixmap pix( img.width(), img.height() ); | 165 | QPixmap pix( img.width(), img.height() ); |
166 | QPainter p( &pix ); | 166 | QPainter p( &pix ); |
167 | p.drawTiledPixmap( pix.rect(), bg, offset ); | 167 | p.drawTiledPixmap( pix.rect(), bg, offset ); |
168 | p.drawImage( 0, 0, img ); | 168 | p.drawImage( 0, 0, img ); |
169 | return new QPixmap( pix ); | 169 | return new QPixmap( pix ); |
170 | } | 170 | } |
171 | 171 | ||
172 | QPixmap *maskVPixToMask( QPixmap pix, QBitmap mask ) { | 172 | QPixmap *maskVPixToMask( QPixmap pix, QBitmap mask ) { |
173 | QPixmap *pixmap = new QPixmap( pix ); | 173 | QPixmap *pixmap = new QPixmap( pix ); |
174 | pixmap->setMask( mask ); | 174 | pixmap->setMask( mask ); |
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h index 710ba9e..b35558b 100644 --- a/noncore/multimedia/opieplayer2/videowidget.h +++ b/noncore/multimedia/opieplayer2/videowidget.h | |||
@@ -34,65 +34,64 @@ | |||
34 | #ifndef VIDEO_WIDGET_H | 34 | #ifndef VIDEO_WIDGET_H |
35 | #define VIDEO_WIDGET_H | 35 | #define VIDEO_WIDGET_H |
36 | 36 | ||
37 | #include <qwidget.h> | 37 | #include <qwidget.h> |
38 | #include "xinevideowidget.h" | 38 | #include "xinevideowidget.h" |
39 | 39 | ||
40 | class QPixmap; | 40 | class QPixmap; |
41 | class QSlider; | 41 | class QSlider; |
42 | 42 | ||
43 | enum VideoButtons { | 43 | enum VideoButtons { |
44 | VideoStop = 0, | 44 | VideoStop = 0, |
45 | VideoPlay, | 45 | VideoPlay, |
46 | // VideoPause, | 46 | // VideoPause, |
47 | VideoPrevious, | 47 | VideoPrevious, |
48 | VideoNext, | 48 | VideoNext, |
49 | VideoVolUp, | 49 | VideoVolUp, |
50 | VideoVolDown, | 50 | VideoVolDown, |
51 | VideoFullscreen | 51 | VideoFullscreen |
52 | }; | 52 | }; |
53 | 53 | ||
54 | class VideoWidget : public QWidget { | 54 | class VideoWidget : public QWidget { |
55 | Q_OBJECT | 55 | Q_OBJECT |
56 | public: | 56 | public: |
57 | VideoWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); | 57 | VideoWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ); |
58 | ~VideoWidget(); | 58 | ~VideoWidget(); |
59 | 59 | ||
60 | 60 | ||
61 | XineVideoWidget* vidWidget(); | 61 | XineVideoWidget* vidWidget(); |
62 | public slots: | 62 | public slots: |
63 | void updateSlider( long, long ); | 63 | void updateSlider( long, long ); |
64 | void sliderPressed( ); | 64 | void sliderPressed( ); |
65 | void sliderReleased( ); | 65 | void sliderReleased( ); |
66 | void setPaused( bool b); | ||
67 | void setPlaying( bool b); | 66 | void setPlaying( bool b); |
68 | void setFullscreen( bool b ); | 67 | void setFullscreen( bool b ); |
69 | void makeVisible(); | 68 | void makeVisible(); |
70 | void setPosition( long ); | 69 | void setPosition( long ); |
71 | void setLength( long ); | 70 | void setLength( long ); |
72 | void setView( char ); | 71 | void setView( char ); |
73 | 72 | ||
74 | signals: | 73 | signals: |
75 | void moreClicked(); | 74 | void moreClicked(); |
76 | void lessClicked(); | 75 | void lessClicked(); |
77 | void moreReleased(); | 76 | void moreReleased(); |
78 | void lessReleased(); | 77 | void lessReleased(); |
79 | void sliderMoved( long ); | 78 | void sliderMoved( long ); |
80 | void videoResized ( const QSize &s ); | 79 | void videoResized ( const QSize &s ); |
81 | 80 | ||
82 | protected: | 81 | protected: |
83 | 82 | ||
84 | void resizeEvent( QResizeEvent * ); | 83 | void resizeEvent( QResizeEvent * ); |
85 | void paintEvent( QPaintEvent *pe ); | 84 | void paintEvent( QPaintEvent *pe ); |
86 | void showEvent( QShowEvent *se ); | 85 | void showEvent( QShowEvent *se ); |
87 | void mouseMoveEvent( QMouseEvent *event ); | 86 | void mouseMoveEvent( QMouseEvent *event ); |
88 | void mousePressEvent( QMouseEvent *event ); | 87 | void mousePressEvent( QMouseEvent *event ); |
89 | void mouseReleaseEvent( QMouseEvent *event ); | 88 | void mouseReleaseEvent( QMouseEvent *event ); |
90 | void closeEvent( QCloseEvent *event ); | 89 | void closeEvent( QCloseEvent *event ); |
91 | void keyReleaseEvent( QKeyEvent *e); | 90 | void keyReleaseEvent( QKeyEvent *e); |
92 | 91 | ||
93 | private: | 92 | private: |
94 | // Ticker songInfo; | 93 | // Ticker songInfo; |
95 | QPixmap *pixBg; | 94 | QPixmap *pixBg; |
96 | QImage *imgUp; | 95 | QImage *imgUp; |
97 | QImage *imgDn; | 96 | QImage *imgDn; |
98 | QImage *imgButtonMask; | 97 | QImage *imgButtonMask; |