summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-08-21 04:33:38 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-08-21 04:33:38 (GMT)
commit8598114e3379df3a73d4ccc7760e3761ed55edf0 (patch)
tree9c8da15646795f34a194a7aa5485dce95dcd40e0 /src
parentbc5b2b8ea1259bffdbdafe9d509fc675476fdb97 (diff)
downloadQt-8598114e3379df3a73d4ccc7760e3761ed55edf0.zip
Qt-8598114e3379df3a73d4ccc7760e3761ed55edf0.tar.gz
Qt-8598114e3379df3a73d4ccc7760e3761ed55edf0.tar.bz2
SetPropertyAction -> PropertyAction
Diffstat (limited to 'src')
-rw-r--r--src/declarative/QmlChanges.txt1
-rw-r--r--src/declarative/util/qmlanimation.cpp76
-rw-r--r--src/declarative/util/qmlanimation.h12
-rw-r--r--src/declarative/util/qmlanimation_p.h10
4 files changed, 50 insertions, 49 deletions
diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt
index 1465b14..0f1bd1b 100644
--- a/src/declarative/QmlChanges.txt
+++ b/src/declarative/QmlChanges.txt
@@ -20,6 +20,7 @@ Bind -> Binding
SetProperties -> PropertyChanges
RunScript -> StateChangeScript
SetAnchors -> AnchorChanges
+SetPropertyAction -> PropertyAction
RunScriptAction -> ScriptAction
ParentChangeAction -> ParentAction
diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp
index c89b0ce..720a045 100644
--- a/src/declarative/util/qmlanimation.cpp
+++ b/src/declarative/util/qmlanimation.cpp
@@ -422,7 +422,7 @@ void QmlAbstractAnimation::setGroup(QmlAnimationGroup *g)
}
/*!
- \qmlproperty Object SetPropertyAction::target
+ \qmlproperty Object PropertyAction::target
This property holds an explicit target object to animate.
The exact effect of the \c target property depends on how the animation
@@ -459,7 +459,7 @@ void QmlAbstractAnimation::setTarget(QObject *o)
}
/*!
- \qmlproperty string SetPropertyAction::property
+ \qmlproperty string PropertyAction::property
This property holds an explicit property to animated.
The exact effect of the \c property property depends on how the animation
@@ -870,58 +870,58 @@ QAbstractAnimation *QmlScriptAction::qtAnimation()
QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ScriptAction,QmlScriptAction)
/*!
- \qmlclass SetPropertyAction QmlSetPropertyAction
+ \qmlclass PropertyAction QmlPropertyAction
\inherits Animation
- \brief The SetPropertyAction allows immediate property changes during animation.
+ \brief The PropertyAction allows immediate property changes during animation.
Explicitly set \c theimage.smooth=true during a transition:
\code
- SetPropertyAction { target: theimage; property: "smooth"; value: true }
+ PropertyAction { target: theimage; property: "smooth"; value: true }
\endcode
Set \c thewebview.url to the value set for the destination state:
\code
- SetPropertyAction { target: thewebview; property: "url" }
+ PropertyAction { target: thewebview; property: "url" }
\endcode
- The SetPropertyAction is immediate -
+ The PropertyAction is immediate -
the target property is not animated to the selected value in any way.
*/
/*!
\internal
- \class QmlSetPropertyAction
+ \class QmlPropertyAction
*/
-QmlSetPropertyAction::QmlSetPropertyAction(QObject *parent)
-: QmlAbstractAnimation(*(new QmlSetPropertyActionPrivate), parent)
+QmlPropertyAction::QmlPropertyAction(QObject *parent)
+: QmlAbstractAnimation(*(new QmlPropertyActionPrivate), parent)
{
- Q_D(QmlSetPropertyAction);
+ Q_D(QmlPropertyAction);
d->init();
}
-QmlSetPropertyAction::~QmlSetPropertyAction()
+QmlPropertyAction::~QmlPropertyAction()
{
}
-void QmlSetPropertyActionPrivate::init()
+void QmlPropertyActionPrivate::init()
{
- Q_Q(QmlSetPropertyAction);
+ Q_Q(QmlPropertyAction);
spa = new QActionAnimation;
QFx_setParent_noEvent(spa, q);
}
/*!
- \qmlproperty string SetPropertyAction::properties
+ \qmlproperty string PropertyAction::properties
This property holds the properties to be immediately set, comma-separated.
*/
-QString QmlSetPropertyAction::properties() const
+QString QmlPropertyAction::properties() const
{
- Q_D(const QmlSetPropertyAction);
+ Q_D(const QmlPropertyAction);
return d->properties;
}
-void QmlSetPropertyAction::setProperties(const QString &p)
+void QmlPropertyAction::setProperties(const QString &p)
{
- Q_D(QmlSetPropertyAction);
+ Q_D(QmlPropertyAction);
if (d->properties == p)
return;
d->properties = p;
@@ -929,61 +929,61 @@ void QmlSetPropertyAction::setProperties(const QString &p)
}
/*!
- \qmlproperty list<Item> SetPropertyAction::targets
+ \qmlproperty list<Item> PropertyAction::targets
This property holds the items selected to be affected by this animation (all if not set).
\sa exclude
*/
-QList<QObject *> *QmlSetPropertyAction::targets()
+QList<QObject *> *QmlPropertyAction::targets()
{
- Q_D(QmlSetPropertyAction);
+ Q_D(QmlPropertyAction);
return &d->targets;
}
/*!
- \qmlproperty list<Item> SetPropertyAction::exclude
+ \qmlproperty list<Item> PropertyAction::exclude
This property holds the items not to be affected by this animation.
\sa targets
*/
-QList<QObject *> *QmlSetPropertyAction::exclude()
+QList<QObject *> *QmlPropertyAction::exclude()
{
- Q_D(QmlSetPropertyAction);
+ Q_D(QmlPropertyAction);
return &d->exclude;
}
/*!
- \qmlproperty any SetPropertyAction::value
+ \qmlproperty any PropertyAction::value
This property holds the value to be set on the property.
If not set, then the value defined for the end state of the transition.
*/
-QVariant QmlSetPropertyAction::value() const
+QVariant QmlPropertyAction::value() const
{
- Q_D(const QmlSetPropertyAction);
+ Q_D(const QmlPropertyAction);
return d->value;
}
-void QmlSetPropertyAction::setValue(const QVariant &v)
+void QmlPropertyAction::setValue(const QVariant &v)
{
- Q_D(QmlSetPropertyAction);
+ Q_D(QmlPropertyAction);
if (d->value.isNull || d->value != v) {
d->value = v;
emit valueChanged(v);
}
}
-void QmlSetPropertyActionPrivate::doAction()
+void QmlPropertyActionPrivate::doAction()
{
property.write(value);
}
-QAbstractAnimation *QmlSetPropertyAction::qtAnimation()
+QAbstractAnimation *QmlPropertyAction::qtAnimation()
{
- Q_D(QmlSetPropertyAction);
+ Q_D(QmlPropertyAction);
return d->spa;
}
-void QmlSetPropertyAction::prepare(QmlMetaProperty &p)
+void QmlPropertyAction::prepare(QmlMetaProperty &p)
{
- Q_D(QmlSetPropertyAction);
+ Q_D(QmlPropertyAction);
if (d->userProperty.isNull)
d->property = p;
@@ -993,11 +993,11 @@ void QmlSetPropertyAction::prepare(QmlMetaProperty &p)
d->spa->setAnimAction(&d->proxy, QAbstractAnimation::KeepWhenStopped);
}
-void QmlSetPropertyAction::transition(QmlStateActions &actions,
+void QmlPropertyAction::transition(QmlStateActions &actions,
QmlMetaProperties &modified,
TransitionDirection direction)
{
- Q_D(QmlSetPropertyAction);
+ Q_D(QmlPropertyAction);
Q_UNUSED(direction);
struct QmlSetPropertyAnimationAction : public QAbstractAnimationAction
@@ -1072,7 +1072,7 @@ void QmlSetPropertyAction::transition(QmlStateActions &actions,
}
}
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,SetPropertyAction,QmlSetPropertyAction)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PropertyAction,QmlPropertyAction)
/*!
\qmlclass ParentAction QmlParentAction
diff --git a/src/declarative/util/qmlanimation.h b/src/declarative/util/qmlanimation.h
index e27c899..f5180a5 100644
--- a/src/declarative/util/qmlanimation.h
+++ b/src/declarative/util/qmlanimation.h
@@ -186,11 +186,11 @@ protected:
virtual QAbstractAnimation *qtAnimation();
};
-class QmlSetPropertyActionPrivate;
-class QmlSetPropertyAction : public QmlAbstractAnimation
+class QmlPropertyActionPrivate;
+class QmlPropertyAction : public QmlAbstractAnimation
{
Q_OBJECT
- Q_DECLARE_PRIVATE(QmlSetPropertyAction)
+ Q_DECLARE_PRIVATE(QmlPropertyAction)
Q_PROPERTY(QObject *target READ target WRITE setTarget NOTIFY targetChanged)
Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY targetChanged)
@@ -200,8 +200,8 @@ class QmlSetPropertyAction : public QmlAbstractAnimation
Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged)
public:
- QmlSetPropertyAction(QObject *parent=0);
- virtual ~QmlSetPropertyAction();
+ QmlPropertyAction(QObject *parent=0);
+ virtual ~QmlPropertyAction();
QString properties() const;
void setProperties(const QString &);
@@ -396,7 +396,7 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QmlAbstractAnimation)
QML_DECLARE_TYPE(QmlPauseAnimation)
QML_DECLARE_TYPE(QmlScriptAction)
-QML_DECLARE_TYPE(QmlSetPropertyAction)
+QML_DECLARE_TYPE(QmlPropertyAction)
QML_DECLARE_TYPE(QmlParentAction)
QML_DECLARE_TYPE(QmlPropertyAnimation)
QML_DECLARE_TYPE(QmlColorAnimation)
diff --git a/src/declarative/util/qmlanimation_p.h b/src/declarative/util/qmlanimation_p.h
index b81f5ae..4f6edb7 100644
--- a/src/declarative/util/qmlanimation_p.h
+++ b/src/declarative/util/qmlanimation_p.h
@@ -240,11 +240,11 @@ public:
QActionAnimation *rsa;
};
-class QmlSetPropertyActionPrivate : public QmlAbstractAnimationPrivate
+class QmlPropertyActionPrivate : public QmlAbstractAnimationPrivate
{
- Q_DECLARE_PUBLIC(QmlSetPropertyAction)
+ Q_DECLARE_PUBLIC(QmlPropertyAction)
public:
- QmlSetPropertyActionPrivate()
+ QmlPropertyActionPrivate()
: QmlAbstractAnimationPrivate(), proxy(this), spa(0) {}
void init();
@@ -257,8 +257,8 @@ public:
void doAction();
- QAnimationActionProxy<QmlSetPropertyActionPrivate,
- &QmlSetPropertyActionPrivate::doAction> proxy;
+ QAnimationActionProxy<QmlPropertyActionPrivate,
+ &QmlPropertyActionPrivate::doAction> proxy;
QActionAnimation *spa;
};