aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/divetextitem.h
blob: b2e3fb61e4bd3ff6e51bca7a32fb9aaf7ed91ba9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef DIVETEXTITEM_H
#define DIVETEXTITEM_H

#include <QObject>
#include <QGraphicsSimpleTextItem>

/* A Line Item that has animated-properties. */
class DiveTextItem :public QObject, public QGraphicsSimpleTextItem{
	Q_OBJECT
	Q_PROPERTY(QPointF pos READ pos WRITE setPos)
	Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity)
public:
	DiveTextItem(QGraphicsItem* parent = 0);
	virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget);
	void setAlignment(int alignFlags);
	void animatedHide();
	void animateMoveTo(qreal x, qreal y);
private:
	int internalAlignFlags;
};

#endif