#ifndef PQPROPERTYANIMATION_H
#define PQPROPERTYANIMATION_H

#include <QPropertyAnimation>
#include "pqabstractanimation.h"

class PQPropertyAnimation : public QPropertyAnimation {
    Q_OBJECT
    PQ_OBJECT_EX(QPropertyAnimation)
    PQ_VANIMATION_EX(QPropertyAnimation)

public:
    Q_PROPERTY(QByteArray propertyName READ propertyName WRITE setPropertyName)
    Q_PROPERTY(QObject* targetObject READ targetObject WRITE setTargetObject)

public:
    Q_INVOKABLE explicit PQPropertyAnimation(QObject *parent = 0);
    Q_INVOKABLE PQPropertyAnimation(QObject *target, const QByteArray &propertyName, QObject *parent = 0);
    ~PQPropertyAnimation() {}

    QObject *targetObject() const;
    void setTargetObject(QObject *target);

    QByteArray propertyName() const;
    void setPropertyName(const QByteArray &propertyName);

public Q_SLOTS:
    PQ_ON_SIGNAL_DECL_START {
        PQANIMATION_ON_SIGNALS()
    } PQ_ON_SIGNAL_DECL_END
};

#endif // PQPROPERTYANIMATION_H
