profile: don't derive DiveTextItem from QObject

This was used for animations, but these are now controlled
centrally, so no need for the Q_PROPERTY rigmarole.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-02-26 19:40:27 +01:00
parent 76faecb379
commit 7c7469b8ab

View file

@ -2,17 +2,12 @@
#ifndef DIVETEXTITEM_H
#define DIVETEXTITEM_H
#include <QObject>
#include <QFont>
#include <QGraphicsPixmapItem>
class QBrush;
/* A Line Item that has animated-properties. */
class DiveTextItem : public QObject, public QGraphicsPixmapItem {
Q_OBJECT
Q_PROPERTY(QPointF pos READ pos WRITE setPos)
Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity)
class DiveTextItem : public QGraphicsPixmapItem {
public:
// Note: vertical centring is based on the actual rendered text, not on the font metrics.
// This is fine for placing text in the "tankbar", but it will look disastrous when