36 lines
1.2 KiB
Plaintext
36 lines
1.2 KiB
Plaintext
/*!
|
|
\headerfile QskSkinAnimator.h
|
|
|
|
\brief A helper class for delegating transitions between skin states. For
|
|
example, if you wish to smoothly transition from one color to another, you
|
|
should use QskControl::skinAnimator.
|
|
|
|
QskSkinAnimator is a low-level API which allows for smooth transitions
|
|
between values stored by QskSkinHint. Depending on the QskControl::skinState(),
|
|
a different value may be returned by a call to QskControl::skinHint().
|
|
By specifying an animator for the same QskAspect, an automatic transition
|
|
can occur between those two values.
|
|
|
|
In the simple case, you can create a hint animator by calling
|
|
QskSkinlet::animator() to get a default animator for that skin aspect.
|
|
Then, set the duration value:
|
|
|
|
\code
|
|
control->skinAnimator( QskSkinHint::Background ).setDuration<500>(); // Set the color transition to 500ms.
|
|
\endcode
|
|
|
|
To animate using an easing curve, you can replace the progress functor with
|
|
one utilizing a QEasingCurve:
|
|
\code
|
|
control->skinAnimator( QskSkinHint::Background ).progress = &QskSkinHint::easingProgress<QEasingCurve::InOutBounce>;
|
|
\endcode
|
|
*/
|
|
|
|
class QskSkinAnimator
|
|
{
|
|
/*!
|
|
|
|
*/
|
|
};
|
|
|