summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/videowidget.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 9782b68..f59772e 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -65,31 +65,31 @@ const char * const skinV_mask_file_names[7] = {
65 65
66} 66}
67 67
68VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name ) 68VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name )
69 : MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 ) 69 : MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 )
70{ 70{
71 setCaption( tr("OpiePlayer - Video") ); 71 setCaption( tr("OpiePlayer - Video") );
72 72
73 Button defaultButton; 73 Button defaultButton;
74 Button toggleButton = defaultButton; 74 Button toggleButton = defaultButton;
75 toggleButton.type = ToggleButton; 75 toggleButton.type = ToggleButton;
76 76
77 buttons.insert( 0, toggleButton ); // play 77 buttons.push_back( toggleButton ); // play
78 buttons.insert( 1, toggleButton ); // stop 78 buttons.push_back( toggleButton ); // stop
79 buttons.insert( 2, toggleButton ); // next 79 buttons.push_back( toggleButton ); // next
80 buttons.insert( 3, toggleButton ); // previous 80 buttons.push_back( toggleButton ); // previous
81 buttons.insert( 4, toggleButton ); // volUp 81 buttons.push_back( toggleButton ); // volUp
82 buttons.insert( 5, toggleButton ); // volDown 82 buttons.push_back( toggleButton ); // volDown
83 buttons.insert( 6, toggleButton ); // fullscreen 83 buttons.push_back( toggleButton ); // fullscreen
84 84
85 videoFrame = new XineVideoWidget ( this, "Video frame" ); 85 videoFrame = new XineVideoWidget ( this, "Video frame" );
86 86
87 connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & ))); 87 connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & )));
88 connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) ); 88 connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) );
89 89
90 Config cfg("OpiePlayer"); 90 Config cfg("OpiePlayer");
91 cfg.setGroup("Options"); 91 cfg.setGroup("Options");
92 skin = cfg.readEntry("Skin","default"); 92 skin = cfg.readEntry("Skin","default");
93 93
94 QString skinPath = "opieplayer2/skins/" + skin; 94 QString skinPath = "opieplayer2/skins/" + skin;
95 backgroundPixmap = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); 95 backgroundPixmap = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
@@ -234,25 +234,25 @@ void VideoWidget::updateSlider( long i, long max ) {
234 int val = int((double)i * width / max); 234 int val = int((double)i * width / max);
235 if ( !mediaPlayerState.isFullscreen() && !videoSliderBeingMoved ) { 235 if ( !mediaPlayerState.isFullscreen() && !videoSliderBeingMoved ) {
236 if ( slider->value() != val ) { 236 if ( slider->value() != val ) {
237 slider->setValue( val ); 237 slider->setValue( val );
238 } 238 }
239 if ( slider->maxValue() != width ) { 239 if ( slider->maxValue() != width ) {
240 slider->setMaxValue( width ); 240 slider->setMaxValue( width );
241 } 241 }
242 } 242 }
243} 243}
244 244
245void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { 245void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
246 for ( unsigned int i = 0; i < buttons.count(); i++ ) { 246 for ( unsigned int i = 0; i < buttons.size(); i++ ) {
247 247
248 Button &button = buttons[ i ]; 248 Button &button = buttons[ i ];
249 249
250 if ( event->state() == QMouseEvent::LeftButton ) { 250 if ( event->state() == QMouseEvent::LeftButton ) {
251 // The test to see if the mouse click is inside the button or not 251 // The test to see if the mouse click is inside the button or not
252 bool isOnButton = isOverButton( event->pos() - upperLeftOfButtonMask, i ); 252 bool isOnButton = isOverButton( event->pos() - upperLeftOfButtonMask, i );
253 253
254 if ( isOnButton && !button.isHeld ) { 254 if ( isOnButton && !button.isHeld ) {
255 button.isHeld = TRUE; 255 button.isHeld = TRUE;
256 toggleButton( button ); 256 toggleButton( button );
257 257
258 switch (i) { 258 switch (i) {