#ifndef PQABSTRACTANIMATION_PRIVATE_H
#define PQABSTRACTANIMATION_PRIVATE_H

#include "pqabstractanimation.h"
#include <pqobject_private.h>
#include <QEasingCurve>

#define PQAANIMATION_STANDARD_METHODS(Q) \
    PQOBJECT_STANDARD_METHODS(Q,Q)\
    \
    int P##Q::state() const {\
        return Q::state();\
    }\
    \
    int P##Q::direction() const {\
        return Q::direction();\
    }\
    \
    void P##Q::setDirection(int direction) {\
        Q::setDirection(Direction(direction));\
    }\
    \
    int P##Q::currentTime() const {\
        return Q::currentTime();\
    }\
    \
    int P##Q::currentLoopTime() const {\
        return Q::currentLoopTime();\
    }\
    \
    int P##Q::loopCount() const {\
        return Q::loopCount();\
    }\
    \
    void P##Q::setLoopCount(int loopCount) {\
        Q::setLoopCount(loopCount);\
    }\
    \
    int P##Q::currentLoop() const {\
        return Q::currentLoop();\
    }\
    \
    int P##Q::totalDuration() const {\
        return Q::totalDuration();\
    }\
    \
    \
    void P##Q::start(int policy) {\
        Q::start(QAbstractAnimation::DeletionPolicy(policy));\
    }\
    \
    void P##Q::pause() {\
        Q::pause();\
    }\
    \
    void P##Q::resume() {\
        Q::resume();\
    }\
    \
    void P##Q::setPaused(bool paused) {\
        Q::setPaused(paused);\
    }\
    \
    void P##Q::stop() {\
        Q::stop();\
    }\
    \
    void P##Q::setCurrentTime(int msecs) {\
        Q::setCurrentTime(msecs);\
    }\
    \
    void P##Q::finished_pslot() {\
        PHPQt5Connection_invoke(this, "finished()", QVariantList());\
    }\
    \
    void P##Q::stateChanged_pslot(int newState, int oldState) {\
        QVariantList args;\
        args << newState;\
        args << oldState;\
        PHPQt5Connection_invoke(this, "stateChanged(int,int)", args);\
    }\
    \
    void P##Q::currentLoopChanged_pslot(int currentLoop) {\
        QVariantList args;\
        args << currentLoop;\
        PHPQt5Connection_invoke(this, "currentLoopChanged(int)", args);\
    }\
    \
    void P##Q::directionChanged_pslot(int direction) {\
        QVariantList args;\
        args << direction;\
        PHPQt5Connection_invoke(this, "directionChanged(int)", args);\
    }

#define PQANIMATION_STANDARD_METHODS(Q) \
    PQAANIMATION_STANDARD_METHODS(Q)\
    \
    void P##Q::updateCurrentTime(int currentTime) {\
        Q::updateCurrentTime(currentTime);\
    }\
    \
    int P##Q::duration() const {\
        return Q::duration();\
    }\

#define PQVANIMATION_STANDARD_METHODS(Q) \
    PQANIMATION_STANDARD_METHODS(Q) \
    \
    void P##Q::setStartValue(const QVariant &value) {\
        Q::setStartValue(value);\
    }\
    void P##Q::setStartPointValue(int x, int y) {\
        Q::setStartValue(QPoint(x, y));\
    }\
    void P##Q::setStartSizeValue(int width, int height) {\
        Q::setStartValue(QSize(width, height));\
    }\
    \
    void P##Q::setStartRectValue(int x, int y, int width, int height) {\
        Q::setStartValue(QRect(x, y, width, height));\
    }\
    \
    void P##Q::setEndValue(const QVariant &value) {\
        Q::setEndValue(value);\
    }\
    \
    void P##Q::setEndPointValue(int x, int y) {\
        Q::setEndValue(QPoint(x, y));\
    }\
    void P##Q::setEndSizeValue(int width, int height) {\
        Q::setEndValue(QSize(width, height));\
    }\
    \
    void P##Q::setEndRectValue(int x, int y, int width, int height) {\
        Q::setEndValue(QRect(x, y, width, height));\
    }\
    \
    void P##Q::setEasingCurveType(int easing) {\
        Q::setEasingCurve(QEasingCurve(QEasingCurve::Type(easing)));\
    }\
    \
    int P##Q::easingCurveType() {\
        return Q::easingCurve().type();\
    }\
    \
    void P##Q::setDuration(int msecs) {\
        return Q::setDuration(msecs);\
    }

#endif // PQABSTRACTANIMATION_PRIVATE_H
