mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-12-03 16:09:08 +01:00
28 lines
505 B
C++
28 lines
505 B
C++
#ifndef TEXTITEM_H
|
|
#define TEXTITEM_H
|
|
|
|
#include <QList>
|
|
#include <QRectF>
|
|
#include <QPainterPath>
|
|
|
|
class QPainter;
|
|
|
|
class TextItem
|
|
{
|
|
public:
|
|
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;
|
|
|
|
const QString *text() const {return _text;}
|
|
bool collides(const QList<TextItem*> &list) const;
|
|
|
|
protected:
|
|
const QString *_text;
|
|
};
|
|
|
|
#endif // TEXTITEM_H
|