You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tqt3/doc/html/ntqstylesheet.html

384 lines
23 KiB

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/kernel/qstylesheet.cpp:854 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>TQStyleSheet Class</title>
<style type="text/css"><!--
fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
<a href="index.html">
<font color="#004faf">Home</font></a>
| <a href="classes.html">
<font color="#004faf">All&nbsp;Classes</font></a>
| <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
| <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
| <a href="groups.html">
<font color="#004faf">Grouped&nbsp;Classes</font></a>
| <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>TQStyleSheet Class Reference</h1>
<p>The TQStyleSheet class is a collection of styles for rich text
rendering and a generator of tags.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qstylesheet-h.html">ntqstylesheet.h</a>&gt;</tt>
<p>Inherits <a href="tqobject.html">TQObject</a>.
<p><a href="qstylesheet-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li class=fn><a href="#TQStyleSheet"><b>TQStyleSheet</b></a> ( TQObject&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )</li>
<li class=fn>virtual <a href="#~TQStyleSheet"><b>~TQStyleSheet</b></a> ()</li>
<li class=fn>TQStyleSheetItem * <a href="#item"><b>item</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;name )</li>
<li class=fn>const TQStyleSheetItem * <a href="#item-2"><b>item</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;name ) const</li>
<li class=fn>virtual TQTextCustomItem * <a href="#tag"><b>tag</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;name, const&nbsp;TQMap&lt;TQString,&nbsp;TQString&gt;&nbsp;&amp;&nbsp;attr, const&nbsp;TQString&nbsp;&amp;&nbsp;context, const&nbsp;TQMimeSourceFactory&nbsp;&amp;&nbsp;factory, bool&nbsp;emptyTag, TQTextDocument&nbsp;*&nbsp;doc ) const</li>
<li class=fn>virtual void <a href="#scaleFont"><b>scaleFont</b></a> ( TQFont&nbsp;&amp;&nbsp;font, int&nbsp;logicalSize ) const</li>
<li class=fn>virtual void <a href="#error"><b>error</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;msg ) const</li>
</ul>
<h2>Static Public Members</h2>
<ul>
<li class=fn>TQStyleSheet * <a href="#defaultSheet"><b>defaultSheet</b></a> ()</li>
<li class=fn>void <a href="#setDefaultSheet"><b>setDefaultSheet</b></a> ( TQStyleSheet&nbsp;*&nbsp;sheet )</li>
<li class=fn>TQString <a href="#escape"><b>escape</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;plain )</li>
<li class=fn>TQString <a href="#convertFromPlainText"><b>convertFromPlainText</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;plain, TQStyleSheetItem::WhiteSpaceMode&nbsp;mode = TQStyleSheetItem::WhiteSpacePre )</li>
<li class=fn>bool <a href="#mightBeRichText"><b>mightBeRichText</b></a> ( const&nbsp;TQString&nbsp;&amp;&nbsp;text )</li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>
The TQStyleSheet class is a collection of styles for rich text
rendering and a generator of tags.
<p>
<p> By creating <a href="qstylesheetitem.html">TQStyleSheetItem</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="ntqtextedit.html">TQTextEdit</a> or a <a href="ntqtextbrowser.html">TQTextBrowser</a>. However, <a href="ntqlabel.html">TQLabel</a>,
<a href="ntqwhatsthis.html">TQWhatsThis</a> and <a href="ntqmessagebox.html">TQMessageBox</a> also support it, and other classes are
likely to follow. With <a href="ntqsimplerichtext.html">TQSimpleRichText</a> it is possible to use the
rich text renderer for custom widgets as well.
<p> The default TQStyleSheet object has the following style bindings,
sorted by structuring bindings, anchors, character style bindings
(i.e. inline styles), special elements such as horizontal lines or
images, and other tags. In addition, rich text supports simple
HTML tables.
<p> The structuring tags are
<center><table cellpadding="4" cellspacing="2" border="0">
<tr bgcolor="#a2c511"> <th valign="top">Structuring tags <th valign="top">Notes
<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;qt&gt;</tt>...<tt>&lt;/qt&gt;</tt>
<td valign="top">A TQt 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="ntqtextedit.html#documentTitle">TQTextEdit::documentTitle</a>().
<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="ntqtextbrowser.html">TQTextBrowser</a> will then keep
the current page and display the new document in a small
popup similar to <a href="ntqwhatsthis.html">TQWhatsThis</a>. Note that links will not work
in documents with <tt>&lt;qt type="detail"&gt;...&lt;/qt&gt;</tt>.
<li> <tt>bgcolor</tt> -- The background color, for example <tt>bgcolor="yellow"</tt> or <tt>bgcolor="#0000FF"</tt>.
<li> <tt>background</tt> -- The background pixmap, for example <tt>background="granite.xpm"</tt>. The pixmap name will be resolved
by a <a href="qmimesourcefactory.html">TQMimeSourceFactory</a>().
<li> <tt>text</tt> -- The default text color, for example <tt>text="red"</tt>.
<li> <tt>link</tt> -- The link color, for example <tt>link="green"</tt>.
</ul>
<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&lt;h1&gt;...&lt;/h1&gt;</tt>
<td valign="top">A top-level heading.
<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;h2&gt;...&lt;/h2&gt;</tt>
<td valign="top">A sublevel heading.
<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&lt;h3&gt;...&lt;/h3&gt;</tt>
<td valign="top">A sub-sublevel heading.
<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;h4&gt;...&lt;/h4&gt;</tt> <tt>&lt;h5&gt;...&lt;/h5&gt;</tt>
<td valign="top">Headings of lesser importance.
<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&lt;p&gt;...&lt;/p&gt;</tt>
<td valign="top">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>.
<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;center&gt;...</tt><br><tt>&lt;/center&gt;</tt>
<td valign="top">A centered paragraph.
<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&lt;blockquote&gt;...</tt><br><tt>&lt;/blockquote&gt;</tt>
<td valign="top">An indented paragraph that is useful for quotes.
<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;ul&gt;...&lt;/ul&gt;</tt>
<td valign="top">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>.
<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&lt;ol&gt;...&lt;/ol&gt;</tt>
<td valign="top">An ordered list. You can also pass a type argument to
define the enumeration label style. The default is <tt>type="1"</tt>; other types are <tt>"a"</tt> and <tt>"A"</tt>.
<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;li&gt;...&lt;/li&gt;</tt>
<td valign="top">A list item. This tag can be used only within the context
of <tt>&lt;ol&gt;</tt> or <tt>&lt;ul&gt;</tt>.
<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&lt;dl&gt;...&lt;/dl&gt;</tt>
<td valign="top">A list of definitions, consisting of terms and descriptions.
<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;dt&gt;...&lt;/dt&gt;</tt>
<td valign="top">A term in a list of definitions. This tag can be used only
in the context of <tt>&lt;dl&gt;...&lt;/dl&gt;</tt>.
<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&lt;dd&gt;...&lt;/dd&gt;</tt>
<td valign="top">A description in a list of definitions. This tag can be
used only in the context of <tt>&lt;dl&gt;...&lt;/dl&gt;</tt>.
<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;pre&gt;...&lt;/pre&gt;</tt>
<td valign="top">For larger chunks of code. Whitespaces in the contents are
preserved. For small bits of code use the inline-style <tt>code</tt>.
<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&lt;div&gt;...&lt;/div&gt;</tt> and <tt>&lt;span&gt;...&lt;/span&gt;</tt>
<td valign="top">Block grouping elements. These are used to structure the
document, and are often used to provide hints about the
intended presentation of the document.
</table></center>
<p> Anchors and links are done with a single tag:
<center><table cellpadding="4" cellspacing="2" border="0">
<tr bgcolor="#a2c511"> <th valign="top">Anchor tags <th valign="top">Notes
<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;a&gt;...&lt;/a&gt;</tt>
<td valign="top">An anchor or link.
<ul>
<li> A link is created by using an <tt>href</tt>
attribute, for example
<br><tt>&lt;a href="target.qml"&gt;Link Text&lt;/a&gt;</tt>. Links to
targets within a document are achieved in the same way
as for HTML, e.g.
<br><tt>&lt;a href="target.qml#subtitle"&gt;Link Text&lt;/a&gt;</tt>.
<li> A target is created by using a <a href="tqobject.html#name-prop">name</a>
attribute, for example
<br><tt>&lt;a name="subtitle"&gt;&lt;h2&gt;Sub Title&lt;/h2&gt;&lt;/a&gt;</tt>.
</ul>
</table></center>
<p> The default character style bindings are
<center><table cellpadding="4" cellspacing="2" border="0">
<tr bgcolor="#a2c511"> <th valign="top">Style tags <th valign="top">Notes
<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&lt;em&gt;...&lt;/em&gt;</tt>
<td valign="top">Emphasized. By default this is the same as <tt>&lt;i&gt;...&lt;/i&gt;</tt>
(italic).
<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;strong&gt;...&lt;/strong&gt;</tt>
<td valign="top">Strong. By default this is the same as <tt>&lt;b&gt;...&lt;/b&gt;</tt>
(bold).
<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&lt;i&gt;...&lt;/i&gt;</tt>
<td valign="top">Italic font style.
<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;b&gt;...&lt;/b&gt;</tt>
<td valign="top">Bold font style.
<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&lt;u&gt;...&lt;/u&gt;</tt>
<td valign="top">Underlined font style.
<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;s&gt;...&lt;/s&gt;</tt>
<td valign="top">Strike out font style.
<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&lt;big&gt;...&lt;/big&gt;</tt>
<td valign="top">A larger font size.
<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;small&gt;...&lt;/small&gt;</tt>
<td valign="top">A smaller font size.
<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&lt;sub&gt;...&lt;/sub&gt;</tt>
<td valign="top">Subscripted text
<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;sup&gt;...&lt;/sup&gt;</tt>
<td valign="top">Superscripted text
<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&lt;code&gt;...&lt;/code&gt;</tt>
<td valign="top">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>.
<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;tt&gt;...&lt;/tt&gt;</tt>
<td valign="top">Typewriter font style.
<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&lt;font&gt;...&lt;/font&gt;</tt>
<td valign="top">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="red"</tt> or
<tt>color="#FF0000"</tt>.
<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> <tt>face</tt> -- The family of the font, for example <tt>face=times</tt>.
</ul>
</table></center>
<p> Special elements are:
<center><table cellpadding="4" cellspacing="2" border="0">
<tr bgcolor="#a2c511"> <th valign="top">Special tags <th valign="top">Notes
<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;img&gt;</tt>
<td valign="top">An image. The image name for the mime source factory is
given in the source attribute, for example
<tt>&lt;img src="qt.xpm"&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="tqimage.html#smoothScale">TQImage::smoothScale</a>()).
<br>
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.
<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&lt;hr&gt;</tt>
<td valign="top">A horizontal line.
<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;br&gt;</tt>
<td valign="top">A line break.
<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&lt;nobr&gt;...&lt;/nobr&gt;</tt>
<td valign="top">No break. Prevents word wrap.
</table></center>
<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> <center><table cellpadding="4" cellspacing="2" border="0">
<tr bgcolor="#a2c511"> <th valign="top">Table tags <th valign="top">Notes
<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;table&gt;...&lt;/table&gt;</tt>
<td valign="top">A table. Tables support the following attributes:
<ul>
<li> <tt>bgcolor</tt> -- The background color.
<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> <tt>border</tt> -- The width of the table border. The default is
0 (= no border).
<li> <tt>cellspacing</tt> -- Additional space around the table cells.
The default is 2.
<li> <tt>cellpadding</tt> -- Additional space around the contents of
table cells. The default is 1.
</ul>
<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&lt;tr&gt;...&lt;/tr&gt;</tt>
<td valign="top">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.
</ul>
<tr bgcolor="#f0f0f0"> <td valign="top"><tt>&lt;th&gt;...&lt;/th&gt;</tt>
<td valign="top">A table header cell. Similar to <tt>td</tt>, but defaults to
center alignment and a bold font.
<tr bgcolor="#d0d0d0"> <td valign="top"><tt>&lt;td&gt;...&lt;/td&gt;</tt>
<td valign="top">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> <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> <tt>colspan</tt> -- Specifies how many columns this cell spans.
The default is 1.
<li> <tt>rowspan</tt> -- Specifies how many rows this cell spans. The
default is 1.
<li> <tt>align</tt> -- Alignment; possible values are <tt>left</tt>, <tt>right</tt>, and <tt>center</tt>. The default is <tt>left</tt>.
<li> <tt>valign</tt> -- Vertical alignment; possible values are <tt>top</tt>, <tt>middle</tt>, and <tt>bottom</tt>. The default is <tt>middle</tt>.
</ul>
</table></center>
<p>See also <a href="graphics.html">Graphics Classes</a>, <a href="helpsystem.html">Help System</a>, and <a href="text.html">Text Related Classes</a>.
<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="TQStyleSheet"></a>TQStyleSheet::TQStyleSheet ( <a href="tqobject.html">TQObject</a>&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )
</h3>
Creates a style sheet called <em>name</em>, with parent <em>parent</em>. Like
any <a href="tqobject.html">TQObject</a> it will be deleted when its parent is destroyed (if
the child still exists).
<p> By default the style sheet has the tag definitions defined above.
<h3 class=fn><a name="~TQStyleSheet"></a>TQStyleSheet::~TQStyleSheet ()<tt> [virtual]</tt>
</h3>
Destroys the style sheet. All styles inserted into the style sheet
will be deleted.
<h3 class=fn><a href="ntqstring.html">TQString</a> <a name="convertFromPlainText"></a>TQStyleSheet::convertFromPlainText ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;plain, <a href="qstylesheetitem.html#WhiteSpaceMode-enum">TQStyleSheetItem::WhiteSpaceMode</a>&nbsp;mode = TQStyleSheetItem::WhiteSpacePre )<tt> [static]</tt>
</h3> Auxiliary function. Converts the plain text string <em>plain</em> to a
rich text formatted paragraph while preserving most of its look.
<p> <em>mode</em> defines the whitespace mode. Possible values are <a href="qstylesheetitem.html#WhiteSpaceMode-enum">TQStyleSheetItem::WhiteSpacePre</a> (no wrapping, all whitespaces
preserved) and <a href="qstylesheetitem.html#WhiteSpaceMode-enum">TQStyleSheetItem::WhiteSpaceNormal</a> (wrapping,
simplified whitespaces).
<p> <p>See also <a href="#escape">escape</a>().
<p>Examples: <a href="qaction-application-example.html#x1163">action/application.cpp</a>, <a href="simple-application-example.html#x1581">application/application.cpp</a>, and <a href="mdi-example.html#x2067">mdi/application.cpp</a>.
<h3 class=fn><a href="ntqstylesheet.html">TQStyleSheet</a>&nbsp;* <a name="defaultSheet"></a>TQStyleSheet::defaultSheet ()<tt> [static]</tt>
</h3>
Returns the application-wide default style sheet. This style sheet
is used by rich text rendering classes such as <a href="ntqsimplerichtext.html">TQSimpleRichText</a>,
<a href="ntqwhatsthis.html">TQWhatsThis</a> and <a href="ntqmessagebox.html">TQMessageBox</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="ntqtextedit.html">TQTextEdit</a>
and <a href="ntqtextbrowser.html">TQTextBrowser</a>.
<p> <p>See also <a href="#setDefaultSheet">setDefaultSheet</a>().
<h3 class=fn>void <a name="error"></a>TQStyleSheet::error ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;msg ) 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> 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> <em>msg</em> is the error message.
<h3 class=fn><a href="ntqstring.html">TQString</a> <a name="escape"></a>TQStyleSheet::escape ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;plain )<tt> [static]</tt>
</h3>
Auxiliary function. Converts the plain text string <em>plain</em> to a
rich text formatted string with any HTML meta-characters escaped.
<p> <p>See also <a href="#convertFromPlainText">convertFromPlainText</a>().
<h3 class=fn><a href="qstylesheetitem.html">TQStyleSheetItem</a>&nbsp;* <a name="item"></a>TQStyleSheet::item ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;name )
</h3>
Returns the style called <em>name</em> or 0 if there is no such style.
<h3 class=fn>const&nbsp;<a href="qstylesheetitem.html">TQStyleSheetItem</a>&nbsp;* <a name="item-2"></a>TQStyleSheet::item ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;name ) const
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Returns the style called <em>name</em> or 0 if there is no such style
(const version)
<h3 class=fn>bool <a name="mightBeRichText"></a>TQStyleSheet::mightBeRichText ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;text )<tt> [static]</tt>
</h3>
Returns TRUE if the string <em>text</em> is likely to be rich text;
otherwise returns FALSE.
<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.
<h3 class=fn>void <a name="scaleFont"></a>TQStyleSheet::scaleFont ( <a href="ntqfont.html">TQFont</a>&nbsp;&amp;&nbsp;font, int&nbsp;logicalSize ) const<tt> [virtual]</tt>
</h3>
Scales the font <em>font</em> to the appropriate physical point size
corresponding to the logical font size <em>logicalSize</em>.
<p> When calling this function, <em>font</em> has a point size corresponding
to the logical font size 3.
<p> Logical font sizes range from 1 to 7, with 1 being the smallest.
<p> <p>See also <a href="qstylesheetitem.html#logicalFontSize">TQStyleSheetItem::logicalFontSize</a>(), <a href="qstylesheetitem.html#logicalFontSizeStep">TQStyleSheetItem::logicalFontSizeStep</a>(), and <a href="ntqfont.html#setPointSize">TQFont::setPointSize</a>().
<h3 class=fn>void <a name="setDefaultSheet"></a>TQStyleSheet::setDefaultSheet ( <a href="ntqstylesheet.html">TQStyleSheet</a>&nbsp;*&nbsp;sheet )<tt> [static]</tt>
</h3>
Sets the application-wide default style sheet to <em>sheet</em>,
deleting any style sheet previously set. The ownership is
transferred to TQStyleSheet.
<p> <p>See also <a href="#defaultSheet">defaultSheet</a>().
<h3 class=fn>TQTextCustomItem * <a name="tag"></a>TQStyleSheet::tag ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;name, const&nbsp;<a href="tqmap.html">TQMap</a>&lt;TQString,&nbsp;TQString&gt;&nbsp;&amp;&nbsp;attr, const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;context, const&nbsp;<a href="qmimesourcefactory.html">TQMimeSourceFactory</a>&nbsp;&amp;&nbsp;factory, bool&nbsp;emptyTag, TQTextDocument&nbsp;*&nbsp;doc ) const<tt> [virtual]</tt>
</h3>
<p><b>This function is under development and is subject to change.</b>
<p> Generates an internal object for the tag called <em>name</em>, given the
attributes <em>attr</em>, and using additional information provided by
the mime source factory <em>factory</em>.
<p> <em>context</em> is the optional context of the document, i.e. the path
to look for relative links. This becomes important if the text
contains relative references, for example within image tags.
<a href="ntqsimplerichtext.html">TQSimpleRichText</a> always uses the default mime source factory (see
<a href="qmimesourcefactory.html#defaultFactory">TQMimeSourceFactory::defaultFactory</a>()) to resolve these
references. The context will then be used to calculate the
absolute path. See <a href="qmimesourcefactory.html#makeAbsolute">TQMimeSourceFactory::makeAbsolute</a>() for details.
<p> <em>emptyTag</em> and <em>doc</em> are for internal use only.
<p> This function should not be used in application code.
<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">TQt toolkit</a>.
Copyright &copy; 1995-2007
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2007
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
<td align=right><div align=right>TQt 3.3.8</div>
</table></div></address></body>
</html>