Commit 66dbf82c authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - A to B Loop implementation.

parent 34c9ee45
...@@ -237,6 +237,10 @@ AdvControlsWidget::AdvControlsWidget( intf_thread_t *_p_i ) : ...@@ -237,6 +237,10 @@ AdvControlsWidget::AdvControlsWidget( intf_thread_t *_p_i ) :
ABButton->setIconSize( QSize( 20, 20 ) ); ABButton->setIconSize( QSize( 20, 20 ) );
advLayout->addWidget( ABButton ); advLayout->addWidget( ABButton );
BUTTON_SET_ACT( ABButton, "AB", qtr( "A to B" ), fromAtoB() ); BUTTON_SET_ACT( ABButton, "AB", qtr( "A to B" ), fromAtoB() );
timeA = 0;
timeB = 0;
CONNECT( THEMIM->getIM(), positionUpdated( float, int, int ),
this, AtoBLoop( float, int, int ) );
//FIXME Frame by frame function //FIXME Frame by frame function
frameButton = new QPushButton( "Fr" ); frameButton = new QPushButton( "Fr" );
...@@ -282,10 +286,40 @@ void AdvControlsWidget::snapshot() ...@@ -282,10 +286,40 @@ void AdvControlsWidget::snapshot()
if( p_vout ) vout_Control( p_vout, VOUT_SNAPSHOT ); if( p_vout ) vout_Control( p_vout, VOUT_SNAPSHOT );
} }
void AdvControlsWidget::frame(){} void AdvControlsWidget::frame()
void AdvControlsWidget::fromAtoB(){} {
}
void AdvControlsWidget::fromAtoB()
{
if( !timeA )
{
timeA = var_GetTime( THEMIM->getInput(), "time" );
ABButton->setText( "A->..." );
return;
}
if( !timeB )
{
timeB = var_GetTime( THEMIM->getInput(), "time" );
var_SetTime( THEMIM->getInput(), "time" , timeA );
ABButton->setText( "A<=>B" );
return;
}
timeA = 0;
timeB = 0;
ABButton->setText( "AB" );
}
void AdvControlsWidget::record(){} void AdvControlsWidget::record(){}
void AdvControlsWidget::AtoBLoop( float f_pos, int i_time, int i_length )
{
if( timeB )
{
if( i_time == (int)(timeB/1000000) )
var_SetTime( THEMIM->getInput(), "time" , timeA );
}
}
/***************************** /*****************************
* DA Control Widget ! * DA Control Widget !
*****************************/ *****************************/
......
...@@ -125,11 +125,14 @@ private: ...@@ -125,11 +125,14 @@ private:
QPushButton *recordButton, *ABButton; QPushButton *recordButton, *ABButton;
QPushButton *snapshotButton, *frameButton; QPushButton *snapshotButton, *frameButton;
mtime_t timeA, timeB;
private slots: private slots:
void snapshot(); void snapshot();
void frame(); void frame();
void fromAtoB(); void fromAtoB();
void record(); void record();
void AtoBLoop( float, int, int );
}; };
/* Button Bar */ /* Button Bar */
......
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