File indexing completed on 2024-05-19 05:35:18

0001 //////////////////////////////////////////////////////////////////////////////
0002 // oxygenanimationdata.cpp
0003 // base class data container needed for widget animations
0004 // -------------------
0005 //
0006 // SPDX-FileCopyrightText: 2009 Hugo Pereira Da Costa <hugo.pereira@free.fr>
0007 //
0008 // SPDX-License-Identifier: MIT
0009 //////////////////////////////////////////////////////////////////////////////
0010 
0011 #include "oxygenanimationdata.h"
0012 
0013 namespace Oxygen
0014 {
0015 const qreal AnimationData::OpacityInvalid = -1;
0016 int AnimationData::_steps = 0;
0017 
0018 //_________________________________________________________________________________
0019 void AnimationData::setupAnimation(const Animation::Pointer &animation, const QByteArray &property)
0020 {
0021     // setup animation
0022     animation.data()->setStartValue(0.0);
0023     animation.data()->setEndValue(1.0);
0024     animation.data()->setTargetObject(this);
0025     animation.data()->setPropertyName(property);
0026 }
0027 }