Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:09:34

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QGRAPHICSITEMANIMATION_H
0005 #define QGRAPHICSITEMANIMATION_H
0006 
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtCore/qobject.h>
0009 
0010 QT_REQUIRE_CONFIG(graphicsview);
0011 
0012 QT_BEGIN_NAMESPACE
0013 
0014 class QGraphicsItem;
0015 class QPointF;
0016 class QTimeLine;
0017 class QTransform;
0018 
0019 class QGraphicsItemAnimationPrivate;
0020 class Q_WIDGETS_EXPORT QGraphicsItemAnimation : public QObject
0021 {
0022     Q_OBJECT
0023 public:
0024     QGraphicsItemAnimation(QObject *parent = nullptr);
0025     virtual ~QGraphicsItemAnimation();
0026 
0027     QGraphicsItem *item() const;
0028     void setItem(QGraphicsItem *item);
0029 
0030     QTimeLine *timeLine() const;
0031     void setTimeLine(QTimeLine *timeLine);
0032 
0033     QPointF posAt(qreal step) const;
0034     QList<QPair<qreal, QPointF> > posList() const;
0035     void setPosAt(qreal step, const QPointF &pos);
0036 
0037     QTransform transformAt(qreal step) const;
0038 
0039     qreal rotationAt(qreal step) const;
0040     QList<QPair<qreal, qreal> > rotationList() const;
0041     void setRotationAt(qreal step, qreal angle);
0042 
0043     qreal xTranslationAt(qreal step) const;
0044     qreal yTranslationAt(qreal step) const;
0045     QList<QPair<qreal, QPointF> > translationList() const;
0046     void setTranslationAt(qreal step, qreal dx, qreal dy);
0047 
0048     qreal verticalScaleAt(qreal step) const;
0049     qreal horizontalScaleAt(qreal step) const;
0050     QList<QPair<qreal, QPointF> > scaleList() const;
0051     void setScaleAt(qreal step, qreal sx, qreal sy);
0052 
0053     qreal verticalShearAt(qreal step) const;
0054     qreal horizontalShearAt(qreal step) const;
0055     QList<QPair<qreal, QPointF> > shearList() const;
0056     void setShearAt(qreal step, qreal sh, qreal sv);
0057 
0058     void clear();
0059 
0060 public Q_SLOTS:
0061     void setStep(qreal x);
0062 
0063 protected:
0064     virtual void beforeAnimationStep(qreal step);
0065     virtual void afterAnimationStep(qreal step);
0066 
0067 private:
0068     Q_DISABLE_COPY(QGraphicsItemAnimation)
0069     QGraphicsItemAnimationPrivate *d;
0070 };
0071 
0072 QT_END_NAMESPACE
0073 
0074 #endif