Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 112b0974ad288f6cd55bf971ee6026a9 > files > 1350

libqt3-devel-3.0.2-2mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /tmp/qt-3.0-reggie-28534/qt-x11-free-3.0.2/src/widgets/qgroupbox.cpp:54 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>QGroupBox Class</title>
<style type="text/css"><!--
h3.fn,span.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>QGroupBox Class Reference</h1>

<p>The QGroupBox widget provides a group box frame with a title.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qgroupbox-h.html">qgroupbox.h</a>&gt;</tt>
<p>Inherits <a href="qframe.html">QFrame</a>.
<p>Inherited by <a href="qbuttongroup.html">QButtonGroup</a>, <a href="qhgroupbox.html">QHGroupBox</a> and <a href="qvgroupbox.html">QVGroupBox</a>.
<p><a href="qgroupbox-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class=fn><a href="#QGroupBox"><b>QGroupBox</b></a> ( QWidget&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )</div></li>
<li><div class=fn><a href="#QGroupBox-2"><b>QGroupBox</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;title, QWidget&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )</div></li>
<li><div class=fn><a href="#QGroupBox-3"><b>QGroupBox</b></a> ( int&nbsp;strips, Orientation&nbsp;orientation, QWidget&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )</div></li>
<li><div class=fn><a href="#QGroupBox-4"><b>QGroupBox</b></a> ( int&nbsp;strips, Orientation&nbsp;orientation, const&nbsp;QString&nbsp;&amp;&nbsp;title, QWidget&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )</div></li>
<li><div class=fn>virtual void <a href="#setColumnLayout"><b>setColumnLayout</b></a> ( int&nbsp;strips, Orientation&nbsp;direction )</div></li>
<li><div class=fn>QString <a href="#title"><b>title</b></a> () const</div></li>
<li><div class=fn>virtual void <a href="#setTitle"><b>setTitle</b></a> ( const QString &amp; )</div></li>
<li><div class=fn>int <a href="#alignment"><b>alignment</b></a> () const</div></li>
<li><div class=fn>virtual void <a href="#setAlignment"><b>setAlignment</b></a> ( int )</div></li>
<li><div class=fn>int <a href="#columns"><b>columns</b></a> () const</div></li>
<li><div class=fn>void <a href="#setColumns"><b>setColumns</b></a> ( int )</div></li>
<li><div class=fn>Orientation <a href="#orientation"><b>orientation</b></a> () const</div></li>
<li><div class=fn>void <a href="#setOrientation"><b>setOrientation</b></a> ( Orientation )</div></li>
<li><div class=fn>int <a href="#insideMargin"><b>insideMargin</b></a> () const</div></li>
<li><div class=fn>int <a href="#insideSpacing"><b>insideSpacing</b></a> () const</div></li>
<li><div class=fn>void <a href="#setInsideMargin"><b>setInsideMargin</b></a> ( int&nbsp;m )</div></li>
<li><div class=fn>void <a href="#setInsideSpacing"><b>setInsideSpacing</b></a> ( int&nbsp;s )</div></li>
<li><div class=fn>void <a href="#addSpace"><b>addSpace</b></a> ( int&nbsp;size )</div></li>
</ul>
<h2>Properties</h2>
<ul>
<li><div class=fn>Alignment <a href="#alignment-prop"><b>alignment</b></a>&nbsp;- the alignment of the group box title</div></li>
<li><div class=fn>int <a href="#columns-prop"><b>columns</b></a>&nbsp;- the number of columns or rows (depending on \l orientation) in the group box</div></li>
<li><div class=fn>Orientation <a href="#orientation-prop"><b>orientation</b></a>&nbsp;- the current orientation of the group box</div></li>
<li><div class=fn>QString <a href="#title-prop"><b>title</b></a>&nbsp;- the group box title text</div></li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>


The QGroupBox widget provides a group box frame with a title.
<p> 



<p> A group box provides a frame, a title and a keyboard shortcut, and
displays various other widgets inside itself.  The title is on top,
the keyboard shortcut moves <a href="focus.html#keyboard-focus">keyboard focus</a> to one of the group box's
child widgets, and the child widgets are arranged in an array inside
the frame.
<p> The simplest way to use it is to create a group box with the desired
number of columns (or rows) and orientation, and then just create
widgets with the group box as parent.
<p> However, it is also possible to change the <a href="#orientation">orientation</a>() and number
of <a href="#columns">columns</a>() after construction, or to ignore all the automatic
layout support and manage all that yourself. You can add 'empty'
spaces to the group box with <a href="#addSpace">addSpace</a>().
<p> QGroupBox also lets you set the <a href="#title">title</a>() (normally set in the
constructor) and the title's <a href="#alignment">alignment</a>().
<p> You can change the spacing used by the group box with
<a href="#setInsideMargin">setInsideMargin</a>() and <a href="#setInsideSpacing">setInsideSpacing</a>().
<p> <img src=qgrpbox-w.png>
<p> <p>See also <a href="qbuttongroup.html">QButtonGroup</a>, <a href="appearance.html">Widget Appearance and Style</a>, <a href="geomanagement.html">Layout Management</a> and <a href="organizers.html">Organizers</a>.

<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="QGroupBox"></a>QGroupBox::QGroupBox ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )
</h3>
Constructs a group box widget with no title.
<p> The <em>parent</em> and <em>name</em> arguments are passed to the <a href="qwidget.html">QWidget</a> constructor.
<p> This constructor does not do automatic layout.

<h3 class=fn><a name="QGroupBox-2"></a>QGroupBox::QGroupBox ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;title, <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )
</h3>
Constructs a group box with the title <em>title</em>.
<p> The <em>parent</em> and <em>name</em> arguments are passed to the <a href="qwidget.html">QWidget</a> constructor.
<p> This constructor does not do automatic layout.

<h3 class=fn><a name="QGroupBox-3"></a>QGroupBox::QGroupBox ( int&nbsp;strips, <a href="qt.html#Orientation-enum">Orientation</a>&nbsp;orientation, <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )
</h3>
Constructs a group box with no title. Child widgets will be arranged
in <em>strips</em> rows or columns (depending on <em>orientation</em>).
<p> The <em>parent</em> and <em>name</em> arguments are passed to the <a href="qwidget.html">QWidget</a> constructor.

<h3 class=fn><a name="QGroupBox-4"></a>QGroupBox::QGroupBox ( int&nbsp;strips, <a href="qt.html#Orientation-enum">Orientation</a>&nbsp;orientation, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;title, <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )
</h3>
Constructs a group box titled <em>title</em>. Child widgets will be arranged
in <em>strips</em> rows or columns (depending on <em>orientation</em>).
<p> The <em>parent</em> and <em>name</em> arguments are passed to the <a href="qwidget.html">QWidget</a> constructor.

<h3 class=fn>void <a name="addSpace"></a>QGroupBox::addSpace ( int&nbsp;size )
</h3>
Adds an empty cell at the next free position. If <em>size</em> is greater
than 0, the empty cell has a fixed height or width.
If the group box is oriented horizontally, the empty cell has a fixed
height; if oriented vertically, it has a fixed width.
<p> Use this method to separate the widgets in the group box or to skip
the next free cell. For performance reasons, call this method after
calling <a href="#setColumnLayout">setColumnLayout</a>() or by changing the <a href="#columns-prop">QGroupBox::columns</a> or
<a href="#orientation-prop">QGroupBox::orientation</a> properties. It is generally a good idea to call
these methods first (if needed at all), and insert the widgets and
spaces afterwards.

<h3 class=fn>int <a name="alignment"></a>QGroupBox::alignment () const
</h3><p>Returns the alignment of the group box title.
See the <a href="qgroupbox.html#alignment-prop">"alignment"</a> property for details.
<h3 class=fn>int <a name="columns"></a>QGroupBox::columns () const
</h3><p>Returns the number of columns or rows (depending on <a href="#orientation-prop">orientation</a>) in the group box.
See the <a href="qgroupbox.html#columns-prop">"columns"</a> property for details.
<h3 class=fn>int <a name="insideMargin"></a>QGroupBox::insideMargin () const
</h3>
Returns the width of the blank spacing between the items in the group
and the frame of the group.
<p> Only applies if the group box has a defined orientation.
<p> The default is about 11.
<p> <p>See also <a href="#setInsideMargin">setInsideMargin</a>() and <a href="#orientation-prop">orientation</a>.

<h3 class=fn>int <a name="insideSpacing"></a>QGroupBox::insideSpacing () const
</h3>
Returns the width of the blank spacing between each of the items in the
group.
<p> Only applies if the group box has a defined orientation.
<p> The default is about 5.
<p> <p>See also <a href="#setInsideSpacing">setInsideSpacing</a>() and <a href="#orientation-prop">orientation</a>.

<h3 class=fn><a href="qt.html#Orientation-enum">Orientation</a> <a name="orientation"></a>QGroupBox::orientation () const
</h3><p>Returns the current orientation of the group box.
See the <a href="qgroupbox.html#orientation-prop">"orientation"</a> property for details.
<h3 class=fn>void <a name="setAlignment"></a>QGroupBox::setAlignment ( int )<tt> [virtual]</tt>
</h3><p>Sets the alignment of the group box title.
See the <a href="qgroupbox.html#alignment-prop">"alignment"</a> property for details.
<h3 class=fn>void <a name="setColumnLayout"></a>QGroupBox::setColumnLayout ( int&nbsp;strips, <a href="qt.html#Orientation-enum">Orientation</a>&nbsp;direction )<tt> [virtual]</tt>
</h3>
Changes the layout of the group box. This function is useful only in
combination with the default constructor that does not take any
layout information. This function will put all existing children in
the new layout. It is not good Qt programming style to
call this function after children have been inserted.
Sets the number of columns or rows to be <em>strips</em>, depending on <em>direction</em>.
<p> <p>See also <a href="#orientation-prop">orientation</a> and <a href="#columns-prop">columns</a>.

<h3 class=fn>void <a name="setColumns"></a>QGroupBox::setColumns ( int )
</h3><p>Sets the number of columns or rows (depending on <a href="#orientation-prop">orientation</a>) in the group box.
See the <a href="qgroupbox.html#columns-prop">"columns"</a> property for details.
<h3 class=fn>void <a name="setInsideMargin"></a>QGroupBox::setInsideMargin ( int&nbsp;m )
</h3>
Sets the the width of the blank spacing between each of the items in the
group to <em>m</em> pixels.
<p> <p>See also <a href="#insideSpacing">insideSpacing</a>().

<h3 class=fn>void <a name="setInsideSpacing"></a>QGroupBox::setInsideSpacing ( int&nbsp;s )
</h3>
Sets the width of the blank spacing between each of the items in the
group to <em>s</em> pixels.

<h3 class=fn>void <a name="setOrientation"></a>QGroupBox::setOrientation ( <a href="qt.html#Orientation-enum">Orientation</a> )
</h3><p>Sets the current orientation of the group box.
See the <a href="qgroupbox.html#orientation-prop">"orientation"</a> property for details.
<h3 class=fn>void <a name="setTitle"></a>QGroupBox::setTitle ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp; )<tt> [virtual]</tt>
</h3><p>Sets the group box title text.
See the <a href="qgroupbox.html#title-prop">"title"</a> property for details.
<h3 class=fn><a href="qstring.html">QString</a> <a name="title"></a>QGroupBox::title () const
</h3><p>Returns the group box title text.
See the <a href="qgroupbox.html#title-prop">"title"</a> property for details.
<hr><h2>Property Documentation</h2>
<h3 class=fn>Alignment <a name="alignment-prop"></a>alignment</h3>
<p>This property holds the alignment of the group box title.
<p>The title is always placed on the upper frame line; however,
the horizontal alignment can be specified by the alignment parameter.
<p> The alignment is one of the following flags:
<ul>
<li> <a href="qt.html#AlignmentFlags-enum">AlignAuto</a> aligns the title accroding to the language, usually left.
<li> <a href="qt.html#AlignmentFlags-enum">AlignLeft</a> aligns the title text to the left.
<li> <a href="qt.html#AlignmentFlags-enum">AlignRight</a> aligns the title text to the right.
<li> <a href="qt.html#AlignmentFlags-enum">AlignHCenter</a> aligns the title text centered.
</ul>
<p> The default alignment is <a href="qt.html#AlignmentFlags-enum">AlignAuto</a>.
<p> <p>See also <a href="qt.html#AlignmentFlags-enum">Qt::AlignmentFlags</a>.

<p>Set this property's value with <a href="#setAlignment">setAlignment</a>() and get this property's value with <a href="#alignment">alignment</a>().
<h3 class=fn>int <a name="columns-prop"></a>columns</h3>
<p>This property holds the number of columns or rows (depending on <a href="#orientation-prop">orientation</a>) in the group box.
<p>Usually it is not a good idea to set this property because it is slow
(it does a complete layout).  It is better to set the number of columns
directly in the constructor.

<p>Set this property's value with <a href="#setColumns">setColumns</a>() and get this property's value with <a href="#columns">columns</a>().
<h3 class=fn><a href="qt.html#Orientation-enum">Orientation</a> <a name="orientation-prop"></a>orientation</h3>
<p>This property holds the current orientation of the group box.
<p>A horizontal group box arranges it's children in columns, while a
vertical group box arranges them in rows. Thus, a horizontal group box
with only one column will arrange the children vertically in that column.
<p> Usually it is not a good idea to set this property because it is slow
(it does a complete layout). It is better to set the orientation directly
in the constructor.

<p>Set this property's value with <a href="#setOrientation">setOrientation</a>() and get this property's value with <a href="#orientation">orientation</a>().
<h3 class=fn><a href="qstring.html">QString</a> <a name="title-prop"></a>title</h3>
<p>This property holds the group box title text.
<p>The group box title text will have a focus-change keyboard
accelerator if the title contains &amp;, followed by a letter.
<p> <pre>
      g-&gt;setTitle( "&amp;User information" );
  </pre>
 
This produces "User information" with the U underlined;
Alt+U moves the keyboard focus to the group box.
<p> There is no default title text.
<p> 
<p>Set this property's value with <a href="#setTitle">setTitle</a>() and get this property's value with <a href="#title">title</a>().
<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>.
Copyright &copy; 1995-2001
<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; 2001 
<a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt version 3.0.2</div>
</table></div></address></body>
</html>