1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-06 23:03:22 +02:00
GPXSee/src/map/IMG/textpointitem.h

37 lines
757 B
C
Raw Normal View History

2019-05-10 18:56:19 +02:00
#ifndef TEXTPOINTITEM_H
#define TEXTPOINTITEM_H
#include <QRect>
#include <QString>
#include <QVector>
#include "textitem.h"
2019-05-10 18:56:19 +02:00
class QPainter;
class QFont;
class QImage;
class QColor;
class TextPointItem : public TextItem
2019-05-10 18:56:19 +02:00
{
public:
TextPointItem() : _text(0), _font(0), _img(0) {}
TextPointItem(const QPoint &point, const QString *text, const QFont *font,
const QImage *img, const QColor *color);
bool isValid() const {return !_rect.isEmpty();}
QRectF boundingRect() const {return _rect;}
QPainterPath shape() const {return _shape;}
2019-05-10 18:56:19 +02:00
void paint(QPainter *painter) const;
private:
const QString *_text;
const QFont *_font;
const QImage *_img;
const QColor *_color;
QRect _rect, _textRect;
QPainterPath _shape;
2019-05-10 18:56:19 +02:00
};
#endif // TEXTPOINTITEM_H