Commit d778aa78 authored by Ludovic Fauvet's avatar Ludovic Fauvet
Browse files

Timeline: Create a slot for changing duration

parent bbf4d62f
......@@ -49,9 +49,7 @@ Timeline::Timeline( QWidget *parent ) :
tracksRulerLayout->addWidget( m_tracksRuler );
changeZoom( 5 );
m_tracksView->setDuration( 800 );
m_tracksRuler->setDuration( 800 );
setDuration( 1500 );
connect( m_tracksView->horizontalScrollBar(), SIGNAL( valueChanged( int ) ), m_tracksRuler, SLOT( moveRuler( int ) ) );
}
......@@ -73,3 +71,9 @@ void Timeline::changeZoom( int factor )
m_scale = (double) FRAME_SIZE / m_tracksRuler->comboScale[factor];
m_tracksView->setScale( m_scale );
}
void Timeline::setDuration( int duration )
{
m_tracksView->setDuration( duration );
m_tracksRuler->setDuration( duration );
}
......@@ -39,6 +39,7 @@ public:
public slots:
void changeZoom( int factor );
void setDuration( int duration );
protected:
virtual void changeEvent( QEvent *e );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment