Qt Jambi Home

com.trolltech.qt.core
Enum Qt.ContextMenuPolicy

java.lang.Object
  extended by java.lang.Enum<Qt.ContextMenuPolicy>
      extended by com.trolltech.qt.core.Qt.ContextMenuPolicy
All Implemented Interfaces:
QtEnumerator, java.io.Serializable, java.lang.Comparable<Qt.ContextMenuPolicy>
Enclosing interface:
Qt

public static enum Qt.ContextMenuPolicy
extends java.lang.Enum<Qt.ContextMenuPolicy>
implements QtEnumerator

This enum type defines the various policies a widget can have with respect to showing a context menu.


Enum Constant Summary
ActionsContextMenu
          the widget displays its QWidget::actions() as context menu.
CustomContextMenu
          the widget emits the QWidget::customContextMenuRequested() signal.
DefaultContextMenu
          the widget's QWidget::contextMenuEvent() handler is called.
NoContextMenu
          the widget does not feature a context menu, context menu handling is deferred to the widget's parent.
PreventContextMenu
          the widget does not feature a context menu, and in contrast to NoContextMenu, the handling is not deferred to the widget's parent.
 
Method Summary
static Qt.ContextMenuPolicy resolve(int value)
           
 int value()
          This function should return an integer value for the enum values of the enumeration that implements this interface.
static Qt.ContextMenuPolicy valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Qt.ContextMenuPolicy[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NoContextMenu

public static final Qt.ContextMenuPolicy NoContextMenu

the widget does not feature a context menu, context menu handling is deferred to the widget's parent.


DefaultContextMenu

public static final Qt.ContextMenuPolicy DefaultContextMenu

the widget's QWidget::contextMenuEvent() handler is called.


ActionsContextMenu

public static final Qt.ContextMenuPolicy ActionsContextMenu

the widget displays its QWidget::actions() as context menu.


CustomContextMenu

public static final Qt.ContextMenuPolicy CustomContextMenu

the widget emits the QWidget::customContextMenuRequested() signal.


PreventContextMenu

public static final Qt.ContextMenuPolicy PreventContextMenu

the widget does not feature a context menu, and in contrast to NoContextMenu, the handling is not deferred to the widget's parent. This means that all right mouse button events are guaranteed to be delivered to the widget itself through mousePressEvent(), and mouseReleaseEvent().

Method Detail

values

public static final Qt.ContextMenuPolicy[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(Qt.ContextMenuPolicy c : Qt.ContextMenuPolicy.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static Qt.ContextMenuPolicy valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

value

public int value()
Description copied from interface: QtEnumerator
This function should return an integer value for the enum values of the enumeration that implements this interface.

Specified by:
value in interface QtEnumerator

resolve

public static Qt.ContextMenuPolicy resolve(int value)

Qt Jambi Home