Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 8e6051afcdb111a0317a58fb64c2abf5 > files > 3519

qt4-doc-4.6.3-0.2mdv2010.2.i586.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- q3stylesheet.cpp -->
<head>
  <title>Qt 4.6: Q3StyleSheet Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name="//apple_ref/cpp/cl//Q3StyleSheet"></a>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">Q3StyleSheet Class Reference<br /><span class="small-subtitle">[<a href="qt3support.html">Qt3Support</a> module]</span>
</h1>
<p>The Q3StyleSheet class is a collection of styles for rich text rendering and a generator of tags. <a href="#details">More...</a></p>
<pre> #include &lt;Q3StyleSheet&gt;</pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See <a href="porting4.html#qstylesheet">Porting to Qt 4</a> for more information.</p>
<p>Inherits <a href="qobject.html">QObject</a>.</p>
<ul>
<li><a href="q3stylesheet-members.html">List of all members, including inherited members</a></li>
</ul>
<hr />
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="q3stylesheet.html#Q3StyleSheet">Q3StyleSheet</a></b> ( QObject * <i>parent</i> = 0, const char * <i>name</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><b><a href="q3stylesheet.html#dtor.Q3StyleSheet">~Q3StyleSheet</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="q3stylesheet.html#error">error</a></b> ( const QString &amp; <i>msg</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Q3StyleSheetItem * </td><td class="memItemRight" valign="bottom"><b><a href="q3stylesheet.html#item">item</a></b> ( const QString &amp; <i>name</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const Q3StyleSheetItem * </td><td class="memItemRight" valign="bottom"><b><a href="q3stylesheet.html#item-2">item</a></b> ( const QString &amp; <i>name</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="q3stylesheet.html#scaleFont">scaleFont</a></b> ( QFont &amp; <i>font</i>, int <i>logicalSize</i> ) const</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<hr />
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="q3stylesheet.html#convertFromPlainText">convertFromPlainText</a></b> ( const QString &amp; <i>plain</i>, Q3StyleSheetItem::WhiteSpaceMode <i>mode</i> = Q3StyleSheetItem::WhiteSpacePre )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Q3StyleSheet * </td><td class="memItemRight" valign="bottom"><b><a href="q3stylesheet.html#defaultSheet">defaultSheet</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="q3stylesheet.html#escape">escape</a></b> ( const QString &amp; <i>plain</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="q3stylesheet.html#mightBeRichText">mightBeRichText</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="q3stylesheet.html#setDefaultSheet">setDefaultSheet</a></b> ( Q3StyleSheet * <i>sheet</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li><div class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li><div class="fn"></div>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
<li><div class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The Q3StyleSheet class is a collection of styles for rich text rendering and a generator of tags.</p>
<p>By creating <a href="q3stylesheetitem.html">Q3StyleSheetItem</a> objects for a style sheet you build a definition of a set of tags. This definition will be used by the internal rich text rendering system to parse and display text documents to which the style sheet applies. Rich text is normally visualized in a <a href="qtextedit.html">QTextEdit</a> or a <a href="qtextbrowser.html">QTextBrowser</a>. However, <a href="qlabel.html">QLabel</a>, <a href="qwhatsthis.html">QWhatsThis</a> and <a href="qmessagebox.html">QMessageBox</a> also support it, and other classes are likely to follow. With <a href="porting4.html#qsimplerichtext">QSimpleRichText</a> it is possible to use the rich text renderer for custom widgets as well.</p>
<p>The default Q3StyleSheet object has the following style bindings, sorted by structuring bindings, anchors, character style bindings (i.e&#x2e; inline styles), special elements such as horizontal lines or images, and other tags. In addition, rich text supports simple HTML tables.</p>
<p>The structuring tags are</p>
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Structuring tags</th><th>Notes</th></tr></thead>
<tr valign="top" class="odd"><td><tt>&lt;qt&gt;</tt>...<tt>&lt;/qt&gt;</tt></td><td>A Qt rich text document. It understands the following attributes:<ul>
<li><tt>title</tt> -- The caption of the document. This attribute is easily accessible with <a href="qtextedit.html#documentTitle-prop">QTextEdit::documentTitle</a>().</li>
<li><tt>type</tt> -- The type of the document. The default type is <tt>page</tt>. It indicates that the document is displayed in a page of its own. Another style is <tt>detail</tt>, which can be used to explain certain expressions in more detail in a few sentences. For <tt>detail</tt>, <a href="qtextbrowser.html">QTextBrowser</a> will then keep the current page and display the new document in a small popup similar to <a href="qwhatsthis.html">QWhatsThis</a>. Note that links will not work in documents with <tt>&lt;qt type=&quot;detail&quot;&gt;...&lt;/qt&gt;</tt>.</li>
<li><tt>bgcolor</tt> -- The background color, for example <tt>bgcolor=&quot;yellow&quot;</tt> or <tt>bgcolor=&quot;#0000FF&quot;</tt>.</li>
<li><tt>background</tt> -- The background pixmap, for example <tt>background=&quot;granite.xpm&quot;</tt>. The pixmap name will be resolved by a Q3MimeSourceFactory().</li>
<li><tt>text</tt> -- The default text color, for example <tt>text=&quot;red&quot;</tt>.</li>
<li><tt>link</tt> -- The link color, for example <tt>link=&quot;green&quot;</tt>.</li>
</ul>
</td></tr>
<tr valign="top" class="even"><td><tt>&lt;h1&gt;...&lt;/h1&gt;</tt></td><td>A top-level heading.</td></tr>
<tr valign="top" class="odd"><td><tt>&lt;h2&gt;...&lt;/h2&gt;</tt></td><td>A sublevel heading.</td></tr>
<tr valign="top" class="even"><td><tt>&lt;h3&gt;...&lt;/h3&gt;</tt></td><td>A sub-sublevel heading.</td></tr>
<tr valign="top" class="odd"><td><tt>&lt;p&gt;...&lt;/p&gt;</tt></td><td>A left-aligned paragraph. Adjust the alignment with the <tt>align</tt> attribute. Possible values are <tt>left</tt>, <tt>right</tt> and <tt>center</tt>.</td></tr>
<tr valign="top" class="even"><td><tt>&lt;center&gt;...</tt>&lt;br&gt;<tt>&lt;/center&gt;</tt></td><td>A centered paragraph.</td></tr>
<tr valign="top" class="odd"><td><tt>&lt;blockquote&gt;...</tt>&lt;br&gt;<tt>&lt;/blockquote&gt;</tt></td><td>An indented paragraph that is useful for quotes.</td></tr>
<tr valign="top" class="even"><td><tt>&lt;ul&gt;...&lt;/ul&gt;</tt></td><td>An unordered list. You can also pass a type argument to define the bullet style. The default is <tt>type=disc</tt>; other types are <tt>circle</tt> and <tt>square</tt>.</td></tr>
<tr valign="top" class="odd"><td><tt>&lt;ol&gt;...&lt;/ol&gt;</tt></td><td>An ordered list. You can also pass a type argument to define the enumeration label style. The default is <tt>type=&quot;1&quot;</tt>; other types are <tt>&quot;a&quot;</tt> and <tt>&quot;A&quot;</tt>.</td></tr>
<tr valign="top" class="even"><td><tt>&lt;li&gt;...&lt;/li&gt;</tt></td><td>A list item. This tag can be used only within the context of <tt>&lt;ol&gt;</tt> or <tt>&lt;ul&gt;</tt>.</td></tr>
<tr valign="top" class="odd"><td><tt>&lt;pre&gt;...&lt;/pre&gt;</tt></td><td>For larger chunks of code. Whitespaces in the contents are preserved. For small bits of code use the inline-style <tt>code</tt>.</td></tr>
</table></p>
<p>Anchors and links are done with a single tag:</p>
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Anchor tags</th><th>Notes</th></tr></thead>
<tr valign="top" class="odd"><td><tt>&lt;a&gt;...&lt;/a&gt;</tt></td><td>An anchor or link.<ul>
<li>A link is created by using an <tt>href</tt> attribute, for example &lt;br&gt;<tt>&lt;a href=&quot;target.qml&quot;&gt;Link Text&lt;/a&gt;</tt>. Links to targets within a document are achieved in the same way as for HTML, e.g&#x2e; &lt;br&gt;<tt>&lt;a href=&quot;target.qml#subtitle&quot;&gt;Link Text&lt;/a&gt;</tt>.</li>
<li>A target is created by using a <tt>name</tt> attribute, for example &lt;br&gt;<tt>&lt;a name=&quot;subtitle&quot;&gt;&lt;h2&gt;Sub Title&lt;/h2&gt;&lt;/a&gt;</tt>.</li>
</ul>
</td></tr>
</table></p>
<p>The default character style bindings are</p>
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Style tags</th><th>Notes</th></tr></thead>
<tr valign="top" class="odd"><td><tt>&lt;em&gt;...&lt;/em&gt;</tt></td><td>Emphasized. By default this is the same as <tt>&lt;i&gt;...&lt;/i&gt;</tt> (italic).</td></tr>
<tr valign="top" class="even"><td><tt>&lt;strong&gt;...&lt;/strong&gt;</tt></td><td>Strong. By default this is the same as <tt>&lt;b&gt;...&lt;/b&gt;</tt> (bold).</td></tr>
<tr valign="top" class="odd"><td><tt>&lt;i&gt;...&lt;/i&gt;</tt></td><td>Italic font style.</td></tr>
<tr valign="top" class="even"><td><tt>&lt;b&gt;...&lt;/b&gt;</tt></td><td>Bold font style.</td></tr>
<tr valign="top" class="odd"><td><tt>&lt;u&gt;...&lt;/u&gt;</tt></td><td>Underlined font style.</td></tr>
<tr valign="top" class="even"><td><tt>&lt;s&gt;...&lt;/s&gt;</tt></td><td>Strike out font style.</td></tr>
<tr valign="top" class="odd"><td><tt>&lt;big&gt;...&lt;/big&gt;</tt></td><td>A larger font size.</td></tr>
<tr valign="top" class="even"><td><tt>&lt;small&gt;...&lt;/small&gt;</tt></td><td>A smaller font size.</td></tr>
<tr valign="top" class="odd"><td><tt>&lt;sub&gt;...&lt;/sub&gt;</tt></td><td>Subscripted text</td></tr>
<tr valign="top" class="even"><td><tt>&lt;sup&gt;...&lt;/sup&gt;</tt></td><td>Superscripted text</td></tr>
<tr valign="top" class="odd"><td><tt>&lt;code&gt;...&lt;/code&gt;</tt></td><td>Indicates code. By default this is the same as <tt>&lt;tt&gt;...&lt;/tt&gt;</tt> (typewriter). For larger chunks of code use the block-tag <tt>&lt;</tt><tt>pre&gt;</tt>.</td></tr>
<tr valign="top" class="even"><td><tt>&lt;tt&gt;...&lt;/tt&gt;</tt></td><td>Typewriter font style.</td></tr>
<tr valign="top" class="odd"><td><tt>&lt;font&gt;...&lt;/font&gt;</tt></td><td>Customizes the font size, family and text color. The tag understands the following attributes:<ul>
<li><tt>color</tt> -- The text color, for example <tt>color=&quot;red&quot;</tt> or <tt>color=&quot;#FF0000&quot;</tt>.</li>
<li><tt>size</tt> -- The logical size of the font. Logical sizes 1 to 7 are supported. The value may either be absolute (for example, <tt>size=3</tt>) or relative (<tt>size=-2</tt>). In the latter case the sizes are simply added.</li>
<li><tt>face</tt> -- The family of the font, for example <tt>face=times</tt>.</li>
</ul>
</td></tr>
</table></p>
<p>Special elements are:</p>
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Special tags</th><th>Notes</th></tr></thead>
<tr valign="top" class="odd"><td><tt>&lt;img&gt;</tt></td><td>An image. The image name for the mime source factory is given in the source attribute, for example <tt>&lt;img src=&quot;qt.xpm&quot;&gt;</tt> The image tag also understands the attributes <tt>width</tt> and <tt>height</tt> that determine the size of the image. If the pixmap does not fit the specified size it will be scaled automatically (by using <a href="qimage-qt3.html#smoothScale">QImage::smoothScale</a>()).<p>The <tt>align</tt> attribute determines where the image is placed. By default, an image is placed inline just like a normal character. Specify <tt>left</tt> or <tt>right</tt> to place the image at the respective side.</p>
</td></tr>
<tr valign="top" class="even"><td><tt>&lt;hr&gt;</tt></td><td>A horizontal line.</td></tr>
<tr valign="top" class="odd"><td><tt>&lt;br&gt;</tt></td><td>A line break.</td></tr>
<tr valign="top" class="even"><td><tt>&lt;nobr&gt;...&lt;/nobr&gt;</tt></td><td>No break. Prevents word wrap.</td></tr>
</table></p>
<p>In addition, rich text supports simple HTML tables. A table consists of one or more rows each of which contains one or more cells. Cells are either data cells or header cells, depending on their content. Cells which span rows and columns are supported.</p>
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Table tags</th><th>Notes</th></tr></thead>
<tr valign="top" class="odd"><td><tt>&lt;table&gt;...&lt;/table&gt;</tt></td><td>A table. Tables support the following attributes:<ul>
<li><tt>bgcolor</tt> -- The background color.</li>
<li><tt>width</tt> -- The table width. This is either an absolute pixel width or a relative percentage of the table's width, for example <tt>width=80%</tt>.</li>
<li><tt>border</tt> -- The width of the table border. The default is 0 (= no border).</li>
<li><tt>cellspacing</tt> -- Additional space around the table cells. The default is 2.</li>
<li><tt>cellpadding</tt> -- Additional space around the contents of table cells. The default is 1.</li>
</ul>
</td></tr>
<tr valign="top" class="even"><td><tt>&lt;tr&gt;...&lt;/tr&gt;</tt></td><td>A table row. This is only valid within a <tt>table</tt>. Rows support the following attribute:<ul>
<li><tt>bgcolor</tt> -- The background color.</li>
</ul>
</td></tr>
<tr valign="top" class="odd"><td><tt>&lt;th&gt;...&lt;/th&gt;</tt></td><td>A table header cell. Similar to <tt>td</tt>, but defaults to center alignment and a bold font.</td></tr>
<tr valign="top" class="even"><td><tt>&lt;td&gt;...&lt;/td&gt;</tt></td><td>A table data cell. This is only valid within a <tt>tr</tt>. Cells support the following attributes:<ul>
<li><tt>bgcolor</tt> -- The background color.</li>
<li><tt>width</tt> -- The cell width. This is either an absolute pixel width or a relative percentage of table's width, for example <tt>width=50%</tt>.</li>
<li><tt>colspan</tt> -- Specifies how many columns this cell spans. The default is 1.</li>
<li><tt>rowspan</tt> -- Specifies how many rows this cell spans. The default is 1.</li>
<li><tt>align</tt> -- <a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a>; possible values are <tt>left</tt>, <tt>right</tt>, and <tt>center</tt>. The default is <tt>left</tt>.</li>
<li><tt>valign</tt> -- <a href="qt.html#Orientation-enum">Qt::Vertical</a> alignment; possible values are <tt>top</tt>, <tt>middle</tt>, and <tt>bottom</tt>. The default is <tt>middle</tt>.</li>
</ul>
</td></tr>
</table></p>
<hr />
<h2>Member Function Documentation</h2>
<a name="//apple_ref/cpp/instm/Q3StyleSheet/Q3StyleSheet"></a>
<h3 class="fn"><a name="Q3StyleSheet"></a>Q3StyleSheet::Q3StyleSheet ( <a href="qobject.html">QObject</a> * <i>parent</i> = 0, const char * <i>name</i> = 0 )</h3>
<p>Creates a style sheet called <i>name</i>, with parent <i>parent</i>. Like any <a href="qobject.html">QObject</a> it will be deleted when its parent is destroyed (if the child still exists).</p>
<p>By default the style sheet has the tag definitions defined above.</p>
<a name="//apple_ref/cpp/instm/Q3StyleSheet/~Q3StyleSheet"></a>
<h3 class="fn"><a name="dtor.Q3StyleSheet"></a>Q3StyleSheet::~Q3StyleSheet ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Destroys the style sheet. All styles inserted into the style sheet will be deleted.</p>
<a name="//apple_ref/cpp/clm/Q3StyleSheet/convertFromPlainText"></a>
<h3 class="fn"><a name="convertFromPlainText"></a><a href="qstring.html">QString</a> Q3StyleSheet::convertFromPlainText ( const <a href="qstring.html">QString</a> &amp; <i>plain</i>, <a href="q3stylesheetitem.html#WhiteSpaceMode-enum">Q3StyleSheetItem::WhiteSpaceMode</a> <i>mode</i> = Q3StyleSheetItem::WhiteSpacePre )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Auxiliary function. Converts the plain text string <i>plain</i> to a rich text formatted paragraph while preserving most of its look.</p>
<p><i>mode</i> defines the whitespace mode. Possible values are <tt>Q3StyleSheetItem::WhiteSpacePre</tt> (no wrapping, all whitespaces preserved) and <a href="q3stylesheetitem.html#WhiteSpaceMode-enum">Q3StyleSheetItem::WhiteSpaceNormal</a> (wrapping, simplified whitespaces).</p>
<p>See also <a href="q3stylesheet.html#escape">escape</a>().</p>
<a name="//apple_ref/cpp/clm/Q3StyleSheet/defaultSheet"></a>
<h3 class="fn"><a name="defaultSheet"></a>Q3StyleSheet * Q3StyleSheet::defaultSheet ()&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Returns the application-wide default style sheet. This style sheet is used by rich text rendering classes such as <a href="porting4.html#qsimplerichtext">QSimpleRichText</a>, <a href="qwhatsthis.html">QWhatsThis</a> and <a href="qmessagebox.html">QMessageBox</a> to define the rendering style and available tags within rich text documents. It also serves as the initial style sheet for the more complex render widgets, <a href="qtextedit.html">QTextEdit</a> and <a href="qtextbrowser.html">QTextBrowser</a>.</p>
<p>See also <a href="q3stylesheet.html#setDefaultSheet">setDefaultSheet</a>().</p>
<a name="//apple_ref/cpp/instm/Q3StyleSheet/error"></a>
<h3 class="fn"><a name="error"></a>void Q3StyleSheet::error ( const <a href="qstring.html">QString</a> &amp; <i>msg</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>This virtual function is called when an error occurs when processing rich text. Reimplement it if you need to catch error messages.</p>
<p>Errors might occur if some rich text strings contain tags that are not understood by the stylesheet, if some tags are nested incorrectly, or if tags are not closed properly.</p>
<p><i>msg</i> is the error message.</p>
<a name="//apple_ref/cpp/clm/Q3StyleSheet/escape"></a>
<h3 class="fn"><a name="escape"></a><a href="qstring.html">QString</a> Q3StyleSheet::escape ( const <a href="qstring.html">QString</a> &amp; <i>plain</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Auxiliary function. Converts the plain text string <i>plain</i> to a rich text formatted string with any HTML meta-characters escaped.</p>
<p>See also <a href="q3stylesheet.html#convertFromPlainText">convertFromPlainText</a>().</p>
<a name="//apple_ref/cpp/instm/Q3StyleSheet/item"></a>
<h3 class="fn"><a name="item"></a><a href="q3stylesheetitem.html">Q3StyleSheetItem</a> * Q3StyleSheet::item ( const <a href="qstring.html">QString</a> &amp; <i>name</i> )</h3>
<p>Returns the style called <i>name</i> or 0 if there is no such style.</p>
<h3 class="fn"><a name="item-2"></a>const <a href="q3stylesheetitem.html">Q3StyleSheetItem</a> * Q3StyleSheet::item ( const <a href="qstring.html">QString</a> &amp; <i>name</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns the style called <i>name</i> or 0 if there is no such style (const version)</p>
<a name="//apple_ref/cpp/clm/Q3StyleSheet/mightBeRichText"></a>
<h3 class="fn"><a name="mightBeRichText"></a>bool Q3StyleSheet::mightBeRichText ( const <a href="qstring.html">QString</a> &amp; <i>text</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Returns true if the string <i>text</i> is likely to be rich text; otherwise returns false.</p>
<p>This function uses a fast and therefore simple heuristic. It mainly checks whether there is something that looks like a tag before the first line break. Although the result may be correct for common cases, there is no guarantee.</p>
<a name="//apple_ref/cpp/instm/Q3StyleSheet/scaleFont"></a>
<h3 class="fn"><a name="scaleFont"></a>void Q3StyleSheet::scaleFont ( <a href="qfont.html">QFont</a> &amp; <i>font</i>, int <i>logicalSize</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Scales the font <i>font</i> to the appropriate physical point size corresponding to the logical font size <i>logicalSize</i>.</p>
<p>When calling this function, <i>font</i> has a point size corresponding to the logical font size 3.</p>
<p>Logical font sizes range from 1 to 7, with 1 being the smallest.</p>
<p>See also <a href="q3stylesheetitem.html#logicalFontSize">Q3StyleSheetItem::logicalFontSize</a>(), <a href="q3stylesheetitem.html#logicalFontSizeStep">Q3StyleSheetItem::logicalFontSizeStep</a>(), and <a href="qfont.html#setPointSize">QFont::setPointSize</a>().</p>
<a name="//apple_ref/cpp/clm/Q3StyleSheet/setDefaultSheet"></a>
<h3 class="fn"><a name="setDefaultSheet"></a>void Q3StyleSheet::setDefaultSheet ( Q3StyleSheet * <i>sheet</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Sets the application-wide default style sheet to <i>sheet</i>, deleting any style sheet previously set. The ownership is transferred to <a href="q3stylesheet.html" class="compat">Q3StyleSheet</a>.</p>
<p>See also <a href="q3stylesheet.html#defaultSheet">defaultSheet</a>().</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="40%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="40%" align="right"><div align="right">Qt 4.6.3</div></td>
</tr></table></div></address></body>
</html>