Qt Jambi Home

com.trolltech.qt.core
Enum Qt.WindowType

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

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

This enum type is used to specify various window-system properties for the widget. They are fairly unusual but necessary in a few cases. Some of these flags depend on whether the underlying window manager supports them.

The main types are

ConstantValueDescription
Widget0This is the default type for QWidget. Widgets of this type are child widgets if they have a parent, and independent windows if they have no parent. See also Qt::Window and Qt::SubWindow.
Window1Indicates that the widget is a window, usually with a window system frame and a title bar, irrespective of whether the widget has a parent or not.
Dialog3Indicates that the widget is a window that should be decorated as a dialog (i.e., typically no maximize or minimize buttons in the title bar). This is the default type for QDialog. If you want to use it as a modal dialog, it should be launched from another window, or have a parent and used with the QWidget::windowModality property. If you make it modal, the dialog will prevent other top-level windows in the application from getting any input. We refer to a top-level window that has a parent as a secondary window.
Sheet5Indicates that the widget is a Macintosh sheet.
Drawer7Indicates that the widget is a Macintosh drawer.
Popup9Indicates that the widget is a popup top-level window, i.e. that it is modal, but has a window system frame appropriate for popup menus.
Tool11Indicates that the widget is a tool window. A tool window is often a small window with a smaller than usual title bar and decoration, typically used for collections of tool buttons. It there is a parent, the tool window will always be kept on top of it. If there isn't a parent, you may consider using Qt::WindowStaysOnTopHint as well. If the window system supports it, a tool window can be decorated with a somewhat lighter frame. It can also be combined with Qt::FramelessWindowHint.
ToolTip13Indicates that the widget is a tooltip. This is used internally to implement tooltips.
SplashScreen15Indicates that the window is a splash screen. This is the default type for QSplashScreen.
Desktop17Indicates that this widget is the desktop. This is the type for QDesktopWidget.
SubWindow18Indicates that this widget is a child widget, irrespective of whether the widget has a parent or not.

There are also a number of flags which you can use to customize the appearance of top-level windows. These have no effect on other windows:

ConstantValueDescription
MSWindowsFixedSizeDialogHint256Gives the window a thin dialog border on Windows. This style is traditionally used for fixed-size dialogs.
MSWindowsOwnDC512Gives the window its own display context on Windows.
X11BypassWindowManagerHint1024Bypass the window manager completely. This results in a borderless window that is not managed at all (i.e., no keyboard input unless you call QWidget::activateWindow() manually).
FramelessWindowHint2048Produces a borderless window. The user cannot move or resize a borderless window via the window system. On X11, the result of the flag is dependent on the window manager and its ability to understand Motif and/or NETWM hints. Most existing modern window managers can handle this.
CustomizeWindowHint33554432Turns off the default window title hints.
WindowTitleHint4096Gives the window a title bar.
WindowSystemMenuHint8192Adds a window system menu, and possibly a close button.
WindowMinimizeButtonHint16384Adds a minimize button. On some platforms this implies Qt::WindowSystemMenuHint for it to work.
WindowMaximizeButtonHint32768Adds a maximize button. On some platforms this implies Qt::WindowSystemMenuHint for it to work.
WindowMinMaxButtonsHint49152Adds a minimize and a maximize button. On some platforms this implies Qt::WindowSystemMenuHint for it to work.
WindowContextHelpButtonHint65536Adds a context help button to dialogs. On some platforms this implies Qt::WindowSystemMenuHint for it to work.
WindowShadeButtonHint131072 
WindowStaysOnTopHint262144Informs the window system that the window should stay on top of all other windows. Note that on some window managers on X11 you also have to pass Qt::X11BypassWindowManagerHint for this flag to work correctly.
WindowType_Mask255A mask for extracting the window type part of the window flags.

Obsolete flags:

ConstantValueDescription
WMouseNoMask?Use Qt::WA_MouseNoMask instead.
WDestructiveClose?Use Qt::WA_DeleteOnClose instead.
WStaticContents?Use Qt::WA_StaticContents instead.
WGroupLeader?No longer needed.
WShowModal?Use QWidget::windowModality instead.
WNoMousePropagation?Use Qt::WA_NoMousePropagation instead.
WType_TopLevel?Use Qt::Window instead.
WType_Dialog?Use Qt::Dialog instead.
WType_Popup?Use Qt::Popup instead.
WType_Desktop?Use Qt::Desktop instead.
WType_Mask?Use Qt::WindowType_Mask instead.
WStyle_Customize?No longer needed.
WStyle_NormalBorder?No longer needed.
WStyle_DialogBorder?Use Qt::MSWindowsFixedSizeDialogHint instead.
WStyle_NoBorder?Use Qt::FramelessWindowHint instead.
WStyle_Title?Use Qt::WindowTitleHint instead.
WStyle_SysMenu?Use Qt::WindowSystemMenuHint instead.
WStyle_Minimize?Use Qt::WindowMinimizeButtonHint instead.
WStyle_Maximize?Use Qt::WindowMaximizeButtonHint instead.
WStyle_MinMax?Use Qt::WindowMinMaxButtonsHint instead.
WStyle_Tool?Use Qt::Tool instead.
WStyle_StaysOnTop?Use Qt::WindowStaysOnTopHint instead.
WStyle_ContextHelp?Use Qt::WindowContextHelpButtonHint instead.
WPaintDesktop?No longer needed.
WPaintClever?No longer needed.
WX11BypassWM?Use Qt::X11BypassWindowManagerHint instead.
WWinOwnDC?Use Qt::MSWindowsOwnDC instead.
WMacSheet?Use Qt::Sheet instead.
WMacDrawer?Use Qt::Drawer instead.
WStyle_Splash?Use Qt::SplashScreen instead.
WNoAutoErase?No longer needed.
WRepaintNoErase?No longer needed.
WNorthWestGravity?Use Qt::WA_StaticContents instead.
WType_Modal?Use Qt::Dialog and QWidget::windowModality instead.
WStyle_Dialog?Use Qt::Dialog instead.
WStyle_NoBorderEx?Use Qt::FramelessWindowHint instead.
WResizeNoErase?No longer needed.
WMacNoSheet?No longer needed.

See Also:
QWidget::windowFlags, Flags Example

Enum Constant Summary
CustomizeWindowHint
          Turns off the default window title hints.
Desktop
          Indicates that this widget is the desktop.
Dialog
          Indicates that the widget is a window that should be decorated as a dialog (i.e., typically no maximize or minimize buttons in the title bar).
Drawer
          Indicates that the widget is a Macintosh drawer.
FramelessWindowHint
          Produces a borderless window.
MSWindowsFixedSizeDialogHint
          Gives the window a thin dialog border on Windows.
MSWindowsOwnDC
          Gives the window its own display context on Windows.
Popup
          Indicates that the widget is a popup top-level window, i.e. that it is modal, but has a window system frame appropriate for popup menus.
Sheet
          Indicates that the widget is a Macintosh sheet.
SplashScreen
          Indicates that the window is a splash screen.
SubWindow
          Indicates that this widget is a child widget, irrespective of whether the widget has a parent or not.
Tool
          Indicates that the widget is a tool window.
ToolTip
          Indicates that the widget is a tooltip.
Widget
          This is the default type for QWidget.
Window
          Indicates that the widget is a window, usually with a window system frame and a title bar, irrespective of whether the widget has a parent or not.
WindowContextHelpButtonHint
          Adds a context help button to dialogs.
WindowMaximizeButtonHint
          Adds a maximize button.
WindowMinimizeButtonHint
          Adds a minimize button.
WindowMinMaxButtonsHint
          Adds a minimize and a maximize button.
WindowShadeButtonHint
          Internal.
WindowStaysOnTopHint
          Informs the window system that the window should stay on top of all other windows.
WindowSystemMenuHint
          Adds a window system menu, and possibly a close button.
WindowTitleHint
          Gives the window a title bar.
WindowType_Mask
          A mask for extracting the window type part of the window flags.
X11BypassWindowManagerHint
          Bypass the window manager completely.
 
Method Summary
static Qt.WindowFlags createQFlags(Qt.WindowType... values)
           
static Qt.WindowType 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.WindowType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Qt.WindowType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Widget

public static final Qt.WindowType Widget

This is the default type for QWidget. Widgets of this type are child widgets if they have a parent, and independent windows if they have no parent. See also Qt::Window and Qt::SubWindow.


Window

public static final Qt.WindowType Window

Indicates that the widget is a window, usually with a window system frame and a title bar, irrespective of whether the widget has a parent or not.


Dialog

public static final Qt.WindowType Dialog

Indicates that the widget is a window that should be decorated as a dialog (i.e., typically no maximize or minimize buttons in the title bar). This is the default type for QDialog. If you want to use it as a modal dialog, it should be launched from another window, or have a parent and used with the QWidget::windowModality property. If you make it modal, the dialog will prevent other top-level windows in the application from getting any input. We refer to a top-level window that has a parent as a secondary window.


Sheet

public static final Qt.WindowType Sheet

Indicates that the widget is a Macintosh sheet.


Drawer

public static final Qt.WindowType Drawer

Indicates that the widget is a Macintosh drawer.


Popup

public static final Qt.WindowType Popup

Indicates that the widget is a popup top-level window, i.e. that it is modal, but has a window system frame appropriate for popup menus.


Tool

public static final Qt.WindowType Tool

Indicates that the widget is a tool window. A tool window is often a small window with a smaller than usual title bar and decoration, typically used for collections of tool buttons. It there is a parent, the tool window will always be kept on top of it. If there isn't a parent, you may consider using Qt::WindowStaysOnTopHint as well. If the window system supports it, a tool window can be decorated with a somewhat lighter frame. It can also be combined with Qt::FramelessWindowHint.


ToolTip

public static final Qt.WindowType ToolTip

Indicates that the widget is a tooltip. This is used internally to implement tooltips.


SplashScreen

public static final Qt.WindowType SplashScreen

Indicates that the window is a splash screen. This is the default type for QSplashScreen.


Desktop

public static final Qt.WindowType Desktop

Indicates that this widget is the desktop. This is the type for QDesktopWidget.


SubWindow

public static final Qt.WindowType SubWindow

Indicates that this widget is a child widget, irrespective of whether the widget has a parent or not.


WindowType_Mask

public static final Qt.WindowType WindowType_Mask

A mask for extracting the window type part of the window flags.


MSWindowsFixedSizeDialogHint

public static final Qt.WindowType MSWindowsFixedSizeDialogHint

Gives the window a thin dialog border on Windows. This style is traditionally used for fixed-size dialogs.


MSWindowsOwnDC

public static final Qt.WindowType MSWindowsOwnDC

Gives the window its own display context on Windows.


X11BypassWindowManagerHint

public static final Qt.WindowType X11BypassWindowManagerHint

Bypass the window manager completely. This results in a borderless window that is not managed at all (i.e., no keyboard input unless you call QWidget::activateWindow() manually).


FramelessWindowHint

public static final Qt.WindowType FramelessWindowHint

Produces a borderless window. The user cannot move or resize a borderless window via the window system. On X11, the result of the flag is dependent on the window manager and its ability to understand Motif and/or NETWM hints. Most existing modern window managers can handle this.


WindowTitleHint

public static final Qt.WindowType WindowTitleHint

Gives the window a title bar.


WindowSystemMenuHint

public static final Qt.WindowType WindowSystemMenuHint

Adds a window system menu, and possibly a close button.


WindowMinimizeButtonHint

public static final Qt.WindowType WindowMinimizeButtonHint

Adds a minimize button. On some platforms this implies Qt::WindowSystemMenuHint for it to work.


WindowMaximizeButtonHint

public static final Qt.WindowType WindowMaximizeButtonHint

Adds a maximize button. On some platforms this implies Qt::WindowSystemMenuHint for it to work.


WindowMinMaxButtonsHint

public static final Qt.WindowType WindowMinMaxButtonsHint

Adds a minimize and a maximize button. On some platforms this implies Qt::WindowSystemMenuHint for it to work.


WindowContextHelpButtonHint

public static final Qt.WindowType WindowContextHelpButtonHint

Adds a context help button to dialogs. On some platforms this implies Qt::WindowSystemMenuHint for it to work.


WindowShadeButtonHint

public static final Qt.WindowType WindowShadeButtonHint
Internal.


WindowStaysOnTopHint

public static final Qt.WindowType WindowStaysOnTopHint

Informs the window system that the window should stay on top of all other windows. Note that on some window managers on X11 you also have to pass Qt::X11BypassWindowManagerHint for this flag to work correctly.


CustomizeWindowHint

public static final Qt.WindowType CustomizeWindowHint

Turns off the default window title hints.

Method Detail

values

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

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

valueOf

public static Qt.WindowType 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
java.lang.NullPointerException - if the argument is null

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

createQFlags

public static Qt.WindowFlags createQFlags(Qt.WindowType... values)

resolve

public static Qt.WindowType resolve(int value)

Qt Jambi Home