Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a6711891ce757817bba854bf3f25205a > files > 2128

qtjambi-doc-4.3.3-3mdv2008.1.i586.rpm

<class name="QMenu" doc="/**
&lt;p&gt;The &lt;a href=&quot;QMenu.html#QMenu(java.lang.String, com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QMenu&lt;/tt&gt;&lt;/a&gt; class provides a menu widget for use in menu bars, context menus, and other popup menus.&lt;/p&gt;
&lt;p&gt;A menu widget is a selection menu. It can be either a pull-down menu in a menu bar or a standalone context menu. Pull-down menus are shown by the menu bar when the user clicks on the respective item or presses the specified shortcut key. Use QMenuBar::addMenu() to insert a menu into a menu bar. Context menus are usually invoked by some special keyboard key or by right-clicking. They can be executed either asynchronously with &lt;a href=&quot;QMenu.html#popup(com.trolltech.qt.core.QPoint, com.trolltech.qt.gui.QAction)&quot;&gt;&lt;tt&gt;popup&lt;/tt&gt;&lt;/a&gt; or synchronously with &lt;a href=&quot;QMenu.html#exec(java.util.List&lt;com.trolltech.qt.gui.QAction&gt;, com.trolltech.qt.core.QPoint, com.trolltech.qt.gui.QAction)&quot;&gt;&lt;tt&gt;exec&lt;/tt&gt;&lt;/a&gt;. Menus can also be invoked in response to button presses; these are just like context menus except for how they are invoked.&lt;/p&gt;
    &lt;table align=&quot;center&quot; cellpadding=&quot;0&quot;&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;p&gt;&lt;img src=&quot;%2E%2E/images/plastique-menu.png&quot; /&gt;&lt;/p&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;p&gt;&lt;img src=&quot;%2E%2E/images/windowsxp-menu.png&quot; /&gt;&lt;/p&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;p&gt;&lt;img src=&quot;%2E%2E/images/macintosh-menu.png&quot; /&gt;&lt;/p&gt;
        &lt;/td&gt;

    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td colspan=&quot;3&quot;&gt;
           &lt;p&gt;A menu shown in &lt;a href=&quot;%2E%2E/gallery-plastique.html&quot;&gt;Plastique widget style&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;%2E%2E/gallery-windowsxp.html&quot;&gt;Windows XP widget style&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;%2E%2E/gallery-macintosh.html&quot;&gt;Macintosh widget style&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;/table&gt;
    &lt;p&gt;A menu consists of a list of action items. Actions are added with &lt;a href=&quot;QMenu.html#addAction(com.trolltech.qt.gui.QIcon, java.lang.String)&quot;&gt;&lt;tt&gt;addAction&lt;/tt&gt;&lt;/a&gt;. An action is represented vertically and rendered by &lt;a href=&quot;QStyle.html&quot;&gt;&lt;tt&gt;QStyle&lt;/tt&gt;&lt;/a&gt;. In addition, actions can have a text label, an optional icon drawn on the very left side, and shortcut key sequence such as &amp;quot;Ctrl+X&amp;quot;.&lt;/p&gt;
&lt;p&gt;There are three kinds of action items: separators, actions that show a submenu, and actions that perform an action. Separators are inserted with &lt;a href=&quot;QMenu.html#addSeparator()&quot;&gt;&lt;tt&gt;addSeparator&lt;/tt&gt;&lt;/a&gt;. For submenus use &lt;a href=&quot;QMenu.html#addMenu(java.lang.String)&quot;&gt;&lt;tt&gt;addMenu&lt;/tt&gt;&lt;/a&gt;. All other items are considered action items.&lt;/p&gt;
&lt;p&gt;When inserting action items you usually specify a receiver and a slot. The receiver will be notifed whenever the item is triggered(). In addition, &lt;a href=&quot;QMenu.html#QMenu(java.lang.String, com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QMenu&lt;/tt&gt;&lt;/a&gt; provides two signals, activated() and highlighted(), which signal the &lt;a href=&quot;QAction.html&quot;&gt;&lt;tt&gt;QAction&lt;/tt&gt;&lt;/a&gt; that was triggered from the menu.&lt;/p&gt;
&lt;p&gt;You clear a menu with &lt;a href=&quot;QMenu.html#clear()&quot;&gt;&lt;tt&gt;clear&lt;/tt&gt;&lt;/a&gt; and remove individual action items with &lt;a href=&quot;QWidget.html#removeAction(com.trolltech.qt.gui.QAction)&quot;&gt;&lt;tt&gt;removeAction&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A &lt;a href=&quot;QMenu.html#QMenu(java.lang.String, com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QMenu&lt;/tt&gt;&lt;/a&gt; can also provide a tear-off menu. A tear-off menu is a top-level window that contains a copy of the menu. This makes it possible for the user to &amp;quot;tear off&amp;quot; frequently used menus and position them in a convenient place on the screen. If you want this functionality for a particular menu, insert a tear-off handle with &lt;a href=&quot;QMenu.html#setTearOffEnabled(boolean)&quot;&gt;&lt;tt&gt;setTearOffEnabled&lt;/tt&gt;&lt;/a&gt;. When using tear-off menus, bear in mind that the concept isn't typically used on Microsoft Windows so some users may not be familiar with it. Consider using a &lt;a href=&quot;QToolBar.html&quot;&gt;&lt;tt&gt;QToolBar&lt;/tt&gt;&lt;/a&gt; instead.&lt;/p&gt;
&lt;p&gt;See the Menus&lt;/tt&gt; example for an example of how to use &lt;a href=&quot;QMenuBar.html&quot;&gt;&lt;tt&gt;QMenuBar&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QMenu.html#QMenu(java.lang.String, com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QMenu&lt;/tt&gt;&lt;/a&gt; in your application.&lt;/p&gt;
&lt;p&gt;Important inherited functions: &lt;a href=&quot;QMenu.html#addAction(com.trolltech.qt.gui.QIcon, java.lang.String)&quot;&gt;&lt;tt&gt;addAction&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QWidget.html#removeAction(com.trolltech.qt.gui.QAction)&quot;&gt;&lt;tt&gt;removeAction&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QMenu.html#clear()&quot;&gt;&lt;tt&gt;clear&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QMenu.html#addSeparator()&quot;&gt;&lt;tt&gt;addSeparator&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;QMenu.html#addMenu(java.lang.String)&quot;&gt;&lt;tt&gt;addMenu&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QMenuBar.html&quot;&gt;&lt;tt&gt;QMenuBar&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;%2E%2E/guibooks.html#fowler&quot;&gt;GUI Design Handbook: Menu, Drop-Down and Pop-Up&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;%2E%2E/qtjambi-application.html&quot;&gt;Application Example&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;%2E%2E/qtjambi-menus.html&quot;&gt;Menus Example&lt;/tt&gt;&lt;/a&gt;
@see Recent Files Example&lt;/tt&gt; */">
    <signal name="protected final void aboutToHide()" doc="/**
&lt;p&gt;This signal is emitted just before the menu is hidden from the user.&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;a href=&quot;QMenu.html#aboutToShow()&quot;&gt;&lt;tt&gt;aboutToShow&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QWidget.html#hide()&quot;&gt;&lt;tt&gt;hide&lt;/tt&gt;&lt;/a&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <signal name="protected final void aboutToShow()" doc="/**
&lt;p&gt;This signal is emitted just before the menu is shown to the user.&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;a href=&quot;QMenu.html#aboutToHide()&quot;&gt;&lt;tt&gt;aboutToHide&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QWidget.html#show()&quot;&gt;&lt;tt&gt;show&lt;/tt&gt;&lt;/a&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <signal name="protected final void customContextMenuRequested(com.trolltech.qt.core.QPoint pos)" doc="/**
&lt;p&gt;This signal is emitted when the widget's &lt;a href=&quot;QWidget.html#contextMenuPolicy()&quot;&gt;&lt;tt&gt;contextMenuPolicy&lt;/tt&gt;&lt;/a&gt; is Qt::CustomContextMenu, and the user has requested a context menu on the widget. The position &lt;tt&gt;pos&lt;/tt&gt; is the position of the context menu event that the widget receives. Normally this is in widget coordinates. The exception to this rule is &lt;a href=&quot;QAbstractScrollArea.html&quot;&gt;&lt;tt&gt;QAbstractScrollArea&lt;/tt&gt;&lt;/a&gt; and its subclasses that map the context menu event to coordinates of the viewport()&lt;/tt&gt; .&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(com.trolltech.qt.core.QPoint pos)&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;a href=&quot;QWidget.html#mapToGlobal(com.trolltech.qt.core.QPoint)&quot;&gt;&lt;tt&gt;mapToGlobal&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QMenu.html#QMenu(java.lang.String, com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QMenu&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QWidget.html#contextMenuPolicy()&quot;&gt;&lt;tt&gt;contextMenuPolicy&lt;/tt&gt;&lt;/a&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <signal name="protected final void hovered(com.trolltech.qt.gui.QAction action)" doc="/**
&lt;p&gt;This signal is emitted when a menu action is highlighted; &lt;tt&gt;action&lt;/tt&gt; is the action that caused the signal to be emitted.&lt;/p&gt;
&lt;p&gt;Often this is used to update status information.&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(com.trolltech.qt.gui.QAction action)&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;a href=&quot;QMenu.html#triggered(com.trolltech.qt.gui.QAction)&quot;&gt;&lt;tt&gt;triggered&lt;/tt&gt;&lt;/a&gt;, &lt;tt&gt;QAction::hovered&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <signal name="protected final void triggered(com.trolltech.qt.gui.QAction action)" doc="/**
&lt;p&gt;This signal is emitted when an action in this menu is triggered; &lt;tt&gt;action&lt;/tt&gt; is the action that caused the signal to be emitted.&lt;/p&gt;
&lt;p&gt;Normally, you connect each menu action's triggered() signal to its own custom slot, but sometimes you will want to connect several actions to a single slot, for example, when you have a group of closely related actions, such as &amp;quot;left justify&amp;quot;, &amp;quot;center&amp;quot;, &amp;quot;right justify&amp;quot;.&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(com.trolltech.qt.gui.QAction action)&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;a href=&quot;QMenu.html#hovered(com.trolltech.qt.gui.QAction)&quot;&gt;&lt;tt&gt;hovered&lt;/tt&gt;&lt;/a&gt;, &lt;tt&gt;QAction::triggered&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <method name="public QMenu(com.trolltech.qt.gui.QWidget parent)" doc="/**
&lt;p&gt;Constructs a menu with parent &lt;tt&gt;parent&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Although a popup menu is always a top-level widget, if a parent is passed the popup menu will be deleted when that parent is destroyed (as with any other &lt;a href=&quot;%2E%2E/core/%2E%2E/core/QObject.html#QObject(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QObject&lt;/tt&gt;&lt;/a&gt;).&lt;/p&gt;
 */"/>
    <method name="public QMenu()" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QMenu.html#QMenu(java.lang.String, com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QMenu&lt;/tt&gt;&lt;/a&gt;(0). */"/>
    <method name="public QMenu(java.lang.String title, com.trolltech.qt.gui.QWidget parent)" doc="/**
&lt;p&gt;Constructs a menu with a &lt;tt&gt;title&lt;/tt&gt; and a &lt;tt&gt;parent&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Although a popup menu is always a top-level widget, if a parent is passed the popup menu will be deleted when that parent is destroyed (as with any other &lt;a href=&quot;%2E%2E/core/%2E%2E/core/QObject.html#QObject(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QObject&lt;/tt&gt;&lt;/a&gt;).&lt;/p&gt;

@see &lt;a href=&quot;QMenu.html#title()&quot;&gt;title&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QMenu(java.lang.String title)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QMenu.html#QMenu(java.lang.String, com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QMenu&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;title&lt;/tt&gt;, 0). */"/>
    <method name="public final com.trolltech.qt.gui.QAction actionAt(com.trolltech.qt.core.QPoint arg__1)" doc="/**
&lt;p&gt;Returns the item at &lt;tt&gt;arg__1&lt;/tt&gt;; returns 0 if there is no item there.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.core.QRect actionGeometry(com.trolltech.qt.gui.QAction arg__1)" doc="/**
&lt;p&gt;Returns the geometry of action &lt;tt&gt;arg__1&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.gui.QAction activeAction()" doc="/**
&lt;p&gt;Returns the currently highlighted action, or 0 if no action is currently highlighted.&lt;/p&gt;

@see &lt;a href=&quot;QMenu.html#setActiveAction(com.trolltech.qt.gui.QAction)&quot;&gt;&lt;tt&gt;setActiveAction&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QAction addAction(java.lang.String text)" doc="/**
&lt;p&gt;This convenience function creates a new action with &lt;tt&gt;text&lt;/tt&gt;. The function adds the newly created action to the menu's list of actions, and returns it.&lt;/p&gt;

@see &lt;tt&gt;QWidget::addAction&lt;/tt&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QAction addAction(com.trolltech.qt.gui.QIcon icon, java.lang.String text)" doc="/**
&lt;p&gt;This convenience function creates a new action with an &lt;tt&gt;icon&lt;/tt&gt; and some &lt;tt&gt;text&lt;/tt&gt;. The function adds the newly created action to the menu's list of actions, and returns it.&lt;/p&gt;

@see &lt;tt&gt;QWidget::addAction&lt;/tt&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QAction addMenu(com.trolltech.qt.gui.QMenu menu)" doc="/**
&lt;p&gt;This convenience function adds &lt;tt&gt;menu&lt;/tt&gt; as a submenu to this menu. It returns the menus &lt;a href=&quot;QMenu.html#menuAction()&quot;&gt;&lt;tt&gt;menuAction&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;tt&gt;QWidget::addAction&lt;/tt&gt;
@see &lt;tt&gt;QMenu::menuAction&lt;/tt&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QMenu addMenu(com.trolltech.qt.gui.QIcon icon, java.lang.String title)" doc="/**
&lt;p&gt;Appends a new &lt;a href=&quot;QMenu.html#QMenu(java.lang.String, com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QMenu&lt;/tt&gt;&lt;/a&gt; with &lt;tt&gt;icon&lt;/tt&gt; and &lt;tt&gt;title&lt;/tt&gt; to the menu. The menu takes ownership of the menu. Returns the new menu.&lt;/p&gt;

@see &lt;tt&gt;QWidget::addAction&lt;/tt&gt;
@see &lt;tt&gt;QMenu::menuAction&lt;/tt&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QMenu addMenu(java.lang.String title)" doc="/**
&lt;p&gt;Appends a new &lt;a href=&quot;QMenu.html#QMenu(java.lang.String, com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QMenu&lt;/tt&gt;&lt;/a&gt; with &lt;tt&gt;title&lt;/tt&gt; to the menu. The menu takes ownership of the menu. Returns the new menu.&lt;/p&gt;

@see &lt;tt&gt;QWidget::addAction&lt;/tt&gt;
@see &lt;tt&gt;QMenu::menuAction&lt;/tt&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QAction addSeparator()" doc="/**
&lt;p&gt;This convenience function creates a new separator action, i.e&amp;#x2e; an action with QAction::isSeparator() returning true, and adds the new action to this menu's list of actions. It returns the newly created action.&lt;/p&gt;

@see &lt;tt&gt;QWidget::addAction&lt;/tt&gt; */"/>
    <method name="public final void clear()" doc="/**
&lt;p&gt;Removes all the menu's actions. Actions owned by the menu and not shown in any other widget are deleted.&lt;/p&gt;

@see &lt;a href=&quot;QWidget.html#removeAction(com.trolltech.qt.gui.QAction)&quot;&gt;&lt;tt&gt;removeAction&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected final int columnCount()" doc="/**
&lt;p&gt;If a menu does not fit on the screen it lays itself out so that it does fit. It is style dependent what layout means (for example, on Windows it will use multiple columns).&lt;/p&gt;
&lt;p&gt;This functions returns the number of columns necessary.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.gui.QAction defaultAction()" doc="/**
&lt;p&gt;Returns the current default action.&lt;/p&gt;

@see &lt;a href=&quot;QMenu.html#setDefaultAction(com.trolltech.qt.gui.QAction)&quot;&gt;&lt;tt&gt;setDefaultAction&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QAction exec(com.trolltech.qt.core.QPoint pos, com.trolltech.qt.gui.QAction at)" doc="/**
&lt;p&gt;Executes this menu synchronously.&lt;/p&gt;
&lt;p&gt;Pops up the menu so that the action &lt;tt&gt;at&lt;/tt&gt; will be at the specified &lt;i&gt;global&lt;/i&gt; position &lt;tt&gt;pos&lt;/tt&gt;. To translate a widget's local coordinates into global coordinates, use QWidget::mapToGlobal().&lt;/p&gt;
&lt;p&gt;This returns the triggered &lt;a href=&quot;QAction.html&quot;&gt;&lt;tt&gt;QAction&lt;/tt&gt;&lt;/a&gt; in either the popup menu or one of its submenus, or 0 if no item was triggered (normally because the user pressed Esc).&lt;/p&gt;
&lt;p&gt;Note that all signals are emitted as usual. If you connect a &lt;a href=&quot;QAction.html&quot;&gt;&lt;tt&gt;QAction&lt;/tt&gt;&lt;/a&gt; to a slot and call the menu's &lt;a href=&quot;QMenu.html#exec(java.util.List&lt;com.trolltech.qt.gui.QAction&gt;, com.trolltech.qt.core.QPoint, com.trolltech.qt.gui.QAction)&quot;&gt;&lt;tt&gt;exec&lt;/tt&gt;&lt;/a&gt;, you get the result both via the signal-slot connection and in the return value of &lt;a href=&quot;QMenu.html#exec(java.util.List&lt;com.trolltech.qt.gui.QAction&gt;, com.trolltech.qt.core.QPoint, com.trolltech.qt.gui.QAction)&quot;&gt;&lt;tt&gt;exec&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Common usage is to position the menu at the current mouse position:&lt;/p&gt;
&lt;pre&gt;    exec(QCursor::pos());&lt;/pre&gt;
&lt;p&gt;or aligned to a widget:&lt;/p&gt;
&lt;pre&gt;    exec(somewidget.mapToGlobal(QPoint(0, 0)));&lt;/pre&gt;
&lt;p&gt;or in reaction to a &lt;a href=&quot;QMouseEvent.html&quot;&gt;&lt;tt&gt;QMouseEvent&lt;/tt&gt;&lt;/a&gt; *e:&lt;/p&gt;
&lt;pre&gt;    exec(e-&amp;gt;globalPos());&lt;/pre&gt;
&lt;p&gt;When positioning a menu with &lt;a href=&quot;QMenu.html#exec(java.util.List&lt;com.trolltech.qt.gui.QAction&gt;, com.trolltech.qt.core.QPoint, com.trolltech.qt.gui.QAction)&quot;&gt;&lt;tt&gt;exec&lt;/tt&gt;&lt;/a&gt; or &lt;a href=&quot;QMenu.html#popup(com.trolltech.qt.core.QPoint, com.trolltech.qt.gui.QAction)&quot;&gt;&lt;tt&gt;popup&lt;/tt&gt;&lt;/a&gt;, bear in mind that you cannot rely on the menu's current &lt;a href=&quot;QWidget.html#size()&quot;&gt;&lt;tt&gt;size&lt;/tt&gt;&lt;/a&gt;. For performance reasons, the menu adapts its size only when necessary. So in many cases, the size before and after the show is different. Instead, use &lt;a href=&quot;QMenu.html#sizeHint()&quot;&gt;&lt;tt&gt;sizeHint&lt;/tt&gt;&lt;/a&gt; which calculates the proper size depending on the menu's current contents.&lt;/p&gt;

@see &lt;a href=&quot;QMenu.html#popup(com.trolltech.qt.core.QPoint, com.trolltech.qt.gui.QAction)&quot;&gt;&lt;tt&gt;popup&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QWidget::mapToGlobal&lt;/tt&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QAction exec(com.trolltech.qt.core.QPoint pos)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QMenu.html#exec(java.util.List&lt;com.trolltech.qt.gui.QAction&gt;, com.trolltech.qt.core.QPoint, com.trolltech.qt.gui.QAction)&quot;&gt;exec&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;pos&lt;/tt&gt;, 0). */"/>
    <method name="public final com.trolltech.qt.gui.QAction exec()" doc="/**
&lt;p&gt;Executes this menu synchronously.&lt;/p&gt;
&lt;p&gt;This is equivalent to &lt;tt&gt;exec(pos())&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;This returns the triggered &lt;a href=&quot;QAction.html&quot;&gt;&lt;tt&gt;QAction&lt;/tt&gt;&lt;/a&gt; in either the popup menu or one of its submenus, or 0 if no item was triggered (normally because the user pressed Esc).&lt;/p&gt;
&lt;p&gt;In most situations you'll want to specify the position yourself, for example, the current mouse position:&lt;/p&gt;
&lt;pre&gt;    exec(QCursor::pos());&lt;/pre&gt;
&lt;p&gt;or aligned to a widget:&lt;/p&gt;
&lt;pre&gt;    exec(somewidget.mapToGlobal(QPoint(0,0)));&lt;/pre&gt;
&lt;p&gt;or in reaction to a &lt;a href=&quot;QMouseEvent.html&quot;&gt;&lt;tt&gt;QMouseEvent&lt;/tt&gt;&lt;/a&gt; *e:&lt;/p&gt;
&lt;pre&gt;    exec(e-&amp;gt;globalPos());&lt;/pre&gt;
 */"/>
    <method name="public final void hideTearOffMenu()" doc="/**
&lt;p&gt;This function will forcibly hide the torn off menu making it disappear from the users desktop.&lt;/p&gt;

@see &lt;a href=&quot;QMenu.html#isTearOffMenuVisible()&quot;&gt;&lt;tt&gt;isTearOffMenuVisible&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMenu.html#isTearOffEnabled()&quot;&gt;&lt;tt&gt;isTearOffEnabled&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QIcon icon()" doc="/**
&lt;p&gt;Returns The icon of the menu.&lt;/p&gt;
&lt;p&gt;This is equivalent to the QAction::icon property of the &lt;a href=&quot;QMenu.html#menuAction()&quot;&gt;&lt;tt&gt;menuAction&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QMenu.html#setIcon(com.trolltech.qt.gui.QIcon)&quot;&gt;&lt;tt&gt;setIcon&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QAction insertMenu(com.trolltech.qt.gui.QAction before, com.trolltech.qt.gui.QMenu menu)" doc="/**
&lt;p&gt;This convenience function inserts &lt;tt&gt;menu&lt;/tt&gt; before action &lt;tt&gt;before&lt;/tt&gt; and returns the menus &lt;a href=&quot;QMenu.html#menuAction()&quot;&gt;&lt;tt&gt;menuAction&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;tt&gt;QWidget::insertAction&lt;/tt&gt;
@see &lt;a href=&quot;QMenu.html#addMenu(java.lang.String)&quot;&gt;&lt;tt&gt;addMenu&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QAction insertSeparator(com.trolltech.qt.gui.QAction before)" doc="/**
&lt;p&gt;This convenience function creates a new separator action, i.e&amp;#x2e; an action with QAction::isSeparator() returning true. The function inserts the newly created action into this menu's list of actions before action &lt;tt&gt;before&lt;/tt&gt; and returns it.&lt;/p&gt;

@see &lt;tt&gt;QWidget::insertAction&lt;/tt&gt;
@see &lt;a href=&quot;QMenu.html#addSeparator()&quot;&gt;&lt;tt&gt;addSeparator&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean isEmpty()" doc="/**
&lt;p&gt;Returns true if there are no actions inserted into the menu, false otherwise.&lt;/p&gt;

@see &lt;tt&gt;QWidget::actions&lt;/tt&gt; */"/>
    <method name="public final boolean isTearOffEnabled()" doc="/**
&lt;p&gt;Returns whether the menu supports being torn off.&lt;/p&gt;
&lt;p&gt;When true, &lt;a href=&quot;QMenu.html#QMenu(java.lang.String, com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QMenu&lt;/tt&gt;&lt;/a&gt; has a special menu item (often shown as a dashed line at the top of the menu) that creates a copy of the menu when the tear-off menu item is triggered. This &amp;quot;torn-off&amp;quot; copy lives in a separate window. It contains the same menu items as the original menu, with the exception of the tear-off handle.&lt;/p&gt;
 */"/>
    <method name="public final boolean isTearOffMenuVisible()" doc="/**
&lt;p&gt;When a menu is torn off a second menu is shown to display the menu contents in a new window. When the menu is in this mode and the menu is visible returns true; otherwise false.&lt;/p&gt;

@see &lt;a href=&quot;QMenu.html#hideTearOffMenu()&quot;&gt;&lt;tt&gt;hideTearOffMenu&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QMenu.html#isTearOffEnabled()&quot;&gt;&lt;tt&gt;isTearOffEnabled&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QAction menuAction()" doc="/**
&lt;p&gt;Returns the action associated with this menu.&lt;/p&gt;
 */"/>
    <method name="public final void popup(com.trolltech.qt.core.QPoint pos, com.trolltech.qt.gui.QAction at)" doc="/**
&lt;p&gt;Displays the menu so that the action &lt;tt&gt;at&lt;/tt&gt; will be at the specified &lt;i&gt;global&lt;/i&gt; position &lt;tt&gt;pos&lt;/tt&gt;. To translate a widget's local coordinates into global coordinates, use QWidget::mapToGlobal().&lt;/p&gt;
&lt;p&gt;When positioning a menu with &lt;a href=&quot;QMenu.html#exec(java.util.List&lt;com.trolltech.qt.gui.QAction&gt;, com.trolltech.qt.core.QPoint, com.trolltech.qt.gui.QAction)&quot;&gt;&lt;tt&gt;exec&lt;/tt&gt;&lt;/a&gt; or &lt;a href=&quot;QMenu.html#popup(com.trolltech.qt.core.QPoint, com.trolltech.qt.gui.QAction)&quot;&gt;&lt;tt&gt;popup&lt;/tt&gt;&lt;/a&gt;, bear in mind that you cannot rely on the menu's current &lt;a href=&quot;QWidget.html#size()&quot;&gt;&lt;tt&gt;size&lt;/tt&gt;&lt;/a&gt;. For performance reasons, the menu adapts its size only when necessary, so in many cases, the size before and after the show is different. Instead, use &lt;a href=&quot;QMenu.html#sizeHint()&quot;&gt;&lt;tt&gt;sizeHint&lt;/tt&gt;&lt;/a&gt; which calculates the proper size depending on the menu's current contents.&lt;/p&gt;

@see &lt;tt&gt;QWidget::mapToGlobal&lt;/tt&gt;
@see &lt;a href=&quot;QMenu.html#exec(java.util.List&lt;com.trolltech.qt.gui.QAction&gt;, com.trolltech.qt.core.QPoint, com.trolltech.qt.gui.QAction)&quot;&gt;&lt;tt&gt;exec&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void popup(com.trolltech.qt.core.QPoint pos)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QMenu.html#popup(com.trolltech.qt.core.QPoint, com.trolltech.qt.gui.QAction)&quot;&gt;popup&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;pos&lt;/tt&gt;, 0). */"/>
    <method name="public final boolean separatorsCollapsible()" doc="/**
&lt;p&gt;Returns whether consecutive separators should be collapsed.&lt;/p&gt;
&lt;p&gt;This property specifies whether consecutive separators in the menu should be visually collapsed to a single one. Separators at the beginning or the end of the menu are also hidden.&lt;/p&gt;

@see &lt;a href=&quot;QMenu.html#setSeparatorsCollapsible(boolean)&quot;&gt;&lt;tt&gt;setSeparatorsCollapsible&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setActiveAction(com.trolltech.qt.gui.QAction act)" doc="/**
&lt;p&gt;Sets the currently highlighted action to &lt;tt&gt;act&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QMenu.html#activeAction()&quot;&gt;&lt;tt&gt;activeAction&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setDefaultAction(com.trolltech.qt.gui.QAction arg__1)" doc="/**
&lt;p&gt;This will set the default action to &lt;tt&gt;arg__1&lt;/tt&gt;. The default action may have a visual queue depending on the current &lt;a href=&quot;QStyle.html&quot;&gt;&lt;tt&gt;QStyle&lt;/tt&gt;&lt;/a&gt;. A default action is usually meant to indicate what will defaultly happen on a drop, as shown in a context menu.&lt;/p&gt;

@see &lt;a href=&quot;QMenu.html#defaultAction()&quot;&gt;&lt;tt&gt;defaultAction&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setIcon(com.trolltech.qt.gui.QIcon icon)" doc="/**
&lt;p&gt;Sets The icon of the menu to &lt;tt&gt;icon&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;This is equivalent to the QAction::icon property of the &lt;a href=&quot;QMenu.html#menuAction()&quot;&gt;&lt;tt&gt;menuAction&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QMenu.html#icon()&quot;&gt;&lt;tt&gt;icon&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setSeparatorsCollapsible(boolean collapse)" doc="/**
&lt;p&gt;Sets whether consecutive separators should be collapsed to &lt;tt&gt;collapse&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;This property specifies whether consecutive separators in the menu should be visually collapsed to a single one. Separators at the beginning or the end of the menu are also hidden.&lt;/p&gt;

@see &lt;a href=&quot;QMenu.html#separatorsCollapsible()&quot;&gt;&lt;tt&gt;separatorsCollapsible&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setTearOffEnabled(boolean arg__1)" doc="/**
&lt;p&gt;Sets whether the menu supports being torn off to &lt;tt&gt;arg__1&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;When true, &lt;a href=&quot;QMenu.html#QMenu(java.lang.String, com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QMenu&lt;/tt&gt;&lt;/a&gt; has a special menu item (often shown as a dashed line at the top of the menu) that creates a copy of the menu when the tear-off menu item is triggered. This &amp;quot;torn-off&amp;quot; copy lives in a separate window. It contains the same menu items as the original menu, with the exception of the tear-off handle.&lt;/p&gt;

@see &lt;a href=&quot;QMenu.html#isTearOffEnabled()&quot;&gt;&lt;tt&gt;isTearOffEnabled&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setTitle(java.lang.String title)" doc="/**
&lt;p&gt;Sets The title of the menu to &lt;tt&gt;title&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;This is equivalent to the QAction::text property of the &lt;a href=&quot;QMenu.html#menuAction()&quot;&gt;&lt;tt&gt;menuAction&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QMenu.html#title()&quot;&gt;&lt;tt&gt;title&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.lang.String title()" doc="/**
&lt;p&gt;Returns The title of the menu.&lt;/p&gt;
&lt;p&gt;This is equivalent to the QAction::text property of the &lt;a href=&quot;QMenu.html#menuAction()&quot;&gt;&lt;tt&gt;menuAction&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QMenu.html#setTitle(java.lang.String)&quot;&gt;&lt;tt&gt;setTitle&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected void actionEvent(com.trolltech.qt.gui.QActionEvent arg__1)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="protected void changeEvent(com.trolltech.qt.core.QEvent arg__1)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="protected void enterEvent(com.trolltech.qt.core.QEvent arg__1)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&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;
 */"/>
    <method name="protected boolean focusNextPrevChild(boolean next)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="protected void hideEvent(com.trolltech.qt.gui.QHideEvent arg__1)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="protected void keyPressEvent(com.trolltech.qt.gui.QKeyEvent arg__1)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="protected void leaveEvent(com.trolltech.qt.core.QEvent arg__1)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="protected void mouseMoveEvent(com.trolltech.qt.gui.QMouseEvent arg__1)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="protected void mousePressEvent(com.trolltech.qt.gui.QMouseEvent arg__1)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="protected void mouseReleaseEvent(com.trolltech.qt.gui.QMouseEvent arg__1)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="protected void paintEvent(com.trolltech.qt.gui.QPaintEvent arg__1)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public com.trolltech.qt.core.QSize sizeHint()" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="protected void timerEvent(com.trolltech.qt.core.QTimerEvent arg__1)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="protected void wheelEvent(com.trolltech.qt.gui.QWheelEvent arg__1)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public static com.trolltech.qt.gui.QAction exec(java.util.List&lt;com.trolltech.qt.gui.QAction&gt; actions, com.trolltech.qt.core.QPoint pos, com.trolltech.qt.gui.QAction at)" doc="/**
&lt;p&gt;Executes this menu synchronously.&lt;/p&gt;
&lt;p&gt;The menu's actions are specified by the list of &lt;tt&gt;actions&lt;/tt&gt;. The menu will pop up so that the specified action, &lt;tt&gt;at&lt;/tt&gt;, appears at global position &lt;tt&gt;pos&lt;/tt&gt;. If &lt;tt&gt;at&lt;/tt&gt; is not specified then the menu appears at position &lt;tt&gt;pos&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;The function returns the triggered &lt;a href=&quot;QAction.html&quot;&gt;&lt;tt&gt;QAction&lt;/tt&gt;&lt;/a&gt; in either the popup menu or one of its submenus, or 0 if no item was triggered (normally because the user pressed Esc).&lt;/p&gt;
&lt;p&gt;This is equivalent to:&lt;/p&gt;
&lt;pre&gt;    QMenu menu;
    QAction *at = actions[0]; &lt;span class=&quot;comment&quot;&gt;// Assumes actions is not empty&lt;/span&gt;
    foreach (QAction *a, actions)
       menu.addAction(a);
    menu.exec(pos, at);&lt;/pre&gt;

@see &lt;a href=&quot;QMenu.html#popup(com.trolltech.qt.core.QPoint, com.trolltech.qt.gui.QAction)&quot;&gt;&lt;tt&gt;popup&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QWidget::mapToGlobal&lt;/tt&gt; */"/>
    <method name="public static com.trolltech.qt.gui.QAction exec(java.util.List&lt;com.trolltech.qt.gui.QAction&gt; actions, com.trolltech.qt.core.QPoint pos)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QMenu.html#exec(java.util.List&lt;com.trolltech.qt.gui.QAction&gt;, com.trolltech.qt.core.QPoint, com.trolltech.qt.gui.QAction)&quot;&gt;exec&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;actions&lt;/tt&gt;, &lt;tt&gt;pos&lt;/tt&gt;, 0). */"/>
</class>