[vlc-commits] Qt: EPGRuler: add timeline

Francois Cartegnie git at videolan.org
Sat Mar 5 16:25:47 CET 2011


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Mar  5 13:38:20 2011 +0100| [b8635eb0ce033393936ba2c389f4ec1b13031385] | committer: Francois Cartegnie

Qt: EPGRuler: add timeline

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b8635eb0ce033393936ba2c389f4ec1b13031385
---

 modules/gui/qt4/components/epg/EPGRuler.cpp |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/components/epg/EPGRuler.cpp b/modules/gui/qt4/components/epg/EPGRuler.cpp
index 9eb3404..d7a3ca0 100644
--- a/modules/gui/qt4/components/epg/EPGRuler.cpp
+++ b/modules/gui/qt4/components/epg/EPGRuler.cpp
@@ -93,4 +93,12 @@ void EPGRuler::paintEvent( QPaintEvent *event )
         posx += spacing;
         current = current.addSecs( 60 * 60 );
     }
+
+    /* draw current time line */
+    posx = localStartTime.secsTo( QDateTime::currentDateTime() ) * m_scale;
+    if ( posx <= width() && posx >= 0 )
+    {
+        p.setPen( QPen( QColor( 255, 0 , 0, 128 ) ) );
+        p.drawLine( posx, 15, posx, 30 );
+    }
 }



More information about the vlc-commits mailing list