Warning, file /include/QtWidgets/qgraphicstransform.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005 #ifndef QGRAPHICSTRANSFORM_H
0006 #define QGRAPHICSTRANSFORM_H
0007
0008 #include <QtWidgets/qtwidgetsglobal.h>
0009 #include <QtCore/QObject>
0010 #include <QtGui/QVector3D>
0011 #include <QtGui/QTransform>
0012 #include <QtGui/QMatrix4x4>
0013
0014 QT_REQUIRE_CONFIG(graphicsview);
0015
0016 QT_BEGIN_NAMESPACE
0017
0018 class QGraphicsItem;
0019 class QGraphicsTransformPrivate;
0020
0021 class Q_WIDGETS_EXPORT QGraphicsTransform : public QObject
0022 {
0023 Q_OBJECT
0024 public:
0025 QGraphicsTransform(QObject *parent = nullptr);
0026 ~QGraphicsTransform();
0027
0028 virtual void applyTo(QMatrix4x4 *matrix) const = 0;
0029
0030 protected Q_SLOTS:
0031 void update();
0032
0033 protected:
0034 QGraphicsTransform(QGraphicsTransformPrivate &p, QObject *parent);
0035
0036 private:
0037 friend class QGraphicsItem;
0038 friend class QGraphicsItemPrivate;
0039 Q_DECLARE_PRIVATE(QGraphicsTransform)
0040 };
0041
0042 class QGraphicsScalePrivate;
0043
0044 class Q_WIDGETS_EXPORT QGraphicsScale : public QGraphicsTransform
0045 {
0046 Q_OBJECT
0047
0048 Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged)
0049 Q_PROPERTY(qreal xScale READ xScale WRITE setXScale NOTIFY xScaleChanged)
0050 Q_PROPERTY(qreal yScale READ yScale WRITE setYScale NOTIFY yScaleChanged)
0051 Q_PROPERTY(qreal zScale READ zScale WRITE setZScale NOTIFY zScaleChanged)
0052 public:
0053 QGraphicsScale(QObject *parent = nullptr);
0054 ~QGraphicsScale();
0055
0056 QVector3D origin() const;
0057 void setOrigin(const QVector3D &point);
0058
0059 qreal xScale() const;
0060 void setXScale(qreal);
0061
0062 qreal yScale() const;
0063 void setYScale(qreal);
0064
0065 qreal zScale() const;
0066 void setZScale(qreal);
0067
0068 void applyTo(QMatrix4x4 *matrix) const override;
0069
0070 Q_SIGNALS:
0071 void originChanged();
0072 void xScaleChanged();
0073 void yScaleChanged();
0074 void zScaleChanged();
0075 void scaleChanged();
0076
0077 private:
0078 Q_DECLARE_PRIVATE(QGraphicsScale)
0079 };
0080
0081 class QGraphicsRotationPrivate;
0082
0083 class Q_WIDGETS_EXPORT QGraphicsRotation : public QGraphicsTransform
0084 {
0085 Q_OBJECT
0086
0087 Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged)
0088 Q_PROPERTY(qreal angle READ angle WRITE setAngle NOTIFY angleChanged)
0089 Q_PROPERTY(QVector3D axis READ axis WRITE setAxis NOTIFY axisChanged)
0090 public:
0091 QGraphicsRotation(QObject *parent = nullptr);
0092 ~QGraphicsRotation();
0093
0094 QVector3D origin() const;
0095 void setOrigin(const QVector3D &point);
0096
0097 qreal angle() const;
0098 void setAngle(qreal);
0099
0100 QVector3D axis() const;
0101 void setAxis(const QVector3D &axis);
0102 void setAxis(Qt::Axis axis);
0103
0104 void applyTo(QMatrix4x4 *matrix) const override;
0105
0106 Q_SIGNALS:
0107 void originChanged();
0108 void angleChanged();
0109 void axisChanged();
0110
0111 private:
0112 Q_DECLARE_PRIVATE(QGraphicsRotation)
0113 };
0114
0115 QT_END_NAMESPACE
0116
0117 #endif