📄 class_qwt_text.html
字号:
</table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Assign/Replace a text engine for a text format<p>With setTextEngine it is possible to extend Qwt with other types of text formats.<p>Owner of a commercial Qt license can build the qwtmathml library, that is based on the MathML renderer, that is included in MML Widget component of the Qt solutions package.<p>For QwtText::PlainText it is not allowed to assign a engine == NULL.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>format</em> </td><td>Text format </td></tr> <tr><td valign="top"></td><td valign="top"><em>engine</em> </td><td>Text engine</td></tr> </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_math_m_l_text_engine.html">QwtMathMLTextEngine</a> </dd></dl><dl compact><dt><b>Warning:</b></dt><dd>Using QwtText::AutoText does nothing. </dd></dl><p>Definition at line <a class="el" href="qwt__text_8cpp-source.html#l00667">667</a> of file <a class="el" href="qwt__text_8cpp-source.html">qwt_text.cpp</a>. </td> </tr></table><a class="anchor" name="5b7bddee1d80139b93d60a0a3a044944"></a><!-- doxytag: member="QwtText::testLayoutAttribute" ref="5b7bddee1d80139b93d60a0a3a044944" args="(LayoutAttribute) const " --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">bool QwtText::testLayoutAttribute </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="class_qwt_text.html#0953aabc098f410dba89bbada47f2e5a">LayoutAttribute</a> </td> <td class="mdname1" valign="top" nowrap> <em>attribute</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Test a layout attribute<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>attribute</em> </td><td>Layout attribute </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>true, if attribute is enabled</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_text.html#2b621d3104ead2185d2d939b1f5b9d68">setLayoutAttribute</a> </dd></dl><p>Definition at line <a class="el" href="qwt__text_8cpp-source.html#l00445">445</a> of file <a class="el" href="qwt__text_8cpp-source.html">qwt_text.cpp</a>. </td> </tr></table><a class="anchor" name="53c4bcae538e272660d33bed6f71f01b"></a><!-- doxytag: member="QwtText::testPaintAttribute" ref="53c4bcae538e272660d33bed6f71f01b" args="(PaintAttribute) const " --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">bool QwtText::testPaintAttribute </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="class_qwt_text.html#9739e47ea489e690f121e4b1d27ae24e">PaintAttribute</a> </td> <td class="mdname1" valign="top" nowrap> <em>attribute</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Test a paint attribute<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>attribute</em> </td><td>Paint attribute </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>true, if attribute is enabled</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_text.html#ac80e3f05137173059b196206ceea9e8">setPaintAttribute</a> </dd></dl><p>Definition at line <a class="el" href="qwt__text_8cpp-source.html#l00417">417</a> of file <a class="el" href="qwt__text_8cpp-source.html">qwt_text.cpp</a>. </td> </tr></table><a class="anchor" name="15a42a83153f82bab8cfc283d090d736"></a><!-- doxytag: member="QwtText::text" ref="15a42a83153f82bab8cfc283d090d736" args="() const " --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">QString QwtText::text </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Return the text. <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="class_qwt_text.html#9ba9caa82fcfbc4bfbf8ce20ccea981e">setText</a> </dd></dl><p>Definition at line <a class="el" href="qwt__text_8cpp-source.html#l00249">249</a> of file <a class="el" href="qwt__text_8cpp-source.html">qwt_text.cpp</a>.<p>Referenced by <a class="el" href="qwt__plot__xml_8cpp-source.html#l00021">QwtPlot::grabProperties()</a>. </td> </tr></table><a class="anchor" name="2828c4976bd30572d236811bc30037be"></a><!-- doxytag: member="QwtText::textEngine" ref="2828c4976bd30572d236811bc30037be" args="(QwtText::TextFormat)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">const <a class="el" href="class_qwt_text_engine.html">QwtTextEngine</a> * QwtText::textEngine </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="class_qwt_text.html#63e0d6a59a427a37ed0bfa71b782fd76">QwtText::TextFormat</a> </td> <td class="mdname1" valign="top" nowrap> <em>format</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Find the text engine for a text format. <p>textEngine can be used to find out if a text format is supported. F.e, if one wants to use MathML labels, the MathML renderer from the commercial Qt solutions package might be required, that is not available in Qt Open Source Edition environments.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>format</em> </td><td>Text format </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The text engine, or NULL if no engine is available. </dd></dl><p>Definition at line <a class="el" href="qwt__text_8cpp-source.html#l00687">687</a> of file <a class="el" href="qwt__text_8cpp-source.html">qwt_text.cpp</a>. </td> </tr></table><a class="anchor" name="053d8fdb4de77bd3b6f2eb0ecd3980ca"></a><!-- doxytag: member="QwtText::textEngine" ref="053d8fdb4de77bd3b6f2eb0ecd3980ca" args="(const QString &text, QwtText::TextFormat=AutoText)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">const <a class="el" href="class_qwt_text_engine.html">QwtTextEngine</a> * QwtText::textEngine </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const QString & </td> <td class="mdname" nowrap> <em>text</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="class_qwt_text.html#63e0d6a59a427a37ed0bfa71b782fd76">QwtText::TextFormat</a> </td> <td class="mdname" nowrap> <em>format</em> = <code>AutoText</code></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Find the text engine for a text format<p>In case of QwtText::AutoText the first text engine (beside <a class="el" href="class_qwt_plain_text_engine.html">QwtPlainTextEngine</a>) is returned, where <a class="el" href="class_qwt_text_engine.html#98316f2f6f4f50216ceffbe9babe2901">QwtTextEngine::mightRender</a> returns true. If there is none <a class="el" href="class_qwt_plain_text_engine.html">QwtPlainTextEngine</a> is returnd.<p>If no text engine is registered for the format <a class="el" href="class_qwt_plain_text_engine.html">QwtPlainTextEngine</a> is returnd.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>text</em> </td><td>Text, needed in case of AutoText </td></tr> <tr><td valign="top"></td><td valign="top"><em>format</em> </td><td>Text format </td></tr> </table></dl><p>Definition at line <a class="el" href="qwt__text_8cpp-source.html#l00640">640</a> of file <a class="el" href="qwt__text_8cpp-source.html">qwt_text.cpp</a>.<p>Referenced by <a class="el" href="qwt__text_8cpp-source.html#l00180">QwtText()</a>, and <a class="el" href="qwt__text_8cpp-source.html#l00237">setText()</a>. </td> </tr></table><a class="anchor" name="6e7ff0a75f1eecc37478f9ca643da379"></a><!-- doxytag: member="QwtText::textSize" ref="6e7ff0a75f1eecc37478f9ca643da379" args="(const QFont &=QFont()) const " --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">QSize QwtText::textSize </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const QFont & </td> <td class="mdname1" valign="top" nowrap> <em>defaultFont</em> = <code>QFont()</code> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Returns the size, that is needed to render text<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>defaultFont</em> </td><td>Font of the text </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>Caluclated size </dd></dl><p>Definition at line <a class="el" href="qwt__text_8cpp-source.html#l00510">510</a> of file <a class="el" href="qwt__text_8cpp-source.html">qwt_text.cpp</a>.<p>References <a class="el" href="qwt__text_8cpp-source.html#l00296">font()</a>, and <a class="el" href="qwt__text_8cpp-source.html#l00308">usedFont()</a>.<p>Referenced by <a class="el" href="qwt__scale__draw_8cpp-source.html#l00612">QwtScaleDraw::drawLabel()</a>, <a class="el" href="qwt__round__scale__d
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -