<class name="QGroupBox" doc="/** <p>The <a href="QGroupBox.html#QGroupBox(java.lang.String, com.trolltech.qt.gui.QWidget)"><tt>QGroupBox</tt></a> 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 keyboard focus to one of the group box's child widgets.</p> <p><a href="QGroupBox.html#QGroupBox(java.lang.String, com.trolltech.qt.gui.QWidget)"><tt>QGroupBox</tt></a> also lets you set the <a href="QGroupBox.html#title()">title</tt></a> (normally set in the constructor) and the title's <a href="QGroupBox.html#alignment()">alignment</tt></a>. Group boxes can be checkable</tt>; child widgets in checkable group boxes are enabled or disabled depending on whether or not the group box is checked</tt>.</p> <p>You can minimize the space consumption of a group box by enabling the flat</tt> property. In most <a href="QStyle.html">styles</tt></a>, enabling this property results in the removal of the left, right and bottom edges of the frame.</p> <p><a href="QGroupBox.html#QGroupBox(java.lang.String, com.trolltech.qt.gui.QWidget)"><tt>QGroupBox</tt></a> doesn't automatically lay out the child widgets (which are often <a href="QCheckBox.html"><tt>QCheckBox</tt></a>es or <a href="QRadioButton.html"><tt>QRadioButton</tt></a>s but can be any widgets). The following example shows how we can set up a <a href="QGroupBox.html#QGroupBox(java.lang.String, com.trolltech.qt.gui.QWidget)"><tt>QGroupBox</tt></a> with a layout:</p> <pre> QGroupBox *groupBox = new QGroupBox(tr(&quot;Exclusive Radio Buttons&quot;)); QRadioButton *radio1 = new QRadioButton(tr(&quot;&amp;Radio button 1&quot;)); QRadioButton *radio2 = new QRadioButton(tr(&quot;R&amp;adio button 2&quot;)); QRadioButton *radio3 = new QRadioButton(tr(&quot;Ra&amp;dio button 3&quot;)); radio1-&gt;setChecked(true); QVBoxLayout *vbox = new QVBoxLayout; vbox-&gt;addWidget(radio1); vbox-&gt;addWidget(radio2); vbox-&gt;addWidget(radio3); vbox-&gt;addStretch(1); groupBox-&gt;setLayout(vbox);</pre> <p><table width="100%" align="center" cellpadding="2" cellspacing="1" border="0"> <tr valign="top" class="odd"><td><img src="%2E%2E/images/windowsxp-groupbox.png" alt="Screenshot of a Windows XP style group box" /></td><td><img src="%2E%2E/images/macintosh-groupbox.png" alt="Screenshot of a Macintosh style group box" /></td><td><img src="%2E%2E/images/plastique-groupbox.png" alt="Screenshot of a Plastique style group box" /></td></tr> <tr valign="top" class="even"><td>A <a href="%2E%2E/gallery-windowsxp.html">Windows XP style</tt></a> group box.</td><td>A <a href="%2E%2E/gallery-macintosh.html">Macintosh style</tt></a> group box.</td><td>A <a href="%2E%2E/gallery-plastique.html">Plastique style</tt></a> group box.</td></tr> </table></p> @see <a href="QButtonGroup.html"><tt>QButtonGroup</tt></a> @see Group Box Example</tt> */"> <signal name="protected final void clicked(boolean checked)" doc="/** <p>This signal is emitted when the check box is activated (i.e&#x2e; pressed down then released while the mouse cursor is inside the button), or when the shortcut key is typed, Notably, this signal is <i>not</i> emitted if you call <a href="QGroupBox.html#setChecked(boolean)"><tt>setChecked</tt></a>.</p> <p>If the check box is checked <tt>checked</tt> is true; it is false if the check box is unchecked.</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(boolean checked)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd>checkable</tt>, <a href="QGroupBox.html#toggled(boolean)"><tt>toggled</tt></a>, checked</tt></dd> </dl> */"/> <signal name="protected final void customContextMenuRequested(com.trolltech.qt.core.QPoint pos)" doc="/** <p>This signal is emitted when the widget's <a href="QWidget.html#contextMenuPolicy()"><tt>contextMenuPolicy</tt></a> is Qt::CustomContextMenu, and the user has requested a context menu on the widget. The position <tt>pos</tt> is the position of the context menu event that the widget receives. Normally this is in widget coordinates. The exception to this rule is <a href="QAbstractScrollArea.html"><tt>QAbstractScrollArea</tt></a> and its subclasses that map the context menu event to coordinates of the viewport()</tt> .</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(com.trolltech.qt.core.QPoint pos)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><a href="QWidget.html#mapToGlobal(com.trolltech.qt.core.QPoint)"><tt>mapToGlobal</tt></a>, <a href="QMenu.html"><tt>QMenu</tt></a>, <a href="QWidget.html#contextMenuPolicy()"><tt>contextMenuPolicy</tt></a></dd> </dl> */"/> <signal name="protected final void toggled(boolean arg__1)" doc="/** <p>If the group box is checkable, this signal is emitted when the check box is toggled. <tt>arg__1</tt> is true if the check box is checked; otherwise it is false.</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(boolean arg__1)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd>checkable</tt></dd> </dl> */"/> <method name="public QGroupBox(com.trolltech.qt.gui.QWidget parent)" doc="/** <p>Constructs a group box widget with the given <tt>parent</tt> but with no title.</p> */"/> <method name="public QGroupBox()" doc="/** <p>Equivalent to <a href="QGroupBox.html#QGroupBox(java.lang.String, com.trolltech.qt.gui.QWidget)"><tt>QGroupBox</tt></a>(0). */"/> <method name="public QGroupBox(java.lang.String title, com.trolltech.qt.gui.QWidget parent)" doc="/** <p>Constructs a group box with the given <tt>title</tt> and <tt>parent</tt>.</p> */"/> <method name="public QGroupBox(java.lang.String title)" doc="/** <p>Equivalent to <a href="QGroupBox.html#QGroupBox(java.lang.String, com.trolltech.qt.gui.QWidget)"><tt>QGroupBox</tt></a>(<tt>title</tt>, 0). */"/> <method name="public final com.trolltech.qt.core.Qt.Alignment alignment()" doc="/** <p>Returns the alignment of the group box title..</p> <p>Most styles place the title at the top of the frame. The horizontal alignment of the title can be specified using single values from the following list:</p> <ul> <li>Qt::AlignLeft aligns the title text with the left-hand side of the group box.</li> <li>Qt::AlignRight aligns the title text with the right-hand side of the group box.</li> <li>Qt::AlignHCenter aligns the title text with the horizontal center of the group box.</li> </ul> <p>The default alignment is Qt::AlignLeft.</p> @see <a href="QGroupBox.html#setAlignment(int)"><tt>setAlignment</tt></a> @see Qt::Alignment</tt> */"/> <method name="public final boolean isCheckable()" doc="/** <p>Returns whether the group box has a checkbox in its title.</p> <p>If this property is true, the group box displays its title using a checkbox in place of an ordinary label. If the checkbox is checked, the group box's children are enabled; otherwise they are disabled and inaccessible.</p> <p>By default, group boxes are not checkable.</p> <p>If this property is enabled for a group box, it will also be initially checked to ensure that its contents are enabled.</p> @see checked</tt> */"/> <method name="public final boolean isChecked()" doc="/** <p>Returns whether the group box is checked.</p> <p>If the group box is checkable, it is displayed with a check box. If the check box is checked, the group box's children are enabled; otherwise the children are disabled and are inaccessible to the user.</p> <p>By default, checkable group boxes are also checked.</p> @see checkable</tt> */"/> <method name="public final boolean isFlat()" doc="/** <p>Returns whether the group box is painted flat or has a frame.</p> <p>A group box usually consists of a surrounding frame with a title at the top. If this property is enabled, only the top part of the frame is drawn in most styles; otherwise the whole frame is drawn.</p> <p>By default, this property is disabled; i.e&#x2e; group boxes are not flat unless explicitly specified.</p> <p><b>Note:</b> In some styles, flat and non-flat group boxes have similar representations and may not be as distinguishable as they are in other styles.</p> @see <a href="QGroupBox.html#title()">title</tt></a> */"/> <method name="public final void setAlignment(int alignment)" doc="/** <p>Sets the alignment of the group box title. to <tt>alignment</tt>.</p> <p>Most styles place the title at the top of the frame. The horizontal alignment of the title can be specified using single values from the following list:</p> <ul> <li>Qt::AlignLeft aligns the title text with the left-hand side of the group box.</li> <li>Qt::AlignRight aligns the title text with the right-hand side of the group box.</li> <li>Qt::AlignHCenter aligns the title text with the horizontal center of the group box.</li> </ul> <p>The default alignment is Qt::AlignLeft.</p> @see <a href="QGroupBox.html#alignment()"><tt>alignment</tt></a> @see Qt::Alignment</tt> */"/> <method name="public final void setCheckable(boolean checkable)" doc="/** <p>Sets whether the group box has a checkbox in its title to <tt>checkable</tt>.</p> <p>If this property is true, the group box displays its title using a checkbox in place of an ordinary label. If the checkbox is checked, the group box's children are enabled; otherwise they are disabled and inaccessible.</p> <p>By default, group boxes are not checkable.</p> <p>If this property is enabled for a group box, it will also be initially checked to ensure that its contents are enabled.</p> @see <a href="QGroupBox.html#isCheckable()"><tt>isCheckable</tt></a> @see checked</tt> */"/> <method name="public final void setChecked(boolean checked)" doc="/** <p>Sets whether the group box is checked to <tt>checked</tt>.</p> <p>If the group box is checkable, it is displayed with a check box. If the check box is checked, the group box's children are enabled; otherwise the children are disabled and are inaccessible to the user.</p> <p>By default, checkable group boxes are also checked.</p> @see <a href="QGroupBox.html#isChecked()"><tt>isChecked</tt></a> @see checkable</tt> */"/> <method name="public final void setFlat(boolean flat)" doc="/** <p>Sets whether the group box is painted flat or has a frame to <tt>flat</tt>.</p> <p>A group box usually consists of a surrounding frame with a title at the top. If this property is enabled, only the top part of the frame is drawn in most styles; otherwise the whole frame is drawn.</p> <p>By default, this property is disabled; i.e&#x2e; group boxes are not flat unless explicitly specified.</p> <p><b>Note:</b> In some styles, flat and non-flat group boxes have similar representations and may not be as distinguishable as they are in other styles.</p> @see <a href="QGroupBox.html#isFlat()"><tt>isFlat</tt></a> @see <a href="QGroupBox.html#title()">title</tt></a> */"/> <method name="public final void setTitle(java.lang.String title)" doc="/** <p>Sets the group box title text to <tt>title</tt>.</p> <p>The group box title text will have a keyboard shortcut if the title contains an ampersand ('&amp;') followed by a letter.</p> <pre> g-&gt;setTitle(&quot;&amp;User information&quot;);</pre> <p>In the example above, <b>Alt+U</b> moves the keyboard focus to the group box. See the <a href="QShortcut.html#mnemonic">QShortcut</a> documentation for details (to display an actual ampersand, use '&amp;&amp;').</p> <p>There is no default title text.</p> @see <a href="QGroupBox.html#title()"><tt>title</tt></a> @see <a href="QGroupBox.html#alignment()">alignment</tt></a> */"/> <method name="public final java.lang.String title()" doc="/** <p>Returns the group box title text.</p> <p>The group box title text will have a keyboard shortcut if the title contains an ampersand ('&amp;') followed by a letter.</p> <pre> g-&gt;setTitle(&quot;&amp;User information&quot;);</pre> <p>In the example above, <b>Alt+U</b> moves the keyboard focus to the group box. See the <a href="QShortcut.html#mnemonic">QShortcut</a> documentation for details (to display an actual ampersand, use '&amp;&amp;').</p> <p>There is no default title text.</p> @see <a href="QGroupBox.html#setTitle(java.lang.String)"><tt>setTitle</tt></a> @see <a href="QGroupBox.html#alignment()">alignment</tt></a> */"/> <method name="protected void changeEvent(com.trolltech.qt.core.QEvent event)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <method name="protected void childEvent(com.trolltech.qt.core.QChildEvent event)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <method name="public boolean event(com.trolltech.qt.core.QEvent event)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <method name="protected void focusInEvent(com.trolltech.qt.gui.QFocusEvent event)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <method name="public com.trolltech.qt.core.QSize minimumSizeHint()" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <method name="protected void mouseMoveEvent(com.trolltech.qt.gui.QMouseEvent event)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <method name="protected void mousePressEvent(com.trolltech.qt.gui.QMouseEvent event)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <method name="protected void mouseReleaseEvent(com.trolltech.qt.gui.QMouseEvent event)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <method name="protected void paintEvent(com.trolltech.qt.gui.QPaintEvent event)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <method name="protected void resizeEvent(com.trolltech.qt.gui.QResizeEvent event)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> </class>