Adding a setter for grow factor property.
svn path=/trunk/KDE/kdelibs/; revision=1039066
This commit is contained in:
parent
8a930cbaca
commit
71528727ea
@ -30,6 +30,16 @@ GrowAnimation::GrowAnimation(qreal factor)
|
||||
{
|
||||
}
|
||||
|
||||
void GrowAnimation::setFactor(qreal factor)
|
||||
{
|
||||
m_animFactor = qBound(qreal(0.0), factor, qreal(1.0));
|
||||
}
|
||||
|
||||
qreal GrowAnimation::factor() const
|
||||
{
|
||||
return m_animFactor;
|
||||
}
|
||||
|
||||
QAbstractAnimation* GrowAnimation::render(QObject* parent){
|
||||
|
||||
//get current geometry values
|
||||
|
@ -41,12 +41,18 @@ namespace Plasma
|
||||
class GrowAnimation : public Animation
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(qreal factor READ factor WRITE setFactor)
|
||||
|
||||
public:
|
||||
/* TODO: convert to qreal */
|
||||
|
||||
GrowAnimation(qreal factor = 0.5);
|
||||
virtual ~GrowAnimation(){};
|
||||
|
||||
qreal factor() const;
|
||||
|
||||
void setFactor(qreal);
|
||||
|
||||
|
||||
protected:
|
||||
virtual QAbstractAnimation* render(QObject* parent = 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user