133 PaintUsingTextFont = 0x01,
136 PaintUsingTextColor = 0x02,
139 PaintBackground = 0x04
142 Q_DECLARE_FLAGS(PaintAttributes, PaintAttribute)
159 Q_DECLARE_FLAGS(LayoutAttributes, LayoutAttribute)
162 QwtText(
const QString&, TextFormat textFormat = AutoText);
169 bool operator==(
const QwtText&)
const;
170 bool operator!=(
const QwtText&)
const;
173 QString text()
const;
176 bool isEmpty()
const;
178 void setFont(
const QFont&);
181 QFont usedFont(
const QFont&)
const;
184 TextFormat format()
const;
186 void setRenderFlags(
int);
187 int renderFlags()
const;
189 void setColor(
const QColor&);
190 QColor color()
const;
192 QColor usedColor(
const QColor&)
const;
194 void setBorderRadius(
double);
195 double borderRadius()
const;
197 void setBorderPen(
const QPen&);
198 QPen borderPen()
const;
200 void setBackgroundBrush(
const QBrush&);
201 QBrush backgroundBrush()
const;
203 void setPaintAttribute(PaintAttribute,
bool on =
true);
204 bool testPaintAttribute(PaintAttribute)
const;
206 void setLayoutAttribute(LayoutAttribute,
bool on =
true);
207 bool testLayoutAttribute(LayoutAttribute)
const;
209 double heightForWidth(
double width)
const;
210 double heightForWidth(
double width,
const QFont&)
const;
212 QSizeF textSize()
const;
213 QSizeF textSize(
const QFont&)
const;
215 void draw(QPainter* painter,
const QRectF& rect)
const;
227 LayoutCache* m_layoutCache;
Abstract base class for rendering text strings.
Definition qwt_text_engine.h:48
A class representing a text.
Definition qwt_text.h:69
LayoutAttribute
Layout Attributes The layout attributes affects some aspects of the layout of the text.
Definition qwt_text.h:149
@ RichText
Use the Scribe framework (Qt Rich Text) to render the text.
Definition qwt_text.h:94
@ PlainText
Draw the text as it is, using a QwtPlainTextEngine.
Definition qwt_text.h:91
@ MathMLText
Use a MathML (http://en.wikipedia.org/wiki/MathML) render engine to display the text.
Definition qwt_text.h:109
@ TeXText
Use a TeX (http://en.wikipedia.org/wiki/TeX) render engine to display the text ( not implemented yet ...
Definition qwt_text.h:115
PaintAttribute
Paint Attributes.
Definition qwt_text.h:131