summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-07-02 02:35:48 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-07-02 02:46:45 (GMT)
commit36e237d5dc4bb0728b63f26d9af07fe9c1b1601f (patch)
treea9f0ce2a5e4c765abf754b4e4dcad5da20a53a15
parent7f73eb160e0499750c42224afc34a9432afa1b48 (diff)
downloadQt-36e237d5dc4bb0728b63f26d9af07fe9c1b1601f.zip
Qt-36e237d5dc4bb0728b63f26d9af07fe9c1b1601f.tar.gz
Qt-36e237d5dc4bb0728b63f26d9af07fe9c1b1601f.tar.bz2
Move timeline class to util and make private.
-rw-r--r--src/declarative/declarative.pro1
-rw-r--r--src/declarative/extra/qfxflowview.h2
-rw-r--r--src/declarative/fx/qfxflickable_p.h2
-rw-r--r--src/declarative/fx/qfxpathview_p.h1
-rw-r--r--src/declarative/test/qfxtestengine.cpp2
-rw-r--r--src/declarative/timeline/qmltimelinevalueproxy.h86
-rw-r--r--src/declarative/timeline/timeline.pri7
-rw-r--r--src/declarative/util/qmlanimation_p.h2
-rw-r--r--src/declarative/util/qmltimeline.cpp (renamed from src/declarative/timeline/qmltimeline.cpp)2
-rw-r--r--src/declarative/util/qmltimeline_p.h (renamed from src/declarative/timeline/qmltimeline.h)46
-rw-r--r--src/declarative/util/util.pri2
11 files changed, 47 insertions, 106 deletions
diff --git a/src/declarative/declarative.pro b/src/declarative/declarative.pro
index 9f555fe..4bf267c 100644
--- a/src/declarative/declarative.pro
+++ b/src/declarative/declarative.pro
@@ -19,7 +19,6 @@ include(util/util.pri)
include(fx/fx.pri)
include(canvas/canvas.pri)
include(qml/qml.pri)
-include(timeline/timeline.pri)
include(extra/extra.pri)
include(widgets/widgets.pri)
include(test/test.pri)
diff --git a/src/declarative/extra/qfxflowview.h b/src/declarative/extra/qfxflowview.h
index 2bec6a1..126f567 100644
--- a/src/declarative/extra/qfxflowview.h
+++ b/src/declarative/extra/qfxflowview.h
@@ -42,7 +42,7 @@
#ifndef QFXFLOWVIEW_H
#define QFXFLOWVIEW_H
-#include <QtDeclarative/QmlTimeLine>
+#include <private/qmltimeline_p.h>
#include <QtDeclarative/qfxitem.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/fx/qfxflickable_p.h b/src/declarative/fx/qfxflickable_p.h
index a3b1500..28ec6d8 100644
--- a/src/declarative/fx/qfxflickable_p.h
+++ b/src/declarative/fx/qfxflickable_p.h
@@ -57,7 +57,7 @@
#include "qfxflickable.h"
#include "qfxitem_p.h"
#include "qml.h"
-#include "qmltimelinevalueproxy.h"
+#include "private/qmltimeline_p.h"
#include "private/qmlanimation_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/fx/qfxpathview_p.h b/src/declarative/fx/qfxpathview_p.h
index b5c5ba2..b77c2a0 100644
--- a/src/declarative/fx/qfxpathview_p.h
+++ b/src/declarative/fx/qfxpathview_p.h
@@ -58,7 +58,6 @@
#include "qfxitem_p.h"
#include "qfxvisualitemmodel.h"
#include "qml.h"
-#include "qmltimelinevalueproxy.h"
#include "private/qmlanimation_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/test/qfxtestengine.cpp b/src/declarative/test/qfxtestengine.cpp
index 0d7e5df..cf746db 100644
--- a/src/declarative/test/qfxtestengine.cpp
+++ b/src/declarative/test/qfxtestengine.cpp
@@ -41,7 +41,7 @@
#include <QFile>
#include <QmlComponent>
-#include <qmltimeline.h>
+#include <private/qmltimeline_p.h>
#include "qfxtestengine.h"
#include "qfxtestobjects.h"
#include <QCryptographicHash>
diff --git a/src/declarative/timeline/qmltimelinevalueproxy.h b/src/declarative/timeline/qmltimelinevalueproxy.h
deleted file mode 100644
index 9ecdba1..0000000
--- a/src/declarative/timeline/qmltimelinevalueproxy.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module 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 either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** 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.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** 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.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QMLTIMELINEVALUEPROXY_H
-#define QMLTIMELINEVALUEPROXY_H
-
-#include <QtDeclarative/qmltimeline.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
-
-template<class T>
-class QmlTimeLineValueProxy : public QmlTimeLineValue
-{
-public:
- QmlTimeLineValueProxy(T *cls, void (T::*func)(qreal), qreal v = 0.)
- : QmlTimeLineValue(v), _class(cls), _setFunctionReal(func), _setFunctionInt(0)
- {
- Q_ASSERT(_class);
- }
-
- QmlTimeLineValueProxy(T *cls, void (T::*func)(int), qreal v = 0.)
- : QmlTimeLineValue(v), _class(cls), _setFunctionReal(0), _setFunctionInt(func)
- {
- Q_ASSERT(_class);
- }
-
- virtual void setValue(qreal v)
- {
- QmlTimeLineValue::setValue(v);
- if (_setFunctionReal) (_class->*_setFunctionReal)(v);
- else if (_setFunctionInt) (_class->*_setFunctionInt)((int)v);
- }
-
-private:
- T *_class;
- void (T::*_setFunctionReal)(qreal);
- void (T::*_setFunctionInt)(int);
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif//QMLTIMELINEVALUEPROXY_H
diff --git a/src/declarative/timeline/timeline.pri b/src/declarative/timeline/timeline.pri
deleted file mode 100644
index a7b3cb9..0000000
--- a/src/declarative/timeline/timeline.pri
+++ /dev/null
@@ -1,7 +0,0 @@
-SOURCES += \
- timeline/qmltimeline.cpp \
-
-HEADERS += \
- timeline/qmltimeline.h \
- timeline/qmltimelinevalueproxy.h \
-
diff --git a/src/declarative/util/qmlanimation_p.h b/src/declarative/util/qmlanimation_p.h
index fce5eca..00759e1 100644
--- a/src/declarative/util/qmlanimation_p.h
+++ b/src/declarative/util/qmlanimation_p.h
@@ -63,7 +63,7 @@
#include <QtDeclarative/qmlanimation.h>
#include <QtDeclarative/qml.h>
#include <QtDeclarative/qmlcontext.h>
-#include <QtDeclarative/qmltimelinevalueproxy.h>
+#include <private/qmltimeline_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/timeline/qmltimeline.cpp b/src/declarative/util/qmltimeline.cpp
index dcc8745..5ba310d 100644
--- a/src/declarative/timeline/qmltimeline.cpp
+++ b/src/declarative/util/qmltimeline.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include "qmltimeline.h"
+#include "qmltimeline_p.h"
#include <QDebug>
#include <QMutex>
#include <QThread>
diff --git a/src/declarative/timeline/qmltimeline.h b/src/declarative/util/qmltimeline_p.h
index 627ec79..abed80a 100644
--- a/src/declarative/timeline/qmltimeline.h
+++ b/src/declarative/util/qmltimeline_p.h
@@ -42,16 +42,23 @@
#ifndef QMLTIMELINE_H
#define QMLTIMELINE_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/QObject>
#include <QtCore/QAbstractAnimation>
#include <QtDeclarative/qfxglobal.h>
-QT_BEGIN_HEADER
-
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
-
class QEasingCurve;
class QmlTimeLineValue;
class QmlTimeLineEvent;
@@ -183,8 +190,35 @@ private:
QmlTimeLineObject *d2;
};
-QT_END_NAMESPACE
+template<class T>
+class QmlTimeLineValueProxy : public QmlTimeLineValue
+{
+public:
+ QmlTimeLineValueProxy(T *cls, void (T::*func)(qreal), qreal v = 0.)
+ : QmlTimeLineValue(v), _class(cls), _setFunctionReal(func), _setFunctionInt(0)
+ {
+ Q_ASSERT(_class);
+ }
+
+ QmlTimeLineValueProxy(T *cls, void (T::*func)(int), qreal v = 0.)
+ : QmlTimeLineValue(v), _class(cls), _setFunctionReal(0), _setFunctionInt(func)
+ {
+ Q_ASSERT(_class);
+ }
+
+ virtual void setValue(qreal v)
+ {
+ QmlTimeLineValue::setValue(v);
+ if (_setFunctionReal) (_class->*_setFunctionReal)(v);
+ else if (_setFunctionInt) (_class->*_setFunctionInt)((int)v);
+ }
-QT_END_HEADER
+private:
+ T *_class;
+ void (T::*_setFunctionReal)(qreal);
+ void (T::*_setFunctionInt)(int);
+};
+
+QT_END_NAMESPACE
#endif
diff --git a/src/declarative/util/util.pri b/src/declarative/util/util.pri
index f35812c..543e2d2 100644
--- a/src/declarative/util/util.pri
+++ b/src/declarative/util/util.pri
@@ -16,6 +16,7 @@ SOURCES += \
util/qmllistmodel.cpp\
util/qmllistaccessor.cpp \
util/qmlopenmetaobject.cpp \
+ util/qmltimeline.cpp \
util/qmlbind.cpp
HEADERS += \
@@ -40,4 +41,5 @@ HEADERS += \
util/qmllistaccessor.h \
util/qmlopenmetaobject.h \
util/qmlnullablevalue_p.h \
+ util/qmltimeline_p.h \
util/qmlbind.h