~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qtextoption.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/gui/text/qtextoption.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: QTextOption Class Reference</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<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="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QTextOption Class Reference</h1>
 
21
<p>The QTextOption class provides a description of general rich text properties. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QTextOption&gt;</pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
 
23
<ul>
 
24
<li><a href="qtextoption-members.html">List of all members, including inherited members</a></li>
 
25
</ul>
 
26
<a name="public-types"></a>
 
27
<h3>Public Types</h3>
 
28
<ul>
 
29
<li><div class="fn"/>enum <b><a href="qtextoption.html#Flag-enum">Flag</a></b> { IncludeTrailingSpaces }</li>
 
30
<li><div class="fn"/>flags <b><a href="qtextoption.html#Flag-enum">Flags</a></b></li>
 
31
<li><div class="fn"/>enum <b><a href="qtextoption.html#WrapMode-enum">WrapMode</a></b> { NoWrap, WordWrap, ManualWrap, WrapAnywhere, WrapAtWordBoundaryOrAnywhere }</li>
 
32
</ul>
 
33
<a name="public-functions"></a>
 
34
<h3>Public Functions</h3>
 
35
<ul>
 
36
<li><div class="fn"/><b><a href="qtextoption.html#QTextOption">QTextOption</a></b> ()</li>
 
37
<li><div class="fn"/><b><a href="qtextoption.html#QTextOption-2">QTextOption</a></b> ( Qt::Alignment <i>alignment</i> )</li>
 
38
<li><div class="fn"/><b><a href="qtextoption.html#QTextOption-3">QTextOption</a></b> ( const QTextOption &amp; <i>other</i> )</li>
 
39
<li><div class="fn"/><b><a href="qtextoption.html#dtor.QTextOption">~QTextOption</a></b> ()</li>
 
40
<li><div class="fn"/>Qt::Alignment <b><a href="qtextoption.html#alignment">alignment</a></b> () const</li>
 
41
<li><div class="fn"/>Flags <b><a href="qtextoption.html#flags">flags</a></b> () const</li>
 
42
<li><div class="fn"/>void <b><a href="qtextoption.html#setAlignment">setAlignment</a></b> ( Qt::Alignment <i>alignment</i> )</li>
 
43
<li><div class="fn"/>void <b><a href="qtextoption.html#setFlags">setFlags</a></b> ( Flags <i>flags</i> )</li>
 
44
<li><div class="fn"/>void <b><a href="qtextoption.html#setTabArray">setTabArray</a></b> ( QList&lt;qreal&gt; <i>tabStops</i> )</li>
 
45
<li><div class="fn"/>void <b><a href="qtextoption.html#setTabStop">setTabStop</a></b> ( qreal <i>tabStop</i> )</li>
 
46
<li><div class="fn"/>void <b><a href="qtextoption.html#setTextDirection">setTextDirection</a></b> ( Qt::LayoutDirection <i>direction</i> )</li>
 
47
<li><div class="fn"/>void <b><a href="qtextoption.html#setUseDesignMetrics">setUseDesignMetrics</a></b> ( bool <i>enable</i> )</li>
 
48
<li><div class="fn"/>void <b><a href="qtextoption.html#setWrapMode">setWrapMode</a></b> ( WrapMode <i>mode</i> )</li>
 
49
<li><div class="fn"/>QList&lt;qreal&gt; <b><a href="qtextoption.html#tabArray">tabArray</a></b> () const</li>
 
50
<li><div class="fn"/>qreal <b><a href="qtextoption.html#tabStop">tabStop</a></b> () const</li>
 
51
<li><div class="fn"/>Qt::LayoutDirection <b><a href="qtextoption.html#textDirection">textDirection</a></b> () const</li>
 
52
<li><div class="fn"/>bool <b><a href="qtextoption.html#useDesignMetrics">useDesignMetrics</a></b> () const</li>
 
53
<li><div class="fn"/>WrapMode <b><a href="qtextoption.html#wrapMode">wrapMode</a></b> () const</li>
 
54
<li><div class="fn"/>QTextOption &amp; <b><a href="qtextoption.html#operator-eq">operator=</a></b> ( const QTextOption &amp; <i>other</i> )</li>
 
55
</ul>
 
56
<a name="details"></a>
 
57
<hr />
 
58
<h2>Detailed Description</h2>
 
59
<p>The QTextOption class provides a description of general rich text properties.</p>
 
60
<p>QTextOption is used to encapsulate common rich text properties in a single object. It contains information about text alignment, layout direction, word wrapping, and other standard properties associated with text rendering and layout.</p>
 
61
<p>See also <a href="qtextedit.html">QTextEdit</a>, <a href="qtextdocument.html">QTextDocument</a>, and <a href="qtextcursor.html">QTextCursor</a>.</p>
 
62
<hr />
 
63
<h2>Member Type Documentation</h2>
 
64
<h3 class="flags"><a name="Flag-enum"></a>enum QTextOption::Flag<br />flags QTextOption::Flags</h3>
 
65
<table border="1" cellpadding="2" cellspacing="1" width="40%">
 
66
<tr><th width="60%">Constant</th><th width="40%">Value</th></tr>
 
67
<tr><td valign="top"><tt>QTextOption::IncludeTrailingSpaces</tt></td><td align="center" valign="top"><tt>0x80000000</tt></td></tr>
 
68
</table>
 
69
<p>The Flags type is a typedef for <a href="qflags.html">QFlags</a>&lt;Flag&gt;. It stores an OR combination of Flag values.</p>
 
70
<h3 class="fn"><a name="WrapMode-enum"></a>enum QTextOption::WrapMode</h3>
 
71
<p>This enum describes how text is wrapped in a document.</p>
 
72
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
73
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
74
<tr><td valign="top"><tt>QTextOption::NoWrap</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">Text is not wrapped at all.</td></tr>
 
75
<tr><td valign="top"><tt>QTextOption::WordWrap</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Text is wrapped at word boundaries.</td></tr>
 
76
<tr><td valign="top"><tt>QTextOption::ManualWrap</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">Wrapping occurs at a manually specified length from the start of the line.</td></tr>
 
77
<tr><td valign="top"><tt>QTextOption::WrapAnywhere</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">Text can be wrapped at any point on a line, even if it occurs in the middle of a word.</td></tr>
 
78
<tr><td valign="top"><tt>QTextOption::WrapAtWordBoundaryOrAnywhere</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">If possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word.</td></tr>
 
79
</table>
 
80
<hr />
 
81
<h2>Member Function Documentation</h2>
 
82
<h3 class="fn"><a name="QTextOption"></a>QTextOption::QTextOption ()</h3>
 
83
<p>Constructs a text option with default properties for text.</p>
 
84
<h3 class="fn"><a name="QTextOption-2"></a>QTextOption::QTextOption ( <a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a> <i>alignment</i> )</h3>
 
85
<p>Constructs a text option with the given <i>alignment</i> for text.</p>
 
86
<h3 class="fn"><a name="QTextOption-3"></a>QTextOption::QTextOption ( const QTextOption &amp; <i>other</i> )</h3>
 
87
<p>Construct a copy of the <i>other</i> text option.</p>
 
88
<h3 class="fn"><a name="dtor.QTextOption"></a>QTextOption::~QTextOption ()</h3>
 
89
<p>Destroys the text option.</p>
 
90
<h3 class="fn"><a name="alignment"></a><a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a> QTextOption::alignment () const</h3>
 
91
<p>Returns the text alignment defined by the option.</p>
 
92
<p>See also <a href="qtextoption.html#setAlignment">setAlignment</a>().</p>
 
93
<h3 class="fn"><a name="flags"></a><a href="qtextoption.html#Flag-enum">Flags</a> QTextOption::flags () const</h3>
 
94
<p>Returns the flags associated with the option.</p>
 
95
<p>See also <a href="qtextoption.html#setFlags">setFlags</a>().</p>
 
96
<h3 class="fn"><a name="setAlignment"></a>void QTextOption::setAlignment ( <a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a> <i>alignment</i> )</h3>
 
97
<p>Sets the option's text alignment to the specified <i>alignment</i>.</p>
 
98
<p>See also <a href="qtextoption.html#alignment">alignment</a>().</p>
 
99
<h3 class="fn"><a name="setFlags"></a>void QTextOption::setFlags ( <a href="qtextoption.html#Flag-enum">Flags</a> <i>flags</i> )</h3>
 
100
<p>Sets the flags associated with the option to the given <i>flags</i>.</p>
 
101
<p>See also <a href="qtextoption.html#flags">flags</a>().</p>
 
102
<h3 class="fn"><a name="setTabArray"></a>void QTextOption::setTabArray ( <a href="qlist.html">QList</a>&lt;<a href="qtglobal.html#qreal-typedef">qreal</a>&gt; <i>tabStops</i> )</h3>
 
103
<p>Sets the tab positions for the text layout to those specified by <i>tabStops</i>.</p>
 
104
<p>See also <a href="qtextoption.html#tabArray">tabArray</a>() and <a href="qtextoption.html#setTabStop">setTabStop</a>().</p>
 
105
<h3 class="fn"><a name="setTabStop"></a>void QTextOption::setTabStop ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>tabStop</i> )</h3>
 
106
<p>Sets the distance in device units between tab stops to the value specified by <i>tabStop</i>.</p>
 
107
<p>See also <a href="qtextoption.html#tabStop">tabStop</a>() and <a href="qtextoption.html#setTabArray">setTabArray</a>().</p>
 
108
<h3 class="fn"><a name="setTextDirection"></a>void QTextOption::setTextDirection ( <a href="qt.html#LayoutDirection-enum">Qt::LayoutDirection</a> <i>direction</i> )</h3>
 
109
<p>Sets the direction of the text layout defined by the option to the given <i>direction</i>.</p>
 
110
<p>See also <a href="qtextoption.html#textDirection">textDirection</a>().</p>
 
111
<h3 class="fn"><a name="setUseDesignMetrics"></a>void QTextOption::setUseDesignMetrics ( bool <i>enable</i> )</h3>
 
112
<p>If <i>enable</i> is true then the layout will use design metrics; otherwise it will use the metrics of the paint device (which is the default behavior).</p>
 
113
<p>See also <a href="qtextoption.html#useDesignMetrics">useDesignMetrics</a>().</p>
 
114
<h3 class="fn"><a name="setWrapMode"></a>void QTextOption::setWrapMode ( <a href="qtextoption.html#WrapMode-enum">WrapMode</a> <i>mode</i> )</h3>
 
115
<p>Sets the option's text wrap mode to the given <i>mode</i>.</p>
 
116
<h3 class="fn"><a name="tabArray"></a><a href="qlist.html">QList</a>&lt;<a href="qtglobal.html#qreal-typedef">qreal</a>&gt; QTextOption::tabArray () const</h3>
 
117
<p>Returns a list of tab positions defined for the text layout.</p>
 
118
<p>See also <a href="qtextoption.html#setTabArray">setTabArray</a>() and <a href="qtextoption.html#tabStop">tabStop</a>().</p>
 
119
<h3 class="fn"><a name="tabStop"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QTextOption::tabStop () const</h3>
 
120
<p>Returns the distance in device units between tab stops.</p>
 
121
<p>See also <a href="qtextoption.html#setTabStop">setTabStop</a>() and <a href="qtextoption.html#tabArray">tabArray</a>().</p>
 
122
<h3 class="fn"><a name="textDirection"></a><a href="qt.html#LayoutDirection-enum">Qt::LayoutDirection</a> QTextOption::textDirection () const</h3>
 
123
<p>Returns the direction of the text layout defined by the option.</p>
 
124
<p>See also <a href="qtextoption.html#setTextDirection">setTextDirection</a>().</p>
 
125
<h3 class="fn"><a name="useDesignMetrics"></a>bool QTextOption::useDesignMetrics () const</h3>
 
126
<p>Returns true if the layout uses design rather than device metrics; otherwise returns false.</p>
 
127
<p>See also <a href="qtextoption.html#setUseDesignMetrics">setUseDesignMetrics</a>().</p>
 
128
<h3 class="fn"><a name="wrapMode"></a><a href="qtextoption.html#WrapMode-enum">WrapMode</a> QTextOption::wrapMode () const</h3>
 
129
<p>Returns the text wrap mode defined by the option.</p>
 
130
<p>See also <a href="qtextoption.html#setWrapMode">setWrapMode</a>().</p>
 
131
<h3 class="fn"><a name="operator-eq"></a>QTextOption &amp; QTextOption::operator= ( const QTextOption &amp; <i>other</i> )</h3>
 
132
<p>Returns true if the text option is the same as the <i>other</i> text option; otherwise returns false.</p>
 
133
<p /><address><hr /><div align="center">
 
134
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
135
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
136
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
137
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
138
</tr></table></div></address></body>
 
139
</html>