mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
ca07f45561
Since the animation methods are fairly the same for any QGraphicsItem, I created a new namespace named 'Animations' that should handle all of the specific Animation Functions there, and the programmer has to call those functions from the objects. Good thing is that this reduces boilerplate code. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
18 lines
325 B
C++
18 lines
325 B
C++
#include "divelineitem.h"
|
|
#include "animationfunctions.h"
|
|
#include <QPropertyAnimation>
|
|
|
|
DiveLineItem::DiveLineItem(QGraphicsItem *parent) : QGraphicsLineItem(parent)
|
|
{
|
|
|
|
}
|
|
|
|
void DiveLineItem::animatedHide()
|
|
{
|
|
Animations::hide(this);
|
|
}
|
|
|
|
void DiveLineItem::animateMoveTo(qreal x, qreal y)
|
|
{
|
|
Animations::moveTo(this, x, y);
|
|
}
|