Improved text layout handling

This commit is contained in:
2018-11-28 23:39:33 +01:00
parent 085a90e0e5
commit 8567ef44d1
9 changed files with 117 additions and 63 deletions

View File

@ -11,6 +11,10 @@ public:
virtual ~TextItem() {}
const QString &text() const {return _text;}
const QFont &font() const {return _font;}
void setFont(const QFont &font) {_font = font;}
const QPen &pen() const {return _pen;}
void setPen(const QPen &pen) {_pen = pen;}
virtual QPainterPath shape() const = 0;
virtual QRectF boundingRect() const = 0;
@ -49,6 +53,8 @@ protected:
private:
QString _text;
QFont _font;
QPen _pen;
bool _visible;
};