diff options
Diffstat (limited to 'doc/html/tqsizepolicy.html')
-rw-r--r-- | doc/html/tqsizepolicy.html | 291 |
1 files changed, 291 insertions, 0 deletions
diff --git a/doc/html/tqsizepolicy.html b/doc/html/tqsizepolicy.html new file mode 100644 index 000000000..771bbdea0 --- /dev/null +++ b/doc/html/tqsizepolicy.html @@ -0,0 +1,291 @@ +<!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/qabstractlayout.cpp:1240 --> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>TQSizePolicy 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 Classes</font></a> + | <a href="mainclasses.html"> +<font color="#004faf">Main Classes</font></a> + | <a href="annotated.html"> +<font color="#004faf">Annotated</font></a> + | <a href="groups.html"> +<font color="#004faf">Grouped 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>TQSizePolicy Class Reference</h1> + +<p>The TQSizePolicy class is a layout attribute describing horizontal +and vertical resizing policy. +<a href="#details">More...</a> +<p><tt>#include <<a href="tqsizepolicy-h.html">tqsizepolicy.h</a>></tt> +<p><a href="tqsizepolicy-members.html">List of all member functions.</a> +<h2>Public Members</h2> +<ul> +<li class=fn>enum <a href="#SizeType-enum"><b>SizeType</b></a> { Fixed = 0, Minimum = MayGrow, Maximum = MayShrink, Preferred = MayGrow | MayShrink, MinimumExpanding = MayGrow | ExpMask, Expanding = MayGrow | MayShrink | ExpMask, Ignored = ExpMask }</li> +<li class=fn>enum <a href="#ExpandData-enum"><b>ExpandData</b></a> { NoDirection = 0, Horizontally = 1, Vertically = 2, Horizontal = Horizontally, Vertical = Vertically, BothDirections = Horizontally | Vertically }</li> +<li class=fn><a href="#TQSizePolicy"><b>TQSizePolicy</b></a> ()</li> +<li class=fn><a href="#TQSizePolicy-2"><b>TQSizePolicy</b></a> ( SizeType hor, SizeType ver, bool hfw = FALSE )</li> +<li class=fn><a href="#TQSizePolicy-3"><b>TQSizePolicy</b></a> ( SizeType hor, SizeType ver, uchar horStretch, uchar verStretch, bool hfw = FALSE )</li> +<li class=fn>SizeType <a href="#horData"><b>horData</b></a> () const</li> +<li class=fn>SizeType <a href="#verData"><b>verData</b></a> () const</li> +<li class=fn>bool <a href="#mayShrinkHorizontally"><b>mayShrinkHorizontally</b></a> () const</li> +<li class=fn>bool <a href="#mayShrinkVertically"><b>mayShrinkVertically</b></a> () const</li> +<li class=fn>bool <a href="#mayGrowHorizontally"><b>mayGrowHorizontally</b></a> () const</li> +<li class=fn>bool <a href="#mayGrowVertically"><b>mayGrowVertically</b></a> () const</li> +<li class=fn>ExpandData <a href="#expanding"><b>expanding</b></a> () const</li> +<li class=fn>void <a href="#setHorData"><b>setHorData</b></a> ( SizeType d )</li> +<li class=fn>void <a href="#setVerData"><b>setVerData</b></a> ( SizeType d )</li> +<li class=fn>void <a href="#setHeightForWidth"><b>setHeightForWidth</b></a> ( bool b )</li> +<li class=fn>bool <a href="#hasHeightForWidth"><b>hasHeightForWidth</b></a> () const</li> +<li class=fn>bool <a href="#operator-eq-eq"><b>operator==</b></a> ( const TQSizePolicy & s ) const</li> +<li class=fn>bool <a href="#operator!-eq"><b>operator!=</b></a> ( const TQSizePolicy & s ) const</li> +<li class=fn>uint <a href="#horStretch"><b>horStretch</b></a> () const</li> +<li class=fn>uint <a href="#verStretch"><b>verStretch</b></a> () const</li> +<li class=fn>void <a href="#setHorStretch"><b>setHorStretch</b></a> ( uchar sf )</li> +<li class=fn>void <a href="#setVerStretch"><b>setVerStretch</b></a> ( uchar sf )</li> +<li class=fn>void <a href="#transpose"><b>transpose</b></a> ()</li> +</ul> +<hr><a name="details"></a><h2>Detailed Description</h2> + + +The TQSizePolicy class is a layout attribute describing horizontal +and vertical resizing policy. +<p> + +<p> The size policy of a widget is an expression of its willingness to +be resized in various ways. +<p> Widgets that reimplement <a href="tqwidget.html#sizePolicy">TQWidget::sizePolicy</a>() return a TQSizePolicy +that describes the horizontal and vertical resizing policy they +prefer when being laid out. Only <a href="#interesting">one of the + constructors</a> is of interest in most applications. +<p> TQSizePolicy contains two independent SizeType objects; one describes +the widgets's horizontal size policy, and the other describes its +vertical size policy. It also contains a flag to indicate whether the +height and width of its preferred size are related. +<p> The horizontal and vertical <a href="#SizeType-enum">SizeType</a>s are set in the usual constructor +and can be queried using a variety of functions. +<p> The <a href="#hasHeightForWidth">hasHeightForWidth</a>() flag indicates whether the widget's sizeHint() +is width-dependent (such as a word-wrapping label) or not. +<p> <p>See also <a href="#SizeType-enum">TQSizePolicy::SizeType</a>, <a href="appearance.html">Widget Appearance and Style</a>, and <a href="geomanagement.html">Layout Management</a>. + +<hr><h2>Member Type Documentation</h2> +<h3 class=fn><a name="ExpandData-enum"></a>TQSizePolicy::ExpandData</h3> + +<p> This enum type describes in which directions a widget can make use +of extra space. There are four possible values: +<ul> +<li><tt>TQSizePolicy::NoDirection</tt> - the widget cannot make use of extra space in +any direction. +<li><tt>TQSizePolicy::Horizontally</tt> - the widget can usefully be wider than the +sizeHint(). +<li><tt>TQSizePolicy::Vertically</tt> - the widget can usefully be taller than the +sizeHint(). +<li><tt>TQSizePolicy::BothDirections</tt> - the widget can usefully be both wider and +taller than the sizeHint(). +</ul> +<h3 class=fn><a name="SizeType-enum"></a>TQSizePolicy::SizeType</h3> + +<p> The per-dimension sizing types used when constructing a +TQSizePolicy are: +<ul> +<li><tt>TQSizePolicy::Fixed</tt> - The <a href="tqwidget.html#sizeHint">TQWidget::sizeHint</a>() is the only acceptable +alternative, so the widget can never grow or shrink (e.g. the +vertical direction of a push button). +<li><tt>TQSizePolicy::Minimum</tt> - The sizeHint() is minimal, and sufficient. The +widget can be expanded, but there is no advantage to it being +larger (e.g. the horizontal direction of a push button). +It cannot be smaller than the size provided by sizeHint(). +<li><tt>TQSizePolicy::Maximum</tt> - The sizeHint() is a maximum. The widget can be +shrunk any amount without detriment if other widgets need the +space (e.g. a separator line). +It cannot be larger than the size provided by sizeHint(). +<li><tt>TQSizePolicy::Preferred</tt> - The sizeHint() is best, but the widget can be +shrunk and still be useful. The widget can be expanded, but there +is no advantage to it being larger than sizeHint() (the default +<a href="tqwidget.html">TQWidget</a> policy). +<li><tt>TQSizePolicy::Expanding</tt> - The sizeHint() is a sensible size, but the +widget can be shrunk and still be useful. The widget can make use +of extra space, so it should get as much space as possible (e.g. +the horizontal direction of a slider). +<li><tt>TQSizePolicy::MinimumExpanding</tt> - The sizeHint() is minimal, and sufficient. +The widget can make use of extra space, so it should get as much +space as possible (e.g. the horizontal direction of a slider). +<li><tt>TQSizePolicy::Ignored</tt> - the sizeHint() is ignored. The widget will get as +much space as possible. +</ul> +<hr><h2>Member Function Documentation</h2> +<h3 class=fn><a name="TQSizePolicy"></a>TQSizePolicy::TQSizePolicy () +</h3> + +<p> Constructs a minimally initialized TQSizePolicy. + +<h3 class=fn><a name="TQSizePolicy-2"></a>TQSizePolicy::TQSizePolicy ( <a href="tqsizepolicy.html#SizeType-enum">SizeType</a> hor, <a href="tqsizepolicy.html#SizeType-enum">SizeType</a> ver, bool hfw = FALSE ) +</h3> + +<p> <a name="interesting"></a> +This is the constructor normally used to return a value in the +overridden <a href="tqwidget.html#sizePolicy">TQWidget::sizePolicy</a>() function of a <a href="tqwidget.html">TQWidget</a> +subclass. +<p> It constructs a TQSizePolicy with independent horizontal and +vertical sizing types, <em>hor</em> and <em>ver</em> respectively. These <a href="#SizeType-enum">sizing types</a> affect how the widget +is treated by the <a href="ntqlayout.html">layout engine</a>. +<p> If <em>hfw</em> is TRUE, the preferred height of the widget is dependent +on the width of the widget (for example, a <a href="ntqlabel.html">TQLabel</a> with line +wrapping). +<p> <p>See also <a href="#horData">horData</a>(), <a href="#verData">verData</a>(), and <a href="#hasHeightForWidth">hasHeightForWidth</a>(). + +<h3 class=fn><a name="TQSizePolicy-3"></a>TQSizePolicy::TQSizePolicy ( <a href="tqsizepolicy.html#SizeType-enum">SizeType</a> hor, <a href="tqsizepolicy.html#SizeType-enum">SizeType</a> ver, uchar horStretch, uchar verStretch, bool hfw = FALSE ) +</h3> + +<p> Constructs a TQSizePolicy with independent horizontal and vertical +sizing types <em>hor</em> and <em>ver</em>, and stretch factors <em>horStretch</em> +and <em>verStretch</em>. +<p> If <em>hfw</em> is TRUE, the preferred height of the widget is dependent on the +width of the widget. +<p> <p>See also <a href="#horStretch">horStretch</a>() and <a href="#verStretch">verStretch</a>(). + +<h3 class=fn><a href="tqsizepolicy.html#ExpandData-enum">ExpandData</a> <a name="expanding"></a>TQSizePolicy::expanding () const +</h3> + +<p> Returns whether this layout can make use of more space than +sizeHint(). A value of <a href="#ExpandData-enum">Vertical</a> or <a href="#ExpandData-enum">Horizontal</a> means that it wants +to grow in only one dimension, whereas <a href="#ExpandData-enum">BothDirections</a> means that +it wants to grow in both dimensions. +<p> <p>See also <a href="#mayShrinkHorizontally">mayShrinkHorizontally</a>(), <a href="#mayGrowHorizontally">mayGrowHorizontally</a>(), <a href="#mayShrinkVertically">mayShrinkVertically</a>(), and <a href="#mayGrowVertically">mayGrowVertically</a>(). + +<h3 class=fn>bool <a name="hasHeightForWidth"></a>TQSizePolicy::hasHeightForWidth () const +</h3> + +<p> Returns TRUE if the widget's preferred height depends on its +width; otherwise returns FALSE. +<p> <p>See also <a href="#setHeightForWidth">setHeightForWidth</a>(). + +<h3 class=fn><a href="tqsizepolicy.html#SizeType-enum">SizeType</a> <a name="horData"></a>TQSizePolicy::horData () const +</h3> + +<p> Returns the horizontal component of the size policy. +<p> <p>See also <a href="#setHorData">setHorData</a>(), <a href="#verData">verData</a>(), and <a href="#horStretch">horStretch</a>(). + +<h3 class=fn>uint <a name="horStretch"></a>TQSizePolicy::horStretch () const +</h3> + +<p> Returns the horizontal <a href="layout.html#stretch-factor">stretch factor</a> of the size policy. +<p> <p>See also <a href="#setHorStretch">setHorStretch</a>() and <a href="#verStretch">verStretch</a>(). + +<h3 class=fn>bool <a name="mayGrowHorizontally"></a>TQSizePolicy::mayGrowHorizontally () const +</h3> + +<p> Returns TRUE if the widget can sensibly be wider than its +sizeHint(); otherwise returns FALSE. +<p> <p>See also <a href="#mayGrowVertically">mayGrowVertically</a>() and <a href="#mayShrinkHorizontally">mayShrinkHorizontally</a>(). + +<h3 class=fn>bool <a name="mayGrowVertically"></a>TQSizePolicy::mayGrowVertically () const +</h3> + +<p> Returns TRUE if the widget can sensibly be taller than its +sizeHint(); otherwise returns FALSE. +<p> <p>See also <a href="#mayGrowHorizontally">mayGrowHorizontally</a>() and <a href="#mayShrinkVertically">mayShrinkVertically</a>(). + +<h3 class=fn>bool <a name="mayShrinkHorizontally"></a>TQSizePolicy::mayShrinkHorizontally () const +</h3> + +<p> Returns TRUE if the widget can sensibly be narrower than its +sizeHint(); otherwise returns FALSE. +<p> <p>See also <a href="#mayShrinkVertically">mayShrinkVertically</a>() and <a href="#mayGrowHorizontally">mayGrowHorizontally</a>(). + +<h3 class=fn>bool <a name="mayShrinkVertically"></a>TQSizePolicy::mayShrinkVertically () const +</h3> + +<p> Returns TRUE if the widget can sensibly be shorter than its +sizeHint(); otherwise returns FALSE. +<p> <p>See also <a href="#mayShrinkHorizontally">mayShrinkHorizontally</a>() and <a href="#mayGrowVertically">mayGrowVertically</a>(). + +<h3 class=fn>bool <a name="operator!-eq"></a>TQSizePolicy::operator!= ( const <a href="tqsizepolicy.html">TQSizePolicy</a> & s ) const +</h3> + +<p> Returns TRUE if this policy is different from <em>s</em>; otherwise +returns FALSE. +<p> <p>See also <a href="#operator-eq-eq">operator==</a>(). + +<h3 class=fn>bool <a name="operator-eq-eq"></a>TQSizePolicy::operator== ( const <a href="tqsizepolicy.html">TQSizePolicy</a> & s ) const +</h3> + +<p> Returns TRUE if this policy is equal to <em>s</em>; otherwise returns +FALSE. +<p> <p>See also <a href="#operator!-eq">operator!=</a>(). + +<h3 class=fn>void <a name="setHeightForWidth"></a>TQSizePolicy::setHeightForWidth ( bool b ) +</h3> + +<p> Sets the <a href="#hasHeightForWidth">hasHeightForWidth</a>() flag to <em>b</em>. +<p> <p>See also <a href="#hasHeightForWidth">hasHeightForWidth</a>(). + +<h3 class=fn>void <a name="setHorData"></a>TQSizePolicy::setHorData ( <a href="tqsizepolicy.html#SizeType-enum">SizeType</a> d ) +</h3> + +<p> Sets the horizontal component of the size policy to size type <em>d</em>. +<p> <p>See also <a href="#horData">horData</a>() and <a href="#setVerData">setVerData</a>(). + +<h3 class=fn>void <a name="setHorStretch"></a>TQSizePolicy::setHorStretch ( uchar sf ) +</h3> + +<p> Sets the horizontal <a href="layout.html#stretch-factor">stretch factor</a> of the size policy to <em>sf</em>. +<p> <p>See also <a href="#horStretch">horStretch</a>() and <a href="#setVerStretch">setVerStretch</a>(). + +<h3 class=fn>void <a name="setVerData"></a>TQSizePolicy::setVerData ( <a href="tqsizepolicy.html#SizeType-enum">SizeType</a> d ) +</h3> + +<p> Sets the vertical component of the size policy to size type <em>d</em>. +<p> <p>See also <a href="#verData">verData</a>() and <a href="#setHorData">setHorData</a>(). + +<h3 class=fn>void <a name="setVerStretch"></a>TQSizePolicy::setVerStretch ( uchar sf ) +</h3> + +<p> Sets the vertical <a href="layout.html#stretch-factor">stretch factor</a> of the size policy to <em>sf</em>. +<p> <p>See also <a href="#verStretch">verStretch</a>() and <a href="#setHorStretch">setHorStretch</a>(). + +<h3 class=fn>void <a name="transpose"></a>TQSizePolicy::transpose () +</h3> + +<p> Swaps the horizontal and vertical policies and stretches. + +<h3 class=fn><a href="tqsizepolicy.html#SizeType-enum">SizeType</a> <a name="verData"></a>TQSizePolicy::verData () const +</h3> + +<p> Returns the vertical component of the size policy. +<p> <p>See also <a href="#setVerData">setVerData</a>(), <a href="#horData">horData</a>(), and <a href="#verStretch">verStretch</a>(). + +<h3 class=fn>uint <a name="verStretch"></a>TQSizePolicy::verStretch () const +</h3> + +<p> Returns the vertical <a href="layout.html#stretch-factor">stretch factor</a> of the size policy. +<p> <p>See also <a href="#setVerStretch">setVerStretch</a>() and <a href="#horStretch">horStretch</a>(). + +<!-- eof --> +<hr><p> +This file is part of the <a href="index.html">TQt toolkit</a>. +Copyright © 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 © 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> |