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: QwtMathMLTextEngine 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>QwtMathMLTextEngine Class Reference</h1><!-- doxytag: class="QwtMathMLTextEngine" --><!-- doxytag: inherits="QwtTextEngine" -->Inheritance diagram for QwtMathMLTextEngine:<p><center><img src="class_qwt_math_m_l_text_engine__inherit__graph.png" border="0" usemap="#_qwt_math_m_l_text_engine__inherit__map" alt="Inheritance graph"></center>
23
<map name="_qwt_math_m_l_text_engine__inherit__map">
24
<area href="class_qwt_text_engine.html" shape="rect" coords="30,8,142,32" alt="">
26
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for QwtMathMLTextEngine:<p><center><img src="class_qwt_math_m_l_text_engine__coll__graph.png" border="0" usemap="#_qwt_math_m_l_text_engine__coll__map" alt="Collaboration graph"></center>
27
<map name="_qwt_math_m_l_text_engine__coll__map">
28
<area href="class_qwt_text_engine.html" shape="rect" coords="30,8,142,32" alt="">
30
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_qwt_math_m_l_text_engine-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
31
Text Engine for the MathML renderer of the Qt solutions package.
33
The Qt Solution package includes a renderer for MathML <a href="http://www.trolltech.com/products/qt/addon/solutions/catalog/4/Widgets/qtmmlwidget">http://www.trolltech.com/products/qt/addon/solutions/catalog/4/Widgets/qtmmlwidget</a> that is available for owners of a commercial Qt license. You need a version >= 2.1, that is only available for Qt4.<p>
34
To enable MathML support the following code needs to be added to the application: <div class="fragment"><pre class="fragment">#include <qwt_mathml_text_engine.h>
36
QwtText::setTextEngine(QwtText::MathMLText, new QwtMathMLTextEngine());
38
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_text_engine.html">QwtTextEngine</a>, <a class="el" href="class_qwt_text.html#ef6a1e71b1feba3116ce69f6c9de70ad">QwtText::setTextEngine</a> </dd></dl>
39
<dl compact><dt><b>Warning:</b></dt><dd>Unfortunately the MathML renderer doesn't support rotating of texts. </dd></dl>
44
Definition at line <a class="el" href="qwt__mathml__text__engine_8h-source.html#l00039">39</a> of file <a class="el" href="qwt__mathml__text__engine_8h-source.html">qwt_mathml_text_engine.h</a>.<table border="0" cellpadding="0" cellspacing="0">
46
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
47
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_math_m_l_text_engine.html#f88b085974808e0497d120044672f721">QwtMathMLTextEngine</a> ()</td></tr>
49
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_math_m_l_text_engine.html#864d4265a7621e7389b21d419e6503ff">~QwtMathMLTextEngine</a> ()</td></tr>
51
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_math_m_l_text_engine.html#2af5e9efb10eee9c28cce50699cdfdab">heightForWidth</a> (const QFont &font, int flags, const QString &text, int width) const </td></tr>
53
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual QSize </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_math_m_l_text_engine.html#ecb16b442a1ff15418dc31860e11c27b">textSize</a> (const QFont &font, int flags, const QString &text) const </td></tr>
55
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_math_m_l_text_engine.html#476c19642bf2c69a1abf0021547a1d7e">draw</a> (QPainter *painter, const QRect &rect, int flags, const QString &text) const </td></tr>
57
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_math_m_l_text_engine.html#59ca5842c32fd12cfd2aeeef5c985600">mightRender</a> (const QString &) const </td></tr>
59
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_math_m_l_text_engine.html#21ae25c70e4ff79cde60072e4bd75a29">textMargins</a> (const QFont &, const QString &, int &left, int &right, int &top, int &bottom) const </td></tr>
62
<hr><h2>Constructor & Destructor Documentation</h2>
63
<a class="anchor" name="f88b085974808e0497d120044672f721"></a><!-- doxytag: member="QwtMathMLTextEngine::QwtMathMLTextEngine" ref="f88b085974808e0497d120044672f721" args="()" --><p>
64
<table class="mdTable" cellpadding="2" cellspacing="0">
67
<table cellpadding="0" cellspacing="0" border="0">
69
<td class="md" nowrap valign="top">QwtMathMLTextEngine::QwtMathMLTextEngine </td>
70
<td class="md" valign="top">( </td>
71
<td class="mdname1" valign="top" nowrap> </td>
72
<td class="md" valign="top"> ) </td>
73
<td class="md" nowrap></td>
79
<table cellspacing="5" cellpadding="0" border="0">
91
Definition at line <a class="el" href="qwt__mathml__text__engine_8cpp-source.html#l00022">22</a> of file <a class="el" href="qwt__mathml__text__engine_8cpp-source.html">qwt_mathml_text_engine.cpp</a>. </td>
94
<a class="anchor" name="864d4265a7621e7389b21d419e6503ff"></a><!-- doxytag: member="QwtMathMLTextEngine::~QwtMathMLTextEngine" ref="864d4265a7621e7389b21d419e6503ff" args="()" --><p>
95
<table class="mdTable" cellpadding="2" cellspacing="0">
98
<table cellpadding="0" cellspacing="0" border="0">
100
<td class="md" nowrap valign="top">QwtMathMLTextEngine::~QwtMathMLTextEngine </td>
101
<td class="md" valign="top">( </td>
102
<td class="mdname1" valign="top" nowrap> </td>
103
<td class="md" valign="top"> ) </td>
104
<td class="md" nowrap><code> [virtual]</code></td>
110
<table cellspacing="5" cellpadding="0" border="0">
122
Definition at line <a class="el" href="qwt__mathml__text__engine_8cpp-source.html#l00027">27</a> of file <a class="el" href="qwt__mathml__text__engine_8cpp-source.html">qwt_mathml_text_engine.cpp</a>. </td>
125
<hr><h2>Member Function Documentation</h2>
126
<a class="anchor" name="476c19642bf2c69a1abf0021547a1d7e"></a><!-- doxytag: member="QwtMathMLTextEngine::draw" ref="476c19642bf2c69a1abf0021547a1d7e" args="(QPainter *painter, const QRect &rect, int flags, const QString &text) const " --><p>
127
<table class="mdTable" cellpadding="2" cellspacing="0">
130
<table cellpadding="0" cellspacing="0" border="0">
132
<td class="md" nowrap valign="top">void QwtMathMLTextEngine::draw </td>
133
<td class="md" valign="top">( </td>
134
<td class="md" nowrap valign="top">QPainter * </td>
135
<td class="mdname" nowrap> <em>painter</em>, </td>
138
<td class="md" nowrap align="right"></td>
140
<td class="md" nowrap>const QRect & </td>
141
<td class="mdname" nowrap> <em>rect</em>, </td>
144
<td class="md" nowrap align="right"></td>
146
<td class="md" nowrap>int </td>
147
<td class="mdname" nowrap> <em>flags</em>, </td>
150
<td class="md" nowrap align="right"></td>
152
<td class="md" nowrap>const QString & </td>
153
<td class="mdname" nowrap> <em>text</em></td>
157
<td class="md">) </td>
158
<td class="md" colspan="2"> const<code> [virtual]</code></td>
164
<table cellspacing="5" cellpadding="0" border="0">
172
Draw the text in a clipping rectangle<p>
173
<dl compact><dt><b>Parameters:</b></dt><dd>
174
<table border="0" cellspacing="2" cellpadding="0">
175
<tr><td valign="top"></td><td valign="top"><em>painter</em> </td><td>Painter </td></tr>
176
<tr><td valign="top"></td><td valign="top"><em>rect</em> </td><td>Clipping rectangle </td></tr>
177
<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>
178
<tr><td valign="top"></td><td valign="top"><em>text</em> </td><td>Text to be rendered </td></tr>
183
Implements <a class="el" href="class_qwt_text_engine.html#cf750dd01aa35f5c9fc836460c30d663">QwtTextEngine</a>.
185
Definition at line <a class="el" href="qwt__mathml__text__engine_8cpp-source.html#l00097">97</a> of file <a class="el" href="qwt__mathml__text__engine_8cpp-source.html">qwt_mathml_text_engine.cpp</a>. </td>
188
<a class="anchor" name="2af5e9efb10eee9c28cce50699cdfdab"></a><!-- doxytag: member="QwtMathMLTextEngine::heightForWidth" ref="2af5e9efb10eee9c28cce50699cdfdab" args="(const QFont &font, int flags, const QString &text, int width) const " --><p>
189
<table class="mdTable" cellpadding="2" cellspacing="0">
192
<table cellpadding="0" cellspacing="0" border="0">
194
<td class="md" nowrap valign="top">int QwtMathMLTextEngine::heightForWidth </td>
195
<td class="md" valign="top">( </td>
196
<td class="md" nowrap valign="top">const QFont & </td>
197
<td class="mdname" nowrap> <em>font</em>, </td>
200
<td class="md" nowrap align="right"></td>
202
<td class="md" nowrap>int </td>
203
<td class="mdname" nowrap> <em>flags</em>, </td>
206
<td class="md" nowrap align="right"></td>
208
<td class="md" nowrap>const QString & </td>
209
<td class="mdname" nowrap> <em>text</em>, </td>
212
<td class="md" nowrap align="right"></td>
214
<td class="md" nowrap>int </td>
215
<td class="mdname" nowrap> <em>width</em></td>
219
<td class="md">) </td>
220
<td class="md" colspan="2"> const<code> [virtual]</code></td>
226
<table cellspacing="5" cellpadding="0" border="0">
234
Find the height for a given width<p>
235
<dl compact><dt><b>Parameters:</b></dt><dd>
236
<table border="0" cellspacing="2" cellpadding="0">
237
<tr><td valign="top"></td><td valign="top"><em>font</em> </td><td>Font of the text </td></tr>
238
<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>
239
<tr><td valign="top"></td><td valign="top"><em>text</em> </td><td>Text to be rendered </td></tr>
240
<tr><td valign="top"></td><td valign="top"><em>width</em> </td><td>Width</td></tr>
243
<dl compact><dt><b>Returns:</b></dt><dd>Calculated height </dd></dl>
246
Implements <a class="el" href="class_qwt_text_engine.html#ac1112e5b1005d020d596dd174bbabf6">QwtTextEngine</a>.
248
Definition at line <a class="el" href="qwt__mathml__text__engine_8cpp-source.html#l00041">41</a> of file <a class="el" href="qwt__mathml__text__engine_8cpp-source.html">qwt_mathml_text_engine.cpp</a>.
250
References <a class="el" href="qwt__mathml__text__engine_8cpp-source.html#l00056">textSize()</a>. </td>
253
<a class="anchor" name="59ca5842c32fd12cfd2aeeef5c985600"></a><!-- doxytag: member="QwtMathMLTextEngine::mightRender" ref="59ca5842c32fd12cfd2aeeef5c985600" args="(const QString &) const " --><p>
254
<table class="mdTable" cellpadding="2" cellspacing="0">
257
<table cellpadding="0" cellspacing="0" border="0">
259
<td class="md" nowrap valign="top">bool QwtMathMLTextEngine::mightRender </td>
260
<td class="md" valign="top">( </td>
261
<td class="md" nowrap valign="top">const QString & </td>
262
<td class="mdname1" valign="top" nowrap> <em>text</em> </td>
263
<td class="md" valign="top"> ) </td>
264
<td class="md" nowrap> const<code> [virtual]</code></td>
270
<table cellspacing="5" cellpadding="0" border="0">
278
Test if a string can be rendered by <a class="el" href="class_qwt_math_m_l_text_engine.html">QwtMathMLTextEngine</a><p>
279
<dl compact><dt><b>Parameters:</b></dt><dd>
280
<table border="0" cellspacing="2" cellpadding="0">
281
<tr><td valign="top"></td><td valign="top"><em>text</em> </td><td>Text to be tested </td></tr>
284
<dl compact><dt><b>Returns:</b></dt><dd>true, if text begins with "<math>". </dd></dl>
287
Implements <a class="el" href="class_qwt_text_engine.html#98316f2f6f4f50216ceffbe9babe2901">QwtTextEngine</a>.
289
Definition at line <a class="el" href="qwt__mathml__text__engine_8cpp-source.html#l00131">131</a> of file <a class="el" href="qwt__mathml__text__engine_8cpp-source.html">qwt_mathml_text_engine.cpp</a>. </td>
292
<a class="anchor" name="21ae25c70e4ff79cde60072e4bd75a29"></a><!-- doxytag: member="QwtMathMLTextEngine::textMargins" ref="21ae25c70e4ff79cde60072e4bd75a29" args="(const QFont &, const QString &, int &left, int &right, int &top, int &bottom) const " --><p>
293
<table class="mdTable" cellpadding="2" cellspacing="0">
296
<table cellpadding="0" cellspacing="0" border="0">
298
<td class="md" nowrap valign="top">void QwtMathMLTextEngine::textMargins </td>
299
<td class="md" valign="top">( </td>
300
<td class="md" nowrap valign="top">const QFont & </td>
301
<td class="mdname" nowrap>, </td>
304
<td class="md" nowrap align="right"></td>
306
<td class="md" nowrap>const QString & </td>
307
<td class="mdname" nowrap>, </td>
310
<td class="md" nowrap align="right"></td>
312
<td class="md" nowrap>int & </td>
313
<td class="mdname" nowrap> <em>left</em>, </td>
316
<td class="md" nowrap align="right"></td>
318
<td class="md" nowrap>int & </td>
319
<td class="mdname" nowrap> <em>right</em>, </td>
322
<td class="md" nowrap align="right"></td>
324
<td class="md" nowrap>int & </td>
325
<td class="mdname" nowrap> <em>top</em>, </td>
328
<td class="md" nowrap align="right"></td>
330
<td class="md" nowrap>int & </td>
331
<td class="mdname" nowrap> <em>bottom</em></td>
335
<td class="md">) </td>
336
<td class="md" colspan="2"> const<code> [virtual]</code></td>
342
<table cellspacing="5" cellpadding="0" border="0">
350
Return margins around the texts<p>
351
<dl compact><dt><b>Parameters:</b></dt><dd>
352
<table border="0" cellspacing="2" cellpadding="0">
353
<tr><td valign="top"></td><td valign="top"><em>left</em> </td><td>Return 0 </td></tr>
354
<tr><td valign="top"></td><td valign="top"><em>right</em> </td><td>Return 0 </td></tr>
355
<tr><td valign="top"></td><td valign="top"><em>top</em> </td><td>Return 0 </td></tr>
356
<tr><td valign="top"></td><td valign="top"><em>bottom</em> </td><td>Return 0 </td></tr>
361
Implements <a class="el" href="class_qwt_text_engine.html#d84ebda640e65f23ebd758cd545a5b9a">QwtTextEngine</a>.
363
Definition at line <a class="el" href="qwt__mathml__text__engine_8cpp-source.html#l00083">83</a> of file <a class="el" href="qwt__mathml__text__engine_8cpp-source.html">qwt_mathml_text_engine.cpp</a>. </td>
366
<a class="anchor" name="ecb16b442a1ff15418dc31860e11c27b"></a><!-- doxytag: member="QwtMathMLTextEngine::textSize" ref="ecb16b442a1ff15418dc31860e11c27b" args="(const QFont &font, int flags, const QString &text) const " --><p>
367
<table class="mdTable" cellpadding="2" cellspacing="0">
370
<table cellpadding="0" cellspacing="0" border="0">
372
<td class="md" nowrap valign="top">QSize QwtMathMLTextEngine::textSize </td>
373
<td class="md" valign="top">( </td>
374
<td class="md" nowrap valign="top">const QFont & </td>
375
<td class="mdname" nowrap> <em>font</em>, </td>
378
<td class="md" nowrap align="right"></td>
380
<td class="md" nowrap>int </td>
381
<td class="mdname" nowrap> <em>flags</em>, </td>
384
<td class="md" nowrap align="right"></td>
386
<td class="md" nowrap>const QString & </td>
387
<td class="mdname" nowrap> <em>text</em></td>
391
<td class="md">) </td>
392
<td class="md" colspan="2"> const<code> [virtual]</code></td>
398
<table cellspacing="5" cellpadding="0" border="0">
406
Returns the size, that is needed to render text<p>
407
<dl compact><dt><b>Parameters:</b></dt><dd>
408
<table border="0" cellspacing="2" cellpadding="0">
409
<tr><td valign="top"></td><td valign="top"><em>font</em> </td><td>Font of the text </td></tr>
410
<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>
411
<tr><td valign="top"></td><td valign="top"><em>text</em> </td><td>Text to be rendered</td></tr>
414
<dl compact><dt><b>Returns:</b></dt><dd>Caluclated size </dd></dl>
417
Implements <a class="el" href="class_qwt_text_engine.html#73214e1778edf6eb870fc96bf9c5091e">QwtTextEngine</a>.
419
Definition at line <a class="el" href="qwt__mathml__text__engine_8cpp-source.html#l00056">56</a> of file <a class="el" href="qwt__mathml__text__engine_8cpp-source.html">qwt_mathml_text_engine.cpp</a>.
421
Referenced by <a class="el" href="qwt__mathml__text__engine_8cpp-source.html#l00041">heightForWidth()</a>. </td>
424
<hr size="1"><address style="align: right;"><small>Generated on Mon Jun 11 07:42:16 2007 for Qwt User's Guide by
425
<a href="http://www.doxygen.org/index.html">
426
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>