diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-04-08 05:25:09 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-04-08 05:25:09 (GMT) |
commit | a563fac8c17f284bdc7499225edc674e363f6dc8 (patch) | |
tree | 95c0cb5864a7242bed0ab7cc0b77994c7d4e7b5e /src | |
parent | 23ca795df373ef41d2b3020c9ea7c38714aaa67b (diff) | |
parent | cabf4f41a51599b3527cd848af14966986430566 (diff) | |
download | Qt-a563fac8c17f284bdc7499225edc674e363f6dc8.zip Qt-a563fac8c17f284bdc7499225edc674e363f6dc8.tar.gz Qt-a563fac8c17f284bdc7499225edc674e363f6dc8.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src')
16 files changed, 448 insertions, 23 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativegraphicsobjectcontainer.cpp b/src/declarative/graphicsitems/qdeclarativegraphicsobjectcontainer.cpp index c846431..f5beebd 100644 --- a/src/declarative/graphicsitems/qdeclarativegraphicsobjectcontainer.cpp +++ b/src/declarative/graphicsitems/qdeclarativegraphicsobjectcontainer.cpp @@ -108,7 +108,7 @@ public: Example: \code - import Qt 4.6 + import Qt 4.7 import MyApp 2.1 as Widgets Rectangle{ id: rect diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 29e43f9..4b311af 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -449,7 +449,7 @@ void QDeclarativeTextInput::setFocusOnPress(bool b) input of integers between 11 and 31 into the text input: \code - import Qt 4.6 + import Qt 4.7 TextInput{ validator: IntValidator{bottom: 11; top: 31;} focus: true diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index dfd9c0c..15348ed 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -830,7 +830,7 @@ void QDeclarativeVisualDataModel::setDelegate(QDeclarativeComponent *delegate) \code // view.qml - import Qt 4.6 + import Qt 4.7 ListView { width: 200 diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index b12d6f4..f20ffa6 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -882,7 +882,7 @@ void QDeclarativeCompiler::genObject(QDeclarativeParser::Object *obj) // Create the object if (obj->custom.isEmpty() && output->types.at(obj->type).type && - obj != compileState.root) { + !output->types.at(obj->type).type->isExtendedType() && obj != compileState.root) { QDeclarativeInstruction create; create.type = QDeclarativeInstruction::CreateSimpleObject; diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 44437ea..ee0bd18 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -408,7 +408,7 @@ QDeclarativeWorkerScriptEngine *QDeclarativeEnginePrivate::getWorkerScriptEngine \code QDeclarativeEngine engine; QDeclarativeComponent component(&engine); - component.setData("import Qt 4.6\nText { text: \"Hello world!\" }", QUrl()); + component.setData("import Qt 4.7\nText { text: \"Hello world!\" }", QUrl()); QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(component.create()); //add item to view, etc diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/declarative/qml/qdeclarativemetatype.cpp index 56cc219..7b71608 100644 --- a/src/declarative/qml/qdeclarativemetatype.cpp +++ b/src/declarative/qml/qdeclarativemetatype.cpp @@ -328,6 +328,13 @@ bool QDeclarativeType::isCreatable() const return d->m_newFunc != 0; } +bool QDeclarativeType::isExtendedType() const +{ + d->init(); + + return !d->m_metaObjects.isEmpty(); +} + bool QDeclarativeType::isInterface() const { return d->m_isInterface; diff --git a/src/declarative/qml/qdeclarativemetatype_p.h b/src/declarative/qml/qdeclarativemetatype_p.h index 96e3c74..70b7c90 100644 --- a/src/declarative/qml/qdeclarativemetatype_p.h +++ b/src/declarative/qml/qdeclarativemetatype_p.h @@ -122,6 +122,7 @@ public: QDeclarativeCustomParser *customParser() const; bool isCreatable() const; + bool isExtendedType() const; bool isInterface() const; int typeId() const; diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp index 10b9fab..32ba2c3 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp @@ -100,6 +100,9 @@ QScriptValue QDeclarativeObjectScriptClass::newQObject(QObject *object, int type if (!object) return newObject(scriptEngine, this, new ObjectData(object, type)); + if (QObjectPrivate::get(object)->wasDeleted) + return scriptEngine->undefinedValue(); + QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(object, true); if (!ddata) { diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp index ddb0ece..caf680e 100644 --- a/src/declarative/qml/qdeclarativeworkerscript.cpp +++ b/src/declarative/qml/qdeclarativeworkerscript.cpp @@ -508,7 +508,7 @@ void QDeclarativeWorkerScriptEngine::run() Here is an example: \qml - import Qt 4.6 + import Qt 4.7 Rectangle { width: 300 diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp index 0ed97bf..ecbd71e 100644 --- a/src/declarative/util/qdeclarativepropertychanges.cpp +++ b/src/declarative/util/qdeclarativepropertychanges.cpp @@ -103,7 +103,7 @@ QT_BEGIN_NAMESPACE natural width (which is the whole string on one line). \qml - import Qt 4.6 + import Qt 4.7 Rectangle { width: 640 diff --git a/src/declarative/util/qdeclarativesmoothedanimation.cpp b/src/declarative/util/qdeclarativesmoothedanimation.cpp index 3411642..48a7583 100644 --- a/src/declarative/util/qdeclarativesmoothedanimation.cpp +++ b/src/declarative/util/qdeclarativesmoothedanimation.cpp @@ -69,6 +69,7 @@ QSmoothedAnimation::QSmoothedAnimation(QObject *parent) void QSmoothedAnimation::restart() { + initialVelocity = trackVelocity; if (state() != QAbstractAnimation::Running) start(); else @@ -224,6 +225,7 @@ void QSmoothedAnimation::init() QDeclarativePropertyPrivate::write(target, to, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); + stop(); return; case QDeclarativeSmoothedAnimation::Immediate: initialVelocity = 0; @@ -248,13 +250,14 @@ void QSmoothedAnimation::init() /*! \qmlclass SmoothedAnimation QDeclarativeSmoothedAnimation \since 4.7 + \inherits NumberAnimation \brief The SmoothedAnimation element allows a property to smoothly track a value. - The SmoothedAnimation smoothly animates a property's value to a set target value + The SmoothedAnimation animates a property's value to a set target value using an ease in/out quad easing curve. If the animation is restarted with a different target value, the easing curves used to animate to the old - and the new target values are spliced together to avoid any obvious visual - glitches. + and the new target values are smoothly spliced together to avoid any obvious + visual glitches by maintaining the current velocity. The property animation is configured by setting the velocity at which the animation should occur, or the duration that the animation should take. @@ -270,7 +273,7 @@ void QSmoothedAnimation::init() The follow example shows one rectangle tracking the position of another. \code -import Qt 4.6 +import Qt 4.7 Rectangle { width: 800; height: 600; color: "blue" @@ -343,17 +346,14 @@ void QDeclarativeSmoothedAnimation::transition(QDeclarativeStateActions &actions QSet<QAbstractAnimation*> anims; for (int i = 0; i < d->actions->size(); i++) { QSmoothedAnimation *ease; - qreal trackVelocity; bool needsRestart; if (!d->activeAnimations.contains((*d->actions)[i].property)) { ease = new QSmoothedAnimation(); d->wrapperGroup->addAnimation(ease); d->activeAnimations.insert((*d->actions)[i].property, ease); - trackVelocity = 0.0; needsRestart = false; } else { ease = d->activeAnimations.value((*d->actions)[i].property); - trackVelocity = ease->trackVelocity; needsRestart = true; } @@ -366,8 +366,7 @@ void QDeclarativeSmoothedAnimation::transition(QDeclarativeStateActions &actions ease->velocity = d->anim->velocity; ease->userDuration = d->anim->userDuration; - ease->trackVelocity = trackVelocity; - ease->initialVelocity = trackVelocity; + ease->initialVelocity = ease->trackVelocity; if (needsRestart) ease->init(); @@ -458,14 +457,14 @@ void QDeclarativeSmoothedAnimation::setVelocity(qreal v) } /*! -\qmlproperty qreal SmoothedAnimation::maximumEasingTime + \qmlproperty qreal SmoothedAnimation::maximumEasingTime -This property specifies the maximum time, in msecs, an "eases" during the follow should take. -Setting this property causes the velocity to "level out" after at a time. Setting -a negative value reverts to the normal mode of easing over the entire animation -duration. + This property specifies the maximum time, in msecs, an "eases" during the follow should take. + Setting this property causes the velocity to "level out" after at a time. Setting + a negative value reverts to the normal mode of easing over the entire animation + duration. -The default value is -1. + The default value is -1. */ int QDeclarativeSmoothedAnimation::maximumEasingTime() const { diff --git a/src/declarative/util/qdeclarativesmoothedanimation_p.h b/src/declarative/util/qdeclarativesmoothedanimation_p.h index df53104..17aafa4 100644 --- a/src/declarative/util/qdeclarativesmoothedanimation_p.h +++ b/src/declarative/util/qdeclarativesmoothedanimation_p.h @@ -83,7 +83,6 @@ public: int maximumEasingTime() const; void setMaximumEasingTime(int); -public: virtual void transition(QDeclarativeStateActions &actions, QDeclarativeProperties &modified, TransitionDirection direction); diff --git a/src/declarative/util/qdeclarativesmoothedfollow.cpp b/src/declarative/util/qdeclarativesmoothedfollow.cpp new file mode 100644 index 0000000..63c9618 --- /dev/null +++ b/src/declarative/util/qdeclarativesmoothedfollow.cpp @@ -0,0 +1,299 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (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 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. +** +** In addition, as a special exception, Nokia gives you certain additional +** 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. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qdeclarativesmoothedfollow_p.h" +#include "qdeclarativesmoothedanimation_p_p.h" + +#include <private/qobject_p.h> +#include <QtCore/qnumeric.h> + +#include "qdeclarativeglobal_p.h" + + +QT_BEGIN_NAMESPACE + +class QDeclarativeSmoothedFollowPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QDeclarativeSmoothedFollow) +public: + QDeclarativeSmoothedFollowPrivate(); + + bool enabled; + QSmoothedAnimation *anim; +}; + +/*! + \qmlclass SmoothedFollow QDeclarativeSmoothedFollow + \since 4.7 + \inherits NumberAnimation + \brief The SmoothedFollow element allows a property to smoothly track a value. + + The SmoothedFollow animates a property's value to a set target value + using an ease in/out quad easing curve. If the animation is restarted + with a different target value, the easing curves used to animate to the old + and the new target values are smoothly spliced together to avoid any obvious + visual glitches by maintaining the current velocity. + + The property animation is configured by setting the velocity at which the + animation should occur, or the duration that the animation should take. + If both a velocity and a duration are specified, the one that results in + the quickest animation is chosen for each change in the target value. + + For example, animating from 0 to 800 will take 4 seconds if a velocity + of 200 is set, will take 8 seconds with a duration of 8000 set, and will + take 4 seconds with both a velocity of 200 and a duration of 8000 set. + Animating from 0 to 20000 will take 10 seconds if a velocity of 200 is set, + will take 8 seconds with a duration of 8000 set, and will take 8 seconds + with both a velocity of 200 and a duration of 8000 set. + + The follow example shows one rectangle tracking the position of another. +\code +import Qt 4.6 + +Rectangle { + width: 800; height: 600; color: "blue" + + Rectangle { + color: "green" + width: 60; height: 60; + SmoothedFollow on x { to: rect1.x - 5; velocity: 200 } + SmoothedFollow on y { to: rect1.y - 5; velocity: 200 } + } + + Rectangle { + id: rect1 + color: "red" + width: 50; height: 50; + } + + focus: true + Keys.onRightPressed: rect1.x = rect1.x + 100 + Keys.onLeftPressed: rect1.x = rect1.x - 100 + Keys.onUpPressed: rect1.y = rect1.y - 100 + Keys.onDownPressed: rect1.y = rect1.y + 100 +} +\endcode + + The default velocity of SmoothedFollow is 200 units/second. Note that if the range of the + value being animated is small, then the velocity will need to be adjusted + appropriately. For example, the opacity of an item ranges from 0 - 1.0. + To enable a smooth animation in this range the velocity will need to be + set to a value such as 0.5 units/second. Animating from 0 to 1.0 with a velocity + of 0.5 will take 2000 ms to complete. + + \sa SpringFollow +*/ + +QDeclarativeSmoothedFollow::QDeclarativeSmoothedFollow(QObject *parent) + : QObject(*(new QDeclarativeSmoothedFollowPrivate), parent) +{ +} + +QDeclarativeSmoothedFollow::~QDeclarativeSmoothedFollow() +{ +} + +QDeclarativeSmoothedFollowPrivate::QDeclarativeSmoothedFollowPrivate() + : enabled(true), anim(new QSmoothedAnimation) +{ + Q_Q(QDeclarativeSmoothedFollow); + QDeclarative_setParent_noEvent(anim, q); +} + +/*! + \qmlproperty enumeration SmoothedFollow::reversingMode + + Sets how the SmoothedFollow behaves if an animation direction is reversed. + + If reversing mode is \c Eased, the animation will smoothly decelerate, and + then reverse direction. If the reversing mode is \c Immediate, the + animation will immediately begin accelerating in the reverse direction, + begining with a velocity of 0. If the reversing mode is \c Sync, the + property is immediately set to the target value. +*/ +QDeclarativeSmoothedFollow::ReversingMode QDeclarativeSmoothedFollow::reversingMode() const +{ + Q_D(const QDeclarativeSmoothedFollow); + return (ReversingMode) d->anim->reversingMode; +} + +void QDeclarativeSmoothedFollow::setReversingMode(ReversingMode m) +{ + Q_D(QDeclarativeSmoothedFollow); + if (d->anim->reversingMode == (QDeclarativeSmoothedAnimation::ReversingMode) m) + return; + + d->anim->reversingMode = (QDeclarativeSmoothedAnimation::ReversingMode) m; + emit reversingModeChanged(); +} + +/*! + \qmlproperty int SmoothedFollow::duration + + This property holds the animation duration, in msecs, used when tracking the source. + + Setting this to -1 (the default) disables the duration value. +*/ +int QDeclarativeSmoothedFollow::duration() const +{ + Q_D(const QDeclarativeSmoothedFollow); + return d->anim->userDuration; +} + +void QDeclarativeSmoothedFollow::setDuration(int duration) +{ + Q_D(QDeclarativeSmoothedFollow); + if (duration == d->anim->duration()) + return; + + d->anim->userDuration = duration; + emit durationChanged(); +} + +qreal QDeclarativeSmoothedFollow::velocity() const +{ + Q_D(const QDeclarativeSmoothedFollow); + return d->anim->velocity; +} + +/*! + \qmlproperty qreal SmoothedFollow::velocity + + This property holds the average velocity allowed when tracking the 'to' value. + + The default velocity of SmoothedFollow is 200 units/second. + + Setting this to -1 disables the velocity value. +*/ +void QDeclarativeSmoothedFollow::setVelocity(qreal v) +{ + Q_D(QDeclarativeSmoothedFollow); + if (d->anim->velocity == v) + return; + + d->anim->velocity = v; + emit velocityChanged(); +} + +/*! + \qmlproperty qreal SmoothedFollow::maximumEasingTime + + This property specifies the maximum time, in msecs, an "eases" during the follow should take. + Setting this property causes the velocity to "level out" after at a time. Setting + a negative value reverts to the normal mode of easing over the entire animation + duration. + + The default value is -1. +*/ +int QDeclarativeSmoothedFollow::maximumEasingTime() const +{ + Q_D(const QDeclarativeSmoothedFollow); + return d->anim->maximumEasingTime; +} + +void QDeclarativeSmoothedFollow::setMaximumEasingTime(int v) +{ + Q_D(QDeclarativeSmoothedFollow); + d->anim->maximumEasingTime = v; + emit maximumEasingTimeChanged(); +} + +/*! + \qmlproperty real SmoothedFollow::to + This property holds the ending value. + If not set, then the value defined in the end state of the transition or Behavior. +*/ +qreal QDeclarativeSmoothedFollow::to() const +{ + Q_D(const QDeclarativeSmoothedFollow); + return d->anim->to; +} + +void QDeclarativeSmoothedFollow::setTo(qreal t) +{ + Q_D(QDeclarativeSmoothedFollow); + + if (qIsNaN(t)) + return; + + if (d->anim->to == t) + return; + + d->anim->to = t; + + if (d->enabled) + d->anim->restart(); +} + +/*! + \qmlproperty bool SmoothedFollow::enabled + This property whether this animation should automatically restart when + the 'to' property is upated. + + The default value of this property is 'true'. +*/ +bool QDeclarativeSmoothedFollow::enabled() const +{ + Q_D(const QDeclarativeSmoothedFollow); + return d->enabled; +} + +void QDeclarativeSmoothedFollow::setEnabled(bool e) +{ + Q_D(QDeclarativeSmoothedFollow); + if (d->enabled == e) + return; + d->enabled = e; + + if (d->enabled) + d->anim->restart(); + else + d->anim->stop(); + emit enabledChanged(); +} + +void QDeclarativeSmoothedFollow::setTarget(const QDeclarativeProperty &t) +{ + Q_D(QDeclarativeSmoothedFollow); + d->anim->target = t; +} + +QT_END_NAMESPACE diff --git a/src/declarative/util/qdeclarativesmoothedfollow_p.h b/src/declarative/util/qdeclarativesmoothedfollow_p.h new file mode 100644 index 0000000..d860052 --- /dev/null +++ b/src/declarative/util/qdeclarativesmoothedfollow_p.h @@ -0,0 +1,113 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (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 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. +** +** In addition, as a special exception, Nokia gives you certain additional +** 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. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVESMOOTHEDFOLLOW_H +#define QDECLARATIVESMOOTHEDFOLLOW_H + +#include <qdeclarative.h> +#include <qdeclarativepropertyvaluesource.h> + +#include <QtCore/qobject.h> + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +class QDeclarativeProperty; +class QDeclarativeSmoothedFollowPrivate; +class Q_DECLARATIVE_EXPORT QDeclarativeSmoothedFollow : public QObject, + public QDeclarativePropertyValueSource +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QDeclarativeSmoothedFollow) + Q_INTERFACES(QDeclarativePropertyValueSource) + Q_ENUMS(ReversingMode) + + Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged) + Q_PROPERTY(qreal velocity READ velocity WRITE setVelocity NOTIFY velocityChanged) + Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged) + Q_PROPERTY(ReversingMode reversingMode READ reversingMode WRITE setReversingMode NOTIFY reversingModeChanged) + Q_PROPERTY(qreal maximumEasingTime READ maximumEasingTime WRITE setMaximumEasingTime NOTIFY maximumEasingTimeChanged) + Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) + +public: + enum ReversingMode { Eased, Immediate, Sync }; + + QDeclarativeSmoothedFollow(QObject *parent = 0); + ~QDeclarativeSmoothedFollow(); + + qreal to() const; + void setTo(qreal); + + ReversingMode reversingMode() const; + void setReversingMode(ReversingMode); + + int duration() const; + void setDuration(int); + + qreal velocity() const; + void setVelocity(qreal); + + int maximumEasingTime() const; + void setMaximumEasingTime(int); + + bool enabled() const; + void setEnabled(bool); + + virtual void setTarget(const QDeclarativeProperty &); + +Q_SIGNALS: + void velocityChanged(); + void durationChanged(); + void reversingModeChanged(); + void maximumEasingTimeChanged(); + void enabledChanged(); +}; + +QT_END_NAMESPACE + +QML_DECLARE_TYPE(QDeclarativeSmoothedFollow); + +QT_END_HEADER + +#endif // QDECLARATIVESMOOTHEDFOLLOW_H diff --git a/src/declarative/util/qdeclarativeutilmodule.cpp b/src/declarative/util/qdeclarativeutilmodule.cpp index 218a90b..b9f1abb 100644 --- a/src/declarative/util/qdeclarativeutilmodule.cpp +++ b/src/declarative/util/qdeclarativeutilmodule.cpp @@ -46,6 +46,7 @@ #include "private/qdeclarativebind_p.h" #include "private/qdeclarativeconnections_p.h" #include "private/qdeclarativesmoothedanimation_p.h" +#include "private/qdeclarativesmoothedfollow_p.h" #include "private/qdeclarativefontloader_p.h" #include "private/qdeclarativelistaccessor_p.h" #include "private/qdeclarativelistmodel_p.h" @@ -80,6 +81,7 @@ void QDeclarativeUtilModule::defineModule() qmlRegisterType<QDeclarativeColorAnimation>("Qt",4,6,"ColorAnimation"); qmlRegisterType<QDeclarativeConnections>("Qt",4,6,"Connections"); qmlRegisterType<QDeclarativeSmoothedAnimation>("Qt",4,6,"SmoothedAnimation"); + qmlRegisterType<QDeclarativeSmoothedFollow>("Qt",4,6,"SmoothedFollow"); qmlRegisterType<QDeclarativeFontLoader>("Qt",4,6,"FontLoader"); qmlRegisterType<QDeclarativeListElement>("Qt",4,6,"ListElement"); qmlRegisterType<QDeclarativeNumberAnimation>("Qt",4,6,"NumberAnimation"); diff --git a/src/declarative/util/util.pri b/src/declarative/util/util.pri index 4163596..f20bba1 100644 --- a/src/declarative/util/util.pri +++ b/src/declarative/util/util.pri @@ -9,6 +9,7 @@ SOURCES += \ $$PWD/qdeclarativesystempalette.cpp \ $$PWD/qdeclarativespringfollow.cpp \ $$PWD/qdeclarativesmoothedanimation.cpp \ + $$PWD/qdeclarativesmoothedfollow.cpp \ $$PWD/qdeclarativestate.cpp\ $$PWD/qdeclarativetransitionmanager.cpp \ $$PWD/qdeclarativestateoperations.cpp \ @@ -38,6 +39,7 @@ HEADERS += \ $$PWD/qdeclarativesystempalette_p.h \ $$PWD/qdeclarativespringfollow_p.h \ $$PWD/qdeclarativesmoothedanimation_p.h \ + $$PWD/qdeclarativesmoothedfollow_p.h \ $$PWD/qdeclarativesmoothedanimation_p_p.h \ $$PWD/qdeclarativestate_p.h\ $$PWD/qdeclarativestateoperations_p.h \ |