+
+ connect( horizontalScrollBar(), SIGNAL( valueChanged(int) ),
+ this, SLOT( updateOverlayPosition(int) ) );
+
+ m_overlay = EPGscene->addRect( 0, 0, 100, 1, QPen(), QBrush( QColor( 40, 86, 255, 220 ) ) );
+ m_overlay->setFlag( QGraphicsItem::ItemIgnoresTransformations );
+ m_overlay->setZValue( 100 );
+
+ sceneRectChanged( scene()->sceneRect() );
+
+ connect( scene(), SIGNAL( sceneRectChanged(QRectF) ),
+ this, SLOT( sceneRectChanged(QRectF) ) );
+}
+
+void EPGView::updateOverlayPosition( int value )
+{
+ int pos = value * matrix().inverted().m11();
+ m_overlay->setPos( pos, 0 );