add qproperties

svn path=/trunk/KDE/kdelibs/; revision=1036120
This commit is contained in:
Aaron J. Seigo 2009-10-16 16:34:53 +00:00
parent 4191b96c6d
commit 82cf1ef3fb
2 changed files with 24 additions and 2 deletions

View File

@ -26,22 +26,36 @@
namespace Plasma
{
RotationAnimation::RotationAnimation(qint8 reference, const Qt::Axis &axis,
const qreal &angle)
RotationAnimation::RotationAnimation(qint8 reference, const Qt::Axis &axis, const qreal &angle)
: m_angle(angle), m_axis(axis), m_reference(reference)
{
}
Qt::Axis RotationAnimation::axis() const
{
return m_axis;
}
void RotationAnimation::setAxis(const Qt::Axis &axis)
{
m_axis = axis;
}
qint8 RotationAnimation::reference() const
{
return m_reference;
}
void RotationAnimation::setReference(const qint8 reference)
{
m_reference = reference;
}
qreal RotationAnimation::angle() const
{
return m_angle;
}
void RotationAnimation::setAngle(const qreal &angle)
{
m_angle = angle;

View File

@ -30,6 +30,9 @@ namespace Plasma {
class PLASMA_EXPORT RotationAnimation : public Animation
{
Q_OBJECT
Q_PROPERTY(Qt::Axis axis READ axis WRITE setAxis)
Q_PROPERTY(qint8 reference READ reference WRITE setReference)
Q_PROPERTY(qreal angle READ angle WRITE setAngle)
public:
enum Reference{
@ -45,8 +48,13 @@ class PLASMA_EXPORT RotationAnimation : public Animation
QPropertyAnimation* render(QObject* parent = 0);
Qt::Axis axis() const;
void setAxis(const Qt::Axis &axis);
qint8 reference() const;
void setReference(qint8 reference);
qreal angle() const;
void setAngle(const qreal &angle);
private: