diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-08-21 04:43:15 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-08-21 04:43:15 (GMT) |
commit | bc9ced591a81293a155800cb28771f3bac17a9d2 (patch) | |
tree | d616a685f1de2ccb045a6d275a07d6fd8b2fb732 /src/gui/math3d/qmatrix4x4.h | |
parent | 303915f67c2e797d8c9697466266e1f5c1bf45c6 (diff) | |
download | Qt-bc9ced591a81293a155800cb28771f3bac17a9d2.zip Qt-bc9ced591a81293a155800cb28771f3bac17a9d2.tar.gz Qt-bc9ced591a81293a155800cb28771f3bac17a9d2.tar.bz2 |
Add implicit conversions from math3d classes to QVariant
Existing QVariant-capable classes in QtGui like QColor, QPixmap,
etc have "operator QVariant()". This change adds the same operators
for QVector2D, QVector3D, QVector4D, QQuaternion, and QMatrix4x4.
Reviewed-by: Justin McPherson
Diffstat (limited to 'src/gui/math3d/qmatrix4x4.h')
-rw-r--r-- | src/gui/math3d/qmatrix4x4.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h index 04a4216..10e628b 100644 --- a/src/gui/math3d/qmatrix4x4.h +++ b/src/gui/math3d/qmatrix4x4.h @@ -58,6 +58,7 @@ QT_MODULE(Gui) class QMatrix; class QTransform; +class QVariant; class Q_GUI_EXPORT QMatrix4x4 { @@ -182,6 +183,8 @@ public: void inferSpecialType(); + operator QVariant() const; + #ifndef QT_NO_DEBUG_STREAM friend Q_GUI_EXPORT QDebug operator<<(QDebug dbg, const QMatrix4x4 &m); #endif |