mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: remove unused animation functions
A few animation function are not necessary anymore. Remove them. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
5c5c0c4880
commit
e7b078a7fd
2 changed files with 2 additions and 39 deletions
|
@ -29,33 +29,7 @@ namespace Animations {
|
|||
}
|
||||
}
|
||||
|
||||
void animDelete(QObject *obj, int speed)
|
||||
{
|
||||
if (speed != 0) {
|
||||
QPropertyAnimation *animation = new QPropertyAnimation(obj, "opacity");
|
||||
obj->connect(animation, &QPropertyAnimation::finished, &QObject::deleteLater);
|
||||
animation->setStartValue(1);
|
||||
animation->setEndValue(0);
|
||||
animation->start(QAbstractAnimation::DeleteWhenStopped);
|
||||
} else {
|
||||
delete obj;
|
||||
}
|
||||
}
|
||||
|
||||
void moveTo(QObject *obj, int speed, qreal x, qreal y)
|
||||
{
|
||||
if (speed != 0) {
|
||||
QPropertyAnimation *animation = new QPropertyAnimation(obj, "pos");
|
||||
animation->setDuration(prefs.animation_speed);
|
||||
animation->setStartValue(obj->property("pos").toPointF());
|
||||
animation->setEndValue(QPointF(x, y));
|
||||
animation->start(QAbstractAnimation::DeleteWhenStopped);
|
||||
} else {
|
||||
obj->setProperty("pos", QPointF(x, y));
|
||||
}
|
||||
}
|
||||
|
||||
void scaleTo(QObject *obj, int speed, qreal scale)
|
||||
void scaleTo(QObject *obj, int speed, double scale)
|
||||
{
|
||||
if (speed != 0) {
|
||||
QPropertyAnimation *animation = new QPropertyAnimation(obj, "scale");
|
||||
|
@ -68,9 +42,4 @@ namespace Animations {
|
|||
obj->setProperty("scale", QVariant::fromValue(scale));
|
||||
}
|
||||
}
|
||||
|
||||
void moveTo(QObject *obj, int speed, const QPointF &pos)
|
||||
{
|
||||
moveTo(obj, speed, pos.x(), pos.y());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue