<class name="QToolBox" doc="/** <p>The <a href="QToolBox.html#QToolBox(com.trolltech.qt.gui.QWidget, com.trolltech.qt.core.Qt.WindowFlags)"><tt>QToolBox</tt></a> class provides a column of tabbed widget items.</p> <p>A toolbox is a widget that displays a column of tabs one above the other, with the current item displayed below the current tab. Every tab has an index position within the column of tabs. A tab's item is a <a href="QWidget.html#QWidget(com.trolltech.qt.gui.QWidget, com.trolltech.qt.core.Qt.WindowFlags)"><tt>QWidget</tt></a>.</p> <p>Each item has an <a href="QToolBox.html#itemText(int)"><tt>itemText</tt></a>, an optional <a href="QToolBox.html#itemIcon(int)"><tt>itemIcon</tt></a>, an optional <a href="QToolBox.html#itemToolTip(int)"><tt>itemToolTip</tt></a>, and a <a href="QToolBox.html#widget(int)"><tt>widget</tt></a>. The item's attributes can be changed with <a href="QToolBox.html#setItemText(int, java.lang.String)"><tt>setItemText</tt></a>, <a href="QToolBox.html#setItemIcon(int, com.trolltech.qt.gui.QIcon)"><tt>setItemIcon</tt></a>, and <a href="QToolBox.html#setItemToolTip(int, java.lang.String)"><tt>setItemToolTip</tt></a>. Each item can be enabled or disabled individually with <a href="QToolBox.html#setItemEnabled(int, boolean)"><tt>setItemEnabled</tt></a>.</p> <p>Items are added using <a href="QToolBox.html#addItem(com.trolltech.qt.gui.QWidget, com.trolltech.qt.gui.QIcon, java.lang.String)"><tt>addItem</tt></a>, or inserted at particular positions using <a href="QToolBox.html#insertItem(int, com.trolltech.qt.gui.QWidget, java.lang.String)"><tt>insertItem</tt></a>. The total number of items is given by <a href="QToolBox.html#count()"><tt>count</tt></a>. Items can be deleted with delete, or removed from the toolbox with <a href="QToolBox.html#removeItem(int)"><tt>removeItem</tt></a>. Combining <a href="QToolBox.html#removeItem(int)"><tt>removeItem</tt></a> and <a href="QToolBox.html#insertItem(int, com.trolltech.qt.gui.QWidget, java.lang.String)"><tt>insertItem</tt></a> allows you to move items to different positions.</p> <p>The index of the current item widget is returned by <a href="QToolBox.html#currentIndex()"><tt>currentIndex</tt></a>, and set with <a href="QToolBox.html#setCurrentIndex(int)"><tt>setCurrentIndex</tt></a>. The index of a particular item can be found using <a href="QToolBox.html#indexOf(com.trolltech.qt.gui.QWidget)"><tt>indexOf</tt></a>, and the item at a given index is returned by item().</p> <p>The <a href="QToolBox.html#currentChanged(int)"><tt>currentChanged</tt></a> signal is emitted when the current item is changed.</p> @see <a href="QTabWidget.html"><tt>QTabWidget</tt></a> */"> <signal name="protected final void currentChanged(int index)" doc="/** <p>This signal is emitted when the current item is changed. The new current item's index is passed in <tt>index</tt>, or -1 if there is no current item.</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(int index)</tt></dd> <dd><tt>void mySlot()</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> */"/> <method name="public QToolBox(com.trolltech.qt.gui.QWidget parent, com.trolltech.qt.core.Qt.WindowFlags f)" doc="/** <p>Constructs a new toolbox with the given <tt>parent</tt> and the flags, <tt>f</tt>.</p> */"/> <method name="public QToolBox(com.trolltech.qt.gui.QWidget parent)" doc="/** <p>Equivalent to <a href="QToolBox.html#QToolBox(com.trolltech.qt.gui.QWidget, com.trolltech.qt.core.Qt.WindowFlags)"><tt>QToolBox</tt></a>(<tt>parent</tt>, 0). */"/> <method name="public QToolBox()" doc="/** <p>Equivalent to <a href="QToolBox.html#QToolBox(com.trolltech.qt.gui.QWidget, com.trolltech.qt.core.Qt.WindowFlags)"><tt>QToolBox</tt></a>(0, 0). */"/> <method name="public final int addItem(com.trolltech.qt.gui.QWidget widget, java.lang.String text)" doc="/** <p>Adds the widget <tt>widget</tt> in a new tab at bottom of the toolbox. The new tab's text is set to <tt>text</tt>. Returns the new tab's index.</p> */"/> <method name="public final int addItem(com.trolltech.qt.gui.QWidget widget, com.trolltech.qt.gui.QIcon icon, java.lang.String text)" doc="/** <p>Adds the <tt>widget</tt> in a new tab at bottom of the toolbox. The new tab's text is set to <tt>text</tt>, and the <tt>icon</tt> is displayed to the left of the <tt>text</tt>. Returns the new tab's index.</p> */"/> <method name="public final int count()" doc="/** <p>Returns The number of items contained in the toolbox..</p> */"/> <method name="public final int currentIndex()" doc="/** <p>Returns The index of the current item, or -1 if the toolbox is empty..</p> @see <a href="QToolBox.html#setCurrentIndex(int)"><tt>setCurrentIndex</tt></a> @see <a href="QToolBox.html#indexOf(com.trolltech.qt.gui.QWidget)"><tt>indexOf</tt></a> @see <a href="QToolBox.html#widget(int)"><tt>widget</tt></a> */"/> <method name="public final com.trolltech.qt.gui.QWidget currentWidget()" doc="/** <p>Returns a pointer to the current widget, or 0 if there is no such item.</p> @see <a href="QToolBox.html#currentIndex()"><tt>currentIndex</tt></a> @see <a href="QToolBox.html#setCurrentWidget(com.trolltech.qt.gui.QWidget)"><tt>setCurrentWidget</tt></a> */"/> <method name="public final int indexOf(com.trolltech.qt.gui.QWidget widget)" doc="/** <p>Returns the index of <tt>widget</tt>, or -1 if the item does not exist.</p> */"/> <method name="public final int insertItem(int index, com.trolltech.qt.gui.QWidget widget, com.trolltech.qt.gui.QIcon icon, java.lang.String text)" doc="/** <p>Inserts the <tt>widget</tt> at position <tt>index</tt>, or at the bottom of the toolbox if <tt>index</tt> is out of range. The new item's text is set to <tt>text</tt>, and the <tt>icon</tt> is displayed to the left of the <tt>text</tt>. Returns the new item's index.</p> */"/> <method name="public final int insertItem(int index, com.trolltech.qt.gui.QWidget widget, java.lang.String text)" doc="/** <p>Inserts the <tt>widget</tt> at position <tt>index</tt>, or at the bottom of the toolbox if <tt>index</tt> is out of range. The new item's text is set to <tt>text</tt>. Returns the new item's index.</p> */"/> <method name="public final boolean isItemEnabled(int index)" doc="/** <p>Returns true if the item at position <tt>index</tt> is enabled; otherwise returns false.</p> */"/> <method name="public final com.trolltech.qt.gui.QIcon itemIcon(int index)" doc="/** <p>Returns the icon of the item at position <tt>index</tt>, or a null icon if <tt>index</tt> is out of range.</p> @see <a href="QToolBox.html#setItemIcon(int, com.trolltech.qt.gui.QIcon)"><tt>setItemIcon</tt></a> */"/> <method name="public final java.lang.String itemText(int index)" doc="/** <p>Returns the text of the item at position <tt>index</tt>, or an empty string if <tt>index</tt> is out of range.</p> @see <a href="QToolBox.html#setItemText(int, java.lang.String)"><tt>setItemText</tt></a> */"/> <method name="public final java.lang.String itemToolTip(int index)" doc="/** <p>Returns the tooltip of the item at position <tt>index</tt>, or an empty string if <tt>index</tt> is out of range.</p> @see <a href="QToolBox.html#setItemToolTip(int, java.lang.String)"><tt>setItemToolTip</tt></a> */"/> <method name="public final void removeItem(int index)" doc="/** <p>Removes the item at position <tt>index</tt> from the toolbox. Note that the widget is <i>not</i> deleted.</p> */"/> <method name="public final void setCurrentIndex(int index)" doc="/** <p>Sets The index of the current item, or -1 if the toolbox is empty. to <tt>index</tt>.</p> @see <a href="QToolBox.html#currentIndex()"><tt>currentIndex</tt></a> @see <a href="QToolBox.html#indexOf(com.trolltech.qt.gui.QWidget)"><tt>indexOf</tt></a> @see <a href="QToolBox.html#widget(int)"><tt>widget</tt></a> */"/> <method name="public final void setCurrentWidget(com.trolltech.qt.gui.QWidget widget)" doc="/** <p>Makes<tt>widget</tt> the current widget. The <tt>widget</tt> must be an item in this tool box.</p> @see <a href="QToolBox.html#addItem(com.trolltech.qt.gui.QWidget, com.trolltech.qt.gui.QIcon, java.lang.String)"><tt>addItem</tt></a> @see <a href="QToolBox.html#setCurrentIndex(int)"><tt>setCurrentIndex</tt></a> @see <a href="QToolBox.html#currentWidget()"><tt>currentWidget</tt></a> */"/> <method name="public final void setItemEnabled(int index, boolean enabled)" doc="/** <p>If <tt>enabled</tt> is true then the item at position <tt>index</tt> is enabled; otherwise the item at position <tt>index</tt> is disabled.</p> @see <a href="QToolBox.html#isItemEnabled(int)"><tt>isItemEnabled</tt></a> */"/> <method name="public final void setItemIcon(int index, com.trolltech.qt.gui.QIcon icon)" doc="/** <p>Sets the icon of the item at position <tt>index</tt> to <tt>icon</tt>.</p> @see <a href="QToolBox.html#itemIcon(int)"><tt>itemIcon</tt></a> */"/> <method name="public final void setItemText(int index, java.lang.String text)" doc="/** <p>Sets the text of the item at position <tt>index</tt> to <tt>text</tt>.</p> <p>If the provided text contains an ampersand character ('&amp;'), a mnemonic is automatically created for it. The character that follows the '&amp;' will be used as the shortcut key. Any previous mnemonic will be overwritten, or cleared if no mnemonic is defined by the text. See the <a href="QShortcut.html#mnemonic">QShortcut</a> documentation for details (to display an actual ampersand, use '&amp;&amp;').</p> @see <a href="QToolBox.html#itemText(int)"><tt>itemText</tt></a> */"/> <method name="public final void setItemToolTip(int index, java.lang.String toolTip)" doc="/** <p>Sets the tooltip of the item at position <tt>index</tt> to <tt>toolTip</tt>.</p> @see <a href="QToolBox.html#itemToolTip(int)"><tt>itemToolTip</tt></a> */"/> <method name="public final com.trolltech.qt.gui.QWidget widget(int index)" doc="/** <p>Returns the widget at position <tt>index</tt>, or 0 if there is no such item.</p> */"/> <method name="protected void changeEvent(com.trolltech.qt.core.QEvent arg__1)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <method name="public boolean event(com.trolltech.qt.core.QEvent e)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <method name="protected void itemInserted(int index)" doc="/** <p>This virtual handler is called after a new item was added or inserted at position <tt>index</tt>.</p> @see <a href="QToolBox.html#itemRemoved(int)"><tt>itemRemoved</tt></a> */"/> <method name="protected void itemRemoved(int index)" doc="/** <p>This virtual handler is called after an item was removed from position <tt>index</tt>.</p> @see <a href="QToolBox.html#itemInserted(int)"><tt>itemInserted</tt></a> */"/> <method name="protected void showEvent(com.trolltech.qt.gui.QShowEvent e)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> </class>