com.trolltech.qt.core
Class Qt.WindowType

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

public static final class Qt.WindowType
extends java.lang.Enum
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 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: The CustomizeWindowHint flag is used to enable customization of the window controls. This flag must be set to allow the WindowTitleHint, WindowSystemMenuHint, WindowMinimizeButtonHint, WindowMaximizeButtonHint and WindowCloseButtonHint flags to be changed. Obsolete flags:

See also:
QWidget::windowFlags, and Window Flags Example.

See Also:
Serialized Form

Field Summary
static Qt.WindowType BypassGraphicsProxyWidget
          Prevents the window and its children from automatically embedding themselves into a QGraphicsProxyWidget if the parent widget is already embedded.
static Qt.WindowType CustomizeWindowHint
          Turns off the default window title hints.
static Qt.WindowType Desktop
          Indicates that this widget is the desktop.
static Qt.WindowType Dialog
          Indicates that the widget is a window that should be decorated as a dialog (i.
static Qt.WindowType Drawer
          Indicates that the widget is a Macintosh drawer.
static Qt.WindowType FramelessWindowHint
          Produces a borderless window.
static Qt.WindowType MacWindowToolBarButtonHint
          On Mac OS X adds a tool bar button (i.e., the oblong button that is on the top right of windows that have toolbars.
static Qt.WindowType MSWindowsFixedSizeDialogHint
          Gives the window a thin dialog border on Windows.
static Qt.WindowType MSWindowsOwnDC
          Gives the window its own display context on Windows.
static Qt.WindowType Popup
          Indicates that the widget is a pop-up top-level window, i.e.
static Qt.WindowType Sheet
          Indicates that the widget is a Macintosh sheet.
static Qt.WindowType SplashScreen
          Indicates that the window is a splash screen.
static Qt.WindowType SubWindow
          Indicates that this widget is a sub-window, such as a QMdiSubWindow widget.
static Qt.WindowType Tool
          Indicates that the widget is a tool window.
static Qt.WindowType ToolTip
          Indicates that the widget is a tooltip.
static Qt.WindowType Widget
          This is the default type for QWidget.
static Qt.WindowType Window
           
static Qt.WindowType WindowCancelButtonHint
          Adds a Cancel button to the window decoration of a dialog.
static Qt.WindowType WindowCloseButtonHint
          Adds a close button.
static Qt.WindowType WindowContextHelpButtonHint
          Adds a context help button to dialogs.
static Qt.WindowType WindowMaximizeButtonHint
          Adds a maximize button.
static Qt.WindowType WindowMinimizeButtonHint
          Adds a minimize button.
static Qt.WindowType WindowMinMaxButtonsHint
          Adds a minimize and a maximize button.
static Qt.WindowType WindowOkButtonHint
          Adds an OK button to the window decoration of a dialog.
static Qt.WindowType WindowShadeButtonHint
           
static Qt.WindowType WindowStaysOnBottomHint
          Informs the window system that the window should stay on bottom of all other windows.
static Qt.WindowType WindowStaysOnTopHint
          Informs the window system that the window should stay on top of all other windows.
static Qt.WindowType WindowSystemMenuHint
          Adds a window system menu, and possibly a close button (for example on Mac).
static Qt.WindowType WindowTitleHint
          Gives the window a title bar.
static Qt.WindowType WindowType_Mask
          A mask for extracting the window type part of the window flags.
static Qt.WindowType X11BypassWindowManagerHint
          Bypass the window manager completely.
 
Method Summary
static Qt.WindowFlags createQFlags(Qt.WindowType[] values)
          This function creates a com.trolltech.qt.core.Qt$WindowFlags with the specified com.trolltech.qt.core.Qt$WindowType[] Qt$WindowType values set.
static Qt.WindowType resolve(int value)
          Returns the Qt$WindowType constant with the specified int.
 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)
           
static Qt.WindowType[] values()
           
 
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
 

Field 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

Dialog

public static final Qt.WindowType Dialog
Indicates that the widget is a window that should be decorated as a dialog (i. ., 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 pop-up top-level window, i.e. that it is modal, but has a window system frame appropriate for pop-up 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 .

On Mac OS X, tool windows correspond to the Floating class of windows. This means that the window lives on a level above normal windows; it impossible to put a normal window on top of it. By default, tool windows will disappear when the application is inactive. This can be controlled by the Qt::WA_MacAlwaysShowToolWindow attribute.


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 sub-window, such as a QMdiSubWindow widget.


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 (for example on Mac). If you need to hide or show a close button, it is more portable to use WindowCloseButtonHint.


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

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.


WindowOkButtonHint

public static final Qt.WindowType WindowOkButtonHint
Adds an OK button to the window decoration of a dialog. Only supported for Windows CE.


WindowCancelButtonHint

public static final Qt.WindowType WindowCancelButtonHint
Adds a Cancel button to the window decoration of a dialog. Only supported for Windows CE.


CustomizeWindowHint

public static final Qt.WindowType CustomizeWindowHint
Turns off the default window title hints.


WindowStaysOnBottomHint

public static final Qt.WindowType WindowStaysOnBottomHint
Informs the window system that the window should stay on bottom of all other windows. Note that on X11 this hint will work only in window managers that support _NET_WM_STATE_BELOW atom. If a window always on the bottom has a parent, the parent will also be left on the bottom. This window hint is currently not implemented for Mac OS X.


WindowCloseButtonHint

public static final Qt.WindowType WindowCloseButtonHint
Adds a close button. On some platforms this implies Qt::WindowSystemMenuHint for it to work.


MacWindowToolBarButtonHint

public static final Qt.WindowType MacWindowToolBarButtonHint
On Mac OS X adds a tool bar button (i.e., the oblong button that is on the top right of windows that have toolbars.


BypassGraphicsProxyWidget

public static final Qt.WindowType BypassGraphicsProxyWidget
Prevents the window and its children from automatically embedding themselves into a QGraphicsProxyWidget if the parent widget is already embedded. You can set this flag if you want your widget to always be a toplevel widget on the desktop, regardless of whether the parent widget is embedded in a scene or not.

Method Detail

values

public static Qt.WindowType[] values()

valueOf

public static Qt.WindowType valueOf(java.lang.String name)

value

public int value()
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)
This function creates a com.trolltech.qt.core.Qt$WindowFlags with the specified com.trolltech.qt.core.Qt$WindowType[] Qt$WindowType values set.


resolve

public static Qt.WindowType resolve(int value)
Returns the Qt$WindowType constant with the specified int.