Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/QtCore/qnamespace.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Copyright (C) 2020 The Qt Company Ltd.
0002 // Copyright (C) 2020 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
0003 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0004 
0005 #ifndef QNAMESPACE_H
0006 #define QNAMESPACE_H
0007 
0008 #if 0
0009 #pragma qt_class(Qt)
0010 #endif
0011 
0012 #include <QtCore/qglobal.h>
0013 #include <QtCore/qtmetamacros.h>
0014 
0015 #if defined(__OBJC__) && !defined(__cplusplus)
0016 #  warning "File built in Objective-C mode (.m), but using Qt requires Objective-C++ (.mm)"
0017 #endif
0018 
0019 QT_BEGIN_NAMESPACE
0020 
0021 struct QMetaObject;
0022 
0023 namespace Qt {
0024     Q_NAMESPACE_EXPORT(Q_CORE_EXPORT)
0025 
0026     enum GlobalColor {
0027         color0,
0028         color1,
0029         black,
0030         white,
0031         darkGray,
0032         gray,
0033         lightGray,
0034         red,
0035         green,
0036         blue,
0037         cyan,
0038         magenta,
0039         yellow,
0040         darkRed,
0041         darkGreen,
0042         darkBlue,
0043         darkCyan,
0044         darkMagenta,
0045         darkYellow,
0046         transparent
0047     };
0048 
0049     enum class ColorScheme {
0050         Unknown,
0051         Light,
0052         Dark,
0053     };
0054 
0055     enum MouseButton {
0056         NoButton         = 0x00000000,
0057         LeftButton       = 0x00000001,
0058         RightButton      = 0x00000002,
0059         MiddleButton     = 0x00000004,
0060         BackButton       = 0x00000008,
0061         XButton1         = BackButton,
0062         ExtraButton1     = XButton1,
0063         ForwardButton    = 0x00000010,
0064         XButton2         = ForwardButton,
0065         ExtraButton2     = ForwardButton,
0066         TaskButton       = 0x00000020,
0067         ExtraButton3     = TaskButton,
0068         ExtraButton4     = 0x00000040,
0069         ExtraButton5     = 0x00000080,
0070         ExtraButton6     = 0x00000100,
0071         ExtraButton7     = 0x00000200,
0072         ExtraButton8     = 0x00000400,
0073         ExtraButton9     = 0x00000800,
0074         ExtraButton10    = 0x00001000,
0075         ExtraButton11    = 0x00002000,
0076         ExtraButton12    = 0x00004000,
0077         ExtraButton13    = 0x00008000,
0078         ExtraButton14    = 0x00010000,
0079         ExtraButton15    = 0x00020000,
0080         ExtraButton16    = 0x00040000,
0081         ExtraButton17    = 0x00080000,
0082         ExtraButton18    = 0x00100000,
0083         ExtraButton19    = 0x00200000,
0084         ExtraButton20    = 0x00400000,
0085         ExtraButton21    = 0x00800000,
0086         ExtraButton22    = 0x01000000,
0087         ExtraButton23    = 0x02000000,
0088         ExtraButton24    = 0x04000000,
0089         AllButtons       = 0x07ffffff,
0090         MaxMouseButton   = ExtraButton24,
0091         // 4 high-order bits remain available for future use (0x08000000 through 0x40000000).
0092         MouseButtonMask  = 0xffffffff
0093     };
0094     Q_DECLARE_FLAGS(MouseButtons, MouseButton)
0095     Q_DECLARE_OPERATORS_FOR_FLAGS(MouseButtons)
0096 
0097     enum Orientation {
0098         Horizontal = 0x1,
0099         Vertical = 0x2
0100     };
0101 
0102     Q_DECLARE_FLAGS(Orientations, Orientation)
0103     Q_DECLARE_OPERATORS_FOR_FLAGS(Orientations)
0104 
0105     enum FocusPolicy {
0106         NoFocus = 0,
0107         TabFocus = 0x1,
0108         ClickFocus = 0x2,
0109         StrongFocus = TabFocus | ClickFocus | 0x8,
0110         WheelFocus = StrongFocus | 0x4
0111     };
0112 
0113     enum TabFocusBehavior {
0114         NoTabFocus           = 0x00,
0115         TabFocusTextControls = 0x01,
0116         TabFocusListControls = 0x02,
0117         TabFocusAllControls  = 0xff
0118     };
0119 
0120     enum SortOrder {
0121         AscendingOrder,
0122         DescendingOrder
0123     };
0124 
0125     enum SplitBehaviorFlags {
0126         KeepEmptyParts = 0,
0127         SkipEmptyParts = 0x1,
0128     };
0129     Q_DECLARE_FLAGS(SplitBehavior, SplitBehaviorFlags)
0130     Q_DECLARE_OPERATORS_FOR_FLAGS(SplitBehavior)
0131 
0132     enum TileRule {
0133         StretchTile,
0134         RepeatTile,
0135         RoundTile
0136     };
0137 
0138     // Text formatting flags for QPainter::drawText and QLabel.
0139     // The following two enums can be combined to one integer which
0140     // is passed as 'flags' to QPainter::drawText, QFontMetrics::boundingRect and qt_format_text.
0141 
0142     enum AlignmentFlag {
0143         AlignLeft = 0x0001,
0144         AlignLeading = AlignLeft,
0145         AlignRight = 0x0002,
0146         AlignTrailing = AlignRight,
0147         AlignHCenter = 0x0004,
0148         AlignJustify = 0x0008,
0149         AlignAbsolute = 0x0010,
0150         AlignHorizontal_Mask = AlignLeft | AlignRight | AlignHCenter | AlignJustify | AlignAbsolute,
0151 
0152         AlignTop = 0x0020,
0153         AlignBottom = 0x0040,
0154         AlignVCenter = 0x0080,
0155         AlignBaseline = 0x0100,
0156         // Note that 0x100 will clash with Qt::TextSingleLine = 0x100 due to what the comment above
0157         // this enum declaration states. However, since Qt::AlignBaseline is only used by layouts,
0158         // it doesn't make sense to pass Qt::AlignBaseline to QPainter::drawText(), so there
0159         // shouldn't really be any ambiguity between the two overlapping enum values.
0160         AlignVertical_Mask = AlignTop | AlignBottom | AlignVCenter | AlignBaseline,
0161 
0162         AlignCenter = AlignVCenter | AlignHCenter
0163     };
0164 
0165     Q_DECLARE_FLAGS(Alignment, AlignmentFlag)
0166     Q_DECLARE_OPERATORS_FOR_FLAGS(Alignment)
0167 
0168     enum TextFlag {
0169         TextSingleLine = 0x0100,
0170         TextDontClip = 0x0200,
0171         TextExpandTabs = 0x0400,
0172         TextShowMnemonic = 0x0800,
0173         TextWordWrap = 0x1000,
0174         TextWrapAnywhere = 0x2000,
0175         TextDontPrint = 0x4000,
0176         TextIncludeTrailingSpaces = 0x08000000,
0177         TextHideMnemonic = 0x8000,
0178         TextJustificationForced = 0x10000,
0179         TextForceLeftToRight = 0x20000,
0180         TextForceRightToLeft = 0x40000,
0181         // Ensures that the longest variant is always used when computing the
0182         // size of a multi-variant string.
0183         TextLongestVariant = 0x80000
0184     };
0185     Q_DECLARE_MIXED_ENUM_OPERATORS_SYMMETRIC(int, AlignmentFlag, TextFlag)
0186 
0187     enum TextElideMode {
0188         ElideLeft,
0189         ElideRight,
0190         ElideMiddle,
0191         ElideNone
0192     };
0193     Q_DECLARE_MIXED_ENUM_OPERATORS_SYMMETRIC(int, TextElideMode, TextFlag)
0194 
0195     enum WhiteSpaceMode {
0196         WhiteSpaceNormal,
0197         WhiteSpacePre,
0198         WhiteSpaceNoWrap,
0199         WhiteSpaceModeUndefined = -1
0200     };
0201 
0202     enum HitTestAccuracy { ExactHit, FuzzyHit };
0203 
0204     enum WindowType {
0205         Widget = 0x00000000,
0206         Window = 0x00000001,
0207         Dialog = 0x00000002 | Window,
0208         Sheet = 0x00000004 | Window,
0209         Drawer = Sheet | Dialog,
0210         Popup = 0x00000008 | Window,
0211         Tool = Popup | Dialog,
0212         ToolTip = Popup | Sheet,
0213         SplashScreen = ToolTip | Dialog,
0214         Desktop = 0x00000010 | Window,
0215         SubWindow = 0x00000012, // Note QTBUG-115729 before using
0216         ForeignWindow = 0x00000020 | Window,
0217         CoverWindow = 0x00000040 | Window,
0218 
0219         WindowType_Mask = 0x000000ff,
0220         MSWindowsFixedSizeDialogHint = 0x00000100,
0221         MSWindowsOwnDC = 0x00000200,
0222         BypassWindowManagerHint = 0x00000400,
0223         X11BypassWindowManagerHint = BypassWindowManagerHint,
0224         FramelessWindowHint = 0x00000800,
0225         WindowTitleHint = 0x00001000,
0226         WindowSystemMenuHint = 0x00002000,
0227         WindowMinimizeButtonHint = 0x00004000,
0228         WindowMaximizeButtonHint = 0x00008000,
0229         WindowMinMaxButtonsHint = WindowMinimizeButtonHint | WindowMaximizeButtonHint,
0230         WindowContextHelpButtonHint = 0x00010000,
0231         WindowShadeButtonHint = 0x00020000,
0232         WindowStaysOnTopHint = 0x00040000,
0233         WindowTransparentForInput = 0x00080000,
0234         WindowOverridesSystemGestures = 0x00100000,
0235         WindowDoesNotAcceptFocus = 0x00200000,
0236         MaximizeUsingFullscreenGeometryHint = 0x00400000,
0237 
0238         CustomizeWindowHint = 0x02000000,
0239         WindowStaysOnBottomHint = 0x04000000,
0240         WindowCloseButtonHint = 0x08000000,
0241         MacWindowToolBarButtonHint = 0x10000000,
0242         BypassGraphicsProxyWidget = 0x20000000,
0243         NoDropShadowWindowHint = 0x40000000,
0244         WindowFullscreenButtonHint = 0x80000000
0245     };
0246 
0247     Q_DECLARE_FLAGS(WindowFlags, WindowType)
0248     Q_DECLARE_OPERATORS_FOR_FLAGS(WindowFlags)
0249 
0250     enum WindowState {
0251         WindowNoState    = 0x00000000,
0252         WindowMinimized  = 0x00000001,
0253         WindowMaximized  = 0x00000002,
0254         WindowFullScreen = 0x00000004,
0255         WindowActive     = 0x00000008
0256     };
0257 
0258     Q_DECLARE_FLAGS(WindowStates, WindowState)
0259     Q_DECLARE_OPERATORS_FOR_FLAGS(WindowStates)
0260 
0261     enum ApplicationState {
0262         ApplicationSuspended    = 0x00000000,
0263         ApplicationHidden       = 0x00000001,
0264         ApplicationInactive     = 0x00000002,
0265         ApplicationActive       = 0x00000004
0266     };
0267 
0268     Q_DECLARE_FLAGS(ApplicationStates, ApplicationState)
0269 
0270     enum ScreenOrientation {
0271         PrimaryOrientation           = 0x00000000,
0272         PortraitOrientation          = 0x00000001,
0273         LandscapeOrientation         = 0x00000002,
0274         InvertedPortraitOrientation  = 0x00000004,
0275         InvertedLandscapeOrientation = 0x00000008
0276     };
0277 
0278     Q_DECLARE_FLAGS(ScreenOrientations, ScreenOrientation)
0279     Q_DECLARE_OPERATORS_FOR_FLAGS(ScreenOrientations)
0280 
0281     enum WidgetAttribute {
0282         WA_Disabled = 0,
0283         WA_UnderMouse = 1,
0284         WA_MouseTracking = 2,
0285         // Formerly, 3 was WA_ContentsPropagated.
0286         WA_OpaquePaintEvent = 4,
0287         WA_StaticContents = 5,
0288         WA_LaidOut = 7,
0289         WA_PaintOnScreen = 8,
0290         WA_NoSystemBackground = 9,
0291         WA_UpdatesDisabled = 10,
0292         WA_Mapped = 11,
0293         // Formerly, 12 was WA_MacNoClickThrough.
0294         WA_InputMethodEnabled = 14,
0295         WA_WState_Visible = 15,
0296         WA_WState_Hidden = 16,
0297 
0298         WA_ForceDisabled = 32,
0299         WA_KeyCompression = 33,
0300         WA_PendingMoveEvent = 34,
0301         WA_PendingResizeEvent = 35,
0302         WA_SetPalette = 36,
0303         WA_SetFont = 37,
0304         WA_SetCursor = 38,
0305         WA_NoChildEventsFromChildren = 39,
0306         WA_WindowModified = 41,
0307         WA_Resized = 42,
0308         WA_Moved = 43,
0309         WA_PendingUpdate = 44,
0310         WA_InvalidSize = 45,
0311         // Formerly 46 was WA_MacBrushedMetal and WA_MacMetalStyle.
0312         WA_CustomWhatsThis = 47,
0313         WA_LayoutOnEntireRect = 48,
0314         WA_OutsideWSRange = 49,
0315         WA_GrabbedShortcut = 50,
0316         WA_TransparentForMouseEvents = 51,
0317         WA_PaintUnclipped = 52,
0318         WA_SetWindowIcon = 53,
0319         WA_NoMouseReplay = 54,
0320         WA_DeleteOnClose = 55,
0321         WA_RightToLeft = 56,
0322         WA_SetLayoutDirection = 57,
0323         WA_NoChildEventsForParent = 58,
0324         WA_ForceUpdatesDisabled = 59,
0325 
0326         WA_WState_Created = 60,
0327         WA_WState_CompressKeys = 61,
0328         WA_WState_InPaintEvent = 62,
0329         WA_WState_Reparented = 63,
0330         WA_WState_ConfigPending = 64,
0331         WA_WState_Polished = 66,
0332         // Formerly, 67 was WA_WState_DND.
0333         WA_WState_OwnSizePolicy = 68,
0334         WA_WState_ExplicitShowHide = 69,
0335 
0336         WA_ShowModal = 70, // ## deprecated since since 4.5.1 but still in use :-(
0337         WA_MouseNoMask = 71,
0338         WA_NoMousePropagation = 73, // for now, might go away.
0339         WA_Hover = 74,
0340         WA_InputMethodTransparent = 75, // Don't reset IM when user clicks on this (for virtual keyboards on embedded)
0341         WA_QuitOnClose = 76,
0342 
0343         WA_KeyboardFocusChange = 77,
0344 
0345         WA_AcceptDrops = 78,
0346         WA_DropSiteRegistered = 79, // internal
0347 
0348         WA_WindowPropagation = 80,
0349 
0350         WA_NoX11EventCompression = 81,
0351         WA_TintedBackground = 82,
0352         WA_X11OpenGLOverlay = 83,
0353         WA_AlwaysShowToolTips = 84,
0354         WA_MacOpaqueSizeGrip = 85,
0355         WA_SetStyle = 86,
0356 
0357         WA_SetLocale = 87,
0358         WA_MacShowFocusRect = 88,
0359 
0360         WA_MacNormalSize = 89,  // Mac only
0361         WA_MacSmallSize = 90,   // Mac only
0362         WA_MacMiniSize = 91,    // Mac only
0363 
0364         WA_LayoutUsesWidgetRect = 92,
0365         WA_StyledBackground = 93, // internal
0366         // Formerly, 94 was WA_MSWindowsUseDirect3D.
0367         WA_CanHostQMdiSubWindowTitleBar = 95, // Internal
0368 
0369         WA_MacAlwaysShowToolWindow = 96, // Mac only
0370 
0371         WA_StyleSheet = 97, // internal
0372 
0373         WA_ShowWithoutActivating = 98,
0374 
0375         WA_X11BypassTransientForHint = 99,
0376 
0377         WA_NativeWindow = 100,
0378         WA_DontCreateNativeAncestors = 101,
0379 
0380         // Formerly WA_MacVariableSize = 102,    // Mac only
0381 
0382         WA_DontShowOnScreen = 103,
0383 
0384         // window types from http://standards.freedesktop.org/wm-spec/
0385         WA_X11NetWmWindowTypeDesktop = 104,
0386         WA_X11NetWmWindowTypeDock = 105,
0387         WA_X11NetWmWindowTypeToolBar = 106,
0388         WA_X11NetWmWindowTypeMenu = 107,
0389         WA_X11NetWmWindowTypeUtility = 108,
0390         WA_X11NetWmWindowTypeSplash = 109,
0391         WA_X11NetWmWindowTypeDialog = 110,
0392         WA_X11NetWmWindowTypeDropDownMenu = 111,
0393         WA_X11NetWmWindowTypePopupMenu = 112,
0394         WA_X11NetWmWindowTypeToolTip = 113,
0395         WA_X11NetWmWindowTypeNotification = 114,
0396         WA_X11NetWmWindowTypeCombo = 115,
0397         WA_X11NetWmWindowTypeDND = 116,
0398         // Formerly, 117 was WA_MacFrameworkScaled.
0399         WA_SetWindowModality = 118,
0400         WA_WState_WindowOpacitySet = 119, // internal
0401         WA_TranslucentBackground = 120,
0402 
0403         WA_AcceptTouchEvents = 121,
0404         WA_WState_AcceptedTouchBeginEvent = 122,
0405         WA_TouchPadAcceptSingleTouchEvents = 123,
0406 
0407         WA_X11DoNotAcceptFocus = 126,
0408         // Formerly, 127 was WA_MacNoShadow
0409 
0410         WA_AlwaysStackOnTop = 128,
0411 
0412         WA_TabletTracking = 129,
0413 
0414         WA_ContentsMarginsRespectsSafeArea = 130,
0415 
0416         WA_StyleSheetTarget = 131,
0417 
0418         // Add new attributes before this line
0419         WA_AttributeCount
0420     };
0421 
0422     enum ApplicationAttribute
0423     {
0424         // AA_ImmediateWidgetCreation = 0,
0425         AA_QtQuickUseDefaultSizePolicy = 1 QT_TECH_PREVIEW_API,
0426         AA_DontShowIconsInMenus = 2,
0427         AA_NativeWindows = 3,
0428         AA_DontCreateNativeWidgetSiblings = 4,
0429         AA_PluginApplication = 5,
0430         AA_DontUseNativeMenuBar = 6,
0431         AA_MacDontSwapCtrlAndMeta = 7,
0432         AA_Use96Dpi = 8,
0433         AA_DisableNativeVirtualKeyboard = 9,
0434         // AA_X11InitThreads = 10,
0435         AA_SynthesizeTouchForUnhandledMouseEvents = 11,
0436         AA_SynthesizeMouseForUnhandledTouchEvents = 12,
0437 #if QT_DEPRECATED_SINCE(6, 0)
0438         AA_UseHighDpiPixmaps Q_DECL_ENUMERATOR_DEPRECATED_X(
0439             "High-DPI pixmaps are always enabled. " \
0440             "This attribute no longer has any effect.") = 13,
0441 #endif
0442         AA_ForceRasterWidgets = 14,
0443         AA_UseDesktopOpenGL = 15,
0444         AA_UseOpenGLES = 16,
0445         AA_UseSoftwareOpenGL = 17,
0446         AA_ShareOpenGLContexts = 18,
0447         AA_SetPalette = 19,
0448 #if QT_DEPRECATED_SINCE(6, 0)
0449         AA_EnableHighDpiScaling Q_DECL_ENUMERATOR_DEPRECATED_X(
0450             "High-DPI scaling is always enabled. " \
0451             "This attribute no longer has any effect.") = 20,
0452         AA_DisableHighDpiScaling Q_DECL_ENUMERATOR_DEPRECATED_X(
0453             "High-DPI scaling is always enabled. " \
0454             "This attribute no longer has any effect.") = 21,
0455 #endif
0456         AA_UseStyleSheetPropagationInWidgetStyles = 22,
0457         AA_DontUseNativeDialogs = 23,
0458         AA_SynthesizeMouseForUnhandledTabletEvents = 24,
0459         AA_CompressHighFrequencyEvents = 25,
0460         AA_DontCheckOpenGLContextThreadAffinity = 26,
0461         AA_DisableShaderDiskCache = 27,
0462         AA_DontShowShortcutsInContextMenus = 28,
0463         AA_CompressTabletEvents = 29,
0464         // AA_DisableWindowContextHelpButton = 30,
0465         AA_DisableSessionManager = 31,
0466 
0467         // Add new attributes before this line
0468         AA_AttributeCount
0469     };
0470 
0471 
0472     // Image conversion flags.  The unusual ordering is caused by
0473     // compatibility and default requirements.
0474 
0475     enum ImageConversionFlag {
0476         ColorMode_Mask          = 0x00000003,
0477         AutoColor               = 0x00000000,
0478         ColorOnly               = 0x00000003,
0479         MonoOnly                = 0x00000002,
0480         // Reserved             = 0x00000001,
0481 
0482         AlphaDither_Mask        = 0x0000000c,
0483         ThresholdAlphaDither    = 0x00000000,
0484         OrderedAlphaDither      = 0x00000004,
0485         DiffuseAlphaDither      = 0x00000008,
0486         NoAlpha                 = 0x0000000c, // Not supported
0487 
0488         Dither_Mask             = 0x00000030,
0489         DiffuseDither           = 0x00000000,
0490         OrderedDither           = 0x00000010,
0491         ThresholdDither         = 0x00000020,
0492         // ReservedDither       = 0x00000030,
0493 
0494         DitherMode_Mask         = 0x000000c0,
0495         AutoDither              = 0x00000000,
0496         PreferDither            = 0x00000040,
0497         AvoidDither             = 0x00000080,
0498 
0499         NoOpaqueDetection       = 0x00000100,
0500         NoFormatConversion      = 0x00000200
0501     };
0502     Q_DECLARE_FLAGS(ImageConversionFlags, ImageConversionFlag)
0503     Q_DECLARE_OPERATORS_FOR_FLAGS(ImageConversionFlags)
0504 
0505     enum BGMode {
0506         TransparentMode,
0507         OpaqueMode
0508     };
0509 
0510     enum Key {
0511         // Unicode Basic Latin block (0x00-0x7f)
0512         Key_Space = 0x20,
0513         Key_Any = Key_Space,
0514         Key_Exclam = 0x21,
0515         Key_QuoteDbl = 0x22,
0516         Key_NumberSign = 0x23,
0517         Key_Dollar = 0x24,
0518         Key_Percent = 0x25,
0519         Key_Ampersand = 0x26,
0520         Key_Apostrophe = 0x27,
0521         Key_ParenLeft = 0x28,
0522         Key_ParenRight = 0x29,
0523         Key_Asterisk = 0x2a,
0524         Key_Plus = 0x2b,
0525         Key_Comma = 0x2c,
0526         Key_Minus = 0x2d,
0527         Key_Period = 0x2e,
0528         Key_Slash = 0x2f,
0529         Key_0 = 0x30,
0530         Key_1 = 0x31,
0531         Key_2 = 0x32,
0532         Key_3 = 0x33,
0533         Key_4 = 0x34,
0534         Key_5 = 0x35,
0535         Key_6 = 0x36,
0536         Key_7 = 0x37,
0537         Key_8 = 0x38,
0538         Key_9 = 0x39,
0539         Key_Colon = 0x3a,
0540         Key_Semicolon = 0x3b,
0541         Key_Less = 0x3c,
0542         Key_Equal = 0x3d,
0543         Key_Greater = 0x3e,
0544         Key_Question = 0x3f,
0545         Key_At = 0x40,
0546         Key_A = 0x41,
0547         Key_B = 0x42,
0548         Key_C = 0x43,
0549         Key_D = 0x44,
0550         Key_E = 0x45,
0551         Key_F = 0x46,
0552         Key_G = 0x47,
0553         Key_H = 0x48,
0554         Key_I = 0x49,
0555         Key_J = 0x4a,
0556         Key_K = 0x4b,
0557         Key_L = 0x4c,
0558         Key_M = 0x4d,
0559         Key_N = 0x4e,
0560         Key_O = 0x4f,
0561         Key_P = 0x50,
0562         Key_Q = 0x51,
0563         Key_R = 0x52,
0564         Key_S = 0x53,
0565         Key_T = 0x54,
0566         Key_U = 0x55,
0567         Key_V = 0x56,
0568         Key_W = 0x57,
0569         Key_X = 0x58,
0570         Key_Y = 0x59,
0571         Key_Z = 0x5a,
0572         Key_BracketLeft = 0x5b,
0573         Key_Backslash = 0x5c,
0574         Key_BracketRight = 0x5d,
0575         Key_AsciiCircum = 0x5e,
0576         Key_Underscore = 0x5f,
0577         Key_QuoteLeft = 0x60,
0578         Key_BraceLeft = 0x7b,
0579         Key_Bar = 0x7c,
0580         Key_BraceRight = 0x7d,
0581         Key_AsciiTilde = 0x7e,
0582 
0583         // Unicode Latin-1 Supplement block (0x80-0xff)
0584         Key_nobreakspace = 0x0a0,
0585         Key_exclamdown = 0x0a1,
0586         Key_cent = 0x0a2,
0587         Key_sterling = 0x0a3,
0588         Key_currency = 0x0a4,
0589         Key_yen = 0x0a5,
0590         Key_brokenbar = 0x0a6,
0591         Key_section = 0x0a7,
0592         Key_diaeresis = 0x0a8,
0593         Key_copyright = 0x0a9,
0594         Key_ordfeminine = 0x0aa,
0595         Key_guillemotleft = 0x0ab,        // left angle quotation mark
0596         Key_notsign = 0x0ac,
0597         Key_hyphen = 0x0ad,
0598         Key_registered = 0x0ae,
0599         Key_macron = 0x0af,
0600         Key_degree = 0x0b0,
0601         Key_plusminus = 0x0b1,
0602         Key_twosuperior = 0x0b2,
0603         Key_threesuperior = 0x0b3,
0604         Key_acute = 0x0b4,
0605         Key_micro = 0x0b5,
0606 #if QT_DEPRECATED_SINCE(6, 11)
0607         Key_mu Q_DECL_ENUMERATOR_DEPRECATED_X("This key was misnamed, use Key_micro instead")
0608             = Key_micro,
0609 #endif
0610         Key_paragraph = 0x0b6,
0611         Key_periodcentered = 0x0b7,
0612         Key_cedilla = 0x0b8,
0613         Key_onesuperior = 0x0b9,
0614         Key_masculine = 0x0ba,
0615         Key_guillemotright = 0x0bb,        // right angle quotation mark
0616         Key_onequarter = 0x0bc,
0617         Key_onehalf = 0x0bd,
0618         Key_threequarters = 0x0be,
0619         Key_questiondown = 0x0bf,
0620         Key_Agrave = 0x0c0,
0621         Key_Aacute = 0x0c1,
0622         Key_Acircumflex = 0x0c2,
0623         Key_Atilde = 0x0c3,
0624         Key_Adiaeresis = 0x0c4,
0625         Key_Aring = 0x0c5,
0626         Key_AE = 0x0c6,
0627         Key_Ccedilla = 0x0c7,
0628         Key_Egrave = 0x0c8,
0629         Key_Eacute = 0x0c9,
0630         Key_Ecircumflex = 0x0ca,
0631         Key_Ediaeresis = 0x0cb,
0632         Key_Igrave = 0x0cc,
0633         Key_Iacute = 0x0cd,
0634         Key_Icircumflex = 0x0ce,
0635         Key_Idiaeresis = 0x0cf,
0636         Key_ETH = 0x0d0,
0637         Key_Ntilde = 0x0d1,
0638         Key_Ograve = 0x0d2,
0639         Key_Oacute = 0x0d3,
0640         Key_Ocircumflex = 0x0d4,
0641         Key_Otilde = 0x0d5,
0642         Key_Odiaeresis = 0x0d6,
0643         Key_multiply = 0x0d7,
0644         Key_Ooblique = 0x0d8,
0645         Key_Ugrave = 0x0d9,
0646         Key_Uacute = 0x0da,
0647         Key_Ucircumflex = 0x0db,
0648         Key_Udiaeresis = 0x0dc,
0649         Key_Yacute = 0x0dd,
0650         Key_THORN = 0x0de,
0651         Key_ssharp = 0x0df,
0652         Key_division = 0x0f7,
0653         Key_ydiaeresis = 0x0ff,
0654 
0655         // The rest of the Unicode values are skipped here,
0656         // so that we can represent them along with Qt::Keys
0657         // in the same data type. The maximum Unicode value
0658         // is 0x0010ffff, so we start our custom keys at
0659         // 0x01000000 to not clash with the Unicode values,
0660         // but still give plenty of room to grow.
0661 
0662         Key_Escape = 0x01000000,                // misc keys
0663         Key_Tab = 0x01000001,
0664         Key_Backtab = 0x01000002,
0665         Key_Backspace = 0x01000003,
0666         Key_Return = 0x01000004,
0667         Key_Enter = 0x01000005,
0668         Key_Insert = 0x01000006,
0669         Key_Delete = 0x01000007,
0670         Key_Pause = 0x01000008,
0671         Key_Print = 0x01000009,               // print screen
0672         Key_SysReq = 0x0100000a,
0673         Key_Clear = 0x0100000b,
0674         Key_Home = 0x01000010,                // cursor movement
0675         Key_End = 0x01000011,
0676         Key_Left = 0x01000012,
0677         Key_Up = 0x01000013,
0678         Key_Right = 0x01000014,
0679         Key_Down = 0x01000015,
0680         Key_PageUp = 0x01000016,
0681         Key_PageDown = 0x01000017,
0682         Key_Shift = 0x01000020,                // modifiers
0683         Key_Control = 0x01000021,
0684         Key_Meta = 0x01000022,
0685         Key_Alt = 0x01000023,
0686         Key_CapsLock = 0x01000024,
0687         Key_NumLock = 0x01000025,
0688         Key_ScrollLock = 0x01000026,
0689         Key_F1 = 0x01000030,                // function keys
0690         Key_F2 = 0x01000031,
0691         Key_F3 = 0x01000032,
0692         Key_F4 = 0x01000033,
0693         Key_F5 = 0x01000034,
0694         Key_F6 = 0x01000035,
0695         Key_F7 = 0x01000036,
0696         Key_F8 = 0x01000037,
0697         Key_F9 = 0x01000038,
0698         Key_F10 = 0x01000039,
0699         Key_F11 = 0x0100003a,
0700         Key_F12 = 0x0100003b,
0701         Key_F13 = 0x0100003c,
0702         Key_F14 = 0x0100003d,
0703         Key_F15 = 0x0100003e,
0704         Key_F16 = 0x0100003f,
0705         Key_F17 = 0x01000040,
0706         Key_F18 = 0x01000041,
0707         Key_F19 = 0x01000042,
0708         Key_F20 = 0x01000043,
0709         Key_F21 = 0x01000044,
0710         Key_F22 = 0x01000045,
0711         Key_F23 = 0x01000046,
0712         Key_F24 = 0x01000047,
0713         Key_F25 = 0x01000048,                // F25 .. F35 only on X11
0714         Key_F26 = 0x01000049,
0715         Key_F27 = 0x0100004a,
0716         Key_F28 = 0x0100004b,
0717         Key_F29 = 0x0100004c,
0718         Key_F30 = 0x0100004d,
0719         Key_F31 = 0x0100004e,
0720         Key_F32 = 0x0100004f,
0721         Key_F33 = 0x01000050,
0722         Key_F34 = 0x01000051,
0723         Key_F35 = 0x01000052,
0724         Key_Super_L = 0x01000053,                 // extra keys
0725         Key_Super_R = 0x01000054,
0726         Key_Menu = 0x01000055,
0727         Key_Hyper_L = 0x01000056,
0728         Key_Hyper_R = 0x01000057,
0729         Key_Help = 0x01000058,
0730         Key_Direction_L = 0x01000059,
0731         Key_Direction_R = 0x01000060,
0732 
0733         // International input method support (X keycode - 0xEE00, the
0734         // definition follows Qt/Embedded 2.3.7) Only interesting if
0735         // you are writing your own input method
0736 
0737         // International & multi-key character composition
0738         Key_AltGr               = 0x01001103,
0739         Key_Multi_key           = 0x01001120,  // Multi-key character compose
0740         Key_Codeinput           = 0x01001137,
0741         Key_SingleCandidate     = 0x0100113c,
0742         Key_MultipleCandidate   = 0x0100113d,
0743         Key_PreviousCandidate   = 0x0100113e,
0744 
0745         // Misc Functions
0746         Key_Mode_switch         = 0x0100117e,  // Character set switch
0747         //Key_script_switch       = 0x0100117e,  // Alias for mode_switch
0748 
0749         // Japanese keyboard support
0750         Key_Kanji               = 0x01001121,  // Kanji, Kanji convert
0751         Key_Muhenkan            = 0x01001122,  // Cancel Conversion
0752         //Key_Henkan_Mode         = 0x01001123,  // Start/Stop Conversion
0753         Key_Henkan              = 0x01001123,  // Alias for Henkan_Mode
0754         Key_Romaji              = 0x01001124,  // to Romaji
0755         Key_Hiragana            = 0x01001125,  // to Hiragana
0756         Key_Katakana            = 0x01001126,  // to Katakana
0757         Key_Hiragana_Katakana   = 0x01001127,  // Hiragana/Katakana toggle
0758         Key_Zenkaku             = 0x01001128,  // to Zenkaku
0759         Key_Hankaku             = 0x01001129,  // to Hankaku
0760         Key_Zenkaku_Hankaku     = 0x0100112a,  // Zenkaku/Hankaku toggle
0761         Key_Touroku             = 0x0100112b,  // Add to Dictionary
0762         Key_Massyo              = 0x0100112c,  // Delete from Dictionary
0763         Key_Kana_Lock           = 0x0100112d,  // Kana Lock
0764         Key_Kana_Shift          = 0x0100112e,  // Kana Shift
0765         Key_Eisu_Shift          = 0x0100112f,  // Alphanumeric Shift
0766         Key_Eisu_toggle         = 0x01001130,  // Alphanumeric toggle
0767         //Key_Kanji_Bangou        = 0x01001137,  // Codeinput
0768         //Key_Zen_Koho            = 0x0100113d,  // Multiple/All Candidate(s)
0769         //Key_Mae_Koho            = 0x0100113e,  // Previous Candidate
0770 
0771         // Korean keyboard support
0772         //
0773         // In fact, many Korean users need only 2 keys, Key_Hangul and
0774         // Key_Hangul_Hanja. But rest of the keys are good for future.
0775 
0776         Key_Hangul              = 0x01001131,  // Hangul start/stop(toggle)
0777         Key_Hangul_Start        = 0x01001132,  // Hangul start
0778         Key_Hangul_End          = 0x01001133,  // Hangul end, English start
0779         Key_Hangul_Hanja        = 0x01001134,  // Start Hangul->Hanja Conversion
0780         Key_Hangul_Jamo         = 0x01001135,  // Hangul Jamo mode
0781         Key_Hangul_Romaja       = 0x01001136,  // Hangul Romaja mode
0782         //Key_Hangul_Codeinput    = 0x01001137,  // Hangul code input mode
0783         Key_Hangul_Jeonja       = 0x01001138,  // Jeonja mode
0784         Key_Hangul_Banja        = 0x01001139,  // Banja mode
0785         Key_Hangul_PreHanja     = 0x0100113a,  // Pre Hanja conversion
0786         Key_Hangul_PostHanja    = 0x0100113b,  // Post Hanja conversion
0787         //Key_Hangul_SingleCandidate   = 0x0100113c,  // Single candidate
0788         //Key_Hangul_MultipleCandidate = 0x0100113d,  // Multiple candidate
0789         //Key_Hangul_PreviousCandidate = 0x0100113e,  // Previous candidate
0790         Key_Hangul_Special      = 0x0100113f,  // Special symbols
0791         //Key_Hangul_switch       = 0x0100117e,  // Alias for mode_switch
0792 
0793         // dead keys (X keycode - 0xED00 to avoid the conflict)
0794         Key_Dead_Grave          = 0x01001250,
0795         Key_Dead_Acute          = 0x01001251,
0796         Key_Dead_Circumflex     = 0x01001252,
0797         Key_Dead_Tilde          = 0x01001253,
0798         Key_Dead_Macron         = 0x01001254,
0799         Key_Dead_Breve          = 0x01001255,
0800         Key_Dead_Abovedot       = 0x01001256,
0801         Key_Dead_Diaeresis      = 0x01001257,
0802         Key_Dead_Abovering      = 0x01001258,
0803         Key_Dead_Doubleacute    = 0x01001259,
0804         Key_Dead_Caron          = 0x0100125a,
0805         Key_Dead_Cedilla        = 0x0100125b,
0806         Key_Dead_Ogonek         = 0x0100125c,
0807         Key_Dead_Iota           = 0x0100125d,
0808         Key_Dead_Voiced_Sound   = 0x0100125e,
0809         Key_Dead_Semivoiced_Sound = 0x0100125f,
0810         Key_Dead_Belowdot       = 0x01001260,
0811         Key_Dead_Hook           = 0x01001261,
0812         Key_Dead_Horn           = 0x01001262,
0813         Key_Dead_Stroke         = 0x01001263,
0814         Key_Dead_Abovecomma     = 0x01001264,
0815         Key_Dead_Abovereversedcomma = 0x01001265,
0816         Key_Dead_Doublegrave    = 0x01001266,
0817         Key_Dead_Belowring      = 0x01001267,
0818         Key_Dead_Belowmacron    = 0x01001268,
0819         Key_Dead_Belowcircumflex = 0x01001269,
0820         Key_Dead_Belowtilde     = 0x0100126a,
0821         Key_Dead_Belowbreve     = 0x0100126b,
0822         Key_Dead_Belowdiaeresis = 0x0100126c,
0823         Key_Dead_Invertedbreve  = 0x0100126d,
0824         Key_Dead_Belowcomma     = 0x0100126e,
0825         Key_Dead_Currency       = 0x0100126f,
0826         Key_Dead_a              = 0x01001280,
0827         Key_Dead_A              = 0x01001281,
0828         Key_Dead_e              = 0x01001282,
0829         Key_Dead_E              = 0x01001283,
0830         Key_Dead_i              = 0x01001284,
0831         Key_Dead_I              = 0x01001285,
0832         Key_Dead_o              = 0x01001286,
0833         Key_Dead_O              = 0x01001287,
0834         Key_Dead_u              = 0x01001288,
0835         Key_Dead_U              = 0x01001289,
0836         Key_Dead_Small_Schwa    = 0x0100128a,
0837         Key_Dead_Capital_Schwa  = 0x0100128b,
0838         Key_Dead_Greek          = 0x0100128c,
0839         Key_Dead_Lowline        = 0x01001290,
0840         Key_Dead_Aboveverticalline = 0x01001291,
0841         Key_Dead_Belowverticalline = 0x01001292,
0842         Key_Dead_Longsolidusoverlay = 0x01001293,
0843 
0844         // multimedia/internet keys - ignored by default - see QKeyEvent c'tor
0845         Key_Back  = 0x01000061,
0846         Key_Forward  = 0x01000062,
0847         Key_Stop  = 0x01000063,
0848         Key_Refresh  = 0x01000064,
0849         Key_VolumeDown = 0x01000070,
0850         Key_VolumeMute  = 0x01000071,
0851         Key_VolumeUp = 0x01000072,
0852         Key_BassBoost = 0x01000073,
0853         Key_BassUp = 0x01000074,
0854         Key_BassDown = 0x01000075,
0855         Key_TrebleUp = 0x01000076,
0856         Key_TrebleDown = 0x01000077,
0857         Key_MediaPlay  = 0x01000080,
0858         Key_MediaStop  = 0x01000081,
0859         Key_MediaPrevious  = 0x01000082,
0860         Key_MediaNext  = 0x01000083,
0861         Key_MediaRecord = 0x01000084,
0862         Key_MediaPause = 0x01000085,
0863         Key_MediaTogglePlayPause = 0x01000086,
0864         Key_HomePage  = 0x01000090,
0865         Key_Favorites  = 0x01000091,
0866         Key_Search  = 0x01000092,
0867         Key_Standby = 0x01000093,
0868         Key_OpenUrl = 0x01000094,
0869         Key_LaunchMail  = 0x010000a0,
0870         Key_LaunchMedia = 0x010000a1,
0871         Key_Launch0  = 0x010000a2,
0872         Key_Launch1  = 0x010000a3,
0873         Key_Launch2  = 0x010000a4,
0874         Key_Launch3  = 0x010000a5,
0875         Key_Launch4  = 0x010000a6,
0876         Key_Launch5  = 0x010000a7,
0877         Key_Launch6  = 0x010000a8,
0878         Key_Launch7  = 0x010000a9,
0879         Key_Launch8  = 0x010000aa,
0880         Key_Launch9  = 0x010000ab,
0881         Key_LaunchA  = 0x010000ac,
0882         Key_LaunchB  = 0x010000ad,
0883         Key_LaunchC  = 0x010000ae,
0884         Key_LaunchD  = 0x010000af,
0885         Key_LaunchE  = 0x010000b0,
0886         Key_LaunchF  = 0x010000b1,
0887         Key_MonBrightnessUp = 0x010000b2,
0888         Key_MonBrightnessDown = 0x010000b3,
0889         Key_KeyboardLightOnOff = 0x010000b4,
0890         Key_KeyboardBrightnessUp = 0x010000b5,
0891         Key_KeyboardBrightnessDown = 0x010000b6,
0892         Key_PowerOff = 0x010000b7,
0893         Key_WakeUp = 0x010000b8,
0894         Key_Eject = 0x010000b9,
0895         Key_ScreenSaver = 0x010000ba,
0896         Key_WWW = 0x010000bb,
0897         Key_Memo = 0x010000bc,
0898         Key_LightBulb = 0x010000bd,
0899         Key_Shop = 0x010000be,
0900         Key_History = 0x010000bf,
0901         Key_AddFavorite = 0x010000c0,
0902         Key_HotLinks = 0x010000c1,
0903         Key_BrightnessAdjust = 0x010000c2,
0904         Key_Finance = 0x010000c3,
0905         Key_Community = 0x010000c4,
0906         Key_AudioRewind = 0x010000c5, // Media rewind
0907         Key_BackForward = 0x010000c6,
0908         Key_ApplicationLeft = 0x010000c7,
0909         Key_ApplicationRight = 0x010000c8,
0910         Key_Book = 0x010000c9,
0911         Key_CD = 0x010000ca,
0912         Key_Calculator = 0x010000cb,
0913         Key_ToDoList = 0x010000cc,
0914         Key_ClearGrab = 0x010000cd,
0915         Key_Close = 0x010000ce,
0916         Key_Copy = 0x010000cf,
0917         Key_Cut = 0x010000d0,
0918         Key_Display = 0x010000d1, // Output switch key
0919         Key_DOS = 0x010000d2,
0920         Key_Documents = 0x010000d3,
0921         Key_Excel = 0x010000d4,
0922         Key_Explorer = 0x010000d5,
0923         Key_Game = 0x010000d6,
0924         Key_Go = 0x010000d7,
0925         Key_iTouch = 0x010000d8,
0926         Key_LogOff = 0x010000d9,
0927         Key_Market = 0x010000da,
0928         Key_Meeting = 0x010000db,
0929         Key_MenuKB = 0x010000dc,
0930         Key_MenuPB = 0x010000dd,
0931         Key_MySites = 0x010000de,
0932         Key_News = 0x010000df,
0933         Key_OfficeHome = 0x010000e0,
0934         Key_Option = 0x010000e1,
0935         Key_Paste = 0x010000e2,
0936         Key_Phone = 0x010000e3,
0937         Key_Calendar = 0x010000e4,
0938         Key_Reply = 0x010000e5,
0939         Key_Reload = 0x010000e6,
0940         Key_RotateWindows = 0x010000e7,
0941         Key_RotationPB = 0x010000e8,
0942         Key_RotationKB = 0x010000e9,
0943         Key_Save = 0x010000ea,
0944         Key_Send = 0x010000eb,
0945         Key_Spell = 0x010000ec,
0946         Key_SplitScreen = 0x010000ed,
0947         Key_Support = 0x010000ee,
0948         Key_TaskPane = 0x010000ef,
0949         Key_Terminal = 0x010000f0,
0950         Key_Tools = 0x010000f1,
0951         Key_Travel = 0x010000f2,
0952         Key_Video = 0x010000f3,
0953         Key_Word = 0x010000f4,
0954         Key_Xfer = 0x010000f5,
0955         Key_ZoomIn = 0x010000f6,
0956         Key_ZoomOut = 0x010000f7,
0957         Key_Away = 0x010000f8,
0958         Key_Messenger = 0x010000f9,
0959         Key_WebCam = 0x010000fa,
0960         Key_MailForward = 0x010000fb,
0961         Key_Pictures = 0x010000fc,
0962         Key_Music = 0x010000fd,
0963         Key_Battery = 0x010000fe,
0964         Key_Bluetooth = 0x010000ff,
0965         Key_WLAN = 0x01000100,
0966         Key_UWB = 0x01000101,
0967         Key_AudioForward = 0x01000102, // Media fast-forward
0968         Key_AudioRepeat = 0x01000103, // Toggle repeat mode
0969         Key_AudioRandomPlay = 0x01000104, // Toggle shuffle mode
0970         Key_Subtitle = 0x01000105,
0971         Key_AudioCycleTrack = 0x01000106,
0972         Key_Time = 0x01000107,
0973         Key_Hibernate = 0x01000108,
0974         Key_View = 0x01000109,
0975         Key_TopMenu = 0x0100010a,
0976         Key_PowerDown = 0x0100010b,
0977         Key_Suspend = 0x0100010c,
0978         Key_ContrastAdjust = 0x0100010d,
0979 
0980         // We can remove these two for Qt 7:
0981         Key_LaunchG  = 0x0100010e,
0982         Key_LaunchH  = 0x0100010f,
0983 
0984         Key_TouchpadToggle = 0x01000110,
0985         Key_TouchpadOn = 0x01000111,
0986         Key_TouchpadOff = 0x01000112,
0987 
0988         Key_MicMute = 0x01000113,
0989 
0990         Key_Red = 0x01000114,
0991         Key_Green = 0x01000115,
0992         Key_Yellow = 0x01000116,
0993         Key_Blue = 0x01000117,
0994 
0995         Key_ChannelUp = 0x01000118,
0996         Key_ChannelDown = 0x01000119,
0997 
0998         Key_Guide    = 0x0100011a,
0999         Key_Info     = 0x0100011b,
1000         Key_Settings = 0x0100011c,
1001 
1002         Key_MicVolumeUp   = 0x0100011d,
1003         Key_MicVolumeDown = 0x0100011e,
1004 
1005         Key_New      = 0x01000120,
1006         Key_Open     = 0x01000121,
1007         Key_Find     = 0x01000122,
1008         Key_Undo     = 0x01000123,
1009         Key_Redo     = 0x01000124,
1010 
1011         Key_MediaLast = 0x0100ffff,
1012 
1013         // Keypad navigation keys
1014         Key_Select = 0x01010000,
1015         Key_Yes = 0x01010001,
1016         Key_No = 0x01010002,
1017 
1018         // Newer misc keys
1019         Key_Cancel  = 0x01020001,
1020         Key_Printer = 0x01020002,
1021         Key_Execute = 0x01020003,
1022         Key_Sleep   = 0x01020004,
1023         Key_Play    = 0x01020005, // Not the same as Key_MediaPlay
1024         Key_Zoom    = 0x01020006,
1025         //Key_Jisho   = 0x01020007, // IME: Dictionary key
1026         //Key_Oyayubi_Left = 0x01020008, // IME: Left Oyayubi key
1027         //Key_Oyayubi_Right = 0x01020009, // IME: Right Oyayubi key
1028         Key_Exit    = 0x0102000a,
1029 
1030         // Device keys
1031         Key_Context1 = 0x01100000,
1032         Key_Context2 = 0x01100001,
1033         Key_Context3 = 0x01100002,
1034         Key_Context4 = 0x01100003,
1035         Key_Call = 0x01100004,      // set absolute state to in a call (do not toggle state)
1036         Key_Hangup = 0x01100005,    // set absolute state to hang up (do not toggle state)
1037         Key_Flip = 0x01100006,
1038         Key_ToggleCallHangup = 0x01100007, // a toggle key for answering, or hanging up, based on current call state
1039         Key_VoiceDial = 0x01100008,
1040         Key_LastNumberRedial = 0x01100009,
1041 
1042         Key_Camera = 0x01100020,
1043         Key_CameraFocus = 0x01100021,
1044 
1045         // WARNING: Do not add any keys in the range 0x01200000 to 0xffffffff,
1046         // as those bits are reserved for the Qt::KeyboardModifier enum below.
1047 
1048         Key_unknown = 0x01ffffff
1049     };
1050 
1051     enum KeyboardModifier {
1052         NoModifier           = 0x00000000,
1053         ShiftModifier        = 0x02000000,
1054         ControlModifier      = 0x04000000,
1055         AltModifier          = 0x08000000,
1056         MetaModifier         = 0x10000000,
1057         KeypadModifier       = 0x20000000,
1058         GroupSwitchModifier  = 0x40000000,
1059         // Do not extend the mask to include 0x01000000
1060         KeyboardModifierMask = 0xfe000000
1061     };
1062     Q_DECLARE_FLAGS(KeyboardModifiers, KeyboardModifier)
1063     Q_DECLARE_OPERATORS_FOR_FLAGS(KeyboardModifiers)
1064 
1065     //shorter names for shortcuts
1066     // The use of all-caps identifiers has the potential for clashing with
1067     // user-defined or third-party macros. More so when the identifiers are not
1068     // "namespace"-prefixed. This is considered bad practice and is why
1069     // KeypadModifier was not added to the Modifier enum.
1070     // ### Qt 7: consider deprecating in favor of KeyboardModifier.
1071     enum Modifier {
1072         META          = Qt::MetaModifier,
1073         SHIFT         = Qt::ShiftModifier,
1074         CTRL          = Qt::ControlModifier,
1075         ALT           = Qt::AltModifier,
1076         MODIFIER_MASK = KeyboardModifierMask,
1077     };
1078     Q_DECLARE_FLAGS(Modifiers, Modifier)
1079     Q_DECLARE_OPERATORS_FOR_FLAGS(Modifiers)
1080 
1081     enum ArrowType {
1082         NoArrow,
1083         UpArrow,
1084         DownArrow,
1085         LeftArrow,
1086         RightArrow
1087     };
1088 
1089     enum PenStyle { // pen style
1090         NoPen,
1091         SolidLine,
1092         DashLine,
1093         DotLine,
1094         DashDotLine,
1095         DashDotDotLine,
1096         CustomDashLine
1097 #ifndef Q_MOC_RUN
1098         , MPenStyle = 0x0f
1099 #endif
1100     };
1101 
1102     enum PenCapStyle { // line endcap style
1103         FlatCap = 0x00,
1104         SquareCap = 0x10,
1105         RoundCap = 0x20,
1106         MPenCapStyle = 0x30
1107     };
1108 
1109     enum PenJoinStyle { // line join style
1110         MiterJoin = 0x00,
1111         BevelJoin = 0x40,
1112         RoundJoin = 0x80,
1113         SvgMiterJoin = 0x100,
1114         MPenJoinStyle = 0x1c0
1115     };
1116 
1117     enum BrushStyle { // brush style
1118         NoBrush,
1119         SolidPattern,
1120         Dense1Pattern,
1121         Dense2Pattern,
1122         Dense3Pattern,
1123         Dense4Pattern,
1124         Dense5Pattern,
1125         Dense6Pattern,
1126         Dense7Pattern,
1127         HorPattern,
1128         VerPattern,
1129         CrossPattern,
1130         BDiagPattern,
1131         FDiagPattern,
1132         DiagCrossPattern,
1133         LinearGradientPattern,
1134         RadialGradientPattern,
1135         ConicalGradientPattern,
1136         TexturePattern = 24
1137     };
1138 
1139     enum SizeMode {
1140         AbsoluteSize,
1141         RelativeSize
1142     };
1143 
1144     enum UIEffect {
1145         UI_General,
1146         UI_AnimateMenu,
1147         UI_FadeMenu,
1148         UI_AnimateCombo,
1149         UI_AnimateTooltip,
1150         UI_FadeTooltip,
1151         UI_AnimateToolBox
1152     };
1153 
1154     enum CursorShape {
1155         ArrowCursor,
1156         UpArrowCursor,
1157         CrossCursor,
1158         WaitCursor,
1159         IBeamCursor,
1160         SizeVerCursor,
1161         SizeHorCursor,
1162         SizeBDiagCursor,
1163         SizeFDiagCursor,
1164         SizeAllCursor,
1165         BlankCursor,
1166         SplitVCursor,
1167         SplitHCursor,
1168         PointingHandCursor,
1169         ForbiddenCursor,
1170         WhatsThisCursor,
1171         BusyCursor,
1172         OpenHandCursor,
1173         ClosedHandCursor,
1174         DragCopyCursor,
1175         DragMoveCursor,
1176         DragLinkCursor,
1177         LastCursor = DragLinkCursor,
1178         BitmapCursor = 24,
1179         CustomCursor = 25
1180     };
1181 
1182     enum TextFormat {
1183         PlainText,
1184         RichText,
1185         AutoText,
1186         MarkdownText
1187     };
1188 
1189     enum AspectRatioMode {
1190         IgnoreAspectRatio,
1191         KeepAspectRatio,
1192         KeepAspectRatioByExpanding
1193     };
1194 
1195     enum DockWidgetArea {
1196         LeftDockWidgetArea = 0x1,
1197         RightDockWidgetArea = 0x2,
1198         TopDockWidgetArea = 0x4,
1199         BottomDockWidgetArea = 0x8,
1200 
1201         DockWidgetArea_Mask = 0xf,
1202         AllDockWidgetAreas = DockWidgetArea_Mask,
1203         NoDockWidgetArea = 0
1204     };
1205     enum DockWidgetAreaSizes {
1206         NDockWidgetAreas = 4
1207     };
1208 
1209     Q_DECLARE_FLAGS(DockWidgetAreas, DockWidgetArea)
1210     Q_DECLARE_OPERATORS_FOR_FLAGS(DockWidgetAreas)
1211 
1212     enum ToolBarArea {
1213         LeftToolBarArea = 0x1,
1214         RightToolBarArea = 0x2,
1215         TopToolBarArea = 0x4,
1216         BottomToolBarArea = 0x8,
1217 
1218         ToolBarArea_Mask = 0xf,
1219         AllToolBarAreas = ToolBarArea_Mask,
1220         NoToolBarArea = 0
1221     };
1222 
1223     enum ToolBarAreaSizes {
1224         NToolBarAreas = 4
1225     };
1226 
1227     Q_DECLARE_FLAGS(ToolBarAreas, ToolBarArea)
1228     Q_DECLARE_OPERATORS_FOR_FLAGS(ToolBarAreas)
1229 
1230     enum DateFormat {
1231         TextDate,      // default Qt
1232         ISODate,       // ISO 8601
1233         RFC2822Date = 8, // RFC 2822 (+ 850 and 1036 during parsing)
1234         ISODateWithMs
1235     };
1236 
1237     enum TimeSpec {
1238         LocalTime,
1239         UTC,
1240         OffsetFromUTC,
1241         TimeZone
1242     };
1243 
1244     enum DayOfWeek {
1245         Monday = 1,
1246         Tuesday = 2,
1247         Wednesday = 3,
1248         Thursday = 4,
1249         Friday = 5,
1250         Saturday = 6,
1251         Sunday = 7
1252     };
1253 
1254     enum ScrollBarPolicy {
1255         ScrollBarAsNeeded,
1256         ScrollBarAlwaysOff,
1257         ScrollBarAlwaysOn
1258     };
1259 
1260     enum CaseSensitivity {
1261         CaseInsensitive,
1262         CaseSensitive
1263     };
1264 
1265     enum Corner {
1266         TopLeftCorner = 0x00000,
1267         TopRightCorner = 0x00001,
1268         BottomLeftCorner = 0x00002,
1269         BottomRightCorner = 0x00003
1270     };
1271 
1272     enum Edge {
1273         TopEdge = 0x00001,
1274         LeftEdge = 0x00002,
1275         RightEdge = 0x00004,
1276         BottomEdge = 0x00008
1277     };
1278 
1279     Q_DECLARE_FLAGS(Edges, Edge)
1280     Q_DECLARE_OPERATORS_FOR_FLAGS(Edges)
1281 
1282     enum ConnectionType {
1283         AutoConnection,
1284         DirectConnection,
1285         QueuedConnection,
1286         BlockingQueuedConnection,
1287         UniqueConnection =  0x80,
1288         SingleShotConnection = 0x100,
1289     };
1290 
1291     enum ShortcutContext {
1292         WidgetShortcut,
1293         WindowShortcut,
1294         ApplicationShortcut,
1295         WidgetWithChildrenShortcut
1296     };
1297 
1298     enum FillRule {
1299         OddEvenFill,
1300         WindingFill
1301     };
1302 
1303     enum MaskMode {
1304         MaskInColor,
1305         MaskOutColor
1306     };
1307 
1308     enum ClipOperation {
1309         NoClip,
1310         ReplaceClip,
1311         IntersectClip
1312     };
1313 
1314     // Shape = 0x1, BoundingRect = 0x2
1315     enum ItemSelectionMode {
1316         ContainsItemShape = 0x0,
1317         IntersectsItemShape = 0x1,
1318         ContainsItemBoundingRect = 0x2,
1319         IntersectsItemBoundingRect = 0x3
1320     };
1321 
1322     enum ItemSelectionOperation {
1323         ReplaceSelection,
1324         AddToSelection
1325     };
1326 
1327     enum TransformationMode {
1328         FastTransformation,
1329         SmoothTransformation
1330     };
1331 
1332     enum Axis {
1333         XAxis,
1334         YAxis,
1335         ZAxis
1336     };
1337 
1338     enum FocusReason {
1339         MouseFocusReason,
1340         TabFocusReason,
1341         BacktabFocusReason,
1342         ActiveWindowFocusReason,
1343         PopupFocusReason,
1344         ShortcutFocusReason,
1345         MenuBarFocusReason,
1346         OtherFocusReason,
1347         NoFocusReason
1348     };
1349 
1350     enum ContextMenuPolicy {
1351         NoContextMenu,
1352         DefaultContextMenu,
1353         ActionsContextMenu,
1354         CustomContextMenu,
1355         PreventContextMenu
1356     };
1357 
1358     enum InputMethodQuery {
1359         ImEnabled = 0x1,
1360         ImCursorRectangle = 0x2,
1361         ImFont = 0x4,
1362         ImCursorPosition = 0x8,
1363         ImSurroundingText = 0x10,
1364         ImCurrentSelection = 0x20,
1365         ImMaximumTextLength = 0x40,
1366         ImAnchorPosition = 0x80,
1367         ImHints = 0x100,
1368         ImPreferredLanguage = 0x200,
1369 
1370         ImAbsolutePosition = 0x400,
1371         ImTextBeforeCursor = 0x800,
1372         ImTextAfterCursor = 0x1000,
1373         ImEnterKeyType = 0x2000,
1374         ImAnchorRectangle = 0x4000,
1375         ImInputItemClipRectangle = 0x8000,
1376 
1377         ImReadOnly = 0x10000,
1378         ImPlatformData = 0x80000000,
1379         ImQueryInput = ImCursorRectangle | ImCursorPosition | ImSurroundingText |
1380                        ImCurrentSelection | ImAnchorRectangle | ImAnchorPosition,
1381         ImQueryAll = 0xffffffff
1382     };
1383     Q_DECLARE_FLAGS(InputMethodQueries, InputMethodQuery)
1384     Q_DECLARE_OPERATORS_FOR_FLAGS(InputMethodQueries)
1385 
1386     enum InputMethodHint {
1387         ImhNone = 0x0,
1388 
1389         ImhHiddenText = 0x1,
1390         ImhSensitiveData = 0x2,
1391         ImhNoAutoUppercase = 0x4,
1392         ImhPreferNumbers = 0x8,
1393         ImhPreferUppercase = 0x10,
1394         ImhPreferLowercase = 0x20,
1395         ImhNoPredictiveText = 0x40,
1396 
1397         ImhDate = 0x80,
1398         ImhTime = 0x100,
1399 
1400         ImhPreferLatin = 0x200,
1401 
1402         ImhMultiLine = 0x400,
1403 
1404         ImhNoEditMenu = 0x800,
1405         ImhNoTextHandles = 0x1000,
1406 
1407         ImhDigitsOnly = 0x10000,
1408         ImhFormattedNumbersOnly = 0x20000,
1409         ImhUppercaseOnly = 0x40000,
1410         ImhLowercaseOnly = 0x80000,
1411         ImhDialableCharactersOnly = 0x100000,
1412         ImhEmailCharactersOnly = 0x200000,
1413         ImhUrlCharactersOnly = 0x400000,
1414         ImhLatinOnly = 0x800000,
1415 
1416         ImhExclusiveInputMask = 0xffff0000
1417     };
1418     Q_DECLARE_FLAGS(InputMethodHints, InputMethodHint)
1419     Q_DECLARE_OPERATORS_FOR_FLAGS(InputMethodHints)
1420 
1421     enum EnterKeyType {
1422         EnterKeyDefault,
1423         EnterKeyReturn,
1424         EnterKeyDone,
1425         EnterKeyGo,
1426         EnterKeySend,
1427         EnterKeySearch,
1428         EnterKeyNext,
1429         EnterKeyPrevious
1430     };
1431 
1432     enum ToolButtonStyle {
1433         ToolButtonIconOnly,
1434         ToolButtonTextOnly,
1435         ToolButtonTextBesideIcon,
1436         ToolButtonTextUnderIcon,
1437         ToolButtonFollowStyle
1438     };
1439 
1440     enum LayoutDirection {
1441         LeftToRight,
1442         RightToLeft,
1443         // ### Qt 7: make auto the first one (with value 0)
1444         LayoutDirectionAuto
1445     };
1446 
1447     enum AnchorPoint {
1448         AnchorLeft = 0,
1449         AnchorHorizontalCenter,
1450         AnchorRight,
1451         AnchorTop,
1452         AnchorVerticalCenter,
1453         AnchorBottom
1454     };
1455 
1456     enum FindChildOption {
1457         FindDirectChildrenOnly = 0x0,
1458         FindChildrenRecursively = 0x1
1459     };
1460     Q_DECLARE_FLAGS(FindChildOptions, FindChildOption)
1461 
1462     enum DropAction {
1463         CopyAction = 0x1,
1464         MoveAction = 0x2,
1465         LinkAction = 0x4,
1466         ActionMask = 0xff,
1467         TargetMoveAction = 0x8002,
1468         IgnoreAction = 0x0
1469     };
1470     Q_DECLARE_FLAGS(DropActions, DropAction)
1471     Q_DECLARE_OPERATORS_FOR_FLAGS(DropActions)
1472 
1473     enum CheckState {
1474         Unchecked,
1475         PartiallyChecked,
1476         Checked
1477     };
1478 
1479     enum ItemDataRole {
1480         DisplayRole = 0,
1481         DecorationRole = 1,
1482         EditRole = 2,
1483         ToolTipRole = 3,
1484         StatusTipRole = 4,
1485         WhatsThisRole = 5,
1486         // Metadata
1487         FontRole = 6,
1488         TextAlignmentRole = 7,
1489         BackgroundRole = 8,
1490         ForegroundRole = 9,
1491         CheckStateRole = 10,
1492         // Accessibility
1493         AccessibleTextRole = 11,
1494         AccessibleDescriptionRole = 12,
1495         // More general purpose
1496         SizeHintRole = 13,
1497         InitialSortOrderRole = 14,
1498         // Internal UiLib roles. Start worrying when public roles go that high.
1499         DisplayPropertyRole = 27,
1500         DecorationPropertyRole = 28,
1501         ToolTipPropertyRole = 29,
1502         StatusTipPropertyRole = 30,
1503         WhatsThisPropertyRole = 31,
1504         // Reserved
1505         UserRole = 0x0100
1506     };
1507 
1508     enum ItemFlag {
1509         NoItemFlags = 0,
1510         ItemIsSelectable = 1,
1511         ItemIsEditable = 2,
1512         ItemIsDragEnabled = 4,
1513         ItemIsDropEnabled = 8,
1514         ItemIsUserCheckable = 16,
1515         ItemIsEnabled = 32,
1516         ItemIsAutoTristate = 64,
1517         ItemNeverHasChildren = 128,
1518         ItemIsUserTristate = 256
1519     };
1520     Q_DECLARE_FLAGS(ItemFlags, ItemFlag)
1521     Q_DECLARE_OPERATORS_FOR_FLAGS(ItemFlags)
1522 
1523     enum MatchFlag {
1524         MatchExactly = 0,
1525         MatchContains = 1,
1526         MatchStartsWith = 2,
1527         MatchEndsWith = 3,
1528         MatchRegularExpression = 4,
1529         MatchWildcard = 5,
1530         MatchFixedString = 8,
1531         MatchTypeMask = 0x0F,
1532         MatchCaseSensitive = 16,
1533         MatchWrap = 32,
1534         MatchRecursive = 64
1535     };
1536     Q_DECLARE_FLAGS(MatchFlags, MatchFlag)
1537     Q_DECLARE_OPERATORS_FOR_FLAGS(MatchFlags)
1538 
1539     typedef void * HANDLE;
1540 
1541     enum WindowModality {
1542         NonModal,
1543         WindowModal,
1544         ApplicationModal
1545     };
1546 
1547     enum TextInteractionFlag {
1548         NoTextInteraction         = 0,
1549         TextSelectableByMouse     = 1,
1550         TextSelectableByKeyboard  = 2,
1551         LinksAccessibleByMouse    = 4,
1552         LinksAccessibleByKeyboard = 8,
1553         TextEditable              = 16,
1554 
1555         TextEditorInteraction     = TextSelectableByMouse | TextSelectableByKeyboard | TextEditable,
1556         TextBrowserInteraction    = TextSelectableByMouse | LinksAccessibleByMouse | LinksAccessibleByKeyboard
1557     };
1558     Q_DECLARE_FLAGS(TextInteractionFlags, TextInteractionFlag)
1559     Q_DECLARE_OPERATORS_FOR_FLAGS(TextInteractionFlags)
1560 
1561     enum EventPriority {
1562         HighEventPriority = 1,
1563         NormalEventPriority = 0,
1564         LowEventPriority = -1
1565     };
1566 
1567     enum SizeHint {
1568         MinimumSize,
1569         PreferredSize,
1570         MaximumSize,
1571         MinimumDescent,
1572         NSizeHints
1573     };
1574 
1575     enum WindowFrameSection {
1576         NoSection,
1577         LeftSection,           // For resize
1578         TopLeftSection,
1579         TopSection,
1580         TopRightSection,
1581         RightSection,
1582         BottomRightSection,
1583         BottomSection,
1584         BottomLeftSection,
1585         TitleBarArea    // For move
1586     };
1587 
1588     enum class Initialization {
1589         Uninitialized
1590     };
1591     inline constexpr Initialization Uninitialized = Initialization::Uninitialized;
1592 
1593     struct Disambiguated_t {
1594         explicit Disambiguated_t() = default;
1595     };
1596     inline constexpr Disambiguated_t Disambiguated{};
1597 
1598     enum CoordinateSystem {
1599         DeviceCoordinates,
1600         LogicalCoordinates
1601     };
1602 
1603     enum TouchPointState {
1604         TouchPointUnknownState = 0x00,
1605         TouchPointPressed    = 0x01,
1606         TouchPointMoved      = 0x02,
1607         TouchPointStationary = 0x04,
1608         TouchPointReleased   = 0x08
1609     };
1610     Q_DECLARE_FLAGS(TouchPointStates, TouchPointState)
1611     Q_DECLARE_OPERATORS_FOR_FLAGS(TouchPointStates)
1612 
1613 #ifndef QT_NO_GESTURES
1614     enum GestureState
1615     {
1616         NoGesture,
1617         GestureStarted  = 1,
1618         GestureUpdated  = 2,
1619         GestureFinished = 3,
1620         GestureCanceled = 4
1621     };
1622 
1623     enum GestureType
1624     {
1625         TapGesture        = 1,
1626         TapAndHoldGesture = 2,
1627         PanGesture        = 3,
1628         PinchGesture      = 4,
1629         SwipeGesture      = 5,
1630 
1631         CustomGesture     = 0x0100,
1632 
1633         LastGestureType   = ~0u
1634     };
1635 
1636     enum GestureFlag
1637     {
1638         DontStartGestureOnChildren = 0x01,
1639         ReceivePartialGestures     = 0x02,
1640         IgnoredGesturesPropagateToParent = 0x04
1641     };
1642     Q_DECLARE_FLAGS(GestureFlags, GestureFlag)
1643     Q_DECLARE_OPERATORS_FOR_FLAGS(GestureFlags)
1644 
1645     enum NativeGestureType
1646     {
1647         BeginNativeGesture,
1648         EndNativeGesture,
1649         PanNativeGesture,
1650         ZoomNativeGesture,
1651         SmartZoomNativeGesture,
1652         RotateNativeGesture,
1653         SwipeNativeGesture
1654     };
1655 
1656 #endif // QT_NO_GESTURES
1657 
1658     enum NavigationMode
1659     {
1660         NavigationModeNone,
1661         NavigationModeKeypadTabOrder,
1662         NavigationModeKeypadDirectional,
1663         NavigationModeCursorAuto,
1664         NavigationModeCursorForceVisible
1665     };
1666 
1667     enum CursorMoveStyle {
1668         LogicalMoveStyle,
1669         VisualMoveStyle
1670     };
1671 
1672     enum TimerType {
1673         PreciseTimer,
1674         CoarseTimer,
1675         VeryCoarseTimer
1676     };
1677 
1678     enum ScrollPhase {
1679         NoScrollPhase = 0,
1680         ScrollBegin,
1681         ScrollUpdate,
1682         ScrollEnd,
1683         ScrollMomentum
1684     };
1685 
1686     enum MouseEventSource {
1687         MouseEventNotSynthesized,
1688         MouseEventSynthesizedBySystem,
1689         MouseEventSynthesizedByQt,
1690         MouseEventSynthesizedByApplication
1691     };
1692 
1693     enum MouseEventFlag {
1694         NoMouseEventFlag = 0x00,
1695         MouseEventCreatedDoubleClick = 0x01,
1696         MouseEventFlagMask = 0xFF
1697     };
1698     Q_DECLARE_FLAGS(MouseEventFlags, MouseEventFlag)
1699     Q_DECLARE_OPERATORS_FOR_FLAGS(MouseEventFlags)
1700 
1701     enum ChecksumType {
1702         ChecksumIso3309,
1703         ChecksumItuV41
1704     };
1705 
1706     enum class HighDpiScaleFactorRoundingPolicy {
1707         Unset,
1708         Round,
1709         Ceil,
1710         Floor,
1711         RoundPreferFloor,
1712         PassThrough
1713     };
1714 
1715     enum class PermissionStatus {
1716         Undetermined,
1717         Granted,
1718         Denied,
1719     };
1720 
1721     // QTBUG-48701
1722     enum ReturnByValueConstant { ReturnByValue }; // ### Qt 7: Remove me
1723 
1724 #ifndef Q_QDOC
1725     // NOTE: Generally, do not add Q_ENUM_NS if a corresponding Q_FLAG_NS exists.
1726     Q_ENUM_NS(ScrollBarPolicy)
1727     Q_ENUM_NS(FocusPolicy)
1728     Q_ENUM_NS(ContextMenuPolicy)
1729     Q_ENUM_NS(ArrowType)
1730     Q_ENUM_NS(ToolButtonStyle)
1731     Q_ENUM_NS(PenStyle)
1732     Q_ENUM_NS(PenCapStyle)
1733     Q_ENUM_NS(PenJoinStyle)
1734     Q_ENUM_NS(BrushStyle)
1735     Q_ENUM_NS(FillRule)
1736     Q_ENUM_NS(MaskMode)
1737     Q_ENUM_NS(BGMode)
1738     Q_ENUM_NS(ClipOperation)
1739     Q_ENUM_NS(SizeMode)
1740     Q_ENUM_NS(Axis)
1741     Q_ENUM_NS(Corner)
1742     Q_ENUM_NS(Edge)
1743     Q_ENUM_NS(LayoutDirection)
1744     Q_ENUM_NS(SizeHint)
1745     Q_ENUM_NS(Orientation)
1746     Q_ENUM_NS(DropAction)
1747     Q_FLAG_NS(Alignment)
1748     Q_ENUM_NS(TextFlag)
1749     Q_FLAG_NS(Orientations)
1750     Q_FLAG_NS(SplitBehavior)
1751     Q_FLAG_NS(DropActions)
1752     Q_FLAG_NS(Edges)
1753     Q_FLAG_NS(DockWidgetAreas)
1754     Q_FLAG_NS(ToolBarAreas)
1755     Q_ENUM_NS(DockWidgetArea)
1756     Q_ENUM_NS(ToolBarArea)
1757     Q_ENUM_NS(TextFormat)
1758     Q_ENUM_NS(TextElideMode)
1759     Q_ENUM_NS(DateFormat)
1760     Q_ENUM_NS(TimeSpec)
1761     Q_ENUM_NS(DayOfWeek)
1762     Q_ENUM_NS(CursorShape)
1763     Q_ENUM_NS(GlobalColor)
1764     Q_ENUM_NS(ColorScheme)
1765     Q_ENUM_NS(AspectRatioMode)
1766     Q_ENUM_NS(TransformationMode)
1767     Q_FLAG_NS(ImageConversionFlags)
1768     Q_ENUM_NS(Key)
1769     Q_ENUM_NS(ShortcutContext)
1770     Q_ENUM_NS(TextInteractionFlag)
1771     Q_FLAG_NS(TextInteractionFlags)
1772     Q_ENUM_NS(ItemSelectionMode)
1773     Q_ENUM_NS(ItemSelectionOperation)
1774     Q_FLAG_NS(ItemFlags)
1775     Q_ENUM_NS(CheckState)
1776     Q_ENUM_NS(ItemDataRole)
1777     Q_ENUM_NS(SortOrder)
1778     Q_ENUM_NS(CaseSensitivity)
1779     Q_FLAG_NS(MatchFlags)
1780     Q_ENUM_NS(Modifier)
1781     Q_FLAG_NS(Modifiers)
1782     Q_ENUM_NS(KeyboardModifier)
1783     Q_FLAG_NS(KeyboardModifiers)
1784     Q_FLAG_NS(MouseButtons)
1785     Q_ENUM_NS(WindowType)
1786     Q_ENUM_NS(WindowState)
1787     Q_ENUM_NS(WindowModality)
1788     Q_ENUM_NS(WidgetAttribute)
1789     Q_ENUM_NS(ApplicationAttribute)
1790     Q_FLAG_NS(WindowFlags)
1791     Q_FLAG_NS(WindowStates)
1792     Q_ENUM_NS(FocusReason)
1793     Q_ENUM_NS(InputMethodHint)
1794     Q_ENUM_NS(InputMethodQuery)
1795     Q_FLAG_NS(InputMethodHints)
1796     Q_ENUM_NS(EnterKeyType)
1797     Q_FLAG_NS(InputMethodQueries)
1798     Q_FLAG_NS(TouchPointStates)
1799     Q_ENUM_NS(ScreenOrientation)
1800     Q_FLAG_NS(ScreenOrientations)
1801     Q_ENUM_NS(ConnectionType)
1802     Q_ENUM_NS(ApplicationState)
1803 #ifndef QT_NO_GESTURES
1804     Q_ENUM_NS(GestureState)
1805     Q_ENUM_NS(GestureType)
1806     Q_ENUM_NS(NativeGestureType)
1807 #endif
1808     Q_ENUM_NS(CursorMoveStyle)
1809     Q_ENUM_NS(TimerType)
1810     Q_ENUM_NS(ScrollPhase)
1811     Q_ENUM_NS(MouseEventSource)
1812     Q_FLAG_NS(MouseEventFlags)
1813     Q_ENUM_NS(ChecksumType)
1814     Q_ENUM_NS(HighDpiScaleFactorRoundingPolicy)
1815     Q_ENUM_NS(TabFocusBehavior)
1816     Q_ENUM_NS(PermissionStatus)
1817 #endif // Q_DOC
1818 
1819 }
1820 
1821 typedef bool (*qInternalCallback)(void **);
1822 
1823 class Q_CORE_EXPORT QInternal {
1824 public:
1825     enum PaintDeviceFlags {
1826         UnknownDevice = 0x00,
1827         Widget        = 0x01,
1828         Pixmap        = 0x02,
1829         Image         = 0x03,
1830         Printer       = 0x04,
1831         Picture       = 0x05,
1832         Pbuffer       = 0x06,    // GL pbuffer
1833         FramebufferObject = 0x07, // GL framebuffer object
1834         CustomRaster  = 0x08,
1835         PaintBuffer   = 0x0a,
1836         OpenGL        = 0x0b
1837     };
1838     enum RelayoutType {
1839         RelayoutNormal,
1840         RelayoutDragging,
1841         RelayoutDropped
1842     };
1843 
1844     enum DockPosition {
1845         LeftDock,
1846         RightDock,
1847         TopDock,
1848         BottomDock,
1849         DockCount
1850     };
1851 
1852     enum Callback {
1853         EventNotifyCallback,
1854         LastCallback
1855     };
1856     static bool registerCallback(Callback, qInternalCallback);
1857     static bool unregisterCallback(Callback, qInternalCallback);
1858     static bool activateCallbacks(Callback, void **);
1859 };
1860 
1861 class QKeyCombination
1862 {
1863     int combination;
1864 
1865 public:
1866     constexpr Q_IMPLICIT QKeyCombination(Qt::Key key = Qt::Key_unknown) noexcept
1867         : combination(int(key))
1868     {}
1869 
1870     constexpr explicit QKeyCombination(Qt::Modifiers modifiers, Qt::Key key = Qt::Key_unknown) noexcept
1871         : combination(modifiers.toInt() | int(key))
1872     {}
1873 
1874     constexpr explicit QKeyCombination(Qt::KeyboardModifiers modifiers, Qt::Key key = Qt::Key_unknown) noexcept
1875         : combination(modifiers.toInt() | int(key))
1876     {}
1877 
1878     constexpr Qt::KeyboardModifiers keyboardModifiers() const noexcept
1879     {
1880         return Qt::KeyboardModifiers(combination & Qt::KeyboardModifierMask);
1881     }
1882 
1883     constexpr Qt::Key key() const noexcept
1884     {
1885         return Qt::Key(combination & ~int(Qt::KeyboardModifierMask));
1886     }
1887 
1888     static constexpr QKeyCombination fromCombined(int combined)
1889     {
1890         QKeyCombination result;
1891         result.combination = combined;
1892         return result;
1893     }
1894 
1895     constexpr int toCombined() const noexcept
1896     {
1897         return combination;
1898     }
1899 
1900 #if QT_DEPRECATED_SINCE(6, 0)
1901     QT_DEPRECATED_VERSION_X(6, 0, "Use QKeyCombination instead of int")
1902     constexpr Q_IMPLICIT operator int() const noexcept
1903     {
1904         return combination;
1905     }
1906 #endif
1907 
1908     friend constexpr bool operator==(QKeyCombination lhs, QKeyCombination rhs) noexcept
1909     {
1910         return lhs.combination == rhs.combination;
1911     }
1912 
1913     friend constexpr bool operator!=(QKeyCombination lhs, QKeyCombination rhs) noexcept
1914     {
1915         return lhs.combination != rhs.combination;
1916     }
1917 
1918     bool operator<(QKeyCombination) const = delete;
1919 };
1920 
1921 Q_DECLARE_TYPEINFO(QKeyCombination, Q_RELOCATABLE_TYPE);
1922 
1923 constexpr QKeyCombination operator|(Qt::Modifier modifier, Qt::Key key) noexcept
1924 {
1925     return QKeyCombination(modifier, key);
1926 }
1927 
1928 constexpr QKeyCombination operator|(Qt::Modifiers modifiers, Qt::Key key) noexcept
1929 {
1930     return QKeyCombination(modifiers, key);
1931 }
1932 
1933 constexpr QKeyCombination operator|(Qt::KeyboardModifier modifier, Qt::Key key) noexcept
1934 {
1935     return QKeyCombination(modifier, key);
1936 }
1937 
1938 constexpr QKeyCombination operator|(Qt::KeyboardModifiers modifiers, Qt::Key key) noexcept
1939 {
1940     return QKeyCombination(modifiers, key);
1941 }
1942 
1943 constexpr QKeyCombination operator|(Qt::Key key, Qt::Modifier modifier) noexcept
1944 {
1945     return QKeyCombination(modifier, key);
1946 }
1947 
1948 constexpr QKeyCombination operator|(Qt::Key key, Qt::Modifiers modifiers) noexcept
1949 {
1950     return QKeyCombination(modifiers, key);
1951 }
1952 
1953 constexpr QKeyCombination operator|(Qt::Key key, Qt::KeyboardModifier modifier) noexcept
1954 {
1955     return QKeyCombination(modifier, key);
1956 }
1957 
1958 constexpr QKeyCombination operator|(Qt::Key key, Qt::KeyboardModifiers modifiers) noexcept
1959 {
1960     return QKeyCombination(modifiers, key);
1961 }
1962 
1963 #if QT_DEPRECATED_SINCE(6, 0)
1964 QT_DEPRECATED_VERSION_X(6, 0, "Use operator| instead")
1965 constexpr QKeyCombination operator+(Qt::Modifier modifier, Qt::Key key) noexcept
1966 {
1967     return QKeyCombination(modifier, key);
1968 }
1969 
1970 QT_DEPRECATED_VERSION_X(6, 0, "Use operator| instead")
1971 constexpr QKeyCombination operator+(Qt::Modifiers modifiers, Qt::Key key) noexcept
1972 {
1973     return QKeyCombination(modifiers, key);
1974 }
1975 
1976 QT_DEPRECATED_VERSION_X(6, 0, "Use operator| instead")
1977 constexpr QKeyCombination operator+(Qt::KeyboardModifier modifier, Qt::Key key) noexcept
1978 {
1979     return QKeyCombination(modifier, key);
1980 }
1981 
1982 QT_DEPRECATED_VERSION_X(6, 0, "Use operator| instead")
1983 constexpr QKeyCombination operator+(Qt::KeyboardModifiers modifiers, Qt::Key key) noexcept
1984 {
1985     return QKeyCombination(modifiers, key);
1986 }
1987 
1988 QT_DEPRECATED_VERSION_X(6, 0, "Use operator| instead")
1989 constexpr QKeyCombination operator+(Qt::Key key, Qt::Modifier modifier) noexcept
1990 {
1991     return QKeyCombination(modifier, key);
1992 }
1993 
1994 QT_DEPRECATED_VERSION_X(6, 0, "Use operator| instead")
1995 constexpr QKeyCombination operator+(Qt::Key key, Qt::Modifiers modifiers) noexcept
1996 {
1997     return QKeyCombination(modifiers, key);
1998 }
1999 
2000 QT_DEPRECATED_VERSION_X(6, 0, "Use operator| instead")
2001 constexpr QKeyCombination operator+(Qt::Key key, Qt::KeyboardModifier modifier) noexcept
2002 {
2003     return QKeyCombination(modifier, key);
2004 }
2005 
2006 QT_DEPRECATED_VERSION_X(6, 0, "Use operator| instead")
2007 constexpr QKeyCombination operator+(Qt::Key key, Qt::KeyboardModifiers modifiers) noexcept
2008 {
2009     return QKeyCombination(modifiers, key);
2010 }
2011 #endif
2012 
2013 QT_END_NAMESPACE
2014 
2015 #endif // QNAMESPACE_H