Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 23acfa3..380c703 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp | |||
@@ -51,49 +51,49 @@ | |||
51 | # include <qdirectpainter_qws.h> | 51 | # include <qdirectpainter_qws.h> |
52 | # include <qgfxraster_qws.h> | 52 | # include <qgfxraster_qws.h> |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | 55 | ||
56 | namespace | 56 | namespace |
57 | { | 57 | { |
58 | 58 | ||
59 | const int xo = 2; // movable x offset | 59 | const int xo = 2; // movable x offset |
60 | const int yo = 0; // movable y offset | 60 | const int yo = 0; // movable y offset |
61 | 61 | ||
62 | const char * const skinV_mask_file_names[7] = { | 62 | const char * const skinV_mask_file_names[7] = { |
63 | "play","stop","fwd","back","up","down","full" | 63 | "play","stop","fwd","back","up","down","full" |
64 | }; | 64 | }; |
65 | 65 | ||
66 | } | 66 | } |
67 | 67 | ||
68 | VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name ) | 68 | VideoWidget::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.buttonType = ToggleButton; | 75 | toggleButton.type = ToggleButton; |
76 | 76 | ||
77 | buttons.reserve( 7 ); | 77 | buttons.reserve( 7 ); |
78 | buttons.push_back( toggleButton ); // play | 78 | buttons.push_back( toggleButton ); // play |
79 | buttons.push_back( defaultButton ); // stop | 79 | buttons.push_back( defaultButton ); // stop |
80 | buttons.push_back( defaultButton ); // next | 80 | buttons.push_back( defaultButton ); // next |
81 | buttons.push_back( defaultButton ); // previous | 81 | buttons.push_back( defaultButton ); // previous |
82 | buttons.push_back( defaultButton ); // volUp | 82 | buttons.push_back( defaultButton ); // volUp |
83 | buttons.push_back( defaultButton ); // volDown | 83 | buttons.push_back( defaultButton ); // volDown |
84 | buttons.push_back( toggleButton ); //fullscreen | 84 | buttons.push_back( toggleButton ); //fullscreen |
85 | 85 | ||
86 | videoFrame = new XineVideoWidget ( this, "Video frame" ); | 86 | videoFrame = new XineVideoWidget ( this, "Video frame" ); |
87 | 87 | ||
88 | connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & ))); | 88 | connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & ))); |
89 | connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) ); | 89 | connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) ); |
90 | 90 | ||
91 | Config cfg("OpiePlayer"); | 91 | Config cfg("OpiePlayer"); |
92 | cfg.setGroup("Options"); | 92 | cfg.setGroup("Options"); |
93 | skin = cfg.readEntry("Skin","default"); | 93 | skin = cfg.readEntry("Skin","default"); |
94 | 94 | ||
95 | QString skinPath = "opieplayer2/skins/" + skin; | 95 | QString skinPath = "opieplayer2/skins/" + skin; |
96 | pixBg = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); | 96 | pixBg = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); |
97 | imgUp = QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) ); | 97 | imgUp = QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) ); |
98 | imgDn = QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) ); | 98 | imgDn = QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) ); |
99 | 99 | ||
@@ -275,49 +275,49 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { | |||
275 | if ( event->state() == QMouseEvent::LeftButton ) { | 275 | if ( event->state() == QMouseEvent::LeftButton ) { |
276 | // The test to see if the mouse click is inside the button or not | 276 | // The test to see if the mouse click is inside the button or not |
277 | bool isOnButton = isOverButton( event->pos() - upperLeftOfButtonMask, i ); | 277 | bool isOnButton = isOverButton( event->pos() - upperLeftOfButtonMask, i ); |
278 | 278 | ||
279 | if ( isOnButton && !buttons[i].isHeld ) { | 279 | if ( isOnButton && !buttons[i].isHeld ) { |
280 | buttons[i].isHeld = TRUE; | 280 | buttons[i].isHeld = TRUE; |
281 | toggleButton(i); | 281 | toggleButton(i); |
282 | 282 | ||
283 | switch (i) { | 283 | switch (i) { |
284 | case VideoVolUp: | 284 | case VideoVolUp: |
285 | emit moreClicked(); | 285 | emit moreClicked(); |
286 | return; | 286 | return; |
287 | case VideoVolDown: | 287 | case VideoVolDown: |
288 | emit lessClicked(); | 288 | emit lessClicked(); |
289 | return; | 289 | return; |
290 | } | 290 | } |
291 | } else if ( !isOnButton && buttons[i].isHeld ) { | 291 | } else if ( !isOnButton && buttons[i].isHeld ) { |
292 | buttons[i].isHeld = FALSE; | 292 | buttons[i].isHeld = FALSE; |
293 | toggleButton(i); | 293 | toggleButton(i); |
294 | } | 294 | } |
295 | } else { | 295 | } else { |
296 | 296 | ||
297 | if ( buttons[i].isHeld ) { | 297 | if ( buttons[i].isHeld ) { |
298 | buttons[i].isHeld = FALSE; | 298 | buttons[i].isHeld = FALSE; |
299 | if ( buttons[i].buttonType != ToggleButton ) { | 299 | if ( buttons[i].type != ToggleButton ) { |
300 | setToggleButton( i, FALSE ); | 300 | setToggleButton( i, FALSE ); |
301 | } | 301 | } |
302 | 302 | ||
303 | switch(i) { | 303 | switch(i) { |
304 | 304 | ||
305 | case VideoPlay: { | 305 | case VideoPlay: { |
306 | if( mediaPlayerState.isPaused() ) { | 306 | if( mediaPlayerState.isPaused() ) { |
307 | setToggleButton( i, FALSE ); | 307 | setToggleButton( i, FALSE ); |
308 | mediaPlayerState.setPaused( FALSE ); | 308 | mediaPlayerState.setPaused( FALSE ); |
309 | return; | 309 | return; |
310 | } else if( !mediaPlayerState.isPaused() ) { | 310 | } else if( !mediaPlayerState.isPaused() ) { |
311 | setToggleButton( i, TRUE ); | 311 | setToggleButton( i, TRUE ); |
312 | mediaPlayerState.setPaused( TRUE ); | 312 | mediaPlayerState.setPaused( TRUE ); |
313 | return; | 313 | return; |
314 | } else { | 314 | } else { |
315 | return; | 315 | return; |
316 | } | 316 | } |
317 | } | 317 | } |
318 | 318 | ||
319 | case VideoStop: mediaPlayerState.setPlaying( FALSE ); return; | 319 | case VideoStop: mediaPlayerState.setPlaying( FALSE ); return; |
320 | case VideoNext: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setNext(); return; | 320 | case VideoNext: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setNext(); return; |
321 | case VideoPrevious: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setPrev(); return; | 321 | case VideoPrevious: if( playList.currentTab() == PlayListWidget::CurrentPlayList ) mediaPlayerState.setPrev(); return; |
322 | case VideoVolUp: emit moreReleased(); return; | 322 | case VideoVolUp: emit moreReleased(); return; |
323 | case VideoVolDown: emit lessReleased(); return; | 323 | case VideoVolDown: emit lessReleased(); return; |