-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 41844e1..26777e6 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -66,25 +66,25 @@ const MediaWidget::SkinButtonInfo skinInfo[] = | |||
66 | { MediaWidget::Next, "fwd", MediaWidget::NormalButton }, | 66 | { MediaWidget::Next, "fwd", MediaWidget::NormalButton }, |
67 | { MediaWidget::Previous, "back", MediaWidget::NormalButton }, | 67 | { MediaWidget::Previous, "back", MediaWidget::NormalButton }, |
68 | { MediaWidget::VolumeUp, "up", MediaWidget::NormalButton }, | 68 | { MediaWidget::VolumeUp, "up", MediaWidget::NormalButton }, |
69 | { MediaWidget::VolumeDown, "down", MediaWidget::NormalButton }, | 69 | { MediaWidget::VolumeDown, "down", MediaWidget::NormalButton }, |
70 | { MediaWidget::FullScreen, "full", MediaWidget::ToggleButton } | 70 | { MediaWidget::FullScreen, "full", MediaWidget::ToggleButton } |
71 | }; | 71 | }; |
72 | 72 | ||
73 | const uint buttonCount = sizeof( skinInfo ) / sizeof( skinInfo[ 0 ] ); | 73 | const uint buttonCount = sizeof( skinInfo ) / sizeof( skinInfo[ 0 ] ); |
74 | 74 | ||
75 | } | 75 | } |
76 | 76 | ||
77 | VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name ) | 77 | VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name ) |
78 | : MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 ) | 78 | : MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 ), videoSliderBeingMoved( false ) |
79 | { | 79 | { |
80 | setCaption( tr("OpiePlayer - Video") ); | 80 | setCaption( tr("OpiePlayer - Video") ); |
81 | 81 | ||
82 | 82 | ||
83 | videoFrame = new XineVideoWidget ( this, "Video frame" ); | 83 | videoFrame = new XineVideoWidget ( this, "Video frame" ); |
84 | 84 | ||
85 | connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & ))); | 85 | connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & ))); |
86 | connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) ); | 86 | connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) ); |
87 | 87 | ||
88 | Config cfg("OpiePlayer"); | 88 | Config cfg("OpiePlayer"); |
89 | cfg.setGroup("Options"); | 89 | cfg.setGroup("Options"); |
90 | skin = cfg.readEntry("Skin","default"); | 90 | skin = cfg.readEntry("Skin","default"); |
@@ -180,26 +180,24 @@ void VideoWidget::resizeEvent( QResizeEvent * ) { | |||
180 | Button &button = *it; | 180 | Button &button = *it; |
181 | 181 | ||
182 | if ( !button.mask.isNull() ) { | 182 | if ( !button.mask.isNull() ) { |
183 | button.pixUp = maskVPixToMask( *pixUp, button.mask ); | 183 | button.pixUp = maskVPixToMask( *pixUp, button.mask ); |
184 | button.pixDown = maskVPixToMask( *pixDn, button.mask ); | 184 | button.pixDown = maskVPixToMask( *pixDn, button.mask ); |
185 | } | 185 | } |
186 | } | 186 | } |
187 | 187 | ||
188 | delete pixUp; | 188 | delete pixUp; |
189 | delete pixDn; | 189 | delete pixDn; |
190 | } | 190 | } |
191 | 191 | ||
192 | static bool videoSliderBeingMoved = FALSE; | ||
193 | |||
194 | void VideoWidget::sliderPressed() { | 192 | void VideoWidget::sliderPressed() { |
195 | videoSliderBeingMoved = TRUE; | 193 | videoSliderBeingMoved = TRUE; |
196 | } | 194 | } |
197 | 195 | ||
198 | void VideoWidget::sliderReleased() { | 196 | void VideoWidget::sliderReleased() { |
199 | videoSliderBeingMoved = FALSE; | 197 | videoSliderBeingMoved = FALSE; |
200 | if ( slider->width() == 0 ) { | 198 | if ( slider->width() == 0 ) { |
201 | return; | 199 | return; |
202 | } | 200 | } |
203 | long val = long((double)slider->value() * mediaPlayerState.length() / slider->width()); | 201 | long val = long((double)slider->value() * mediaPlayerState.length() / slider->width()); |
204 | mediaPlayerState.setPosition( val ); | 202 | mediaPlayerState.setPosition( val ); |
205 | } | 203 | } |
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h index 7d50ea0..bed2116 100644 --- a/noncore/multimedia/opieplayer2/videowidget.h +++ b/noncore/multimedia/opieplayer2/videowidget.h | |||
@@ -85,18 +85,20 @@ private: | |||
85 | QImage imgUp; | 85 | QImage imgUp; |
86 | QImage imgDn; | 86 | QImage imgDn; |
87 | QString skin; | 87 | QString skin; |
88 | 88 | ||
89 | 89 | ||
90 | 90 | ||
91 | QString backgroundPix; | 91 | QString backgroundPix; |
92 | QSlider *slider; | 92 | QSlider *slider; |
93 | QImage *currentFrame; | 93 | QImage *currentFrame; |
94 | int scaledWidth; | 94 | int scaledWidth; |
95 | int scaledHeight; | 95 | int scaledHeight; |
96 | XineVideoWidget* videoFrame; | 96 | XineVideoWidget* videoFrame; |
97 | |||
98 | bool videoSliderBeingMoved; | ||
97 | }; | 99 | }; |
98 | 100 | ||
99 | #endif // VIDEO_WIDGET_H | 101 | #endif // VIDEO_WIDGET_H |
100 | 102 | ||
101 | 103 | ||
102 | 104 | ||