1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
<title>Qwt User's Guide: QwtRichTextEngine Class Reference</title>
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
<link href="tabs.css" rel="stylesheet" type="text/css">
7
<!-- Generated by Doxygen 1.4.6 -->
10
<li><a href="index.html"><span>Main Page</span></a></li>
11
<li id="current"><a href="classes.html"><span>Classes</span></a></li>
12
<li><a href="files.html"><span>Files</span></a></li>
13
<li><a href="pages.html"><span>Related Pages</span></a></li>
17
<li><a href="classes.html"><span>Alphabetical List</span></a></li>
18
<li><a href="annotated.html"><span>Class List</span></a></li>
19
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
20
<li><a href="functions.html"><span>Class Members</span></a></li>
22
<h1>QwtRichTextEngine Class Reference</h1><!-- doxytag: class="QwtRichTextEngine" --><!-- doxytag: inherits="QwtTextEngine" -->Inheritance diagram for QwtRichTextEngine:<p><center><img src="class_qwt_rich_text_engine__inherit__graph.png" border="0" usemap="#_qwt_rich_text_engine__inherit__map" alt="Inheritance graph"></center>
23
<map name="_qwt_rich_text_engine__inherit__map">
24
<area href="class_qwt_text_engine.html" shape="rect" coords="20,8,132,32" alt="">
26
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for QwtRichTextEngine:<p><center><img src="class_qwt_rich_text_engine__coll__graph.png" border="0" usemap="#_qwt_rich_text_engine__coll__map" alt="Collaboration graph"></center>
27
<map name="_qwt_rich_text_engine__coll__map">
28
<area href="class_qwt_text_engine.html" shape="rect" coords="20,8,132,32" alt="">
30
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_qwt_rich_text_engine-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
31
A text engine for Qt rich texts.
33
<a class="el" href="class_qwt_rich_text_engine.html">QwtRichTextEngine</a> renders Qt rich texts using the classes of the Scribe framework of Qt.
37
Definition at line <a class="el" href="qwt__text__engine_8h-source.html#l00150">150</a> of file <a class="el" href="qwt__text__engine_8h-source.html">qwt_text_engine.h</a>.<table border="0" cellpadding="0" cellspacing="0">
39
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
40
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_rich_text_engine.html#a4c1d5a1ee88d7406ba1d6453005b46a">QwtRichTextEngine</a> ()</td></tr>
42
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_rich_text_engine.html#ff5b59b422c64eb30230b767675b0b79">heightForWidth</a> (const QFont &font, int flags, const QString &text, int width) const </td></tr>
44
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual QSize </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_rich_text_engine.html#f6232e54a4991dcee4a7b3c783163537">textSize</a> (const QFont &font, int flags, const QString &text) const </td></tr>
46
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_rich_text_engine.html#3b22116710e9095a95e2739e84623725">draw</a> (QPainter *painter, const QRect &rect, int flags, const QString &text) const </td></tr>
48
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_rich_text_engine.html#42da46eee5fbda55e34b18c64b0b5e0b">mightRender</a> (const QString &) const </td></tr>
50
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_rich_text_engine.html#675bb28d8526fbcdbecc1833edffb980">textMargins</a> (const QFont &, const QString &, int &left, int &right, int &top, int &bottom) const </td></tr>
53
<hr><h2>Constructor & Destructor Documentation</h2>
54
<a class="anchor" name="a4c1d5a1ee88d7406ba1d6453005b46a"></a><!-- doxytag: member="QwtRichTextEngine::QwtRichTextEngine" ref="a4c1d5a1ee88d7406ba1d6453005b46a" args="()" --><p>
55
<table class="mdTable" cellpadding="2" cellspacing="0">
58
<table cellpadding="0" cellspacing="0" border="0">
60
<td class="md" nowrap valign="top">QwtRichTextEngine::QwtRichTextEngine </td>
61
<td class="md" valign="top">( </td>
62
<td class="mdname1" valign="top" nowrap> </td>
63
<td class="md" valign="top"> ) </td>
64
<td class="md" nowrap></td>
70
<table cellspacing="5" cellpadding="0" border="0">
82
Definition at line <a class="el" href="qwt__text__engine_8cpp-source.html#l00231">231</a> of file <a class="el" href="qwt__text__engine_8cpp-source.html">qwt_text_engine.cpp</a>. </td>
85
<hr><h2>Member Function Documentation</h2>
86
<a class="anchor" name="3b22116710e9095a95e2739e84623725"></a><!-- doxytag: member="QwtRichTextEngine::draw" ref="3b22116710e9095a95e2739e84623725" args="(QPainter *painter, const QRect &rect, int flags, const QString &text) const " --><p>
87
<table class="mdTable" cellpadding="2" cellspacing="0">
90
<table cellpadding="0" cellspacing="0" border="0">
92
<td class="md" nowrap valign="top">void QwtRichTextEngine::draw </td>
93
<td class="md" valign="top">( </td>
94
<td class="md" nowrap valign="top">QPainter * </td>
95
<td class="mdname" nowrap> <em>painter</em>, </td>
98
<td class="md" nowrap align="right"></td>
100
<td class="md" nowrap>const QRect & </td>
101
<td class="mdname" nowrap> <em>rect</em>, </td>
104
<td class="md" nowrap align="right"></td>
106
<td class="md" nowrap>int </td>
107
<td class="mdname" nowrap> <em>flags</em>, </td>
110
<td class="md" nowrap align="right"></td>
112
<td class="md" nowrap>const QString & </td>
113
<td class="mdname" nowrap> <em>text</em></td>
117
<td class="md">) </td>
118
<td class="md" colspan="2"> const<code> [virtual]</code></td>
124
<table cellspacing="5" cellpadding="0" border="0">
132
Draw the text in a clipping rectangle<p>
133
<dl compact><dt><b>Parameters:</b></dt><dd>
134
<table border="0" cellspacing="2" cellpadding="0">
135
<tr><td valign="top"></td><td valign="top"><em>painter</em> </td><td>Painter </td></tr>
136
<tr><td valign="top"></td><td valign="top"><em>rect</em> </td><td>Clipping rectangle </td></tr>
137
<tr><td valign="top"></td><td valign="top"><em>flags</em> </td><td>Bitwise OR of the flags like in for QPainter::drawText </td></tr>
138
<tr><td valign="top"></td><td valign="top"><em>text</em> </td><td>Text to be rendered </td></tr>
143
Implements <a class="el" href="class_qwt_text_engine.html#cf750dd01aa35f5c9fc836460c30d663">QwtTextEngine</a>.
145
Definition at line <a class="el" href="qwt__text__engine_8cpp-source.html#l00343">343</a> of file <a class="el" href="qwt__text__engine_8cpp-source.html">qwt_text_engine.cpp</a>.
147
References <a class="el" href="qwt__painter_8cpp-source.html#l00404">QwtPainter::drawSimpleRichText()</a>. </td>
150
<a class="anchor" name="ff5b59b422c64eb30230b767675b0b79"></a><!-- doxytag: member="QwtRichTextEngine::heightForWidth" ref="ff5b59b422c64eb30230b767675b0b79" args="(const QFont &font, int flags, const QString &text, int width) const " --><p>
151
<table class="mdTable" cellpadding="2" cellspacing="0">
154
<table cellpadding="0" cellspacing="0" border="0">
156
<td class="md" nowrap valign="top">int QwtRichTextEngine::heightForWidth </td>
157
<td class="md" valign="top">( </td>
158
<td class="md" nowrap valign="top">const QFont & </td>
159
<td class="mdname" nowrap> <em>font</em>, </td>
162
<td class="md" nowrap align="right"></td>
164
<td class="md" nowrap>int </td>
165
<td class="mdname" nowrap> <em>flags</em>, </td>
168
<td class="md" nowrap align="right"></td>
170
<td class="md" nowrap>const QString & </td>
171
<td class="mdname" nowrap> <em>text</em>, </td>
174
<td class="md" nowrap align="right"></td>
176
<td class="md" nowrap>int </td>
177
<td class="mdname" nowrap> <em>width</em></td>
181
<td class="md">) </td>
182
<td class="md" colspan="2"> const<code> [virtual]</code></td>
188
<table cellspacing="5" cellpadding="0" border="0">
196
Find the height for a given width<p>
197
<dl compact><dt><b>Parameters:</b></dt><dd>
198
<table border="0" cellspacing="2" cellpadding="0">
199
<tr><td valign="top"></td><td valign="top"><em>font</em> </td><td>Font of the text </td></tr>
200
<tr><td valign="top"></td><td valign="top"><em>flags</em> </td><td>Bitwise OR of the flags used like in QPainter::drawText </td></tr>
201
<tr><td valign="top"></td><td valign="top"><em>text</em> </td><td>Text to be rendered </td></tr>
202
<tr><td valign="top"></td><td valign="top"><em>width</em> </td><td>Width</td></tr>
205
<dl compact><dt><b>Returns:</b></dt><dd>Calculated height </dd></dl>
208
Implements <a class="el" href="class_qwt_text_engine.html#ac1112e5b1005d020d596dd174bbabf6">QwtTextEngine</a>.
210
Definition at line <a class="el" href="qwt__text__engine_8cpp-source.html#l00245">245</a> of file <a class="el" href="qwt__text__engine_8cpp-source.html">qwt_text_engine.cpp</a>. </td>
213
<a class="anchor" name="42da46eee5fbda55e34b18c64b0b5e0b"></a><!-- doxytag: member="QwtRichTextEngine::mightRender" ref="42da46eee5fbda55e34b18c64b0b5e0b" args="(const QString &) const " --><p>
214
<table class="mdTable" cellpadding="2" cellspacing="0">
217
<table cellpadding="0" cellspacing="0" border="0">
219
<td class="md" nowrap valign="top">bool QwtRichTextEngine::mightRender </td>
220
<td class="md" valign="top">( </td>
221
<td class="md" nowrap valign="top">const QString & </td>
222
<td class="mdname1" valign="top" nowrap> <em>text</em> </td>
223
<td class="md" valign="top"> ) </td>
224
<td class="md" nowrap> const<code> [virtual]</code></td>
230
<table cellspacing="5" cellpadding="0" border="0">
238
Test if a string can be rendered by this text engine<p>
239
<dl compact><dt><b>Parameters:</b></dt><dd>
240
<table border="0" cellspacing="2" cellpadding="0">
241
<tr><td valign="top"></td><td valign="top"><em>text</em> </td><td>Text to be tested </td></tr>
244
<dl compact><dt><b>Returns:</b></dt><dd>QStyleSheet::mightBeRichText(text); </dd></dl>
247
Implements <a class="el" href="class_qwt_text_engine.html#98316f2f6f4f50216ceffbe9babe2901">QwtTextEngine</a>.
249
Definition at line <a class="el" href="qwt__text__engine_8cpp-source.html#l00388">388</a> of file <a class="el" href="qwt__text__engine_8cpp-source.html">qwt_text_engine.cpp</a>. </td>
252
<a class="anchor" name="675bb28d8526fbcdbecc1833edffb980"></a><!-- doxytag: member="QwtRichTextEngine::textMargins" ref="675bb28d8526fbcdbecc1833edffb980" args="(const QFont &, const QString &, int &left, int &right, int &top, int &bottom) const " --><p>
253
<table class="mdTable" cellpadding="2" cellspacing="0">
256
<table cellpadding="0" cellspacing="0" border="0">
258
<td class="md" nowrap valign="top">void QwtRichTextEngine::textMargins </td>
259
<td class="md" valign="top">( </td>
260
<td class="md" nowrap valign="top">const QFont & </td>
261
<td class="mdname" nowrap>, </td>
264
<td class="md" nowrap align="right"></td>
266
<td class="md" nowrap>const QString & </td>
267
<td class="mdname" nowrap>, </td>
270
<td class="md" nowrap align="right"></td>
272
<td class="md" nowrap>int & </td>
273
<td class="mdname" nowrap> <em>left</em>, </td>
276
<td class="md" nowrap align="right"></td>
278
<td class="md" nowrap>int & </td>
279
<td class="mdname" nowrap> <em>right</em>, </td>
282
<td class="md" nowrap align="right"></td>
284
<td class="md" nowrap>int & </td>
285
<td class="mdname" nowrap> <em>top</em>, </td>
288
<td class="md" nowrap align="right"></td>
290
<td class="md" nowrap>int & </td>
291
<td class="mdname" nowrap> <em>bottom</em></td>
295
<td class="md">) </td>
296
<td class="md" colspan="2"> const<code> [virtual]</code></td>
302
<table cellspacing="5" cellpadding="0" border="0">
310
Return margins around the texts<p>
311
<dl compact><dt><b>Parameters:</b></dt><dd>
312
<table border="0" cellspacing="2" cellpadding="0">
313
<tr><td valign="top"></td><td valign="top"><em>left</em> </td><td>Return 0 </td></tr>
314
<tr><td valign="top"></td><td valign="top"><em>right</em> </td><td>Return 0 </td></tr>
315
<tr><td valign="top"></td><td valign="top"><em>top</em> </td><td>Return 0 </td></tr>
316
<tr><td valign="top"></td><td valign="top"><em>bottom</em> </td><td>Return 0 </td></tr>
321
Implements <a class="el" href="class_qwt_text_engine.html#d84ebda640e65f23ebd758cd545a5b9a">QwtTextEngine</a>.
323
Definition at line <a class="el" href="qwt__text__engine_8cpp-source.html#l00405">405</a> of file <a class="el" href="qwt__text__engine_8cpp-source.html">qwt_text_engine.cpp</a>. </td>
326
<a class="anchor" name="f6232e54a4991dcee4a7b3c783163537"></a><!-- doxytag: member="QwtRichTextEngine::textSize" ref="f6232e54a4991dcee4a7b3c783163537" args="(const QFont &font, int flags, const QString &text) const " --><p>
327
<table class="mdTable" cellpadding="2" cellspacing="0">
330
<table cellpadding="0" cellspacing="0" border="0">
332
<td class="md" nowrap valign="top">QSize QwtRichTextEngine::textSize </td>
333
<td class="md" valign="top">( </td>
334
<td class="md" nowrap valign="top">const QFont & </td>
335
<td class="mdname" nowrap> <em>font</em>, </td>
338
<td class="md" nowrap align="right"></td>
340
<td class="md" nowrap>int </td>
341
<td class="mdname" nowrap> <em>flags</em>, </td>
344
<td class="md" nowrap align="right"></td>
346
<td class="md" nowrap>const QString & </td>
347
<td class="mdname" nowrap> <em>text</em></td>
351
<td class="md">) </td>
352
<td class="md" colspan="2"> const<code> [virtual]</code></td>
358
<table cellspacing="5" cellpadding="0" border="0">
366
Returns the size, that is needed to render text<p>
367
<dl compact><dt><b>Parameters:</b></dt><dd>
368
<table border="0" cellspacing="2" cellpadding="0">
369
<tr><td valign="top"></td><td valign="top"><em>font</em> </td><td>Font of the text </td></tr>
370
<tr><td valign="top"></td><td valign="top"><em>flags</em> </td><td>Bitwise OR of the flags used like in QPainter::drawText </td></tr>
371
<tr><td valign="top"></td><td valign="top"><em>text</em> </td><td>Text to be rendered</td></tr>
374
<dl compact><dt><b>Returns:</b></dt><dd>Caluclated size </dd></dl>
377
Implements <a class="el" href="class_qwt_text_engine.html#73214e1778edf6eb870fc96bf9c5091e">QwtTextEngine</a>.
379
Definition at line <a class="el" href="qwt__text__engine_8cpp-source.html#l00270">270</a> of file <a class="el" href="qwt__text__engine_8cpp-source.html">qwt_text_engine.cpp</a>. </td>
382
<hr size="1"><address style="align: right;"><small>Generated on Mon Feb 26 21:25:43 2007 for Qwt User's Guide by
383
<a href="http://www.doxygen.org/index.html">
384
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>