// qabstractanimation.sip generated by MetaSIP
//
// This file is part of the Qt3DAnimation Python extension module.
//
// Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
// 
// This file is part of PyQt6-3D.
// 
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file.  Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
// 
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license.  For more information contact
// info@riverbankcomputing.com.
// 
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


namespace Qt3DAnimation
{
%TypeHeaderCode
#include <qabstractanimation.h>
%End

    class QAbstractAnimation : public QObject /NoDefaultCtors/
    {
%TypeHeaderCode
#include <qabstractanimation.h>
%End

%ConvertToSubClassCode
        static struct class_graph {
            const char *name;
            sipTypeDef **type;
            int yes, no;
        } graph[] = {
            {sipName_Qt3DAnimation__QAbstractAnimation, &sipType_Qt3DAnimation_QAbstractAnimation, 11, 1},
            {sipName_Qt3DAnimation__QAbstractAnimationClip, &sipType_Qt3DAnimation_QAbstractAnimationClip, 14, 2},
            {sipName_Qt3DAnimation__QAbstractChannelMapping, &sipType_Qt3DAnimation_QAbstractChannelMapping, 16, 3},
            {sipName_Qt3DAnimation__QAbstractClipAnimator, &sipType_Qt3DAnimation_QAbstractClipAnimator, 18, 4},
            {sipName_Qt3DAnimation__QAbstractClipBlendNode, &sipType_Qt3DAnimation_QAbstractClipBlendNode, 20, 5},
            {sipName_Qt3DAnimation__QAnimationAspect, &sipType_Qt3DAnimation_QAnimationAspect, -1, 6},
            {sipName_Qt3DAnimation__QAnimationController, &sipType_Qt3DAnimation_QAnimationController, -1, 7},
            {sipName_Qt3DAnimation__QAnimationGroup, &sipType_Qt3DAnimation_QAnimationGroup, -1, 8},
            {sipName_Qt3DAnimation__QChannelMapper, &sipType_Qt3DAnimation_QChannelMapper, -1, 9},
            {sipName_Qt3DAnimation__QClock, &sipType_Qt3DAnimation_QClock, -1, 10},
            {sipName_Qt3DAnimation__QMorphTarget, &sipType_Qt3DAnimation_QMorphTarget, -1, -1},
            {sipName_Qt3DAnimation__QKeyframeAnimation, &sipType_Qt3DAnimation_QKeyframeAnimation, -1, 12},
            {sipName_Qt3DAnimation__QMorphingAnimation, &sipType_Qt3DAnimation_QMorphingAnimation, -1, 13},
            {sipName_Qt3DAnimation__QVertexBlendAnimation, &sipType_Qt3DAnimation_QVertexBlendAnimation, -1, -1},
            {sipName_Qt3DAnimation__QAnimationClip, &sipType_Qt3DAnimation_QAnimationClip, -1, 15},
            {sipName_Qt3DAnimation__QAnimationClipLoader, &sipType_Qt3DAnimation_QAnimationClipLoader, -1, -1},
            {sipName_Qt3DAnimation__QChannelMapping, &sipType_Qt3DAnimation_QChannelMapping, -1, 17},
            {sipName_Qt3DAnimation__QSkeletonMapping, &sipType_Qt3DAnimation_QSkeletonMapping, -1, -1},
            {sipName_Qt3DAnimation__QBlendedClipAnimator, &sipType_Qt3DAnimation_QBlendedClipAnimator, -1, 19},
            {sipName_Qt3DAnimation__QClipAnimator, &sipType_Qt3DAnimation_QClipAnimator, -1, -1},
            {sipName_Qt3DAnimation__QAdditiveClipBlend, &sipType_Qt3DAnimation_QAdditiveClipBlend, -1, 21},
            {sipName_Qt3DAnimation__QClipBlendValue, &sipType_Qt3DAnimation_QClipBlendValue, -1, 22},
            {sipName_Qt3DAnimation__QLerpClipBlend, &sipType_Qt3DAnimation_QLerpClipBlend, -1, -1},
        };
        
        int i = 0;
        
        sipType = NULL;
        
        do
        {
            struct class_graph *cg = &graph[i];
        
            if (cg->name != NULL && sipCpp->inherits(cg->name))
            {
                sipType = *cg->type;
                i = cg->yes;
            }
            else
                i = cg->no;
        }
        while (i >= 0);
%End

    public:
        enum AnimationType
        {
            KeyframeAnimation,
            MorphingAnimation,
            VertexBlendAnimation,
        };

        QString animationName() const;
        Qt3DAnimation::QAbstractAnimation::AnimationType animationType() const;
        float position() const;
        float duration() const;

    public slots:
        void setAnimationName(const QString &name);
        void setPosition(float position);

    protected:
        void setDuration(float duration);

    signals:
        void animationNameChanged(const QString &name);
        void positionChanged(float position);
        void durationChanged(float duration);
    };
};
