1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-12-04 08:19:10 +01:00
GPXSee/src/map/textitem.h

28 lines
505 B
C
Raw Normal View History

#ifndef TEXTITEM_H
#define TEXTITEM_H
#include <QList>
#include <QRectF>
#include <QPainterPath>
class QPainter;
class TextItem
{
public:
2020-10-17 14:26:59 +02:00
TextItem(const QString *text) : _text(text) {}
virtual ~TextItem() {}
virtual QPainterPath shape() const = 0;
virtual QRectF boundingRect() const = 0;
virtual void paint(QPainter *painter) const = 0;
2020-10-17 14:26:59 +02:00
const QString *text() const {return _text;}
bool collides(const QList<TextItem*> &list) const;
2020-10-17 14:26:59 +02:00
protected:
const QString *_text;
};
#endif // TEXTITEM_H