QGraphicsRotation Class Reference

[QtGui module]

该QGraphicsRotation类提供围绕给定轴的旋转变换。More…

继承QGraphicsTransform

Methods

  • __init__ (self, QObject parent = None)
  • float angle (self)
  • applyTo (self, QMatrix4x4 matrix)
  • QVector3D axis (self)
  • QVector3D origin (self)
  • setAngle (self, float)
  • setAxis (self, QVector3D axis)
  • setAxis (self, Qt.Axis axis)
  • setOrigin (self, QVector3D point)

Qt Signals

  • void angleChanged ()
  • void axisChanged ()
  • void originChanged ()

Detailed Description

该QGraphicsRotation类提供围绕给定轴的旋转变换。

您可以通过分配提供所需的轴QVector3D该轴属性或者通过一个成员,如果Qt.Axis到setAxis方便的功能。默认情况下,该轴为(0 ,0,1 ),即,围绕Z轴旋转。

角特性,这是由QGraphicsRotation提供,现在描述了围绕该轴旋转的度数。

QGraphicsRotation提供某些参数,以帮助控制如何旋转应该被应用。

原点是该项目围绕其旋转(即,它保持固定的相对于父作为产品的其馀部分被转动)的位置。默认情况下,原点是QPointF(0 ,0)。

角属性提供的度数为围绕原点的项目按顺时针方向旋转。该值也可以是负的,表示逆时针旋转。对于动画的目的,也可能是有用的,以提供旋转角度超过( -360 , 360 )度,例如以动画如何项目旋转几次。

注意:最后一次旋转是在三维空间中的旋转后投影回2D的综合效应。如果几个旋转是连续进行的,他们不会像预期的那样,除非他们都绕Z轴。


Method Documentation

  1. QGraphicsRotation.__init__ (self, QObject parent = None)

parent的说法,如果不是没有,原因self通过Qt的,而不是PyQt的拥有。

构造一个新的QGraphicsRotation用给定的parent

  1. float QGraphicsRotation.angle (self)
  1. QGraphicsRotation.applyTo (self, QMatrix4x4 matrix)

从重新实现QGraphicsTransform.applyTo( ) 。

  1. QVector3D QGraphicsRotation.axis (self)

  1. QVector3D QGraphicsRotation.origin (self)

[

  1. QGraphicsRotation.setAngle (self, float)
  1. QGraphicsRotation.setAxis (self, QVector3D axis)
  1. QGraphicsRotation.setAxis (self, Qt.Axis axis)
  1. QGraphicsRotation.setOrigin (self, QVector3D point)

Qt Signal Documentation

  1. void angleChanged ()

这是该信号的默认超载。

这个信号被发射时的角度发生了变化。

]($docs-qvector3d.html)

See also QGraphicsRotation.angle

  1. void axisChanged ()

这是该信号的默认超载。

这个信号被发射时的对象更改轴。

See also QGraphicsRotation.axis

  1. void originChanged ()

这是该信号的默认超载。

这个信号被发射时的原点已经改变。

See also QGraphicsRotation.origin