Commit d63e1d81 authored by Jean-Paul Saman's avatar Jean-Paul Saman

(qt4) Enable reverse playback direction button in qt4 interface.

parent 409327e9
......@@ -378,6 +378,15 @@ QWidget *AbstractController::createWidget( buttonType_e button, int* i_size,
widget = advControls;
*i_size = advControls->getWidth();
}
case REVERSE_BUTTON:{
QToolButton *reverseButton = new QToolButton;
setupButton( reverseButton );
CONNECT_MAP_SET( reverseButton, REVERSE_ACTION );
BUTTON_SET_BAR( reverseButton, reverse, qtr( "Reverse" ) );
ENABLE_ON_INPUT( reverseButton );
widget = reverseButton;
}
break;
default:
msg_Warn( p_intf, "This should not happen" );
break;
......@@ -665,6 +674,8 @@ void AbstractController::doAction( int id_action )
THEMIM->getIM()->setAtoB(); break;
case FRAME_ACTION:
frame(); break;
case REVERSE_ACTION:
reverse(); break;
default:
msg_Dbg( p_intf, "Action: %i", id_action );
break;
......@@ -730,6 +741,11 @@ void AbstractController::extSettings()
THEDP->extendedDialog();
}
void AbstractController::reverse()
{
THEMIM->getIM()->reverse();
}
void AbstractController::slower()
{
THEMIM->getIM()->slower();
......@@ -1226,7 +1242,6 @@ static int FullscreenControllerWidgetMouseMoved( vlc_object_t *vlc_object, const
return VLC_SUCCESS;
}
/**
* It is called when video start
*/
......@@ -1246,6 +1261,7 @@ void FullscreenControllerWidget::attachVout( vout_thread_t *p_nvout )
var_GetInteger( p_vout, "mouse-hide-timeout" ) );
vlc_mutex_unlock( &lock );
}
/**
* It is called after turn off video.
*/
......@@ -1294,4 +1310,3 @@ void FullscreenControllerWidget::fullscreenChanged( vout_thread_t *p_vout,
}
vlc_mutex_unlock( &lock );
}
......@@ -83,6 +83,7 @@ typedef enum buttonType_e
TIME_LABEL,
SPLITTER,
ADVANCED_CONTROLLER,
REVERSE_BUTTON,
} buttonType_e;
typedef enum actionType_e
......@@ -100,7 +101,8 @@ typedef enum actionType_e
SNAPSHOT_ACTION,
RECORD_ACTION,
FRAME_ACTION,
ATOB_ACTION
ATOB_ACTION,
REVERSE_ACTION,
} actionType_e;
enum
......@@ -147,6 +149,7 @@ protected slots:
void extSettings();
void faster();
void slower();
void reverse();
void playlist();
void snapshot();
void record();
......
......@@ -572,6 +572,15 @@ void InputManager::activateTeletext( bool b_enable )
}
}
void InputManager::reverse()
{
if( hasInput() )
{
int i_rate = var_GetInteger( p_input, "rate" );
var_SetInteger( p_input, "rate", -i_rate );
}
}
void InputManager::slower()
{
if( hasInput() )
......@@ -869,4 +878,3 @@ static int VolumeChanged( vlc_object_t *p_this, const char *psz_var,
QApplication::postEvent( mim, static_cast<QEvent*>(event) );
return VLC_SUCCESS;
}
......@@ -116,6 +116,7 @@ public slots:
void setInput( input_thread_t * ); ///< Our controlled input changed
void sliderUpdate( float ); ///< User dragged the slider. We get new pos
/* SpeedRate Rate Management */
void reverse();
void slower();
void faster();
void normalRate();
......
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