void tst_QGraphicsItemAnimation::construction() { QGraphicsItemAnimation animation; QVERIFY(!animation.item()); QVERIFY(!animation.timeLine()); QCOMPARE(animation.posAt(0), QPointF()); QCOMPARE(animation.posAt(0.5), QPointF()); QCOMPARE(animation.posAt(1), QPointF()); QCOMPARE(animation.matrixAt(0), QMatrix()); QCOMPARE(animation.matrixAt(0.5), QMatrix()); QCOMPARE(animation.matrixAt(1), QMatrix()); QCOMPARE(animation.rotationAt(0), qreal(0.0)); QCOMPARE(animation.rotationAt(0.5), qreal(0.0)); QCOMPARE(animation.rotationAt(1), qreal(0.0)); QCOMPARE(animation.xTranslationAt(0), qreal(0.0)); QCOMPARE(animation.xTranslationAt(0.5), qreal(0.0)); QCOMPARE(animation.xTranslationAt(1), qreal(0.0)); QCOMPARE(animation.yTranslationAt(0), qreal(0.0)); QCOMPARE(animation.yTranslationAt(0.5), qreal(0.0)); QCOMPARE(animation.yTranslationAt(1), qreal(0.0)); QCOMPARE(animation.verticalScaleAt(0), qreal(1.0)); QCOMPARE(animation.horizontalScaleAt(0), qreal(1.0)); QCOMPARE(animation.verticalShearAt(0), qreal(0.0)); QCOMPARE(animation.horizontalShearAt(0), qreal(0.0)); animation.clear(); // don't crash }
static PyObject *meth_QGraphicsItemAnimation_item(PyObject *sipSelf, PyObject *sipArgs) { PyObject *sipParseErr = NULL; { QGraphicsItemAnimation *sipCpp; if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QGraphicsItemAnimation, &sipCpp)) { QGraphicsItem *sipRes; Py_BEGIN_ALLOW_THREADS sipRes = sipCpp->item(); Py_END_ALLOW_THREADS return sipConvertFromType(sipRes,sipType_QGraphicsItem,NULL); } }