<class name="QWidgetAction" doc="/**
&lt;p&gt;The &lt;a href=&quot;QWidgetAction.html#QWidgetAction(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QWidgetAction&lt;/tt&gt;&lt;/a&gt; class extends &lt;a href=&quot;QAction.html#QAction(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QAction&lt;/tt&gt;&lt;/a&gt; by an interface for inserting custom widgets into action based containers, such as toolbars.&lt;/p&gt;
&lt;p&gt;Most actions in application are represented as items in menus or buttons in toolbars. However sometimes more complex widgets are necessary. For example a zoom action in a word processor may be realized using a &lt;a href=&quot;QComboBox.html&quot;&gt;&lt;tt&gt;QComboBox&lt;/tt&gt;&lt;/a&gt; in a &lt;a href=&quot;QToolBar.html&quot;&gt;&lt;tt&gt;QToolBar&lt;/tt&gt;&lt;/a&gt;, presenting a range of different zoom levels. &lt;a href=&quot;QToolBar.html&quot;&gt;&lt;tt&gt;QToolBar&lt;/tt&gt;&lt;/a&gt; provides QToolBar::insertWidget() as convenience function for inserting a single widget. However if you want to implement an action that uses custom widgets for visualization in multiple containers then you have to subclass &lt;a href=&quot;QWidgetAction.html#QWidgetAction(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QWidgetAction&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If a &lt;a href=&quot;QWidgetAction.html#QWidgetAction(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QWidgetAction&lt;/tt&gt;&lt;/a&gt; is added for example to a &lt;a href=&quot;QToolBar.html&quot;&gt;&lt;tt&gt;QToolBar&lt;/tt&gt;&lt;/a&gt; then QWidgetAction::createWidget() is called. Reimplementations of that function should create a new custom widget with the specified parent.&lt;/p&gt;
&lt;p&gt;If the action is removed from a container widget then QWidgetAction::deleteWidget() is called with the previously created custom widget as argument. The default implementation hides the widget and deletes it using QObject::deleteLater().&lt;/p&gt;
&lt;p&gt;If you have only one single custom widget then you can set it as default widget using &lt;a href=&quot;QWidgetAction.html#setDefaultWidget(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;setDefaultWidget&lt;/tt&gt;&lt;/a&gt;. That widget will then be used if the action is added to a &lt;a href=&quot;QToolBar.html&quot;&gt;&lt;tt&gt;QToolBar&lt;/tt&gt;&lt;/a&gt;, or in general to an action container that supports &lt;a href=&quot;QWidgetAction.html#QWidgetAction(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QWidgetAction&lt;/tt&gt;&lt;/a&gt;. If a &lt;a href=&quot;QWidgetAction.html#QWidgetAction(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QWidgetAction&lt;/tt&gt;&lt;/a&gt; with only a default widget is added to two toolbars at the same time then the default widget is shown only in the first toolbar the action was added to. &lt;a href=&quot;QWidgetAction.html#QWidgetAction(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QWidgetAction&lt;/tt&gt;&lt;/a&gt; takes over ownership of the default widget.&lt;/p&gt;
&lt;p&gt;Note that it is up to the widget to activate the action, for example by reimplementing mouse event handlers and calling QAction::trigger().&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Mac OS X&lt;/b&gt;: If you add widgets to a menu in the application's menu bar on Mac OS X, the widget will be added and function but there are some limitations:&lt;/p&gt;
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;The widget is reparented away from the &lt;a href=&quot;QMenu.html&quot;&gt;&lt;tt&gt;QMenu&lt;/tt&gt;&lt;/a&gt; to the native menu view. If you show the menu some other place (e.g&amp;#x2e; as a popup menu), the widget will not be there.&lt;/li&gt;
&lt;li&gt;Focus/Keyboard handling of the widget is not possible&lt;/li&gt;
&lt;li&gt;Mouse tracking on the widget currently does not work&lt;/li&gt;
&lt;li&gt;Connecting the &lt;a href=&quot;QWidgetAction.html#triggered(boolean)&quot;&gt;&lt;tt&gt;triggered&lt;/tt&gt;&lt;/a&gt; signal to a slot that opens a modal dialog will cause a crash in Mac OS X 10.4 (known bug acknowledged by Apple), a workaround is to use a QueuedConnection instead of a DirectConnection.&lt;/li&gt;
&lt;/ol&gt;

@see &lt;a href=&quot;QAction.html#QAction(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QAction&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QActionGroup.html&quot;&gt;&lt;tt&gt;QActionGroup&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QWidget.html&quot;&gt;&lt;tt&gt;QWidget&lt;/tt&gt;&lt;/a&gt; */">
    <signal name="protected final void changed()" doc="/**
&lt;p&gt;This signal is emitted when an action has changed. If you are only interested in actions in a given widget, you can watch for QWidget::actionEvent() sent with an QEvent::ActionChanged.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signature:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;See Also:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;QWidget::actionEvent&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <signal name="protected final void hovered()" doc="/**
&lt;p&gt;This signal is emitted when an action is highlighted by the user; for example, when the user pauses with the cursor over a menu option, toolbar button, or presses an action's shortcut key combination.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signature:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;See Also:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;QAction::activate&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <signal name="protected final void toggled(boolean arg__1)" doc="/**
&lt;p&gt;This signal is emitted whenever a checkable action changes its &lt;a href=&quot;QAction.html#isChecked()&quot;&gt;&lt;tt&gt;isChecked&lt;/tt&gt;&lt;/a&gt; status. This can be the result of a user interaction, or because &lt;a href=&quot;QAction.html#setChecked(boolean)&quot;&gt;&lt;tt&gt;setChecked&lt;/tt&gt;&lt;/a&gt; was called.&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;arg__1&lt;/tt&gt; is true if the action is checked, or false if the action is unchecked.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signatures:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot(boolean arg__1)&lt;/tt&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;See Also:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;QAction::activate&lt;/tt&gt;, &lt;tt&gt;QAction::triggered&lt;/tt&gt;, checked&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <signal name="protected final void triggered(boolean checked)" doc="/**
&lt;p&gt;This signal is emitted when an action is activated by the user; for example, when the user clicks a menu option, toolbar button, or presses an action's shortcut key combination, or when &lt;a href=&quot;QAction.html#trigger()&quot;&gt;&lt;tt&gt;trigger&lt;/tt&gt;&lt;/a&gt; was called. Notably, it is &lt;i&gt;not&lt;/i&gt; emitted when &lt;a href=&quot;QAction.html#setChecked(boolean)&quot;&gt;&lt;tt&gt;setChecked&lt;/tt&gt;&lt;/a&gt; or &lt;a href=&quot;QAction.html#toggle()&quot;&gt;&lt;tt&gt;toggle&lt;/tt&gt;&lt;/a&gt; is called.&lt;/p&gt;
&lt;p&gt;If the action is checkable, &lt;tt&gt;checked&lt;/tt&gt; is true if the action is checked, or false if the action is unchecked.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signatures:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot(boolean checked)&lt;/tt&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;See Also:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;QAction::activate&lt;/tt&gt;, &lt;tt&gt;QAction::toggled&lt;/tt&gt;, checked&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <method name="public QWidgetAction(com.trolltech.qt.core.QObject parent)" doc="/**
&lt;p&gt;Constructs an action with &lt;tt&gt;parent&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="protected final java.util.List&lt;com.trolltech.qt.gui.QWidget&gt; createdWidgets()" doc="/**
&lt;p&gt;Returns the list of widgets that have been using &lt;a href=&quot;QWidgetAction.html#createWidget(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;createWidget&lt;/tt&gt;&lt;/a&gt; and are currently in use by widgets the action has been added to.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.gui.QWidget defaultWidget()" doc="/**
&lt;p&gt;Returns the default widget.&lt;/p&gt;

@see &lt;a href=&quot;QWidgetAction.html#setDefaultWidget(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;setDefaultWidget&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void releaseWidget(com.trolltech.qt.gui.QWidget widget)" doc="/**
&lt;p&gt;Releases the specified &lt;tt&gt;widget&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Container widgets that support actions call this function when a widget action is removed.&lt;/p&gt;

@see &lt;a href=&quot;QWidgetAction.html#requestWidget(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;requestWidget&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QWidgetAction.html#deleteWidget(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;deleteWidget&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QWidgetAction.html#defaultWidget()&quot;&gt;&lt;tt&gt;defaultWidget&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QWidget requestWidget(com.trolltech.qt.gui.QWidget parent)" doc="/**
&lt;p&gt;Returns a widget that represents the action, with the given &lt;tt&gt;parent&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Container widgets that support actions can call this function to request a widget as visual representation of the action.&lt;/p&gt;

@see &lt;a href=&quot;QWidgetAction.html#releaseWidget(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;releaseWidget&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QWidgetAction.html#createWidget(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;createWidget&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QWidgetAction.html#defaultWidget()&quot;&gt;&lt;tt&gt;defaultWidget&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setDefaultWidget(com.trolltech.qt.gui.QWidget w)" doc="/**
&lt;p&gt;Sets &lt;tt&gt;w&lt;/tt&gt; to be the default widget. The ownership is transferred to &lt;a href=&quot;QWidgetAction.html#QWidgetAction(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QWidgetAction&lt;/tt&gt;&lt;/a&gt;. Unless &lt;a href=&quot;QWidgetAction.html#createWidget(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;createWidget&lt;/tt&gt;&lt;/a&gt; is reimplemented by a subclass to return a new widget the default widget is used when a container widget requests a widget through &lt;a href=&quot;QWidgetAction.html#requestWidget(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;requestWidget&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QWidgetAction.html#defaultWidget()&quot;&gt;&lt;tt&gt;defaultWidget&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected com.trolltech.qt.gui.QWidget createWidget(com.trolltech.qt.gui.QWidget parent)" doc="/**
&lt;p&gt;This function is called whenever the action is added to a container widget that supports custom widgets. If you don't want a custom widget to be used as representation of the action in the specified &lt;tt&gt;parent&lt;/tt&gt; widget then 0 should be returned.&lt;/p&gt;

@see &lt;a href=&quot;QWidgetAction.html#deleteWidget(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;deleteWidget&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected void deleteWidget(com.trolltech.qt.gui.QWidget widget)" doc="/**
&lt;p&gt;This function is called whenever the action is removed from a container widget that displays the action using a custom &lt;tt&gt;widget&lt;/tt&gt; previously created using &lt;a href=&quot;QWidgetAction.html#createWidget(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;createWidget&lt;/tt&gt;&lt;/a&gt;. The default implementation hides the &lt;tt&gt;widget&lt;/tt&gt; and schedules it for deletion using QObject::deleteLater().&lt;/p&gt;

@see &lt;a href=&quot;QWidgetAction.html#createWidget(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;createWidget&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public boolean event(com.trolltech.qt.core.QEvent arg__1)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
</class>
