vlc_linux/vlc-3.0.16/modules/gui/qt/util/input_slider.cpp
/***
 * \brief Main public method, superseeding setValue. Disabling the slider when neeeded
 *
 * \param pos Position, between 0 and 1. -1 disables the slider
 * \param time Elapsed time. Unused
 * \param legnth Duration time.
 ***/
\brief Main public method, superseeding setValue. Disabling the slider when neeeded
\param pos Position, between 0 and 1. -1 disables the slider
\param time Elapsed time. Unused
\param legnth Duration time.
\ brief Main public method superseeding setValue . Disabling the slider when neeeded \ param pos Position between 0 and 1 . - 1 disables the slider \ param time Elapsed time . Unused \ param legnth Duration time .
void SeekSlider::setPosition( float pos, int64_t time, int length )
{
    VLC_UNUSED(time);
    if( pos == -1.0  || ! b_seekable )
    {
        setEnabled( false );
        mTimeTooltip->hide();
        isSliding = false;
        setValue( 0 );
        return;
    }
    else
        setEnabled( true );
    if( !isSliding )
    {
        setValue( pos * static_cast<float>( maximum() ) );
        if ( animLoading != NULL && pos >= 0.0f && animLoading->state() != QAbstractAnimation::Stopped )
        {
            animLoading->stop();
            mLoading = 0.0f;
        }
    }
    inputLength = length;
}
void SeekSlider :: setPosition ( float pos , int64_t time , int length ) { VLC_UNUSED ( time ) ; if ( pos == -1.0 || ! b_seekable ) { setEnabled ( false ) ; mTimeTooltip -> hide ( ) ; isSliding = false ; setValue ( 0 ) ; return ; } else setEnabled ( true ) ; if ( ! isSliding ) { setValue ( pos * static_cast < float > ( maximum ( ) ) ) ; if ( animLoading != NULL && pos >= 0.0f && animLoading -> state ( ) != QAbstractAnimation :: Stopped ) { animLoading -> stop ( ) ; mLoading = 0.0f ; } } inputLength = length ; }
\brief Main public method, superseeding setValue.
\ brief Main public method superseeding setValue .