Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 4688

qt-doc-4.8.5-10.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- q3stylesheet.cpp -->
  <title>Qt 4.8: Q3StyleSheet Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li>Qt3SupportLight</li>
<li>Q3StyleSheet</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">Q3StyleSheet Class Reference</h1>
<!-- $$$Q3StyleSheet-brief -->
<p>The Q3StyleSheet class is a collection of styles for rich text rendering and a generator of tags. <a href="#details">More...</a></p>
<!-- @@@Q3StyleSheet -->
<pre class="cpp"> <span class="preprocessor">#include &lt;Q3StyleSheet&gt;</span></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><b>Inherits: </b><a href="qobject.html">QObject</a>.</p>
<ul>
<li><a href="q3stylesheet-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><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 rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="q3stylesheet.html#dtor.Q3StyleSheet">~Q3StyleSheet</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3stylesheet.html#error">error</a></b> ( const QString &amp; <i>msg</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3StyleSheetItem * </td><td class="memItemRight bottomAlign"><b><a href="q3stylesheet.html#item">item</a></b> ( const QString &amp; <i>name</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const Q3StyleSheetItem * </td><td class="memItemRight bottomAlign"><b><a href="q3stylesheet.html#item-2">item</a></b> ( const QString &amp; <i>name</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3stylesheet.html#scaleFont">scaleFont</a></b> ( QFont &amp; <i>font</i>, int <i>logicalSize</i> ) const</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><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 rightAlign topAlign"> Q3StyleSheet * </td><td class="memItemRight bottomAlign"><b><a href="q3stylesheet.html#defaultSheet">defaultSheet</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3stylesheet.html#escape">escape</a></b> ( const QString &amp; <i>plain</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3stylesheet.html#mightBeRichText">mightBeRichText</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3stylesheet.html#setDefaultSheet">setDefaultSheet</a></b> ( Q3StyleSheet * <i>sheet</i> )</td></tr>
</table>
<ul>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$Q3StyleSheet-description -->
<div class="descr">
<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>
<table class="generic">
<thead><tr 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;..&#x2e;&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;..&#x2e;&lt;/h1&gt;</tt></td><td >A top-level heading.</td></tr>
<tr valign="top" class="odd"><td ><tt>&lt;h2&gt;..&#x2e;&lt;/h2&gt;</tt></td><td >A sublevel heading.</td></tr>
<tr valign="top" class="even"><td ><tt>&lt;h3&gt;..&#x2e;&lt;/h3&gt;</tt></td><td >A sub-sublevel heading.</td></tr>
<tr valign="top" class="odd"><td ><tt>&lt;p&gt;..&#x2e;&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;..&#x2e;</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;..&#x2e;</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;..&#x2e;&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;..&#x2e;&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;..&#x2e;&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;..&#x2e;&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>Anchors and links are done with a single tag:</p>
<table class="generic">
<thead><tr class="qt-style"><th >Anchor tags</th><th >Notes</th></tr></thead>
<tr valign="top" class="odd"><td ><tt>&lt;a&gt;..&#x2e;&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>The default character style bindings are</p>
<table class="generic">
<thead><tr class="qt-style"><th >Style tags</th><th >Notes</th></tr></thead>
<tr valign="top" class="odd"><td ><tt>&lt;em&gt;..&#x2e;&lt;/em&gt;</tt></td><td >Emphasized. By default this is the same as <tt>&lt;i&gt;..&#x2e;&lt;/i&gt;</tt> (italic).</td></tr>
<tr valign="top" class="even"><td ><tt>&lt;strong&gt;..&#x2e;&lt;/strong&gt;</tt></td><td >Strong. By default this is the same as <tt>&lt;b&gt;..&#x2e;&lt;/b&gt;</tt> (bold).</td></tr>
<tr valign="top" class="odd"><td ><tt>&lt;i&gt;..&#x2e;&lt;/i&gt;</tt></td><td >Italic font style.</td></tr>
<tr valign="top" class="even"><td ><tt>&lt;b&gt;..&#x2e;&lt;/b&gt;</tt></td><td >Bold font style.</td></tr>
<tr valign="top" class="odd"><td ><tt>&lt;u&gt;..&#x2e;&lt;/u&gt;</tt></td><td >Underlined font style.</td></tr>
<tr valign="top" class="even"><td ><tt>&lt;s&gt;..&#x2e;&lt;/s&gt;</tt></td><td >Strike out font style.</td></tr>
<tr valign="top" class="odd"><td ><tt>&lt;big&gt;..&#x2e;&lt;/big&gt;</tt></td><td >A larger font size.</td></tr>
<tr valign="top" class="even"><td ><tt>&lt;small&gt;..&#x2e;&lt;/small&gt;</tt></td><td >A smaller font size.</td></tr>
<tr valign="top" class="odd"><td ><tt>&lt;sub&gt;..&#x2e;&lt;/sub&gt;</tt></td><td >Subscripted text</td></tr>
<tr valign="top" class="even"><td ><tt>&lt;sup&gt;..&#x2e;&lt;/sup&gt;</tt></td><td >Superscripted text</td></tr>
<tr valign="top" class="odd"><td ><tt>&lt;code&gt;..&#x2e;&lt;/code&gt;</tt></td><td >Indicates code. By default this is the same as <tt>&lt;tt&gt;..&#x2e;&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;..&#x2e;&lt;/tt&gt;</tt></td><td >Typewriter font style.</td></tr>
<tr valign="top" class="odd"><td ><tt>&lt;font&gt;..&#x2e;&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>Special elements are:</p>
<table class="generic">
<thead><tr 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;..&#x2e;&lt;/nobr&gt;</tt></td><td >No break. Prevents word wrap.</td></tr>
</table>
<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>
<table class="generic">
<thead><tr class="qt-style"><th >Table tags</th><th >Notes</th></tr></thead>
<tr valign="top" class="odd"><td ><tt>&lt;table&gt;..&#x2e;&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;..&#x2e;&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;..&#x2e;&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;..&#x2e;&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>
</div>
<!-- @@@Q3StyleSheet -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Q3StyleSheet[overload1]$$$Q3StyleSheetQObject*constchar* -->
<h3 class="fn"><a name="Q3StyleSheet"></a>Q3StyleSheet::<span class="name">Q3StyleSheet</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0, const <span class="type">char</span> * <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>
<!-- @@@Q3StyleSheet -->
<!-- $$$~Q3StyleSheet[overload1]$$$~Q3StyleSheet -->
<h3 class="fn"><a name="dtor.Q3StyleSheet"></a>Q3StyleSheet::<span class="name">~Q3StyleSheet</span> ()<tt> [virtual]</tt></h3>
<p>Destroys the style sheet. All styles inserted into the style sheet will be deleted.</p>
<!-- @@@~Q3StyleSheet -->
<!-- $$$convertFromPlainText[overload1]$$$convertFromPlainTextconstQString&Q3StyleSheetItem::WhiteSpaceMode -->
<h3 class="fn"><a name="convertFromPlainText"></a><span class="type"><a href="qstring.html">QString</a></span> Q3StyleSheet::<span class="name">convertFromPlainText</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>plain</i>, <span class="type"><a href="q3stylesheetitem.html#WhiteSpaceMode-enum">Q3StyleSheetItem::WhiteSpaceMode</a></span> <i>mode</i> = Q3StyleSheetItem::WhiteSpacePre )<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><b>See also </b><a href="q3stylesheet.html#escape">escape</a>().</p>
<!-- @@@convertFromPlainText -->
<!-- $$$defaultSheet[overload1]$$$defaultSheet -->
<h3 class="fn"><a name="defaultSheet"></a><span class="type">Q3StyleSheet</span> * Q3StyleSheet::<span class="name">defaultSheet</span> ()<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><b>See also </b><a href="q3stylesheet.html#setDefaultSheet">setDefaultSheet</a>().</p>
<!-- @@@defaultSheet -->
<!-- $$$error[overload1]$$$errorconstQString& -->
<h3 class="fn"><a name="error"></a><span class="type">void</span> Q3StyleSheet::<span class="name">error</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>msg</i> ) const<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>
<!-- @@@error -->
<!-- $$$escape[overload1]$$$escapeconstQString& -->
<h3 class="fn"><a name="escape"></a><span class="type"><a href="qstring.html">QString</a></span> Q3StyleSheet::<span class="name">escape</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>plain</i> )<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><b>See also </b><a href="q3stylesheet.html#convertFromPlainText">convertFromPlainText</a>().</p>
<!-- @@@escape -->
<!-- $$$item[overload1]$$$itemconstQString& -->
<h3 class="fn"><a name="item"></a><span class="type"><a href="q3stylesheetitem.html">Q3StyleSheetItem</a></span> * Q3StyleSheet::<span class="name">item</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>name</i> )</h3>
<p>Returns the style called <i>name</i> or 0 if there is no such style.</p>
<!-- @@@item -->
<!-- $$$item$$$itemconstQString& -->
<h3 class="fn"><a name="item-2"></a>const <span class="type"><a href="q3stylesheetitem.html">Q3StyleSheetItem</a></span> * Q3StyleSheet::<span class="name">item</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &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>
<!-- @@@item -->
<!-- $$$mightBeRichText[overload1]$$$mightBeRichTextconstQString& -->
<h3 class="fn"><a name="mightBeRichText"></a><span class="type">bool</span> Q3StyleSheet::<span class="name">mightBeRichText</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i> )<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>
<!-- @@@mightBeRichText -->
<!-- $$$scaleFont[overload1]$$$scaleFontQFont&int -->
<h3 class="fn"><a name="scaleFont"></a><span class="type">void</span> Q3StyleSheet::<span class="name">scaleFont</span> ( <span class="type"><a href="qfont.html">QFont</a></span> &amp; <i>font</i>, <span class="type">int</span> <i>logicalSize</i> ) const<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><b>See also </b><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>
<!-- @@@scaleFont -->
<!-- $$$setDefaultSheet[overload1]$$$setDefaultSheetQ3StyleSheet* -->
<h3 class="fn"><a name="setDefaultSheet"></a><span class="type">void</span> Q3StyleSheet::<span class="name">setDefaultSheet</span> ( <span class="type">Q3StyleSheet</span> * <i>sheet</i> )<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><b>See also </b><a href="q3stylesheet.html#defaultSheet">defaultSheet</a>().</p>
<!-- @@@setDefaultSheet -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>