diff options
Diffstat (limited to 'qt-ui/profile/divetextitem.h')
-rw-r--r-- | qt-ui/profile/divetextitem.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/qt-ui/profile/divetextitem.h b/qt-ui/profile/divetextitem.h new file mode 100644 index 000000000..b2e3fb61e --- /dev/null +++ b/qt-ui/profile/divetextitem.h @@ -0,0 +1,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 |