com.trolltech.qt.core
Enum Qt.WidgetAttribute

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

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

This enum type is used to specify various widget attributes. Attributes are set and cleared with QWidget::setAttribute(), and queried with QWidget::testAttribute(), although some have special convenience functions which are mentioned below.


Enum Constant Summary
WA_AcceptDrops
          Allows data from drag and drop operations to be dropped onto the widget (see QWidget::setAcceptDrops()).
WA_AlwaysShowToolTips
          Enables tooltips for inactive windows.
WA_AttributeCount
          Internal.
WA_CanHostQMdiSubWindowTitleBar
          Internal.
WA_ContentsPropagated
          This flag is superfluous and obsolete; it no longer has any effect.
WA_CustomWhatsThis
          Indicates that the widget wants to continue operating normally in "What's This?" mode.
WA_DeleteOnClose
          Makes Qt delete this widget when the widget has accepted the close event (see QWidget::closeEvent()).
WA_Disabled
          Indicates that the widget is disabled, i.e. it does not receive any mouse or keyboard events.
WA_DropSiteRegistered
          Internal.
WA_ForceDisabled
          Indicates that the widget is explicitly disabled, i.e. it will remain disabled even when all its ancestors are set to the enabled state.
WA_ForceUpdatesDisabled
          Indicates that updates are explicitly disabled for the widget; i.e. it will remain disabled even when all its ancestors are set to the updates-enabled state.
WA_GrabbedShortcut
          Internal.
WA_GroupLeader
          This attribute has been deprecated. Use QWidget::windowModality instead.
WA_Hover
          Forces Qt to generate paint events when the mouse enters or leaves the widget.
WA_InputMethodEnabled
          Enables input methods for Asian languages.
WA_InputMethodTransparent
          Internal.
WA_InvalidSize
          Internal.
WA_KeyboardFocusChange
          Set on a toplevel window when the users changes focus with the keyboard (tab, backtab, or shortcut).
WA_KeyCompression
          Enables key event compression if set, and disables it if not set.
WA_LaidOut
          Internal.
WA_LayoutOnEntireRect
          Indicates that the widget wants QLayout to operate on the entire QWidget::rect(), not only on QWidget::contentsRect().
WA_LayoutUsesWidgetRect
          Ignore the layout item rect from the style when laying out this widget with QLayout.
WA_MacAlwaysShowToolWindow
          On Mac OS X, show the tool window even when the application is not active.
WA_MacBrushedMetal
          Indicates the widget should be drawn in the brushed metal style as supported by the windowing system.
WA_MacMiniSize
          Indicates the widget should have the mini size for widgets in Mac OS X.
WA_MacNoClickThrough
          Indicates that the window is only activated when clicked.
WA_MacNormalSize
          Indicates the widget should have the normal size for widgets in Mac OS X.
WA_MacOpaqueSizeGrip
          Indicates that the native Carbon size grip should be opaque instead of transparent (the default).
WA_MacShowFocusRect
          Indicates that this widget should get a QFocusFrame around it.
WA_MacSmallSize
          Indicates the widget should have the small size for widgets in Mac OS X.
WA_Mapped
          Indicates that the widget is mapped on screen.
WA_MouseNoMask
          Makes the widget receive mouse events for the entire widget regardless of the currently set mask.
WA_MouseTracking
          Indicates that the widget has mouse tracking enabled.
WA_Moved
          Indicates that the widget has an explicit position.
WA_MSWindowsUseDirect3D
          Makes drawing to a widget with this attribute set use the Direct3D paint engine, if the Direct3D paint engine is available.
WA_NoChildEventsForParent
          Indicates that the widget does not want ChildAdded or ChildRemoved events sent to its parent.
WA_NoChildEventsFromChildren
          Indicates that the widget does not want to receive ChildAdded or ChildRemoved events sent from its children.
WA_NoMousePropagation
          Prohibits mouse events from being propagated to the widget's parent.
WA_NoMouseReplay
          Used for popup widgets.
WA_NoSystemBackground
          Indicates that the widget has no background, i.e. when the widget receives paint events, the background is not automatically repainted.
WA_NoX11EventCompression
          Internal.
WA_OpaquePaintEvent
          Indicates that the widget paints all its pixels when it receives a paint event.
WA_OutsideWSRange
          Indicates that the widget is outside the valid range of the window system's coordinate system.
WA_PaintOnScreen
          Indicates that the widget wants to draw directly onto the screen.
WA_PaintOutsidePaintEvent
          Makes it possible to use QPainter to paint on the widget outside paintEvent().
WA_PaintUnclipped
          Makes all painters operating on this widget unclipped.
WA_PendingMoveEvent
          Indicates that a move event is pending, e.g. when a hidden widget was moved.
WA_PendingResizeEvent
          Indicates that a resize event is pending, e.g. when a hidden widget was resized.
WA_PendingUpdate
          Internal.
WA_QuitOnClose
          Makes Qt quit the application when the last widget with the attribute set has accepted closeEvent().
WA_Resized
          Indicates that the widget has an explicit size.
WA_RightToLeft
          Indicates that the layout direction for the widget is right to left.
WA_SetCursor
          Indicates that the widget has a cursor of its own.
WA_SetFont
          Indicates that the widget has a font of its own.
WA_SetLayoutDirection
          Internal.
WA_SetLocale
          Indicates the local should be taken into consideration in the widget.
WA_SetPalette
          Indicates that the widget has a palette of its own.
WA_SetStyle
          Indicates that the widget has a style of its own.
WA_SetWindowIcon
          Internal.
WA_ShowModal
          This attribute has been deprecated. Use QWidget::windowModality instead.
WA_StaticContents
          Indicates that the widget contents are north-west aligned and static.
WA_StyledBackground
          Indicates the widget should be drawn using a styled background.
WA_StyleSheet
          Indicates that the widget is styled using a style sheet.
WA_TintedBackground
          Internal.
WA_TransparentForMouseEvents
          Internal.
WA_UnderMouse
          Indicates that the widget is under the mouse cursor.
WA_UpdatesDisabled
          Indicates that updates are blocked (including the system background).
WA_WindowModified
          Indicates that the window is marked as modified.
WA_WindowPropagation
          Makes a toplevel window inherit font and palette from its parent.
WA_WState_CompressKeys
          Internal.
WA_WState_ConfigPending
          Internal.
WA_WState_Created
          Internal.
WA_WState_DND
          Internal.
WA_WState_ExplicitShowHide
          Internal.
WA_WState_Hidden
          Internal.
WA_WState_InPaintEvent
          Internal.
WA_WState_OwnSizePolicy
          Internal.
WA_WState_Polished
          Internal.
WA_WState_Reparented
          Internal.
WA_WState_Visible
          Internal.
WA_X11OpenGLOverlay
          Internal.
 
Method Summary
static Qt.WidgetAttribute resolve(int value)
           
 int value()
           
static Qt.WidgetAttribute valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Qt.WidgetAttribute[] 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

WA_Disabled

public static final Qt.WidgetAttribute WA_Disabled

Indicates that the widget is disabled, i.e. it does not receive any mouse or keyboard events. There is also a getter functions QWidget::isEnabled(). This is set/cleared by the Qt kernel.


WA_UnderMouse

public static final Qt.WidgetAttribute WA_UnderMouse

Indicates that the widget is under the mouse cursor. The value is not updated correctly during drag and drop operations. There is also a getter function QWidget::underMouse(). This is set/cleared by the Qt kernel.


WA_MouseTracking

public static final Qt.WidgetAttribute WA_MouseTracking

Indicates that the widget has mouse tracking enabled. See QWidget::mouseTracking.


WA_ContentsPropagated

public static final Qt.WidgetAttribute WA_ContentsPropagated

This flag is superfluous and obsolete; it no longer has any effect. Since Qt 4.1, all widgets that do not set WA_PaintOnScreen propagate their contents.


WA_OpaquePaintEvent

public static final Qt.WidgetAttribute WA_OpaquePaintEvent

Indicates that the widget paints all its pixels when it receives a paint event. It is thus not required for operations like updating, resizing, scrolling and focus changes to erase the widget before generating paint events. Using WA_OpaquePaintEvent is a small optimization. It can help to reduce flicker on systems that do not provide double buffer support, and it avoids the computational cycles necessary to erase the background prior to paint. Note: Unlike WA_NoSystemBackground, WA_OpaquePaintEvent makes an effort to avoid transparent window backgrounds. This is set/cleared by the widget's author.


WA_StaticContents

public static final Qt.WidgetAttribute WA_StaticContents

Indicates that the widget contents are north-west aligned and static. On resize, such a widget will receive paint events only for the newly visible part of itself. This is set/cleared by the widget's author.


WA_LaidOut

public static final Qt.WidgetAttribute WA_LaidOut
Internal.


WA_PaintOnScreen

public static final Qt.WidgetAttribute WA_PaintOnScreen

Indicates that the widget wants to draw directly onto the screen. Widgets with this attribute set do not participate in composition management, i.e. they cannot be semi-transparent or shine through semi-transparent overlapping widgets. This is only supported on X11. The flag is set or cleared by the widget's author. For rendering outside of Qt's paint system; e.g. if you need to use native X11 painting primitives, you need to reimplement QWidget::paintEngine() to return 0 and set this flag.


WA_NoSystemBackground

public static final Qt.WidgetAttribute WA_NoSystemBackground

Indicates that the widget has no background, i.e. when the widget receives paint events, the background is not automatically repainted. Note: Unlike WA_OpaquePaintEvent, newly exposed areas are never filled with the background (e.g after showing a window for the first time the user can see "through" it until the application processes the paint events). Setting this flag implicitly disables double buffering for the widget. This is set/cleared by the widget's author.


WA_UpdatesDisabled

public static final Qt.WidgetAttribute WA_UpdatesDisabled

Indicates that updates are blocked (including the system background). This flag must never be set/cleared by the widget author. It is set/cleared by the Qt kernel.


WA_Mapped

public static final Qt.WidgetAttribute WA_Mapped

Indicates that the widget is mapped on screen. This is set/cleared by the Qt kernel.


WA_MacNoClickThrough

public static final Qt.WidgetAttribute WA_MacNoClickThrough

Indicates that the window is only activated when clicked.


WA_PaintOutsidePaintEvent

public static final Qt.WidgetAttribute WA_PaintOutsidePaintEvent

Makes it possible to use QPainter to paint on the widget outside paintEvent(). This is not supported on Windows, Mac OS X or Qtopia Core. We recommend that you use this attribute only when porting Qt 3 code to Qt 4.


WA_InputMethodEnabled

public static final Qt.WidgetAttribute WA_InputMethodEnabled

Enables input methods for Asian languages. Must be set when creating custom text editing widgets.


WA_WState_Visible

public static final Qt.WidgetAttribute WA_WState_Visible
Internal.


WA_WState_Hidden

public static final Qt.WidgetAttribute WA_WState_Hidden
Internal.


WA_ForceDisabled

public static final Qt.WidgetAttribute WA_ForceDisabled

Indicates that the widget is explicitly disabled, i.e. it will remain disabled even when all its ancestors are set to the enabled state. This implies WA_Disabled. This is set/cleared by QWidget::setEnabled() and QWidget::setDisabled().


WA_KeyCompression

public static final Qt.WidgetAttribute WA_KeyCompression

Enables key event compression if set, and disables it if not set. By default key compression is off, so widgets receive one key press event for each key press (or more, since autorepeat is usually on). If you turn it on and your program doesn't keep up with key input, Qt may try to compress key events so that more than one character can be processed in each event. For example, a word processor widget might receive 2, 3 or more characters in each QKeyEvent::text(), if the layout recalculation takes too long for the CPU. If a widget supports multiple character unicode input, it is always safe to turn the compression on. Qt performs key event compression only for printable characters. Qt::Modifier keys, cursor movement keys, function keys and miscellaneous action keys (e.g. Escape, Enter, Backspace, PrintScreen) will stop key event compression, even if there are more compressible key events available. Not all platforms support this compression, in which case turning it on will have no effect. This is set/cleared by the widget's author.


WA_PendingMoveEvent

public static final Qt.WidgetAttribute WA_PendingMoveEvent

Indicates that a move event is pending, e.g. when a hidden widget was moved. This is set/cleared by the Qt kernel.


WA_PendingResizeEvent

public static final Qt.WidgetAttribute WA_PendingResizeEvent

Indicates that a resize event is pending, e.g. when a hidden widget was resized. This is set/cleared by the Qt kernel.


WA_SetPalette

public static final Qt.WidgetAttribute WA_SetPalette

Indicates that the widget has a palette of its own. This is set/cleared by QWidget::setPalette().


WA_SetFont

public static final Qt.WidgetAttribute WA_SetFont

Indicates that the widget has a font of its own. This is set/cleared by QWidget::setFont().


WA_SetCursor

public static final Qt.WidgetAttribute WA_SetCursor

Indicates that the widget has a cursor of its own. This is set/cleared by QWidget::setCursor() and QWidget::unsetCursor().


WA_NoChildEventsFromChildren

public static final Qt.WidgetAttribute WA_NoChildEventsFromChildren

Indicates that the widget does not want to receive ChildAdded or ChildRemoved events sent from its children. This is set by a widget's author.


WA_WindowModified

public static final Qt.WidgetAttribute WA_WindowModified

Indicates that the window is marked as modified. On some platforms this will mean nothing, on others (including Mac OS X and Windows) the window will take a modified appearance. This is set/cleared by QWidget::setWindowModified().


WA_Resized

public static final Qt.WidgetAttribute WA_Resized

Indicates that the widget has an explicit size. This is set/cleared by QWidget::resize() and by QWidget::setGeometry().


WA_Moved

public static final Qt.WidgetAttribute WA_Moved

Indicates that the widget has an explicit position. This is set/cleared by QWidget::move() and by QWidget::setGeometry().


WA_PendingUpdate

public static final Qt.WidgetAttribute WA_PendingUpdate
Internal.


WA_InvalidSize

public static final Qt.WidgetAttribute WA_InvalidSize
Internal.


WA_MacBrushedMetal

public static final Qt.WidgetAttribute WA_MacBrushedMetal

Indicates the widget should be drawn in the brushed metal style as supported by the windowing system. This attribute is only applicable to Mac OS X.


WA_CustomWhatsThis

public static final Qt.WidgetAttribute WA_CustomWhatsThis

Indicates that the widget wants to continue operating normally in "What's This?" mode. This is set by the widget's author.


WA_LayoutOnEntireRect

public static final Qt.WidgetAttribute WA_LayoutOnEntireRect

Indicates that the widget wants QLayout to operate on the entire QWidget::rect(), not only on QWidget::contentsRect(). This is set by the widget's author.


WA_OutsideWSRange

public static final Qt.WidgetAttribute WA_OutsideWSRange

Indicates that the widget is outside the valid range of the window system's coordinate system. A widget outside the valid range cannot be mapped on screen. This is set/cleared by the Qt kernel.


WA_GrabbedShortcut

public static final Qt.WidgetAttribute WA_GrabbedShortcut
Internal.


WA_TransparentForMouseEvents

public static final Qt.WidgetAttribute WA_TransparentForMouseEvents
Internal.


WA_PaintUnclipped

public static final Qt.WidgetAttribute WA_PaintUnclipped

Makes all painters operating on this widget unclipped. Children of this widget or other widgets in front of it do not clip the area the painter can paint on. This flag is only supported for widgets for which the WA_PaintOnScreen flag is set. The preferred way to do this in a cross platform way is to create a transparent widget that lies in front of the other widgets.


WA_SetWindowIcon

public static final Qt.WidgetAttribute WA_SetWindowIcon
Internal.


WA_NoMouseReplay

public static final Qt.WidgetAttribute WA_NoMouseReplay

Used for popup widgets. Indicates that the most recent mouse press event should not be replayed when the popup widget closes. The flag is set by the widget's author and cleared by the Qt kernel every time the widget receives a new mouse event.


WA_DeleteOnClose

public static final Qt.WidgetAttribute WA_DeleteOnClose

Makes Qt delete this widget when the widget has accepted the close event (see QWidget::closeEvent()).


WA_RightToLeft

public static final Qt.WidgetAttribute WA_RightToLeft

Indicates that the layout direction for the widget is right to left.


WA_SetLayoutDirection

public static final Qt.WidgetAttribute WA_SetLayoutDirection
Internal.


WA_NoChildEventsForParent

public static final Qt.WidgetAttribute WA_NoChildEventsForParent

Indicates that the widget does not want ChildAdded or ChildRemoved events sent to its parent. This is rarely necessary but can help to avoid automatic insertion widgets like splitters and layouts. This is set by a widget's author.


WA_ForceUpdatesDisabled

public static final Qt.WidgetAttribute WA_ForceUpdatesDisabled

Indicates that updates are explicitly disabled for the widget; i.e. it will remain disabled even when all its ancestors are set to the updates-enabled state. This implies WA_UpdatesDisabled. This is set/cleared by QWidget::setUpdatesEnabled().


WA_WState_Created

public static final Qt.WidgetAttribute WA_WState_Created
Internal.


WA_WState_CompressKeys

public static final Qt.WidgetAttribute WA_WState_CompressKeys
Internal.


WA_WState_InPaintEvent

public static final Qt.WidgetAttribute WA_WState_InPaintEvent
Internal.


WA_WState_Reparented

public static final Qt.WidgetAttribute WA_WState_Reparented
Internal.


WA_WState_ConfigPending

public static final Qt.WidgetAttribute WA_WState_ConfigPending
Internal.


WA_WState_Polished

public static final Qt.WidgetAttribute WA_WState_Polished
Internal.


WA_WState_DND

public static final Qt.WidgetAttribute WA_WState_DND
Internal.


WA_WState_OwnSizePolicy

public static final Qt.WidgetAttribute WA_WState_OwnSizePolicy
Internal.


WA_WState_ExplicitShowHide

public static final Qt.WidgetAttribute WA_WState_ExplicitShowHide
Internal.


WA_ShowModal

public static final Qt.WidgetAttribute WA_ShowModal

This attribute has been deprecated. Use QWidget::windowModality instead.


WA_MouseNoMask

public static final Qt.WidgetAttribute WA_MouseNoMask

Makes the widget receive mouse events for the entire widget regardless of the currently set mask.


WA_GroupLeader

public static final Qt.WidgetAttribute WA_GroupLeader

This attribute has been deprecated. Use QWidget::windowModality instead.


WA_NoMousePropagation

public static final Qt.WidgetAttribute WA_NoMousePropagation

Prohibits mouse events from being propagated to the widget's parent.


WA_Hover

public static final Qt.WidgetAttribute WA_Hover

Forces Qt to generate paint events when the mouse enters or leaves the widget. This feature is typically used when implementing custom styles; see the Styles example for details.


WA_InputMethodTransparent

public static final Qt.WidgetAttribute WA_InputMethodTransparent
Internal.


WA_QuitOnClose

public static final Qt.WidgetAttribute WA_QuitOnClose

Makes Qt quit the application when the last widget with the attribute set has accepted closeEvent(). This behavior can be adjusted with the QApplication::quitOnLastWindowClosed property. By default the attribute is set for all widgets of type Qt::Window.


WA_KeyboardFocusChange

public static final Qt.WidgetAttribute WA_KeyboardFocusChange

Set on a toplevel window when the users changes focus with the keyboard (tab, backtab, or shortcut).


WA_AcceptDrops

public static final Qt.WidgetAttribute WA_AcceptDrops

Allows data from drag and drop operations to be dropped onto the widget (see QWidget::setAcceptDrops()).


WA_DropSiteRegistered

public static final Qt.WidgetAttribute WA_DropSiteRegistered
Internal.


WA_WindowPropagation

public static final Qt.WidgetAttribute WA_WindowPropagation

Makes a toplevel window inherit font and palette from its parent.


WA_NoX11EventCompression

public static final Qt.WidgetAttribute WA_NoX11EventCompression
Internal.


WA_TintedBackground

public static final Qt.WidgetAttribute WA_TintedBackground
Internal.


WA_X11OpenGLOverlay

public static final Qt.WidgetAttribute WA_X11OpenGLOverlay
Internal.


WA_AlwaysShowToolTips

public static final Qt.WidgetAttribute WA_AlwaysShowToolTips

Enables tooltips for inactive windows.


WA_MacOpaqueSizeGrip

public static final Qt.WidgetAttribute WA_MacOpaqueSizeGrip

Indicates that the native Carbon size grip should be opaque instead of transparent (the default). This attribute is only applicable to Mac OS X and is set by the widget's author.


WA_SetStyle

public static final Qt.WidgetAttribute WA_SetStyle

Indicates that the widget has a style of its own. This is set/cleared by QWidget::setStyle().


WA_SetLocale

public static final Qt.WidgetAttribute WA_SetLocale

Indicates the local should be taken into consideration in the widget.


WA_MacShowFocusRect

public static final Qt.WidgetAttribute WA_MacShowFocusRect

Indicates that this widget should get a QFocusFrame around it. Some widgets draw their own focus halo regardless of this attribute. Not that the QWidget::focusPolicy also plays the main role in whether something is given focus or not, this only controls whether or not this gets the focus frame. This attribute is only applicable to Mac OS X.


WA_MacNormalSize

public static final Qt.WidgetAttribute WA_MacNormalSize

Indicates the widget should have the normal size for widgets in Mac OS X. This attribute is only applicable to Mac OS X.


WA_MacSmallSize

public static final Qt.WidgetAttribute WA_MacSmallSize

Indicates the widget should have the small size for widgets in Mac OS X. This attribute is only applicable to Mac OS X.


WA_MacMiniSize

public static final Qt.WidgetAttribute WA_MacMiniSize

Indicates the widget should have the mini size for widgets in Mac OS X. This attribute is only applicable to Mac OS X.


WA_LayoutUsesWidgetRect

public static final Qt.WidgetAttribute WA_LayoutUsesWidgetRect

Ignore the layout item rect from the style when laying out this widget with QLayout. This makes a difference in QMacStyle and QPlastiqueStyle for some widgets.


WA_StyledBackground

public static final Qt.WidgetAttribute WA_StyledBackground

Indicates the widget should be drawn using a styled background.


WA_MSWindowsUseDirect3D

public static final Qt.WidgetAttribute WA_MSWindowsUseDirect3D

Makes drawing to a widget with this attribute set use the Direct3D paint engine, if the Direct3D paint engine is available. This functionality is experimental.


WA_CanHostQMdiSubWindowTitleBar

public static final Qt.WidgetAttribute WA_CanHostQMdiSubWindowTitleBar
Internal.


WA_MacAlwaysShowToolWindow

public static final Qt.WidgetAttribute WA_MacAlwaysShowToolWindow

On Mac OS X, show the tool window even when the application is not active. By default, all tool windows are hidden when the application is active.


WA_StyleSheet

public static final Qt.WidgetAttribute WA_StyleSheet

Indicates that the widget is styled using a style sheet.


WA_AttributeCount

public static final Qt.WidgetAttribute WA_AttributeCount
Internal.

Method Detail

values

public static final Qt.WidgetAttribute[] 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.WidgetAttribute c : Qt.WidgetAttribute.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.WidgetAttribute 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()
Specified by:
value in interface QtEnumerator

resolve

public static Qt.WidgetAttribute resolve(int value)