Map API refactoring
[GPXSee.git] / src / map / textpathitem.h
blob2c0c0bc26872e1b201320e84ad865348b5829b56
1 #ifndef TEXTPATHITEM_H
2 #define TEXTPATHITEM_H
4 #include <QVector>
5 #include <QPainterPath>
6 #include "textitem.h"
8 class TextPathItem : public TextItem
10 public:
11 TextPathItem() : TextItem(0), _font(0), _color(0) {}
12 TextPathItem(const QPolygonF &line, const QString *label,
13 const QRect &tileRect, const QFont *font, const QColor *color,
14 const QColor *haloColor);
15 TextPathItem(const QPainterPath &line, const QString *label,
16 const QRect &tileRect, const QFont *font, const QColor *color,
17 const QColor *haloColor);
19 bool isValid() const {return !_path.isEmpty();}
21 QPainterPath shape() const {return _shape;}
22 QRectF boundingRect() const {return _rect;}
23 void paint(QPainter *painter) const;
25 private:
26 const QFont *_font;
27 const QColor *_color;
28 const QColor *_haloColor;
29 QPainterPath _path;
30 QRectF _rect;
31 QPainterPath _shape;
34 #endif // TEXTPATHITEM_H