You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

37 lines
765 B

/*
* SPDX-FileCopyrightText: 2014 Hugo Pereira Da Costa <hugo.pereira@free.fr>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "breezewidgetstatedata.h"
namespace Breeze
{
//______________________________________________
bool WidgetStateData::updateState( bool value )
{
if( !_initialized )
{
_state = value;
_initialized = true;
return false;
} else if( _state == value ) {
return false;
} else {
_state = value;
animation().data()->setDirection( _state ? Animation::Forward : Animation::Backward );
if( !animation().data()->isRunning() ) animation().data()->start();
return true;
}
}
}