QML_RUNTIME_TESTING should be disabled by default.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativevaluetypes / testtypes.h
index 104d22f..ff0e84c 100644 (file)
@@ -1,34 +1,34 @@
 /****************************************************************************
 **
-** 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.
 **
 ** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
 ** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 **
 ** In addition, as a special exception, Nokia gives you certain additional
-** rights.  These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
 **
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
 **
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
 **
 **
 **
 #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
 {
@@ -65,27 +67,34 @@ class MyTypeObject : public QObject
 
     Q_PROPERTY(QPoint point READ point WRITE setPoint NOTIFY changed)
     Q_PROPERTY(QPointF pointf READ pointf WRITE setPointf NOTIFY changed)
+    Q_PROPERTY(QPointF pointfpoint READ pointfpoint WRITE setPointfpoint NOTIFY changed)
     Q_PROPERTY(QSize size READ size WRITE setSize NOTIFY changed)
     Q_PROPERTY(QSizeF sizef READ sizef WRITE setSizef NOTIFY changed)
+    Q_PROPERTY(QSizeF sizefsize READ sizefsize WRITE setSizefsize NOTIFY changed)
     Q_PROPERTY(QSize sizereadonly READ size NOTIFY changed)
     Q_PROPERTY(QRect rect READ rect WRITE setRect NOTIFY changed)
     Q_PROPERTY(QRectF rectf READ rectf WRITE setRectf NOTIFY changed)
+    Q_PROPERTY(QRectF rectfrect READ rectfrect WRITE setRectfrect NOTIFY changed)
     Q_PROPERTY(QVector2D vector2 READ vector2 WRITE setVector2 NOTIFY changed)
     Q_PROPERTY(QVector3D vector READ vector WRITE setVector NOTIFY changed)
     Q_PROPERTY(QVector4D vector4 READ vector4 WRITE setVector4 NOTIFY changed)
     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:
     MyTypeObject() :
         m_point(10, 4),
         m_pointf(11.3, -10.9),
+        m_pointfpoint(10.0, 4.0),
         m_size(1912, 1913),
         m_sizef(0.1, 100923.2),
+        m_sizefsize(1912.0, 1913.0),
         m_rect(2, 3, 109, 102),
         m_rectf(103.8, 99.2, 88.1, 77.6),
+        m_rectfrect(2.0, 3.0, 109.0, 102.0),
         m_vector2(32.88, 1.3),
         m_vector(23.88, 3.1, 4.3),
         m_vector4(54.2, 23.88, 3.1, 4.3),
@@ -103,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;
@@ -113,6 +126,10 @@ public:
     QPointF pointf() const { return m_pointf; }
     void setPointf(const QPointF &v) { m_pointf = v; emit changed(); }
 
+    QPointF m_pointfpoint;
+    QPointF pointfpoint() const { return m_pointfpoint; }
+    void setPointfpoint(const QPointF &v) { m_pointfpoint = v; emit changed(); }
+
     QSize m_size;
     QSize size() const { return m_size; }
     void setSize(const QSize &v) { m_size = v; emit changed(); }
@@ -121,6 +138,10 @@ public:
     QSizeF sizef() const { return m_sizef; }
     void setSizef(const QSizeF &v) { m_sizef = v; emit changed(); }
 
+    QSizeF m_sizefsize;
+    QSizeF sizefsize() const { return m_sizefsize; }
+    void setSizefsize(const QSizeF &v) { m_sizefsize = v; emit changed(); }
+
     QRect m_rect;
     QRect rect() const { return m_rect; }
     void setRect(const QRect &v) { m_rect = v; emit changed(); }
@@ -129,6 +150,10 @@ public:
     QRectF rectf() const { return m_rectf; }
     void setRectf(const QRectF &v) { m_rectf = v; emit changed(); }
 
+    QRectF m_rectfrect;
+    QRectF rectfrect() const { return m_rectfrect; }
+    void setRectfrect(const QRectF &v) { m_rectfrect = v; emit changed(); }
+
     QVector2D m_vector2;
     QVector2D vector2() const { return m_vector2; }
     void setVector2(const QVector2D &v) { m_vector2 = v; emit changed(); }
@@ -153,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(); }