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.cpp25
1 files changed, 21 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 7c20c6d..efd756c 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -61,2 +61,3 @@ const int yo = 0; // movable y offset
61 61
62/*
62MediaWidget::Button videoButtons[] = { 63MediaWidget::Button videoButtons[] = {
@@ -70,2 +71,3 @@ MediaWidget::Button videoButtons[] = {
70}; 71};
72*/
71 73
@@ -75,3 +77,3 @@ const char * const skinV_mask_file_names[7] = {
75 77
76const int numVButtons = (sizeof(videoButtons)/sizeof(MediaWidget::Button)); 78//const int numVButtons = (sizeof(videoButtons)/sizeof(MediaWidget::Button));
77 79
@@ -84,2 +86,17 @@ VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
84 86
87 Button defaultButton;
88 defaultButton.isToggle = defaultButton.isHeld = defaultButton.isDown = false;
89 Button toggleButton;
90 toggleButton.isToggle = true;
91 toggleButton.isHeld = toggleButton.isDown = false;
92
93 videoButtons.reserve( 7 );
94 videoButtons.push_back( defaultButton ); // stop
95 videoButtons.push_back( toggleButton ); // play
96 videoButtons.push_back( defaultButton ); // previous
97 videoButtons.push_back( defaultButton ); // next
98 videoButtons.push_back( defaultButton ); // volUp
99 videoButtons.push_back( defaultButton ); // volDown
100 videoButtons.push_back( toggleButton ); //fullscreen
101
85 videoFrame = new XineVideoWidget ( this, "Video frame" ); 102 videoFrame = new XineVideoWidget ( this, "Video frame" );
@@ -278,3 +295,3 @@ void VideoWidget::paintButton( QPainter *p, int i ) {
278void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { 295void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
279 for ( int i = 0; i < numVButtons; i++ ) { 296 for ( unsigned int i = 0; i < videoButtons.size(); i++ ) {
280 if ( event->state() == QMouseEvent::LeftButton ) { 297 if ( event->state() == QMouseEvent::LeftButton ) {
@@ -425,3 +442,3 @@ void VideoWidget::paintEvent( QPaintEvent * pe) {
425 p.drawTiledPixmap( pe->rect(), pixBg, pe->rect().topLeft() ); 442 p.drawTiledPixmap( pe->rect(), pixBg, pe->rect().topLeft() );
426 for ( int i = 0; i < numVButtons; i++ ) { 443 for ( unsigned int i = 0; i < videoButtons.size(); i++ ) {
427 paintButton( &p, i ); 444 paintButton( &p, i );
@@ -432,3 +449,3 @@ void VideoWidget::paintEvent( QPaintEvent * pe) {
432 QPainter p( this ); 449 QPainter p( this );
433 for ( int i = 0; i < numVButtons; i++ ) 450 for ( unsigned int i = 0; i < videoButtons.size(); i++ )
434 paintButton( &p, i ); 451 paintButton( &p, i );