QML_RUNTIME_TESTING should be disabled by default.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativevaluetypes / testtypes.h
index 1efab0c..ff0e84c 100644 (file)
@@ -1,8 +1,7 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
 **
 ** This file is part of the test suite of the Qt Toolkit.
 **
@@ -35,6 +34,7 @@
 **
 **
 **
+**
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
 #include <QQuaternion>
 #include <QMatrix4x4>
 #include <QFont>
+#include <QColor>
 #include <qdeclarative.h>
 #include <QDeclarativePropertyValueSource>
 #include <QDeclarativeProperty>
 #include <private/qdeclarativeproperty_p.h>
+#include <private/qdeclarativepropertyvalueinterceptor_p.h>
 
 class MyTypeObject : public QObject
 {
@@ -79,6 +81,7 @@ class MyTypeObject : public QObject
     Q_PROPERTY(QQuaternion quaternion READ quaternion WRITE setQuaternion NOTIFY changed)
     Q_PROPERTY(QMatrix4x4 matrix READ matrix WRITE setMatrix NOTIFY changed)
     Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY changed)
+    Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY changed)
     Q_PROPERTY(QVariant variant READ variant NOTIFY changed)
 
 public:
@@ -109,6 +112,10 @@ public:
         m_font.setCapitalization(QFont::AllLowercase);
         m_font.setLetterSpacing(QFont::AbsoluteSpacing, 10.2);
         m_font.setWordSpacing(19.7);
+        m_color.setRedF(0.2);
+        m_color.setGreenF(0.88);
+        m_color.setBlueF(0.6);
+        m_color.setAlphaF(0.34);
     }
 
     QPoint m_point;
@@ -171,6 +178,10 @@ public:
     QFont font() const { return m_font; }
     void setFont(const QFont &v) { m_font = v; emit changed(); }
 
+    QColor m_color;
+    QColor color() const { return m_color; }
+    void setColor(const QColor &v) { m_color = v; emit changed(); }
+
     QVariant variant() const { return sizef(); }
 
     void emitRunScript() { emit runScript(); }