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

« back to all changes in this revision

Viewing changes to doc/html/qtextlength.html

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE html
3
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
 
<!-- /fasttmp/mkdist-qt-4.5.2-1245473805/qt-x11-opensource-src-4.5.2/src/gui/text/qtextformat.cpp -->
 
5
<!-- qtextformat.cpp -->
6
6
<head>
7
 
  <title>Qt 4.5: QTextLength Class Reference</title>
 
7
  <title>Qt 4.6: QTextLength Class Reference</title>
8
8
  <link href="classic.css" rel="stylesheet" type="text/css" />
9
9
</head>
10
10
<body>
 
11
<a name="//apple_ref/cpp/cl//QTextLength" />
11
12
<table border="0" cellpadding="0" cellspacing="0" width="100%">
12
13
<tr>
13
 
<td align="left" valign="top" width="32"><a href="http://qtsoftware.com/products/qt"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
14
 
<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="namespaces.html"><font color="#004faf">All&nbsp;Namespaces</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="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
15
 
<td align="right" valign="top" width="230"></td></tr></table><h1 class="title">QTextLength Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
 
14
<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>
 
15
<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><td class="searchBar" align="right" valign="center"><form action="http://www.google.com/cse" id="cse-search-box"><div><input type="hidden" name="cx" value="000136343326384750312:dhbxnqlakyu" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form></td>
 
16
</tr></table><h1 class="title">QTextLength Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
16
17
</h1>
17
18
<p>The QTextLength class encapsulates the different types of length used in a <a href="qtextdocument.html">QTextDocument</a>. <a href="#details">More...</a></p>
18
 
<pre> #include &lt;QTextLength&gt;</pre><p><b>Note:</b> All the functions in this class are <a href="threads.html#reentrant">reentrant</a>.</p>
 
19
<pre> #include &lt;QTextLength&gt;</pre><p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
19
20
<ul>
20
21
<li><a href="qtextlength-members.html">List of all members, including inherited members</a></li>
21
22
</ul>
 
23
<hr />
22
24
<a name="public-types"></a>
23
 
<h3>Public Types</h3>
24
 
<ul>
25
 
<li><div class="fn"></div>enum <b><a href="qtextlength.html#Type-enum">Type</a></b> { VariableLength, FixedLength, PercentageLength }</li>
26
 
</ul>
 
25
<h2>Public Types</h2>
 
26
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
27
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qtextlength.html#Type-enum">Type</a></b> { VariableLength, FixedLength, PercentageLength }</td></tr>
 
28
</table>
 
29
<hr />
27
30
<a name="public-functions"></a>
28
 
<h3>Public Functions</h3>
29
 
<ul>
30
 
<li><div class="fn"></div><b><a href="qtextlength.html#QTextLength">QTextLength</a></b> ()</li>
31
 
<li><div class="fn"></div><b><a href="qtextlength.html#QTextLength-2">QTextLength</a></b> ( Type <i>type</i>, qreal <i>value</i> )</li>
32
 
<li><div class="fn"></div>qreal <b><a href="qtextlength.html#rawValue">rawValue</a></b> () const</li>
33
 
<li><div class="fn"></div>Type <b><a href="qtextlength.html#type">type</a></b> () const</li>
34
 
<li><div class="fn"></div>qreal <b><a href="qtextlength.html#value">value</a></b> ( qreal <i>maximumLength</i> ) const</li>
35
 
<li><div class="fn"></div><b><a href="qtextlength.html#operator-QVariant">operator QVariant</a></b> () const</li>
36
 
<li><div class="fn"></div>bool <b><a href="qtextlength.html#operator-not-eq">operator!=</a></b> ( const QTextLength &amp; <i>other</i> ) const</li>
37
 
<li><div class="fn"></div>bool <b><a href="qtextlength.html#operator-eq-eq">operator==</a></b> ( const QTextLength &amp; <i>other</i> ) const</li>
38
 
</ul>
 
31
<h2>Public Functions</h2>
 
32
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
33
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qtextlength.html#QTextLength">QTextLength</a></b> ()</td></tr>
 
34
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qtextlength.html#QTextLength-2">QTextLength</a></b> ( Type <i>type</i>, qreal <i>value</i> )</td></tr>
 
35
<tr><td class="memItemLeft" align="right" valign="top">qreal </td><td class="memItemRight" valign="bottom"><b><a href="qtextlength.html#rawValue">rawValue</a></b> () const</td></tr>
 
36
<tr><td class="memItemLeft" align="right" valign="top">Type </td><td class="memItemRight" valign="bottom"><b><a href="qtextlength.html#type">type</a></b> () const</td></tr>
 
37
<tr><td class="memItemLeft" align="right" valign="top">qreal </td><td class="memItemRight" valign="bottom"><b><a href="qtextlength.html#value">value</a></b> ( qreal <i>maximumLength</i> ) const</td></tr>
 
38
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qtextlength.html#operator-QVariant">operator QVariant</a></b> () const</td></tr>
 
39
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qtextlength.html#operator-not-eq">operator!=</a></b> ( const QTextLength &amp; <i>other</i> ) const</td></tr>
 
40
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qtextlength.html#operator-eq-eq">operator==</a></b> ( const QTextLength &amp; <i>other</i> ) const</td></tr>
 
41
</table>
39
42
<a name="details"></a>
40
43
<hr />
41
44
<h2>Detailed Description</h2>
45
48
<p>See also <a href="qtexttable.html">QTextTable</a>.</p>
46
49
<hr />
47
50
<h2>Member Type Documentation</h2>
 
51
<a name="//apple_ref/cpp/tag/QTextLength/Type" />
 
52
<a name="//apple_ref/cpp/econst/QTextLength/VariableLength" />
 
53
<a name="//apple_ref/cpp/econst/QTextLength/FixedLength" />
 
54
<a name="//apple_ref/cpp/econst/QTextLength/PercentageLength" />
48
55
<h3 class="fn"><a name="Type-enum"></a>enum QTextLength::Type</h3>
49
 
<p><table border="1" cellpadding="2" cellspacing="1" width="40%">
50
 
<tr><th width="60%">Constant</th><th width="40%">Value</th></tr>
51
 
<tr><td valign="top"><tt>QTextLength::VariableLength</tt></td><td align="center" valign="top"><tt>0</tt></td></tr>
52
 
<tr><td valign="top"><tt>QTextLength::FixedLength</tt></td><td align="center" valign="top"><tt>1</tt></td></tr>
53
 
<tr><td valign="top"><tt>QTextLength::PercentageLength</tt></td><td align="center" valign="top"><tt>2</tt></td></tr>
 
56
<p>This enum describes the different types a length object can have.</p>
 
57
<p><table class="valuelist" border="1" cellpadding="2" cellspacing="1" width="100%">
 
58
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
59
<tr><td valign="top"><tt>QTextLength::VariableLength</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The width of the object is variable</td></tr>
 
60
<tr><td valign="top"><tt>QTextLength::FixedLength</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The width of the object is fixed</td></tr>
 
61
<tr><td valign="top"><tt>QTextLength::PercentageLength</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The width of the object is in percentage of the maximum width</td></tr>
54
62
</table></p>
 
63
<p>See also <a href="qtextlength.html#type">type</a>().</p>
55
64
<hr />
56
65
<h2>Member Function Documentation</h2>
 
66
<a name="//apple_ref/cpp/instm/QTextLength/QTextLength" />
57
67
<h3 class="fn"><a name="QTextLength"></a>QTextLength::QTextLength ()</h3>
58
68
<p>Constructs a new length object which represents a variable size.</p>
59
69
<h3 class="fn"><a name="QTextLength-2"></a>QTextLength::QTextLength ( <a href="qtextlength.html#Type-enum">Type</a> <i>type</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>value</i> )</h3>
60
70
<p>Constructs a new length object of the given <i>type</i> and <i>value</i>.</p>
 
71
<a name="//apple_ref/cpp/instm/QTextLength/rawValue" />
61
72
<h3 class="fn"><a name="rawValue"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QTextLength::rawValue () const</h3>
62
73
<p>Returns the constraint value that is specific for the type of the length. If the length is <a href="qtextlength.html#Type-enum">QTextLength::PercentageLength</a> then the raw value is in percent, in the range of 0 to 100. If the length is <a href="qtextlength.html#Type-enum">QTextLength::FixedLength</a> then that fixed amount is returned. For variable lengths, zero is returned.</p>
 
74
<a name="//apple_ref/cpp/instm/QTextLength/type" />
63
75
<h3 class="fn"><a name="type"></a><a href="qtextlength.html#Type-enum">Type</a> QTextLength::type () const</h3>
64
 
<p>Returns the type of length.</p>
 
76
<p>Returns the type of this length object.</p>
65
77
<p>See also <a href="qtextlength.html#Type-enum">QTextLength::Type</a>.</p>
 
78
<a name="//apple_ref/cpp/instm/QTextLength/value" />
66
79
<h3 class="fn"><a name="value"></a><a href="qtglobal.html#qreal-typedef">qreal</a> QTextLength::value ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>maximumLength</i> ) const</h3>
67
80
<p>Returns the effective length, constrained by the type of the length object and the specified <i>maximumLength</i>.</p>
68
81
<p>See also <a href="qtextlength.html#type">type</a>().</p>
 
82
<a name="//apple_ref/cpp/instm/QTextLength/operator QVariant" />
69
83
<h3 class="fn"><a name="operator-QVariant"></a>QTextLength::operator QVariant () const</h3>
70
84
<p>Returns the text length as a <a href="qvariant.html">QVariant</a></p>
 
85
<a name="//apple_ref/cpp/instm/QTextLength/operator!=" />
71
86
<h3 class="fn"><a name="operator-not-eq"></a>bool QTextLength::operator!= ( const QTextLength &amp; <i>other</i> ) const</h3>
72
87
<p>Returns true if this text length is different from the <i>other</i> text length.</p>
 
88
<a name="//apple_ref/cpp/instm/QTextLength/operator==" />
73
89
<h3 class="fn"><a name="operator-eq-eq"></a>bool QTextLength::operator== ( const QTextLength &amp; <i>other</i> ) const</h3>
74
90
<p>Returns true if this text length is the same as the <i>other</i> text length.</p>
75
91
<p /><address><hr /><div align="center">
76
92
<table width="100%" cellspacing="0" border="0"><tr class="address">
77
 
<td width="30%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
78
 
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
79
 
<td width="30%" align="right"><div align="right">Qt 4.5.2</div></td>
80
 
</tr></table></div></address></body>
 
93
<td width="40%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
 
94
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
95
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
 
96
<script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script><script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script></tr></table></div></address></body>
81
97
</html>