|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<Qt.WindowType>
com.trolltech.qt.core.Qt.WindowType
public static enum Qt.WindowType
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
Constant | Value | Description |
---|---|---|
Widget | 0 | 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 | 1 | 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 | 3 | 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 | 5 | Indicates that the widget is a Macintosh sheet. |
Drawer | 7 | Indicates that the widget is a Macintosh drawer. |
Popup | 9 | 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 | 11 | 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 | 13 | Indicates that the widget is a tooltip. This is used internally to implement tooltips. |
SplashScreen | 15 | Indicates that the window is a splash screen. This is the default type for QSplashScreen. |
Desktop | 17 | Indicates that this widget is the desktop. This is the type for QDesktopWidget. |
SubWindow | 18 | Indicates 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:
Constant | Value | Description |
---|---|---|
MSWindowsFixedSizeDialogHint | 256 | Gives the window a thin dialog border on Windows. This style is traditionally used for fixed-size dialogs. |
MSWindowsOwnDC | 512 | Gives the window its own display context on Windows. |
X11BypassWindowManagerHint | 1024 | 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 | 2048 | 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. |
CustomizeWindowHint | 33554432 | Turns off the default window title hints. |
WindowTitleHint | 4096 | Gives the window a title bar. |
WindowSystemMenuHint | 8192 | Adds a window system menu, and possibly a close button. |
WindowMinimizeButtonHint | 16384 | Adds a minimize button. On some platforms this implies Qt::WindowSystemMenuHint for it to work. |
WindowMaximizeButtonHint | 32768 | Adds a maximize button. On some platforms this implies Qt::WindowSystemMenuHint for it to work. |
WindowMinMaxButtonsHint | 49152 | Adds a minimize and a maximize button. On some platforms this implies Qt::WindowSystemMenuHint for it to work. |
WindowContextHelpButtonHint | 65536 | Adds a context help button to dialogs. On some platforms this implies Qt::WindowSystemMenuHint for it to work. |
WindowShadeButtonHint | 131072 | |
WindowStaysOnTopHint | 262144 | 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. |
WindowType_Mask | 255 | A mask for extracting the window type part of the window flags. |
Obsolete flags:
Constant | Value | Description |
---|---|---|
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. |
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'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 |
---|
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.
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.
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.
public static final Qt.WindowType Sheet
Indicates that the widget is a Macintosh sheet.
public static final Qt.WindowType Drawer
Indicates that the widget is a Macintosh drawer.
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.
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.
public static final Qt.WindowType ToolTip
Indicates that the widget is a tooltip. This is used internally to implement tooltips.
public static final Qt.WindowType SplashScreen
Indicates that the window is a splash screen. This is the default type for QSplashScreen.
public static final Qt.WindowType Desktop
Indicates that this widget is the desktop. This is the type for QDesktopWidget.
public static final Qt.WindowType SubWindow
Indicates that this widget is a child widget, irrespective of whether the widget has a parent or not.
public static final Qt.WindowType WindowType_Mask
A mask for extracting the window type part of the window flags.
public static final Qt.WindowType MSWindowsFixedSizeDialogHint
Gives the window a thin dialog border on Windows. This style is traditionally used for fixed-size dialogs.
public static final Qt.WindowType MSWindowsOwnDC
Gives the window its own display context on Windows.
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).
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.
public static final Qt.WindowType WindowTitleHint
Gives the window a title bar.
public static final Qt.WindowType WindowSystemMenuHint
Adds a window system menu, and possibly a close button.
public static final Qt.WindowType WindowMinimizeButtonHint
Adds a minimize button. On some platforms this implies Qt::WindowSystemMenuHint for it to work.
public static final Qt.WindowType WindowMaximizeButtonHint
Adds a maximize button. On some platforms this implies Qt::WindowSystemMenuHint for it to work.
public static final Qt.WindowType WindowMinMaxButtonsHint
Adds a minimize and a maximize button. On some platforms this implies Qt::WindowSystemMenuHint for it to work.
public static final Qt.WindowType WindowContextHelpButtonHint
Adds a context help button to dialogs. On some platforms this implies Qt::WindowSystemMenuHint for it to work.
public static final Qt.WindowType WindowShadeButtonHint
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.
public static final Qt.WindowType CustomizeWindowHint
Turns off the default window title hints.
Method Detail |
---|
public static final Qt.WindowType[] values()
for(Qt.WindowType c : Qt.WindowType.values()) System.out.println(c);
public static Qt.WindowType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namepublic int value()
QtEnumerator
value
in interface QtEnumerator
public static Qt.WindowFlags createQFlags(Qt.WindowType... values)
public static Qt.WindowType resolve(int value)
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |