[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/plasma/animations
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2010-01-04 9:16:42
Message-ID: 1262596602.425818.12428.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1069728 by aseigo:
API cleansing:
* missing const on widgetToAnimate()
* widgetToAnimation -> targetWidget to be consistent with naming in QVariantAnimation \
which uses targetObject
* targetWidget is not virtual; all set up can be done in the stateChange method
M +4 -3 animation.cpp
M +6 -11 animation.h
--- trunk/KDE/kdelibs/plasma/animations/animation.cpp #1069727:1069728
@@ -59,14 +59,15 @@
d->duration = qMax(0, duration);
}
-void Animation::setWidgetToAnimate(QGraphicsWidget* widget)
+void Animation::setTargetWidget(QGraphicsWidget* widget)
{
d->animObject = widget;
- if (parent() == 0)
+ if (parent() == 0) {
setParent(widget);
+ }
}
-QGraphicsWidget* Animation::widgetToAnimate()
+QGraphicsWidget* Animation::targetWidget() const
{
return d->animObject.data();
}
--- trunk/KDE/kdelibs/plasma/animations/animation.h #1069727:1069728
@@ -49,7 +49,7 @@
Q_OBJECT
Q_PROPERTY(int duration READ duration WRITE setDuration)
Q_PROPERTY(QEasingCurve::Type easingCurveType READ easingCurveType WRITE \
setEasingCurveType)
- Q_PROPERTY(QGraphicsWidget *widgetToAnimate READ widgetToAnimate WRITE \
setWidgetToAnimate) + Q_PROPERTY(QGraphicsWidget *targetWidget READ targetWidget \
WRITE setTargetWidget)
public:
/**
@@ -81,22 +81,18 @@
/**
* Destructor.
*/
- virtual ~Animation() = 0;
+ ~Animation() = 0;
/**
* Set the widget on which the animation is to be performed.
- *
- * If the animation class has any special initialization to be done
- * in the target widget, you should reimplement this method in
- * the derived class.
- * @arg receiver The QGraphicsWidget to be animated.
+ * @arg widget The QGraphicsWidget to be animated.
*/
- virtual void setWidgetToAnimate(QGraphicsWidget* widget);
+ void setTargetWidget(QGraphicsWidget* widget);
/**
- * The widget that the animation will be performed upon
+ * @return The widget that the animation will be performed upon
*/
- QGraphicsWidget *widgetToAnimate();
+ QGraphicsWidget *targetWidget() const;
/**
* Set the animation easing curve type
@@ -109,7 +105,6 @@
QEasingCurve::Type easingCurveType() const;
protected:
-
/**
* Change the animation duration. Default is 250ms.
* @arg duration The new duration of the animation.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic