#include <QDomElement>
#include <QPainter>
#include <QStyleOptionGraphicsItem>
+#if QT_VERSION >= 0x040600
#include <QPropertyAnimation>
-
+#endif
Transition::Transition(const ItemInfo &info, int transitiontrack, double fps, QDomElement params, bool automaticTransition) :
AbstractClipItem(info, QRectF(), fps),
else {
QPropertyAnimation *startAnimation = new QPropertyAnimation(this, "rect");
startAnimation->setDuration(200);
- QRectF r(0, 0, m_info.cropDuration.frames(fps) - 0.02, (qreal) itemHeight() / 2);
- QRectF r2(0, 0, m_info.cropDuration.frames(fps) - 0.02, (qreal)itemHeight());
+ const QRectF r(0, 0, m_info.cropDuration.frames(fps) - 0.02, (qreal) itemHeight() / 2);
+ const QRectF r2(0, 0, m_info.cropDuration.frames(fps) - 0.02, (qreal)itemHeight());
startAnimation->setStartValue(r);
startAnimation->setEndValue(r2);
startAnimation->setEasingCurve(QEasingCurve::OutQuad);
return MOVE;
}
+//static
int Transition::itemHeight()
{
return (int) (KdenliveSettings::trackheight() / 3 * 2 - 1);
}
+//static
int Transition::itemOffset()
{
return (int) (KdenliveSettings::trackheight() / 3 * 2);