QSkinny
0.8.0
C++/Qt UI toolkit
Loading...
Searching...
No Matches
QskVariantAnimator.h
1
/******************************************************************************
2
* QSkinny - Copyright (C) The authors
3
* SPDX-License-Identifier: BSD-3-Clause
4
*****************************************************************************/
5
6
#ifndef QSK_VARIANT_ANIMATOR_H
7
#define QSK_VARIANT_ANIMATOR_H
8
9
#include "QskAnimator.h"
10
#include <qvariant.h>
11
12
class
QSK_EXPORT
QskVariantAnimator
:
public
QskAnimator
13
{
14
public
:
15
QskVariantAnimator
();
16
~QskVariantAnimator
()
override
;
17
18
void
setCurrentValue(
const
QVariant& );
19
QVariant currentValue()
const
;
20
21
void
setStartValue(
const
QVariant& );
22
QVariant startValue()
const
;
23
24
void
setEndValue(
const
QVariant& );
25
QVariant endValue()
const
;
26
27
static
bool
maybeInterpolate(
28
const
QVariant&,
const
QVariant&,
bool
acceptIdentity );
29
30
static
bool
convertValues( QVariant&, QVariant& );
31
32
protected
:
33
void
setup()
override
;
34
void
advance( qreal value )
override
;
35
void
done()
override
;
36
37
private
:
38
QVariant m_startValue;
39
QVariant m_endValue;
40
QVariant m_currentValue;
41
42
void ( *m_interpolator )();
43
};
44
45
inline
QVariant QskVariantAnimator::startValue()
const
46
{
47
return
m_startValue;
48
}
49
50
inline
QVariant QskVariantAnimator::endValue()
const
51
{
52
return
m_endValue;
53
}
54
55
inline
QVariant QskVariantAnimator::currentValue()
const
56
{
57
return
m_currentValue;
58
}
59
60
#endif
QskAnimator
Definition
QskAnimator.h:19
QskVariantAnimator
Definition
QskVariantAnimator.h:13
src
controls
QskVariantAnimator.h
Generated by
1.9.8