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

« back to all changes in this revision

Viewing changes to doc/html/qgroupbox.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/widgets/qgroupbox.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: QGroupBox 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">QGroupBox Class Reference</h1>
 
21
<p>The QGroupBox widget provides a group box frame with a title. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QGroupBox&gt;</pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
 
23
<p>Inherits <a href="qwidget.html">QWidget</a>.</p>
 
24
<p>Inherited by <a href="q3groupbox.html">Q3GroupBox</a>.</p>
 
25
<ul>
 
26
<li><a href="qgroupbox-members.html">List of all members, including inherited members</a></li>
 
27
<li><a href="qgroupbox-qt3.html">Qt 3 support members</a></li>
 
28
</ul>
 
29
<a name="properties"></a>
 
30
<h3>Properties</h3>
 
31
<table width="100%" border="0" cellpadding="0" cellspacing="0">
 
32
<tr><td width="45%" valign="top"><ul>
 
33
<li><div class="fn"/><b><a href="qgroupbox.html#alignment-prop">alignment</a></b> : Qt::Alignment</li>
 
34
<li><div class="fn"/><b><a href="qgroupbox.html#checkable-prop">checkable</a></b> : bool</li>
 
35
<li><div class="fn"/><b><a href="qgroupbox.html#checked-prop">checked</a></b> : bool</li>
 
36
</ul></td><td valign="top"><ul>
 
37
<li><div class="fn"/><b><a href="qgroupbox.html#flat-prop">flat</a></b> : bool</li>
 
38
<li><div class="fn"/><b><a href="qgroupbox.html#title-prop">title</a></b> : QString</li>
 
39
</ul>
 
40
</td></tr>
 
41
</table>
 
42
<ul>
 
43
<li><div class="fn"/>52 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
 
44
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
45
</ul>
 
46
<a name="public-functions"></a>
 
47
<h3>Public Functions</h3>
 
48
<ul>
 
49
<li><div class="fn"/><b><a href="qgroupbox.html#QGroupBox">QGroupBox</a></b> ( QWidget * <i>parent</i> = 0 )</li>
 
50
<li><div class="fn"/><b><a href="qgroupbox.html#QGroupBox-2">QGroupBox</a></b> ( const QString &amp; <i>title</i>, QWidget * <i>parent</i> = 0 )</li>
 
51
<li><div class="fn"/><b><a href="qgroupbox.html#dtor.QGroupBox">~QGroupBox</a></b> ()</li>
 
52
<li><div class="fn"/>Qt::Alignment <b><a href="qgroupbox.html#alignment-prop">alignment</a></b> () const</li>
 
53
<li><div class="fn"/>bool <b><a href="qgroupbox.html#checkable-prop">isCheckable</a></b> () const</li>
 
54
<li><div class="fn"/>bool <b><a href="qgroupbox.html#checked-prop">isChecked</a></b> () const</li>
 
55
<li><div class="fn"/>bool <b><a href="qgroupbox.html#flat-prop">isFlat</a></b> () const</li>
 
56
<li><div class="fn"/>void <b><a href="qgroupbox.html#alignment-prop">setAlignment</a></b> ( int )</li>
 
57
<li><div class="fn"/>void <b><a href="qgroupbox.html#checkable-prop">setCheckable</a></b> ( bool <i>b</i> )</li>
 
58
<li><div class="fn"/>void <b><a href="qgroupbox.html#flat-prop">setFlat</a></b> ( bool <i>b</i> )</li>
 
59
<li><div class="fn"/>void <b><a href="qgroupbox.html#title-prop">setTitle</a></b> ( const QString &amp; )</li>
 
60
<li><div class="fn"/>QString <b><a href="qgroupbox.html#title-prop">title</a></b> () const</li>
 
61
</ul>
 
62
<ul>
 
63
<li><div class="fn"/>183 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
 
64
<li><div class="fn"/>28 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
65
<li><div class="fn"/>10 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
 
66
</ul>
 
67
<a name="public-slots"></a>
 
68
<h3>Public Slots</h3>
 
69
<ul>
 
70
<li><div class="fn"/>void <b><a href="qgroupbox.html#checked-prop">setChecked</a></b> ( bool <i>b</i> )</li>
 
71
</ul>
 
72
<ul>
 
73
<li><div class="fn"/>17 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
 
74
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
75
</ul>
 
76
<a name="signals"></a>
 
77
<h3>Signals</h3>
 
78
<ul>
 
79
<li><div class="fn"/>void <b><a href="qgroupbox.html#toggled">toggled</a></b> ( bool <i>on</i> )</li>
 
80
</ul>
 
81
<ul>
 
82
<li><div class="fn"/>1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
 
83
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
 
84
</ul>
 
85
<h3>Additional Inherited Members</h3>
 
86
<ul>
 
87
<li><div class="fn"/>4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
 
88
<li><div class="fn"/>4 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
 
89
<li><div class="fn"/>39 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
 
90
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
91
</ul>
 
92
<a name="details"></a>
 
93
<hr />
 
94
<h2>Detailed Description</h2>
 
95
<p>The QGroupBox widget provides a group box frame with a title.</p>
 
96
<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 keyboard focus to one of the group box's child widgets.</p>
 
97
<p>QGroupBox also lets you set the <a href="qgroupbox.html#title-prop">title</a> (normally set in the constructor) and the title's <a href="qgroupbox.html#alignment-prop">alignment</a>(). If setCheckable(true) is called then the group box is <a href="qgroupbox.html#checkable-prop">isCheckable</a>(), and it can be <a href="qgroupbox.html#checked-prop">setChecked</a>(). Checkable group boxes child widgets are enabled or disabled depending on whether or not the group box is <a href="qgroupbox.html#checked-prop">isChecked</a>().</p>
 
98
<p>To minimize space consumption, you can remove the right, left and bottom edges of the frame with <a href="qgroupbox.html#flat-prop">setFlat</a>().</p>
 
99
<p><img src="images/plastique-groupbox.png" alt="Screenshot in Plastique style" /> <img src="images/windows-groupbox.png" alt="Screenshot in Windows style" /></p>
 
100
<p>See also <a href="qbuttongroup.html">QButtonGroup</a>.</p>
 
101
<hr />
 
102
<h2>Property Documentation</h2>
 
103
<h3 class="fn"><a name="alignment-prop"></a>alignment : <a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a></h3>
 
104
<p>This property holds the alignment of the group box title.</p>
 
105
<p>The title is always placed on the upper frame line. The horizontal alignment can be specified by the alignment parameter.</p>
 
106
<p>The alignment is one of the following flags:</p>
 
107
<ul>
 
108
<li><tt>Qt::AlignLeft</tt> aligns the title text to the left.</li>
 
109
<li><tt>Qt::AlignRight</tt> aligns the title text to the right.</li>
 
110
<li><tt>Qt::AlignHCenter</tt> aligns the title text centered.</li>
 
111
</ul>
 
112
<p>The default alignment is <tt>Qt::AlignLeft</tt>.</p>
 
113
<p>Access functions:</p>
 
114
<ul>
 
115
<li><div class="fn"/><b>Qt::Alignment alignment () const</b></li>
 
116
<li><div class="fn"/><b>void setAlignment ( int )</b></li>
 
117
</ul>
 
118
<p>See also <a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a>.</p>
 
119
<h3 class="fn"><a name="checkable-prop"></a>checkable : bool</h3>
 
120
<p>This property holds whether the group box has a checkbox in its title.</p>
 
121
<p>If this property is true, the group box has a checkbox. If the checkbox is checked (which is the default), the group box's children are enabled.</p>
 
122
<p>setCheckable() controls whether or not the group box has a checkbox, and isCheckable() controls whether the checkbox is checked or not.</p>
 
123
<p>Access functions:</p>
 
124
<ul>
 
125
<li><div class="fn"/><b>bool isCheckable () const</b></li>
 
126
<li><div class="fn"/><b>void setCheckable ( bool <i>b</i> )</b></li>
 
127
</ul>
 
128
<h3 class="fn"><a name="checked-prop"></a>checked : bool</h3>
 
129
<p>This property holds whether the group box's checkbox is checked.</p>
 
130
<p>If the group box has a check box (see <a href="qgroupbox.html#checkable-prop">isCheckable</a>()), and the check box is checked, the group box's children are enabled. If the checkbox is unchecked the children are disabled.</p>
 
131
<p>Access functions:</p>
 
132
<ul>
 
133
<li><div class="fn"/><b>bool isChecked () const</b></li>
 
134
<li><div class="fn"/><b>void setChecked ( bool <i>b</i> )</b></li>
 
135
</ul>
 
136
<h3 class="fn"><a name="flat-prop"></a>flat : bool</h3>
 
137
<p>This property holds whether the group box is painted flat or has a frame.</p>
 
138
<p>By default a group box has a surrounding frame, with the title being placed on the upper frame line. In flat mode the right, left and bottom frame lines are omitted, and only the thin line at the top is drawn.</p>
 
139
<p>Access functions:</p>
 
140
<ul>
 
141
<li><div class="fn"/><b>bool isFlat () const</b></li>
 
142
<li><div class="fn"/><b>void setFlat ( bool <i>b</i> )</b></li>
 
143
</ul>
 
144
<p>See also <a href="qgroupbox.html#title-prop">title</a>.</p>
 
145
<h3 class="fn"><a name="title-prop"></a>title : <a href="qstring.html">QString</a></h3>
 
146
<p>This property holds the group box title text.</p>
 
147
<p>The group box title text will have a focus-change keyboard shortcut if the title contains &amp;, followed by a letter.</p>
 
148
<pre>&nbsp;   g-&gt;setTitle(&quot;&amp;User information&quot;);</pre>
 
149
<p>This produces &quot;<u>U</u>ser information&quot;; <b>Alt+U</b> moves the keyboard focus to the group box.</p>
 
150
<p>There is no default title text.</p>
 
151
<p>Access functions:</p>
 
152
<ul>
 
153
<li><div class="fn"/><b>QString title () const</b></li>
 
154
<li><div class="fn"/><b>void setTitle ( const QString &amp; )</b></li>
 
155
</ul>
 
156
<hr />
 
157
<h2>Member Function Documentation</h2>
 
158
<h3 class="fn"><a name="QGroupBox"></a>QGroupBox::QGroupBox ( <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
 
159
<p>Constructs a group box widget with no title and parent <i>parent</i>.</p>
 
160
<h3 class="fn"><a name="QGroupBox-2"></a>QGroupBox::QGroupBox ( const <a href="qstring.html">QString</a> &amp; <i>title</i>, <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
 
161
<p>Constructs a group box with the title <i>title</i> and parent <i>parent</i>.</p>
 
162
<h3 class="fn"><a name="dtor.QGroupBox"></a>QGroupBox::~QGroupBox ()</h3>
 
163
<p>Destroys the group box.</p>
 
164
<h3 class="fn"><a name="toggled"></a>void QGroupBox::toggled ( bool <i>on</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
165
<p>If the group box has a check box (see <a href="qgroupbox.html#checkable-prop">isCheckable</a>()) this signal is emitted when the check box is toggled. <i>on</i> is true if the check box is checked; otherwise it is false.</p>
 
166
<p /><address><hr /><div align="center">
 
167
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
168
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
169
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
170
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
171
</tr></table></div></address></body>
 
172
</html>