1// Copyright (C) 2020 The Qt Company Ltd.
2// Copyright (C) 2020 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef QNAMESPACE_H
6#define QNAMESPACE_H
7
8#if 0
9#pragma qt_class(Qt)
10#endif
11
12#include <QtCore/qglobal.h>
13#include <QtCore/qcompare.h>
14#include <QtCore/qtclasshelpermacros.h>
15#include <QtCore/qtmetamacros.h>
16
17#if defined(__OBJC__) && !defined(__cplusplus)
18# warning "File built in Objective-C mode (.m), but using Qt requires Objective-C++ (.mm)"
19#endif
20
21QT_BEGIN_NAMESPACE
22
23struct QMetaObject;
24
25namespace Qt {
26 Q_NAMESPACE_EXPORT(Q_CORE_EXPORT)
27
28 enum GlobalColor {
29 color0,
30 color1,
31 black,
32 white,
33 darkGray,
34 gray,
35 lightGray,
36 red,
37 green,
38 blue,
39 cyan,
40 magenta,
41 yellow,
42 darkRed,
43 darkGreen,
44 darkBlue,
45 darkCyan,
46 darkMagenta,
47 darkYellow,
48 transparent
49 };
50
51 enum class ColorScheme {
52 Unknown,
53 Light,
54 Dark,
55 };
56
57 enum class ContrastPreference {
58 NoPreference,
59 HighContrast,
60 };
61
62 enum MouseButton {
63 NoButton = 0x00000000,
64 LeftButton = 0x00000001,
65 RightButton = 0x00000002,
66 MiddleButton = 0x00000004,
67 BackButton = 0x00000008,
68 XButton1 = BackButton,
69 ExtraButton1 = XButton1,
70 ForwardButton = 0x00000010,
71 XButton2 = ForwardButton,
72 ExtraButton2 = ForwardButton,
73 TaskButton = 0x00000020,
74 ExtraButton3 = TaskButton,
75 ExtraButton4 = 0x00000040,
76 ExtraButton5 = 0x00000080,
77 ExtraButton6 = 0x00000100,
78 ExtraButton7 = 0x00000200,
79 ExtraButton8 = 0x00000400,
80 ExtraButton9 = 0x00000800,
81 ExtraButton10 = 0x00001000,
82 ExtraButton11 = 0x00002000,
83 ExtraButton12 = 0x00004000,
84 ExtraButton13 = 0x00008000,
85 ExtraButton14 = 0x00010000,
86 ExtraButton15 = 0x00020000,
87 ExtraButton16 = 0x00040000,
88 ExtraButton17 = 0x00080000,
89 ExtraButton18 = 0x00100000,
90 ExtraButton19 = 0x00200000,
91 ExtraButton20 = 0x00400000,
92 ExtraButton21 = 0x00800000,
93 ExtraButton22 = 0x01000000,
94 ExtraButton23 = 0x02000000,
95 ExtraButton24 = 0x04000000,
96 AllButtons = 0x07ffffff,
97 MaxMouseButton = ExtraButton24,
98 // 4 high-order bits remain available for future use (0x08000000 through 0x40000000).
99 MouseButtonMask = 0xffffffff
100 };
101 Q_DECLARE_FLAGS(MouseButtons, MouseButton)
102 Q_DECLARE_OPERATORS_FOR_FLAGS(MouseButtons)
103
104 enum Orientation {
105 Horizontal = 0x1,
106 Vertical = 0x2
107 };
108
109 Q_DECLARE_FLAGS(Orientations, Orientation)
110 Q_DECLARE_OPERATORS_FOR_FLAGS(Orientations)
111
112 enum FocusPolicy {
113 NoFocus = 0,
114 TabFocus = 0x1,
115 ClickFocus = 0x2,
116 StrongFocus = TabFocus | ClickFocus | 0x8,
117 WheelFocus = StrongFocus | 0x4
118 };
119
120 enum TabFocusBehavior {
121 NoTabFocus = 0x00,
122 TabFocusTextControls = 0x01,
123 TabFocusListControls = 0x02,
124 TabFocusAllControls = 0xff
125 };
126
127 enum SortOrder {
128 AscendingOrder,
129 DescendingOrder
130 };
131
132 enum SplitBehaviorFlags {
133 KeepEmptyParts = 0,
134 SkipEmptyParts = 0x1,
135 };
136 Q_DECLARE_FLAGS(SplitBehavior, SplitBehaviorFlags)
137 Q_DECLARE_OPERATORS_FOR_FLAGS(SplitBehavior)
138
139 enum TileRule {
140 StretchTile,
141 RepeatTile,
142 RoundTile
143 };
144
145 // Text formatting flags for QPainter::drawText and QLabel.
146 // The following two enums can be combined to one integer which
147 // is passed as 'flags' to QPainter::drawText, QFontMetrics::boundingRect and qt_format_text.
148
149 enum AlignmentFlag {
150 AlignLeft = 0x0001,
151 AlignLeading = AlignLeft,
152 AlignRight = 0x0002,
153 AlignTrailing = AlignRight,
154 AlignHCenter = 0x0004,
155 AlignJustify = 0x0008,
156 AlignAbsolute = 0x0010,
157 AlignHorizontal_Mask = AlignLeft | AlignRight | AlignHCenter | AlignJustify | AlignAbsolute,
158
159 AlignTop = 0x0020,
160 AlignBottom = 0x0040,
161 AlignVCenter = 0x0080,
162 AlignBaseline = 0x0100,
163 // Note that 0x100 will clash with Qt::TextSingleLine = 0x100 due to what the comment above
164 // this enum declaration states. However, since Qt::AlignBaseline is only used by layouts,
165 // it doesn't make sense to pass Qt::AlignBaseline to QPainter::drawText(), so there
166 // shouldn't really be any ambiguity between the two overlapping enum values.
167 AlignVertical_Mask = AlignTop | AlignBottom | AlignVCenter | AlignBaseline,
168
169 AlignCenter = AlignVCenter | AlignHCenter
170 };
171
172 Q_DECLARE_FLAGS(Alignment, AlignmentFlag)
173 Q_DECLARE_OPERATORS_FOR_FLAGS(Alignment)
174
175 enum TextFlag {
176 TextSingleLine = 0x0100,
177 TextDontClip = 0x0200,
178 TextExpandTabs = 0x0400,
179 TextShowMnemonic = 0x0800,
180 TextWordWrap = 0x1000,
181 TextWrapAnywhere = 0x2000,
182 TextDontPrint = 0x4000,
183 TextIncludeTrailingSpaces = 0x08000000,
184 TextHideMnemonic = 0x8000,
185 TextJustificationForced = 0x10000,
186 TextForceLeftToRight = 0x20000,
187 TextForceRightToLeft = 0x40000,
188 // Ensures that the longest variant is always used when computing the
189 // size of a multi-variant string.
190 TextLongestVariant = 0x80000
191 };
192 Q_DECLARE_MIXED_ENUM_OPERATORS_SYMMETRIC(int, AlignmentFlag, TextFlag)
193
194 enum TextElideMode {
195 ElideLeft,
196 ElideRight,
197 ElideMiddle,
198 ElideNone
199 };
200 Q_DECLARE_MIXED_ENUM_OPERATORS_SYMMETRIC(int, TextElideMode, TextFlag)
201
202 enum WhiteSpaceMode {
203 WhiteSpaceNormal,
204 WhiteSpacePre,
205 WhiteSpaceNoWrap,
206 WhiteSpaceModeUndefined = -1
207 };
208
209 enum HitTestAccuracy { ExactHit, FuzzyHit };
210
211 enum WindowType {
212 Widget = 0x00000000,
213 Window = 0x00000001,
214 Dialog = 0x00000002 | Window,
215 Sheet = 0x00000004 | Window,
216 Drawer = Sheet | Dialog,
217 Popup = 0x00000008 | Window,
218 Tool = Popup | Dialog,
219 ToolTip = Popup | Sheet,
220 SplashScreen = ToolTip | Dialog,
221 Desktop = 0x00000010 | Window,
222 SubWindow = 0x00000012, // Note QTBUG-115729 before using
223 ForeignWindow = 0x00000020 | Window,
224 CoverWindow = 0x00000040 | Window,
225
226 WindowType_Mask = 0x000000ff,
227 MSWindowsFixedSizeDialogHint = 0x00000100,
228 MSWindowsOwnDC = 0x00000200,
229 BypassWindowManagerHint = 0x00000400,
230 X11BypassWindowManagerHint = BypassWindowManagerHint,
231 FramelessWindowHint = 0x00000800,
232 WindowTitleHint = 0x00001000,
233 WindowSystemMenuHint = 0x00002000,
234 WindowMinimizeButtonHint = 0x00004000,
235 WindowMaximizeButtonHint = 0x00008000,
236 WindowMinMaxButtonsHint = WindowMinimizeButtonHint | WindowMaximizeButtonHint,
237 WindowContextHelpButtonHint = 0x00010000,
238 WindowShadeButtonHint = 0x00020000,
239 WindowStaysOnTopHint = 0x00040000,
240 WindowTransparentForInput = 0x00080000,
241 WindowOverridesSystemGestures = 0x00100000,
242 WindowDoesNotAcceptFocus = 0x00200000,
243#if QT_DEPRECATED_SINCE(6, 13)
244 MaximizeUsingFullscreenGeometryHint Q_DECL_ENUMERATOR_DEPRECATED_X(
245 "Use Qt::ExpandedClientAreaHint instead") = 0x00400000,
246#endif
247 ExpandedClientAreaHint = 0x00400000,
248 NoTitleBarBackgroundHint = 0x00800000,
249
250 CustomizeWindowHint = 0x02000000,
251 WindowStaysOnBottomHint = 0x04000000,
252 WindowCloseButtonHint = 0x08000000,
253#if QT_DEPRECATED_SINCE(6, 9)
254 MacWindowToolBarButtonHint Q_DECL_ENUMERATOR_DEPRECATED_X(
255 "This flag has been a no-op since Qt 5") = 0x10000000,
256#endif
257 BypassGraphicsProxyWidget = 0x20000000,
258 NoDropShadowWindowHint = 0x40000000,
259 WindowFullscreenButtonHint = 0x80000000
260 };
261
262 Q_DECLARE_FLAGS(WindowFlags, WindowType)
263 Q_DECLARE_OPERATORS_FOR_FLAGS(WindowFlags)
264
265 enum WindowState {
266 WindowNoState = 0x00000000,
267 WindowMinimized = 0x00000001,
268 WindowMaximized = 0x00000002,
269 WindowFullScreen = 0x00000004,
270 WindowActive = 0x00000008
271 };
272
273 Q_DECLARE_FLAGS(WindowStates, WindowState)
274 Q_DECLARE_OPERATORS_FOR_FLAGS(WindowStates)
275
276 enum ApplicationState {
277 ApplicationSuspended = 0x00000000,
278 ApplicationHidden = 0x00000001,
279 ApplicationInactive = 0x00000002,
280 ApplicationActive = 0x00000004
281 };
282
283 Q_DECLARE_FLAGS(ApplicationStates, ApplicationState)
284
285 enum ScreenOrientation {
286 PrimaryOrientation = 0x00000000,
287 PortraitOrientation = 0x00000001,
288 LandscapeOrientation = 0x00000002,
289 InvertedPortraitOrientation = 0x00000004,
290 InvertedLandscapeOrientation = 0x00000008
291 };
292
293 Q_DECLARE_FLAGS(ScreenOrientations, ScreenOrientation)
294 Q_DECLARE_OPERATORS_FOR_FLAGS(ScreenOrientations)
295
296 enum WidgetAttribute {
297 WA_Disabled = 0,
298 WA_UnderMouse = 1,
299 WA_MouseTracking = 2,
300 // Formerly, 3 was WA_ContentsPropagated.
301 WA_OpaquePaintEvent = 4,
302 WA_StaticContents = 5,
303 WA_LaidOut = 7,
304 WA_PaintOnScreen = 8,
305 WA_NoSystemBackground = 9,
306 WA_UpdatesDisabled = 10,
307 WA_Mapped = 11,
308 // Formerly, 12 was WA_MacNoClickThrough.
309 WA_InputMethodEnabled = 14,
310 WA_WState_Visible = 15,
311 WA_WState_Hidden = 16,
312
313 WA_ForceDisabled = 32,
314 WA_KeyCompression = 33,
315 WA_PendingMoveEvent = 34,
316 WA_PendingResizeEvent = 35,
317 WA_SetPalette = 36,
318 WA_SetFont = 37,
319 WA_SetCursor = 38,
320 WA_NoChildEventsFromChildren = 39,
321 WA_WindowModified = 41,
322 WA_Resized = 42,
323 WA_Moved = 43,
324 WA_PendingUpdate = 44,
325 WA_InvalidSize = 45,
326 // Formerly 46 was WA_MacBrushedMetal and WA_MacMetalStyle.
327 WA_CustomWhatsThis = 47,
328 WA_LayoutOnEntireRect = 48,
329 WA_OutsideWSRange = 49,
330 WA_GrabbedShortcut = 50,
331 WA_TransparentForMouseEvents = 51,
332 WA_PaintUnclipped = 52,
333 WA_SetWindowIcon = 53,
334 WA_NoMouseReplay = 54,
335 WA_DeleteOnClose = 55,
336 WA_RightToLeft = 56,
337 WA_SetLayoutDirection = 57,
338 WA_NoChildEventsForParent = 58,
339 WA_ForceUpdatesDisabled = 59,
340
341 WA_WState_Created = 60,
342 WA_WState_CompressKeys = 61,
343 WA_WState_InPaintEvent = 62,
344 WA_WState_Reparented = 63,
345 WA_WState_ConfigPending = 64,
346 WA_WState_Polished = 66,
347 // Formerly, 67 was WA_WState_DND.
348 WA_WState_OwnSizePolicy = 68,
349 WA_WState_ExplicitShowHide = 69,
350
351 WA_ShowModal = 70, // ## deprecated since since 4.5.1 but still in use :-(
352 WA_MouseNoMask = 71,
353 WA_NoMousePropagation = 73, // for now, might go away.
354 WA_Hover = 74,
355 WA_InputMethodTransparent = 75, // Don't reset IM when user clicks on this (for virtual keyboards on embedded)
356 WA_QuitOnClose = 76,
357
358 WA_KeyboardFocusChange = 77,
359
360 WA_AcceptDrops = 78,
361 WA_DropSiteRegistered = 79, // internal
362
363 WA_WindowPropagation = 80,
364
365 WA_NoX11EventCompression = 81,
366 WA_TintedBackground = 82,
367 WA_X11OpenGLOverlay = 83,
368 WA_AlwaysShowToolTips = 84,
369 WA_MacOpaqueSizeGrip = 85,
370 WA_SetStyle = 86,
371
372 WA_SetLocale = 87,
373 WA_MacShowFocusRect = 88,
374
375 WA_MacNormalSize = 89, // Mac only
376 WA_MacSmallSize = 90, // Mac only
377 WA_MacMiniSize = 91, // Mac only
378
379 WA_LayoutUsesWidgetRect = 92,
380 WA_StyledBackground = 93, // internal
381 // Formerly, 94 was WA_MSWindowsUseDirect3D.
382 WA_CanHostQMdiSubWindowTitleBar = 95, // Internal
383
384 WA_MacAlwaysShowToolWindow = 96, // Mac only
385
386 WA_StyleSheet = 97, // internal
387
388 WA_ShowWithoutActivating = 98,
389
390 WA_X11BypassTransientForHint = 99,
391
392 WA_NativeWindow = 100,
393 WA_DontCreateNativeAncestors = 101,
394
395 // Formerly WA_MacVariableSize = 102, // Mac only
396
397 WA_DontShowOnScreen = 103,
398
399 // window types from http://standards.freedesktop.org/wm-spec/
400 WA_X11NetWmWindowTypeDesktop = 104,
401 WA_X11NetWmWindowTypeDock = 105,
402 WA_X11NetWmWindowTypeToolBar = 106,
403 WA_X11NetWmWindowTypeMenu = 107,
404 WA_X11NetWmWindowTypeUtility = 108,
405 WA_X11NetWmWindowTypeSplash = 109,
406 WA_X11NetWmWindowTypeDialog = 110,
407 WA_X11NetWmWindowTypeDropDownMenu = 111,
408 WA_X11NetWmWindowTypePopupMenu = 112,
409 WA_X11NetWmWindowTypeToolTip = 113,
410 WA_X11NetWmWindowTypeNotification = 114,
411 WA_X11NetWmWindowTypeCombo = 115,
412 WA_X11NetWmWindowTypeDND = 116,
413 // Formerly, 117 was WA_MacFrameworkScaled.
414 WA_SetWindowModality = 118,
415 WA_WState_WindowOpacitySet = 119, // internal
416 WA_TranslucentBackground = 120,
417
418 WA_AcceptTouchEvents = 121,
419 WA_WState_AcceptedTouchBeginEvent = 122,
420 WA_TouchPadAcceptSingleTouchEvents = 123,
421
422 WA_X11DoNotAcceptFocus = 126,
423 // Formerly, 127 was WA_MacNoShadow
424
425 WA_AlwaysStackOnTop = 128,
426
427 WA_TabletTracking = 129,
428
429 WA_ContentsMarginsRespectsSafeArea = 130,
430
431 WA_StyleSheetTarget = 131,
432
433 // Add new attributes before this line
434 WA_AttributeCount
435 };
436
437 enum ApplicationAttribute
438 {
439 // AA_ImmediateWidgetCreation = 0,
440 AA_QtQuickUseDefaultSizePolicy = 1,
441 AA_DontShowIconsInMenus = 2,
442 AA_NativeWindows = 3,
443 AA_DontCreateNativeWidgetSiblings = 4,
444 AA_PluginApplication = 5,
445 AA_DontUseNativeMenuBar = 6,
446 AA_MacDontSwapCtrlAndMeta = 7,
447 AA_Use96Dpi = 8,
448 AA_DisableNativeVirtualKeyboard = 9,
449 AA_DontUseNativeMenuWindows = 10,
450 AA_SynthesizeTouchForUnhandledMouseEvents = 11,
451 AA_SynthesizeMouseForUnhandledTouchEvents = 12,
452#if QT_DEPRECATED_SINCE(6, 0)
453 AA_UseHighDpiPixmaps Q_DECL_ENUMERATOR_DEPRECATED_X(
454 "High-DPI pixmaps are always enabled. " \
455 "This attribute no longer has any effect.") = 13,
456#endif
457 AA_ForceRasterWidgets = 14,
458 AA_UseDesktopOpenGL = 15,
459 AA_UseOpenGLES = 16,
460 AA_UseSoftwareOpenGL = 17,
461 AA_ShareOpenGLContexts = 18,
462 AA_SetPalette = 19,
463#if QT_DEPRECATED_SINCE(6, 0)
464 AA_EnableHighDpiScaling Q_DECL_ENUMERATOR_DEPRECATED_X(
465 "High-DPI scaling is always enabled. " \
466 "This attribute no longer has any effect.") = 20,
467 AA_DisableHighDpiScaling Q_DECL_ENUMERATOR_DEPRECATED_X(
468 "High-DPI scaling is always enabled. " \
469 "This attribute no longer has any effect.") = 21,
470#endif
471 AA_UseStyleSheetPropagationInWidgetStyles = 22,
472 AA_DontUseNativeDialogs = 23,
473 AA_SynthesizeMouseForUnhandledTabletEvents = 24,
474 AA_CompressHighFrequencyEvents = 25,
475 AA_DontCheckOpenGLContextThreadAffinity = 26,
476 AA_DisableShaderDiskCache = 27,
477 AA_DontShowShortcutsInContextMenus = 28,
478 AA_CompressTabletEvents = 29,
479 // AA_DisableWindowContextHelpButton = 30, (in Qt 5)
480 AA_DisableSessionManager = 31,
481
482 // Add new attributes before this line
483 AA_AttributeCount
484 };
485
486
487 // Image conversion flags. The unusual ordering is caused by
488 // compatibility and default requirements.
489
490 enum ImageConversionFlag {
491 ColorMode_Mask = 0x00000003,
492 AutoColor = 0x00000000,
493 ColorOnly = 0x00000003,
494 MonoOnly = 0x00000002,
495 // Reserved = 0x00000001,
496
497 AlphaDither_Mask = 0x0000000c,
498 ThresholdAlphaDither = 0x00000000,
499 OrderedAlphaDither = 0x00000004,
500 DiffuseAlphaDither = 0x00000008,
501 NoAlpha = 0x0000000c, // Not supported
502
503 Dither_Mask = 0x00000030,
504 DiffuseDither = 0x00000000,
505 OrderedDither = 0x00000010,
506 ThresholdDither = 0x00000020,
507 // ReservedDither = 0x00000030,
508
509 DitherMode_Mask = 0x000000c0,
510 AutoDither = 0x00000000,
511 PreferDither = 0x00000040,
512 AvoidDither = 0x00000080,
513
514 NoOpaqueDetection = 0x00000100,
515 NoFormatConversion = 0x00000200
516 };
517 Q_DECLARE_FLAGS(ImageConversionFlags, ImageConversionFlag)
518 Q_DECLARE_OPERATORS_FOR_FLAGS(ImageConversionFlags)
519
520 enum BGMode {
521 TransparentMode,
522 OpaqueMode
523 };
524
525 enum Key {
526 // Unicode Basic Latin block (0x00-0x7f)
527 Key_Space = 0x20,
528 Key_Any = Key_Space,
529 Key_Exclam = 0x21,
530 Key_QuoteDbl = 0x22,
531 Key_NumberSign = 0x23,
532 Key_Dollar = 0x24,
533 Key_Percent = 0x25,
534 Key_Ampersand = 0x26,
535 Key_Apostrophe = 0x27,
536 Key_ParenLeft = 0x28,
537 Key_ParenRight = 0x29,
538 Key_Asterisk = 0x2a,
539 Key_Plus = 0x2b,
540 Key_Comma = 0x2c,
541 Key_Minus = 0x2d,
542 Key_Period = 0x2e,
543 Key_Slash = 0x2f,
544 Key_0 = 0x30,
545 Key_1 = 0x31,
546 Key_2 = 0x32,
547 Key_3 = 0x33,
548 Key_4 = 0x34,
549 Key_5 = 0x35,
550 Key_6 = 0x36,
551 Key_7 = 0x37,
552 Key_8 = 0x38,
553 Key_9 = 0x39,
554 Key_Colon = 0x3a,
555 Key_Semicolon = 0x3b,
556 Key_Less = 0x3c,
557 Key_Equal = 0x3d,
558 Key_Greater = 0x3e,
559 Key_Question = 0x3f,
560 Key_At = 0x40,
561 Key_A = 0x41,
562 Key_B = 0x42,
563 Key_C = 0x43,
564 Key_D = 0x44,
565 Key_E = 0x45,
566 Key_F = 0x46,
567 Key_G = 0x47,
568 Key_H = 0x48,
569 Key_I = 0x49,
570 Key_J = 0x4a,
571 Key_K = 0x4b,
572 Key_L = 0x4c,
573 Key_M = 0x4d,
574 Key_N = 0x4e,
575 Key_O = 0x4f,
576 Key_P = 0x50,
577 Key_Q = 0x51,
578 Key_R = 0x52,
579 Key_S = 0x53,
580 Key_T = 0x54,
581 Key_U = 0x55,
582 Key_V = 0x56,
583 Key_W = 0x57,
584 Key_X = 0x58,
585 Key_Y = 0x59,
586 Key_Z = 0x5a,
587 Key_BracketLeft = 0x5b,
588 Key_Backslash = 0x5c,
589 Key_BracketRight = 0x5d,
590 Key_AsciiCircum = 0x5e,
591 Key_Underscore = 0x5f,
592 Key_QuoteLeft = 0x60,
593 Key_BraceLeft = 0x7b,
594 Key_Bar = 0x7c,
595 Key_BraceRight = 0x7d,
596 Key_AsciiTilde = 0x7e,
597
598 // Unicode Latin-1 Supplement block (0x80-0xff)
599 Key_nobreakspace = 0x0a0,
600 Key_exclamdown = 0x0a1,
601 Key_cent = 0x0a2,
602 Key_sterling = 0x0a3,
603 Key_currency = 0x0a4,
604 Key_yen = 0x0a5,
605 Key_brokenbar = 0x0a6,
606 Key_section = 0x0a7,
607 Key_diaeresis = 0x0a8,
608 Key_copyright = 0x0a9,
609 Key_ordfeminine = 0x0aa,
610 Key_guillemotleft = 0x0ab, // left angle quotation mark
611 Key_notsign = 0x0ac,
612 Key_hyphen = 0x0ad,
613 Key_registered = 0x0ae,
614 Key_macron = 0x0af,
615 Key_degree = 0x0b0,
616 Key_plusminus = 0x0b1,
617 Key_twosuperior = 0x0b2,
618 Key_threesuperior = 0x0b3,
619 Key_acute = 0x0b4,
620 Key_micro = 0x0b5,
621#if QT_DEPRECATED_SINCE(6, 11)
622 Key_mu Q_DECL_ENUMERATOR_DEPRECATED_X("This key was misnamed, use Key_micro instead")
623 = Key_micro,
624#endif
625 Key_paragraph = 0x0b6,
626 Key_periodcentered = 0x0b7,
627 Key_cedilla = 0x0b8,
628 Key_onesuperior = 0x0b9,
629 Key_masculine = 0x0ba,
630 Key_guillemotright = 0x0bb, // right angle quotation mark
631 Key_onequarter = 0x0bc,
632 Key_onehalf = 0x0bd,
633 Key_threequarters = 0x0be,
634 Key_questiondown = 0x0bf,
635 Key_Agrave = 0x0c0,
636 Key_Aacute = 0x0c1,
637 Key_Acircumflex = 0x0c2,
638 Key_Atilde = 0x0c3,
639 Key_Adiaeresis = 0x0c4,
640 Key_Aring = 0x0c5,
641 Key_AE = 0x0c6,
642 Key_Ccedilla = 0x0c7,
643 Key_Egrave = 0x0c8,
644 Key_Eacute = 0x0c9,
645 Key_Ecircumflex = 0x0ca,
646 Key_Ediaeresis = 0x0cb,
647 Key_Igrave = 0x0cc,
648 Key_Iacute = 0x0cd,
649 Key_Icircumflex = 0x0ce,
650 Key_Idiaeresis = 0x0cf,
651 Key_ETH = 0x0d0,
652 Key_Ntilde = 0x0d1,
653 Key_Ograve = 0x0d2,
654 Key_Oacute = 0x0d3,
655 Key_Ocircumflex = 0x0d4,
656 Key_Otilde = 0x0d5,
657 Key_Odiaeresis = 0x0d6,
658 Key_multiply = 0x0d7,
659 Key_Ooblique = 0x0d8,
660 Key_Ugrave = 0x0d9,
661 Key_Uacute = 0x0da,
662 Key_Ucircumflex = 0x0db,
663 Key_Udiaeresis = 0x0dc,
664 Key_Yacute = 0x0dd,
665 Key_THORN = 0x0de,
666 Key_ssharp = 0x0df,
667 Key_division = 0x0f7,
668 Key_ydiaeresis = 0x0ff,
669
670 // The rest of the Unicode values are skipped here,
671 // so that we can represent them along with Qt::Keys
672 // in the same data type. The maximum Unicode value
673 // is 0x0010ffff, so we start our custom keys at
674 // 0x01000000 to not clash with the Unicode values,
675 // but still give plenty of room to grow.
676
677 Key_Escape = 0x01000000, // misc keys
678 Key_Tab = 0x01000001,
679 Key_Backtab = 0x01000002,
680 Key_Backspace = 0x01000003,
681 Key_Return = 0x01000004,
682 Key_Enter = 0x01000005,
683 Key_Insert = 0x01000006,
684 Key_Delete = 0x01000007,
685 Key_Pause = 0x01000008,
686 Key_Print = 0x01000009, // print screen
687 Key_SysReq = 0x0100000a,
688 Key_Clear = 0x0100000b,
689 Key_Home = 0x01000010, // cursor movement
690 Key_End = 0x01000011,
691 Key_Left = 0x01000012,
692 Key_Up = 0x01000013,
693 Key_Right = 0x01000014,
694 Key_Down = 0x01000015,
695 Key_PageUp = 0x01000016,
696 Key_PageDown = 0x01000017,
697 Key_Shift = 0x01000020, // modifiers
698 Key_Control = 0x01000021,
699 Key_Meta = 0x01000022,
700 Key_Alt = 0x01000023,
701 Key_CapsLock = 0x01000024,
702 Key_NumLock = 0x01000025,
703 Key_ScrollLock = 0x01000026,
704 Key_F1 = 0x01000030, // function keys
705 Key_F2 = 0x01000031,
706 Key_F3 = 0x01000032,
707 Key_F4 = 0x01000033,
708 Key_F5 = 0x01000034,
709 Key_F6 = 0x01000035,
710 Key_F7 = 0x01000036,
711 Key_F8 = 0x01000037,
712 Key_F9 = 0x01000038,
713 Key_F10 = 0x01000039,
714 Key_F11 = 0x0100003a,
715 Key_F12 = 0x0100003b,
716 Key_F13 = 0x0100003c,
717 Key_F14 = 0x0100003d,
718 Key_F15 = 0x0100003e,
719 Key_F16 = 0x0100003f,
720 Key_F17 = 0x01000040,
721 Key_F18 = 0x01000041,
722 Key_F19 = 0x01000042,
723 Key_F20 = 0x01000043,
724 Key_F21 = 0x01000044,
725 Key_F22 = 0x01000045,
726 Key_F23 = 0x01000046,
727 Key_F24 = 0x01000047,
728 Key_F25 = 0x01000048, // F25 .. F35 only on X11
729 Key_F26 = 0x01000049,
730 Key_F27 = 0x0100004a,
731 Key_F28 = 0x0100004b,
732 Key_F29 = 0x0100004c,
733 Key_F30 = 0x0100004d,
734 Key_F31 = 0x0100004e,
735 Key_F32 = 0x0100004f,
736 Key_F33 = 0x01000050,
737 Key_F34 = 0x01000051,
738 Key_F35 = 0x01000052,
739 Key_Super_L = 0x01000053, // extra keys
740 Key_Super_R = 0x01000054,
741 Key_Menu = 0x01000055,
742 Key_Hyper_L = 0x01000056,
743 Key_Hyper_R = 0x01000057,
744 Key_Help = 0x01000058,
745 Key_Direction_L = 0x01000059,
746 Key_Direction_R = 0x01000060,
747
748 // International input method support (X keycode - 0xEE00, the
749 // definition follows Qt/Embedded 2.3.7) Only interesting if
750 // you are writing your own input method
751
752 // International & multi-key character composition
753 Key_AltGr = 0x01001103,
754 Key_Multi_key = 0x01001120, // Multi-key character compose
755 Key_Codeinput = 0x01001137,
756 Key_SingleCandidate = 0x0100113c,
757 Key_MultipleCandidate = 0x0100113d,
758 Key_PreviousCandidate = 0x0100113e,
759
760 // Misc Functions
761 Key_Mode_switch = 0x0100117e, // Character set switch
762 //Key_script_switch = 0x0100117e, // Alias for mode_switch
763
764 // Japanese keyboard support
765 Key_Kanji = 0x01001121, // Kanji, Kanji convert
766 Key_Muhenkan = 0x01001122, // Cancel Conversion
767 //Key_Henkan_Mode = 0x01001123, // Start/Stop Conversion
768 Key_Henkan = 0x01001123, // Alias for Henkan_Mode
769 Key_Romaji = 0x01001124, // to Romaji
770 Key_Hiragana = 0x01001125, // to Hiragana
771 Key_Katakana = 0x01001126, // to Katakana
772 Key_Hiragana_Katakana = 0x01001127, // Hiragana/Katakana toggle
773 Key_Zenkaku = 0x01001128, // to Zenkaku
774 Key_Hankaku = 0x01001129, // to Hankaku
775 Key_Zenkaku_Hankaku = 0x0100112a, // Zenkaku/Hankaku toggle
776 Key_Touroku = 0x0100112b, // Add to Dictionary
777 Key_Massyo = 0x0100112c, // Delete from Dictionary
778 Key_Kana_Lock = 0x0100112d, // Kana Lock
779 Key_Kana_Shift = 0x0100112e, // Kana Shift
780 Key_Eisu_Shift = 0x0100112f, // Alphanumeric Shift
781 Key_Eisu_toggle = 0x01001130, // Alphanumeric toggle
782 //Key_Kanji_Bangou = 0x01001137, // Codeinput
783 //Key_Zen_Koho = 0x0100113d, // Multiple/All Candidate(s)
784 //Key_Mae_Koho = 0x0100113e, // Previous Candidate
785
786 // Korean keyboard support
787 //
788 // In fact, many Korean users need only 2 keys, Key_Hangul and
789 // Key_Hangul_Hanja. But rest of the keys are good for future.
790
791 Key_Hangul = 0x01001131, // Hangul start/stop(toggle)
792 Key_Hangul_Start = 0x01001132, // Hangul start
793 Key_Hangul_End = 0x01001133, // Hangul end, English start
794 Key_Hangul_Hanja = 0x01001134, // Start Hangul->Hanja Conversion
795 Key_Hangul_Jamo = 0x01001135, // Hangul Jamo mode
796 Key_Hangul_Romaja = 0x01001136, // Hangul Romaja mode
797 //Key_Hangul_Codeinput = 0x01001137, // Hangul code input mode
798 Key_Hangul_Jeonja = 0x01001138, // Jeonja mode
799 Key_Hangul_Banja = 0x01001139, // Banja mode
800 Key_Hangul_PreHanja = 0x0100113a, // Pre Hanja conversion
801 Key_Hangul_PostHanja = 0x0100113b, // Post Hanja conversion
802 //Key_Hangul_SingleCandidate = 0x0100113c, // Single candidate
803 //Key_Hangul_MultipleCandidate = 0x0100113d, // Multiple candidate
804 //Key_Hangul_PreviousCandidate = 0x0100113e, // Previous candidate
805 Key_Hangul_Special = 0x0100113f, // Special symbols
806 //Key_Hangul_switch = 0x0100117e, // Alias for mode_switch
807
808 // dead keys (X keycode - 0xED00 to avoid the conflict)
809 Key_Dead_Grave = 0x01001250,
810 Key_Dead_Acute = 0x01001251,
811 Key_Dead_Circumflex = 0x01001252,
812 Key_Dead_Tilde = 0x01001253,
813 Key_Dead_Macron = 0x01001254,
814 Key_Dead_Breve = 0x01001255,
815 Key_Dead_Abovedot = 0x01001256,
816 Key_Dead_Diaeresis = 0x01001257,
817 Key_Dead_Abovering = 0x01001258,
818 Key_Dead_Doubleacute = 0x01001259,
819 Key_Dead_Caron = 0x0100125a,
820 Key_Dead_Cedilla = 0x0100125b,
821 Key_Dead_Ogonek = 0x0100125c,
822 Key_Dead_Iota = 0x0100125d,
823 Key_Dead_Voiced_Sound = 0x0100125e,
824 Key_Dead_Semivoiced_Sound = 0x0100125f,
825 Key_Dead_Belowdot = 0x01001260,
826 Key_Dead_Hook = 0x01001261,
827 Key_Dead_Horn = 0x01001262,
828 Key_Dead_Stroke = 0x01001263,
829 Key_Dead_Abovecomma = 0x01001264,
830 Key_Dead_Abovereversedcomma = 0x01001265,
831 Key_Dead_Doublegrave = 0x01001266,
832 Key_Dead_Belowring = 0x01001267,
833 Key_Dead_Belowmacron = 0x01001268,
834 Key_Dead_Belowcircumflex = 0x01001269,
835 Key_Dead_Belowtilde = 0x0100126a,
836 Key_Dead_Belowbreve = 0x0100126b,
837 Key_Dead_Belowdiaeresis = 0x0100126c,
838 Key_Dead_Invertedbreve = 0x0100126d,
839 Key_Dead_Belowcomma = 0x0100126e,
840 Key_Dead_Currency = 0x0100126f,
841 Key_Dead_a = 0x01001280,
842 Key_Dead_A = 0x01001281,
843 Key_Dead_e = 0x01001282,
844 Key_Dead_E = 0x01001283,
845 Key_Dead_i = 0x01001284,
846 Key_Dead_I = 0x01001285,
847 Key_Dead_o = 0x01001286,
848 Key_Dead_O = 0x01001287,
849 Key_Dead_u = 0x01001288,
850 Key_Dead_U = 0x01001289,
851 Key_Dead_Small_Schwa = 0x0100128a,
852 Key_Dead_Capital_Schwa = 0x0100128b,
853 Key_Dead_Greek = 0x0100128c,
854 Key_Dead_Lowline = 0x01001290,
855 Key_Dead_Aboveverticalline = 0x01001291,
856 Key_Dead_Belowverticalline = 0x01001292,
857 Key_Dead_Longsolidusoverlay = 0x01001293,
858
859 // multimedia/internet keys - ignored by default - see QKeyEvent c'tor
860 Key_Back = 0x01000061,
861 Key_Forward = 0x01000062,
862 Key_Stop = 0x01000063,
863 Key_Refresh = 0x01000064,
864 Key_VolumeDown = 0x01000070,
865 Key_VolumeMute = 0x01000071,
866 Key_VolumeUp = 0x01000072,
867 Key_BassBoost = 0x01000073,
868 Key_BassUp = 0x01000074,
869 Key_BassDown = 0x01000075,
870 Key_TrebleUp = 0x01000076,
871 Key_TrebleDown = 0x01000077,
872 Key_MediaPlay = 0x01000080,
873 Key_MediaStop = 0x01000081,
874 Key_MediaPrevious = 0x01000082,
875 Key_MediaNext = 0x01000083,
876 Key_MediaRecord = 0x01000084,
877 Key_MediaPause = 0x01000085,
878 Key_MediaTogglePlayPause = 0x01000086,
879 Key_HomePage = 0x01000090,
880 Key_Favorites = 0x01000091,
881 Key_Search = 0x01000092,
882 Key_Standby = 0x01000093,
883 Key_OpenUrl = 0x01000094,
884 Key_LaunchMail = 0x010000a0,
885 Key_LaunchMedia = 0x010000a1,
886 Key_Launch0 = 0x010000a2,
887 Key_Launch1 = 0x010000a3,
888 Key_Launch2 = 0x010000a4,
889 Key_Launch3 = 0x010000a5,
890 Key_Launch4 = 0x010000a6,
891 Key_Launch5 = 0x010000a7,
892 Key_Launch6 = 0x010000a8,
893 Key_Launch7 = 0x010000a9,
894 Key_Launch8 = 0x010000aa,
895 Key_Launch9 = 0x010000ab,
896 Key_LaunchA = 0x010000ac,
897 Key_LaunchB = 0x010000ad,
898 Key_LaunchC = 0x010000ae,
899 Key_LaunchD = 0x010000af,
900 Key_LaunchE = 0x010000b0,
901 Key_LaunchF = 0x010000b1,
902 Key_MonBrightnessUp = 0x010000b2,
903 Key_MonBrightnessDown = 0x010000b3,
904 Key_KeyboardLightOnOff = 0x010000b4,
905 Key_KeyboardBrightnessUp = 0x010000b5,
906 Key_KeyboardBrightnessDown = 0x010000b6,
907 Key_PowerOff = 0x010000b7,
908 Key_WakeUp = 0x010000b8,
909 Key_Eject = 0x010000b9,
910 Key_ScreenSaver = 0x010000ba,
911 Key_WWW = 0x010000bb,
912 Key_Memo = 0x010000bc,
913 Key_LightBulb = 0x010000bd,
914 Key_Shop = 0x010000be,
915 Key_History = 0x010000bf,
916 Key_AddFavorite = 0x010000c0,
917 Key_HotLinks = 0x010000c1,
918 Key_BrightnessAdjust = 0x010000c2,
919 Key_Finance = 0x010000c3,
920 Key_Community = 0x010000c4,
921 Key_AudioRewind = 0x010000c5, // Media rewind
922 Key_BackForward = 0x010000c6,
923 Key_ApplicationLeft = 0x010000c7,
924 Key_ApplicationRight = 0x010000c8,
925 Key_Book = 0x010000c9,
926 Key_CD = 0x010000ca,
927 Key_Calculator = 0x010000cb,
928 Key_ToDoList = 0x010000cc,
929 Key_ClearGrab = 0x010000cd,
930 Key_Close = 0x010000ce,
931 Key_Copy = 0x010000cf,
932 Key_Cut = 0x010000d0,
933 Key_Display = 0x010000d1, // Output switch key
934 Key_DOS = 0x010000d2,
935 Key_Documents = 0x010000d3,
936 Key_Excel = 0x010000d4,
937 Key_Explorer = 0x010000d5,
938 Key_Game = 0x010000d6,
939 Key_Go = 0x010000d7,
940 Key_iTouch = 0x010000d8,
941 Key_LogOff = 0x010000d9,
942 Key_Market = 0x010000da,
943 Key_Meeting = 0x010000db,
944 Key_MenuKB = 0x010000dc,
945 Key_MenuPB = 0x010000dd,
946 Key_MySites = 0x010000de,
947 Key_News = 0x010000df,
948 Key_OfficeHome = 0x010000e0,
949 Key_Option = 0x010000e1,
950 Key_Paste = 0x010000e2,
951 Key_Phone = 0x010000e3,
952 Key_Calendar = 0x010000e4,
953 Key_Reply = 0x010000e5,
954 Key_Reload = 0x010000e6,
955 Key_RotateWindows = 0x010000e7,
956 Key_RotationPB = 0x010000e8,
957 Key_RotationKB = 0x010000e9,
958 Key_Save = 0x010000ea,
959 Key_Send = 0x010000eb,
960 Key_Spell = 0x010000ec,
961 Key_SplitScreen = 0x010000ed,
962 Key_Support = 0x010000ee,
963 Key_TaskPane = 0x010000ef,
964 Key_Terminal = 0x010000f0,
965 Key_Tools = 0x010000f1,
966 Key_Travel = 0x010000f2,
967 Key_Video = 0x010000f3,
968 Key_Word = 0x010000f4,
969 Key_Xfer = 0x010000f5,
970 Key_ZoomIn = 0x010000f6,
971 Key_ZoomOut = 0x010000f7,
972 Key_Away = 0x010000f8,
973 Key_Messenger = 0x010000f9,
974 Key_WebCam = 0x010000fa,
975 Key_MailForward = 0x010000fb,
976 Key_Pictures = 0x010000fc,
977 Key_Music = 0x010000fd,
978 Key_Battery = 0x010000fe,
979 Key_Bluetooth = 0x010000ff,
980 Key_WLAN = 0x01000100,
981 Key_UWB = 0x01000101,
982 Key_AudioForward = 0x01000102, // Media fast-forward
983 Key_AudioRepeat = 0x01000103, // Toggle repeat mode
984 Key_AudioRandomPlay = 0x01000104, // Toggle shuffle mode
985 Key_Subtitle = 0x01000105,
986 Key_AudioCycleTrack = 0x01000106,
987 Key_Time = 0x01000107,
988 Key_Hibernate = 0x01000108,
989 Key_View = 0x01000109,
990 Key_TopMenu = 0x0100010a,
991 Key_PowerDown = 0x0100010b,
992 Key_Suspend = 0x0100010c,
993 Key_ContrastAdjust = 0x0100010d,
994
995 // We can remove these two for Qt 7:
996 Key_LaunchG = 0x0100010e,
997 Key_LaunchH = 0x0100010f,
998
999 Key_TouchpadToggle = 0x01000110,
1000 Key_TouchpadOn = 0x01000111,
1001 Key_TouchpadOff = 0x01000112,
1002
1003 Key_MicMute = 0x01000113,
1004
1005 Key_Red = 0x01000114,
1006 Key_Green = 0x01000115,
1007 Key_Yellow = 0x01000116,
1008 Key_Blue = 0x01000117,
1009
1010 Key_ChannelUp = 0x01000118,
1011 Key_ChannelDown = 0x01000119,
1012
1013 Key_Guide = 0x0100011a,
1014 Key_Info = 0x0100011b,
1015 Key_Settings = 0x0100011c,
1016
1017 Key_MicVolumeUp = 0x0100011d,
1018 Key_MicVolumeDown = 0x0100011e,
1019
1020 Key_Keyboard = 0x0100011f,
1021
1022 Key_New = 0x01000120,
1023 Key_Open = 0x01000121,
1024 Key_Find = 0x01000122,
1025 Key_Undo = 0x01000123,
1026 Key_Redo = 0x01000124,
1027
1028 Key_MediaLast = 0x0100ffff,
1029
1030 // Keypad navigation keys
1031 Key_Select = 0x01010000,
1032 Key_Yes = 0x01010001,
1033 Key_No = 0x01010002,
1034
1035 // Newer misc keys
1036 Key_Cancel = 0x01020001,
1037 Key_Printer = 0x01020002,
1038 Key_Execute = 0x01020003,
1039 Key_Sleep = 0x01020004,
1040 Key_Play = 0x01020005, // Not the same as Key_MediaPlay
1041 Key_Zoom = 0x01020006,
1042 //Key_Jisho = 0x01020007, // IME: Dictionary key
1043 //Key_Oyayubi_Left = 0x01020008, // IME: Left Oyayubi key
1044 //Key_Oyayubi_Right = 0x01020009, // IME: Right Oyayubi key
1045 Key_Exit = 0x0102000a,
1046
1047 // Device keys
1048 Key_Context1 = 0x01100000,
1049 Key_Context2 = 0x01100001,
1050 Key_Context3 = 0x01100002,
1051 Key_Context4 = 0x01100003,
1052 Key_Call = 0x01100004, // set absolute state to in a call (do not toggle state)
1053 Key_Hangup = 0x01100005, // set absolute state to hang up (do not toggle state)
1054 Key_Flip = 0x01100006,
1055 Key_ToggleCallHangup = 0x01100007, // a toggle key for answering, or hanging up, based on current call state
1056 Key_VoiceDial = 0x01100008,
1057 Key_LastNumberRedial = 0x01100009,
1058
1059 Key_Camera = 0x01100020,
1060 Key_CameraFocus = 0x01100021,
1061
1062 // WARNING: Do not add any keys in the range 0x01200000 to 0xffffffff,
1063 // as those bits are reserved for the Qt::KeyboardModifier enum below.
1064
1065 Key_unknown = 0x01ffffff
1066 };
1067
1068 enum KeyboardModifier {
1069 NoModifier = 0x00000000,
1070 ShiftModifier = 0x02000000,
1071 ControlModifier = 0x04000000,
1072 AltModifier = 0x08000000,
1073 MetaModifier = 0x10000000,
1074 KeypadModifier = 0x20000000,
1075 GroupSwitchModifier = 0x40000000,
1076 // Do not extend the mask to include 0x01000000
1077 KeyboardModifierMask = 0xfe000000
1078 };
1079 Q_DECLARE_FLAGS(KeyboardModifiers, KeyboardModifier)
1080 Q_DECLARE_OPERATORS_FOR_FLAGS(KeyboardModifiers)
1081
1082 //shorter names for shortcuts
1083 // The use of all-caps identifiers has the potential for clashing with
1084 // user-defined or third-party macros. More so when the identifiers are not
1085 // "namespace"-prefixed. This is considered bad practice and is why
1086 // KeypadModifier was not added to the Modifier enum.
1087 // ### Qt 7: consider deprecating in favor of KeyboardModifier.
1088 enum Modifier {
1089 META = Qt::MetaModifier,
1090 SHIFT = Qt::ShiftModifier,
1091 CTRL = Qt::ControlModifier,
1092 ALT = Qt::AltModifier,
1093 MODIFIER_MASK = KeyboardModifierMask,
1094 };
1095 Q_DECLARE_FLAGS(Modifiers, Modifier)
1096 Q_DECLARE_OPERATORS_FOR_FLAGS(Modifiers)
1097
1098 enum ArrowType {
1099 NoArrow,
1100 UpArrow,
1101 DownArrow,
1102 LeftArrow,
1103 RightArrow
1104 };
1105
1106 enum PenStyle { // pen style
1107 NoPen,
1108 SolidLine,
1109 DashLine,
1110 DotLine,
1111 DashDotLine,
1112 DashDotDotLine,
1113 CustomDashLine
1114#ifndef Q_MOC_RUN
1115 , MPenStyle = 0x0f
1116#endif
1117 };
1118
1119 enum PenCapStyle { // line endcap style
1120 FlatCap = 0x00,
1121 SquareCap = 0x10,
1122 RoundCap = 0x20,
1123 MPenCapStyle = 0x30
1124 };
1125
1126 enum PenJoinStyle { // line join style
1127 MiterJoin = 0x00,
1128 BevelJoin = 0x40,
1129 RoundJoin = 0x80,
1130 SvgMiterJoin = 0x100,
1131 MPenJoinStyle = 0x1c0
1132 };
1133
1134 enum BrushStyle { // brush style
1135 NoBrush,
1136 SolidPattern,
1137 Dense1Pattern,
1138 Dense2Pattern,
1139 Dense3Pattern,
1140 Dense4Pattern,
1141 Dense5Pattern,
1142 Dense6Pattern,
1143 Dense7Pattern,
1144 HorPattern,
1145 VerPattern,
1146 CrossPattern,
1147 BDiagPattern,
1148 FDiagPattern,
1149 DiagCrossPattern,
1150 LinearGradientPattern,
1151 RadialGradientPattern,
1152 ConicalGradientPattern,
1153 TexturePattern = 24
1154 };
1155
1156 enum SizeMode {
1157 AbsoluteSize,
1158 RelativeSize
1159 };
1160
1161 enum UIEffect {
1162 UI_General,
1163 UI_AnimateMenu,
1164 UI_FadeMenu,
1165 UI_AnimateCombo,
1166 UI_AnimateTooltip,
1167 UI_FadeTooltip,
1168 UI_AnimateToolBox
1169 };
1170
1171 enum CursorShape {
1172 ArrowCursor,
1173 UpArrowCursor,
1174 CrossCursor,
1175 WaitCursor,
1176 IBeamCursor,
1177 SizeVerCursor,
1178 SizeHorCursor,
1179 SizeBDiagCursor,
1180 SizeFDiagCursor,
1181 SizeAllCursor,
1182 BlankCursor,
1183 SplitVCursor,
1184 SplitHCursor,
1185 PointingHandCursor,
1186 ForbiddenCursor,
1187 WhatsThisCursor,
1188 BusyCursor,
1189 OpenHandCursor,
1190 ClosedHandCursor,
1191 DragCopyCursor,
1192 DragMoveCursor,
1193 DragLinkCursor,
1194 LastCursor = DragLinkCursor,
1195#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
1196 BitmapCursor = 24,
1197 CustomCursor = 25,
1198#else
1199 BitmapCursor = 0x100,
1200 CustomCursor = 0x101,
1201#endif
1202 };
1203
1204 enum TextFormat {
1205 PlainText,
1206 RichText,
1207 AutoText,
1208 MarkdownText
1209 };
1210
1211 enum AspectRatioMode {
1212 IgnoreAspectRatio,
1213 KeepAspectRatio,
1214 KeepAspectRatioByExpanding
1215 };
1216
1217 enum DockWidgetArea {
1218 LeftDockWidgetArea = 0x1,
1219 RightDockWidgetArea = 0x2,
1220 TopDockWidgetArea = 0x4,
1221 BottomDockWidgetArea = 0x8,
1222
1223 DockWidgetArea_Mask = 0xf,
1224 AllDockWidgetAreas = DockWidgetArea_Mask,
1225 NoDockWidgetArea = 0
1226 };
1227 enum DockWidgetAreaSizes {
1228 NDockWidgetAreas = 4
1229 };
1230
1231 Q_DECLARE_FLAGS(DockWidgetAreas, DockWidgetArea)
1232 Q_DECLARE_OPERATORS_FOR_FLAGS(DockWidgetAreas)
1233
1234 enum ToolBarArea {
1235 LeftToolBarArea = 0x1,
1236 RightToolBarArea = 0x2,
1237 TopToolBarArea = 0x4,
1238 BottomToolBarArea = 0x8,
1239
1240 ToolBarArea_Mask = 0xf,
1241 AllToolBarAreas = ToolBarArea_Mask,
1242 NoToolBarArea = 0
1243 };
1244
1245 enum ToolBarAreaSizes {
1246 NToolBarAreas = 4
1247 };
1248
1249 Q_DECLARE_FLAGS(ToolBarAreas, ToolBarArea)
1250 Q_DECLARE_OPERATORS_FOR_FLAGS(ToolBarAreas)
1251
1252 enum DateFormat {
1253 TextDate, // default Qt
1254 ISODate, // ISO 8601
1255 RFC2822Date = 8, // RFC 2822 (+ 850 and 1036 during parsing)
1256 ISODateWithMs
1257 };
1258
1259 enum TimeSpec {
1260 LocalTime,
1261 UTC,
1262 OffsetFromUTC,
1263 TimeZone
1264 };
1265
1266 enum DayOfWeek {
1267 Monday = 1,
1268 Tuesday = 2,
1269 Wednesday = 3,
1270 Thursday = 4,
1271 Friday = 5,
1272 Saturday = 6,
1273 Sunday = 7
1274 };
1275
1276 enum ScrollBarPolicy {
1277 ScrollBarAsNeeded,
1278 ScrollBarAlwaysOff,
1279 ScrollBarAlwaysOn
1280 };
1281
1282 enum CaseSensitivity {
1283 CaseInsensitive,
1284 CaseSensitive
1285 };
1286
1287 enum Corner {
1288 TopLeftCorner = 0x00000,
1289 TopRightCorner = 0x00001,
1290 BottomLeftCorner = 0x00002,
1291 BottomRightCorner = 0x00003
1292 };
1293
1294 enum Edge {
1295 TopEdge = 0x00001,
1296 LeftEdge = 0x00002,
1297 RightEdge = 0x00004,
1298 BottomEdge = 0x00008
1299 };
1300
1301 Q_DECLARE_FLAGS(Edges, Edge)
1302 Q_DECLARE_OPERATORS_FOR_FLAGS(Edges)
1303
1304 enum ConnectionType {
1305 AutoConnection,
1306 DirectConnection,
1307 QueuedConnection,
1308 BlockingQueuedConnection,
1309 UniqueConnection = 0x80,
1310 SingleShotConnection = 0x100,
1311 };
1312
1313 enum ShortcutContext {
1314 WidgetShortcut,
1315 WindowShortcut,
1316 ApplicationShortcut,
1317 WidgetWithChildrenShortcut
1318 };
1319
1320 enum FillRule {
1321 OddEvenFill,
1322 WindingFill
1323 };
1324
1325 enum MaskMode {
1326 MaskInColor,
1327 MaskOutColor
1328 };
1329
1330 enum ClipOperation {
1331 NoClip,
1332 ReplaceClip,
1333 IntersectClip
1334 };
1335
1336 // Shape = 0x1, BoundingRect = 0x2
1337 enum ItemSelectionMode {
1338 ContainsItemShape = 0x0,
1339 IntersectsItemShape = 0x1,
1340 ContainsItemBoundingRect = 0x2,
1341 IntersectsItemBoundingRect = 0x3
1342 };
1343
1344 enum ItemSelectionOperation {
1345 ReplaceSelection,
1346 AddToSelection
1347 };
1348
1349 enum TransformationMode {
1350 FastTransformation,
1351 SmoothTransformation
1352 };
1353
1354 enum Axis {
1355 XAxis,
1356 YAxis,
1357 ZAxis
1358 };
1359
1360 enum FocusReason {
1361 MouseFocusReason,
1362 TabFocusReason,
1363 BacktabFocusReason,
1364 ActiveWindowFocusReason,
1365 PopupFocusReason,
1366 ShortcutFocusReason,
1367 MenuBarFocusReason,
1368 OtherFocusReason,
1369 NoFocusReason
1370 };
1371
1372 enum ContextMenuPolicy {
1373 NoContextMenu,
1374 DefaultContextMenu,
1375 ActionsContextMenu,
1376 CustomContextMenu,
1377 PreventContextMenu
1378 };
1379
1380 enum class ContextMenuTrigger {
1381 Press,
1382 Release,
1383 };
1384
1385 enum InputMethodQuery {
1386 ImEnabled = 0x1,
1387 ImCursorRectangle = 0x2,
1388 ImFont = 0x4,
1389 ImCursorPosition = 0x8,
1390 ImSurroundingText = 0x10,
1391 ImCurrentSelection = 0x20,
1392 ImMaximumTextLength = 0x40,
1393 ImAnchorPosition = 0x80,
1394 ImHints = 0x100,
1395 ImPreferredLanguage = 0x200,
1396
1397 ImAbsolutePosition = 0x400,
1398 ImTextBeforeCursor = 0x800,
1399 ImTextAfterCursor = 0x1000,
1400 ImEnterKeyType = 0x2000,
1401 ImAnchorRectangle = 0x4000,
1402 ImInputItemClipRectangle = 0x8000,
1403
1404 ImReadOnly = 0x10000,
1405 ImPlatformData = 0x80000000,
1406 ImQueryInput = ImCursorRectangle | ImCursorPosition | ImSurroundingText |
1407 ImCurrentSelection | ImAnchorRectangle | ImAnchorPosition,
1408 ImQueryAll = 0xffffffff
1409 };
1410 Q_DECLARE_FLAGS(InputMethodQueries, InputMethodQuery)
1411 Q_DECLARE_OPERATORS_FOR_FLAGS(InputMethodQueries)
1412
1413 enum InputMethodHint {
1414 ImhNone = 0x0,
1415
1416 ImhHiddenText = 0x1,
1417 ImhSensitiveData = 0x2,
1418 ImhNoAutoUppercase = 0x4,
1419 ImhPreferNumbers = 0x8,
1420 ImhPreferUppercase = 0x10,
1421 ImhPreferLowercase = 0x20,
1422 ImhNoPredictiveText = 0x40,
1423
1424 ImhDate = 0x80,
1425 ImhTime = 0x100,
1426
1427 ImhPreferLatin = 0x200,
1428
1429 ImhMultiLine = 0x400,
1430
1431 ImhNoEditMenu = 0x800,
1432 ImhNoTextHandles = 0x1000,
1433
1434 ImhDigitsOnly = 0x10000,
1435 ImhFormattedNumbersOnly = 0x20000,
1436 ImhUppercaseOnly = 0x40000,
1437 ImhLowercaseOnly = 0x80000,
1438 ImhDialableCharactersOnly = 0x100000,
1439 ImhEmailCharactersOnly = 0x200000,
1440 ImhUrlCharactersOnly = 0x400000,
1441 ImhLatinOnly = 0x800000,
1442
1443 ImhExclusiveInputMask = 0xffff0000
1444 };
1445 Q_DECLARE_FLAGS(InputMethodHints, InputMethodHint)
1446 Q_DECLARE_OPERATORS_FOR_FLAGS(InputMethodHints)
1447
1448 enum EnterKeyType {
1449 EnterKeyDefault,
1450 EnterKeyReturn,
1451 EnterKeyDone,
1452 EnterKeyGo,
1453 EnterKeySend,
1454 EnterKeySearch,
1455 EnterKeyNext,
1456 EnterKeyPrevious
1457 };
1458
1459 enum ToolButtonStyle {
1460 ToolButtonIconOnly,
1461 ToolButtonTextOnly,
1462 ToolButtonTextBesideIcon,
1463 ToolButtonTextUnderIcon,
1464 ToolButtonFollowStyle
1465 };
1466
1467 enum LayoutDirection {
1468 LeftToRight,
1469 RightToLeft,
1470 // ### Qt 7: make auto the first one (with value 0)
1471 LayoutDirectionAuto
1472 };
1473
1474 enum AnchorPoint {
1475 AnchorLeft = 0,
1476 AnchorHorizontalCenter,
1477 AnchorRight,
1478 AnchorTop,
1479 AnchorVerticalCenter,
1480 AnchorBottom
1481 };
1482
1483 enum FindChildOption {
1484 FindDirectChildrenOnly = 0x0,
1485 FindChildrenRecursively = 0x1
1486 };
1487 Q_DECLARE_FLAGS(FindChildOptions, FindChildOption)
1488
1489 enum DropAction {
1490 CopyAction = 0x1,
1491 MoveAction = 0x2,
1492 LinkAction = 0x4,
1493 ActionMask = 0xff,
1494 TargetMoveAction = 0x8002,
1495 IgnoreAction = 0x0
1496 };
1497 Q_DECLARE_FLAGS(DropActions, DropAction)
1498 Q_DECLARE_OPERATORS_FOR_FLAGS(DropActions)
1499
1500 enum CheckState {
1501 Unchecked,
1502 PartiallyChecked,
1503 Checked
1504 };
1505
1506 enum ItemDataRole {
1507 DisplayRole = 0,
1508 DecorationRole = 1,
1509 EditRole = 2,
1510 ToolTipRole = 3,
1511 StatusTipRole = 4,
1512 WhatsThisRole = 5,
1513 // Metadata
1514 FontRole = 6,
1515 TextAlignmentRole = 7,
1516 BackgroundRole = 8,
1517 ForegroundRole = 9,
1518 CheckStateRole = 10,
1519 // Accessibility
1520 AccessibleTextRole = 11,
1521 AccessibleDescriptionRole = 12,
1522 // More general purpose
1523 SizeHintRole = 13,
1524 InitialSortOrderRole = 14,
1525 // Internal UiLib roles. Start worrying when public roles go that high.
1526 DisplayPropertyRole = 27,
1527 DecorationPropertyRole = 28,
1528 ToolTipPropertyRole = 29,
1529 StatusTipPropertyRole = 30,
1530 WhatsThisPropertyRole = 31,
1531 // QRangeModel support for QML's required property var modelData
1532 RangeModelDataRole = 40,
1533
1534 // Reserved
1535 UserRole = 0x0100,
1536
1537 // Used by Qt models
1538 StandardItemFlagsRole = UserRole - 1, // QStandardItemModel
1539 FileInfoRole = UserRole - 4, // QFileSystemModel
1540 RemoteObjectsCacheRole = UserRole - 1, // QtRemoteObjects::QAbstractItemModelReplica
1541 };
1542
1543 enum ItemFlag {
1544 NoItemFlags = 0,
1545 ItemIsSelectable = 1,
1546 ItemIsEditable = 2,
1547 ItemIsDragEnabled = 4,
1548 ItemIsDropEnabled = 8,
1549 ItemIsUserCheckable = 16,
1550 ItemIsEnabled = 32,
1551 ItemIsAutoTristate = 64,
1552 ItemNeverHasChildren = 128,
1553 ItemIsUserTristate = 256
1554 };
1555 Q_DECLARE_FLAGS(ItemFlags, ItemFlag)
1556 Q_DECLARE_OPERATORS_FOR_FLAGS(ItemFlags)
1557
1558 enum MatchFlag {
1559 MatchExactly = 0,
1560 MatchContains = 1,
1561 MatchStartsWith = 2,
1562 MatchEndsWith = 3,
1563 MatchRegularExpression = 4,
1564 MatchWildcard = 5,
1565 MatchFixedString = 8,
1566 MatchTypeMask = 0x0F,
1567 MatchCaseSensitive = 16,
1568 MatchWrap = 32,
1569 MatchRecursive = 64
1570 };
1571 Q_DECLARE_FLAGS(MatchFlags, MatchFlag)
1572 Q_DECLARE_OPERATORS_FOR_FLAGS(MatchFlags)
1573
1574 typedef void * HANDLE;
1575
1576 enum WindowModality {
1577 NonModal,
1578 WindowModal,
1579 ApplicationModal
1580 };
1581
1582 enum TextInteractionFlag {
1583 NoTextInteraction = 0,
1584 TextSelectableByMouse = 1,
1585 TextSelectableByKeyboard = 2,
1586 LinksAccessibleByMouse = 4,
1587 LinksAccessibleByKeyboard = 8,
1588 TextEditable = 16,
1589
1590 TextEditorInteraction = TextSelectableByMouse | TextSelectableByKeyboard | TextEditable,
1591 TextBrowserInteraction = TextSelectableByMouse | LinksAccessibleByMouse | LinksAccessibleByKeyboard
1592 };
1593 Q_DECLARE_FLAGS(TextInteractionFlags, TextInteractionFlag)
1594 Q_DECLARE_OPERATORS_FOR_FLAGS(TextInteractionFlags)
1595
1596 enum EventPriority {
1597 HighEventPriority = 1,
1598 NormalEventPriority = 0,
1599 LowEventPriority = -1
1600 };
1601
1602 enum SizeHint {
1603 MinimumSize,
1604 PreferredSize,
1605 MaximumSize,
1606 MinimumDescent,
1607 NSizeHints
1608 };
1609
1610 enum WindowFrameSection {
1611 NoSection,
1612 LeftSection, // For resize
1613 TopLeftSection,
1614 TopSection,
1615 TopRightSection,
1616 RightSection,
1617 BottomRightSection,
1618 BottomSection,
1619 BottomLeftSection,
1620 TitleBarArea // For move
1621 };
1622
1623 enum class Initialization {
1624 Uninitialized
1625 };
1626 inline constexpr Initialization Uninitialized = Initialization::Uninitialized;
1627
1628 inline QT_DEFINE_TAG(Disambiguated);
1629
1630 enum CoordinateSystem {
1631 DeviceCoordinates,
1632 LogicalCoordinates
1633 };
1634
1635 enum TouchPointState {
1636 TouchPointUnknownState = 0x00,
1637 TouchPointPressed = 0x01,
1638 TouchPointMoved = 0x02,
1639 TouchPointStationary = 0x04,
1640 TouchPointReleased = 0x08
1641 };
1642 Q_DECLARE_FLAGS(TouchPointStates, TouchPointState)
1643 Q_DECLARE_OPERATORS_FOR_FLAGS(TouchPointStates)
1644
1645#ifndef QT_NO_GESTURES
1646 enum GestureState
1647 {
1648 NoGesture,
1649 GestureStarted = 1,
1650 GestureUpdated = 2,
1651 GestureFinished = 3,
1652 GestureCanceled = 4
1653 };
1654
1655 enum GestureType
1656 {
1657 TapGesture = 1,
1658 TapAndHoldGesture = 2,
1659 PanGesture = 3,
1660 PinchGesture = 4,
1661 SwipeGesture = 5,
1662
1663 CustomGesture = 0x0100,
1664
1665 LastGestureType = ~0u
1666 };
1667
1668 enum GestureFlag
1669 {
1670 DontStartGestureOnChildren = 0x01,
1671 ReceivePartialGestures = 0x02,
1672 IgnoredGesturesPropagateToParent = 0x04
1673 };
1674 Q_DECLARE_FLAGS(GestureFlags, GestureFlag)
1675 Q_DECLARE_OPERATORS_FOR_FLAGS(GestureFlags)
1676
1677 enum NativeGestureType
1678 {
1679 BeginNativeGesture,
1680 EndNativeGesture,
1681 PanNativeGesture,
1682 ZoomNativeGesture,
1683 SmartZoomNativeGesture,
1684 RotateNativeGesture,
1685 SwipeNativeGesture
1686 };
1687
1688#endif // QT_NO_GESTURES
1689
1690 enum NavigationMode
1691 {
1692 NavigationModeNone,
1693 NavigationModeKeypadTabOrder,
1694 NavigationModeKeypadDirectional,
1695 NavigationModeCursorAuto,
1696 NavigationModeCursorForceVisible
1697 };
1698
1699 enum CursorMoveStyle {
1700 LogicalMoveStyle,
1701 VisualMoveStyle
1702 };
1703
1704 enum TimerType {
1705 PreciseTimer,
1706 CoarseTimer,
1707 VeryCoarseTimer
1708 };
1709
1710 enum class TimerId {
1711 Invalid = 0,
1712 };
1713
1714 enum ScrollPhase {
1715 NoScrollPhase = 0,
1716 ScrollBegin,
1717 ScrollUpdate,
1718 ScrollEnd,
1719 ScrollMomentum
1720 };
1721
1722 enum MouseEventSource {
1723 MouseEventNotSynthesized,
1724 MouseEventSynthesizedBySystem,
1725 MouseEventSynthesizedByQt,
1726 MouseEventSynthesizedByApplication
1727 };
1728
1729 enum MouseEventFlag {
1730 NoMouseEventFlag = 0x00,
1731 MouseEventCreatedDoubleClick = 0x01,
1732 MouseEventFlagMask = 0xFF
1733 };
1734 Q_DECLARE_FLAGS(MouseEventFlags, MouseEventFlag)
1735 Q_DECLARE_OPERATORS_FOR_FLAGS(MouseEventFlags)
1736
1737 enum ChecksumType {
1738 ChecksumIso3309,
1739 ChecksumItuV41
1740 };
1741
1742 enum class HighDpiScaleFactorRoundingPolicy {
1743 Unset,
1744 Round,
1745 Ceil,
1746 Floor,
1747 RoundPreferFloor,
1748 PassThrough
1749 };
1750
1751 enum class PermissionStatus {
1752 Undetermined,
1753 Granted,
1754 Denied,
1755 };
1756
1757 // QTBUG-48701
1758 enum ReturnByValueConstant { ReturnByValue }; // ### Qt 7: Remove me
1759
1760#ifndef Q_QDOC
1761 // NOTE: Generally, do not add Q_ENUM_NS if a corresponding Q_FLAG_NS exists.
1762 Q_ENUM_NS(ScrollBarPolicy)
1763 Q_ENUM_NS(FocusPolicy)
1764 Q_ENUM_NS(ContextMenuPolicy)
1765 Q_ENUM_NS(ContextMenuTrigger)
1766 Q_ENUM_NS(ArrowType)
1767 Q_ENUM_NS(ToolButtonStyle)
1768 Q_ENUM_NS(PenStyle)
1769 Q_ENUM_NS(PenCapStyle)
1770 Q_ENUM_NS(PenJoinStyle)
1771 Q_ENUM_NS(BrushStyle)
1772 Q_ENUM_NS(FillRule)
1773 Q_ENUM_NS(MaskMode)
1774 Q_ENUM_NS(BGMode)
1775 Q_ENUM_NS(ClipOperation)
1776 Q_ENUM_NS(SizeMode)
1777 Q_ENUM_NS(Axis)
1778 Q_ENUM_NS(Corner)
1779 Q_ENUM_NS(Edge)
1780 Q_ENUM_NS(LayoutDirection)
1781 Q_ENUM_NS(SizeHint)
1782 Q_ENUM_NS(Orientation)
1783 Q_ENUM_NS(DropAction)
1784 Q_FLAG_NS(Alignment)
1785 Q_ENUM_NS(TextFlag)
1786 Q_FLAG_NS(Orientations)
1787 Q_FLAG_NS(SplitBehavior)
1788 Q_FLAG_NS(DropActions)
1789 Q_FLAG_NS(Edges)
1790 Q_FLAG_NS(DockWidgetAreas)
1791 Q_FLAG_NS(ToolBarAreas)
1792 Q_ENUM_NS(DockWidgetArea)
1793 Q_ENUM_NS(ToolBarArea)
1794 Q_ENUM_NS(TextFormat)
1795 Q_ENUM_NS(TextElideMode)
1796 Q_ENUM_NS(DateFormat)
1797 Q_ENUM_NS(TimeSpec)
1798 Q_ENUM_NS(DayOfWeek)
1799 Q_ENUM_NS(CursorShape)
1800 Q_ENUM_NS(GlobalColor)
1801 Q_ENUM_NS(ColorScheme)
1802 Q_ENUM_NS(ContrastPreference)
1803 Q_ENUM_NS(AspectRatioMode)
1804 Q_ENUM_NS(TransformationMode)
1805 Q_FLAG_NS(ImageConversionFlags)
1806 Q_ENUM_NS(Key)
1807 Q_ENUM_NS(ShortcutContext)
1808 Q_ENUM_NS(TextInteractionFlag)
1809 Q_FLAG_NS(TextInteractionFlags)
1810 Q_ENUM_NS(ItemSelectionMode)
1811 Q_ENUM_NS(ItemSelectionOperation)
1812 Q_FLAG_NS(ItemFlags)
1813 Q_ENUM_NS(CheckState)
1814 Q_ENUM_NS(ItemDataRole)
1815 Q_ENUM_NS(SortOrder)
1816 Q_ENUM_NS(CaseSensitivity)
1817 Q_FLAG_NS(MatchFlags)
1818 Q_ENUM_NS(Modifier)
1819 Q_FLAG_NS(Modifiers)
1820 Q_ENUM_NS(KeyboardModifier)
1821 Q_FLAG_NS(KeyboardModifiers)
1822 Q_FLAG_NS(MouseButtons)
1823 Q_ENUM_NS(WindowType)
1824 Q_ENUM_NS(WindowState)
1825 Q_ENUM_NS(WindowModality)
1826 Q_ENUM_NS(WidgetAttribute)
1827 Q_ENUM_NS(ApplicationAttribute)
1828 Q_FLAG_NS(WindowFlags)
1829 Q_FLAG_NS(WindowStates)
1830 Q_ENUM_NS(FocusReason)
1831 Q_ENUM_NS(InputMethodHint)
1832 Q_ENUM_NS(InputMethodQuery)
1833 Q_FLAG_NS(InputMethodHints)
1834 Q_ENUM_NS(EnterKeyType)
1835 Q_FLAG_NS(InputMethodQueries)
1836 Q_FLAG_NS(TouchPointStates)
1837 Q_ENUM_NS(ScreenOrientation)
1838 Q_FLAG_NS(ScreenOrientations)
1839 Q_ENUM_NS(ConnectionType)
1840 Q_ENUM_NS(ApplicationState)
1841#ifndef QT_NO_GESTURES
1842 Q_ENUM_NS(GestureState)
1843 Q_ENUM_NS(GestureType)
1844 Q_ENUM_NS(NativeGestureType)
1845#endif
1846 Q_ENUM_NS(CursorMoveStyle)
1847 Q_ENUM_NS(TimerType)
1848 Q_ENUM_NS(TimerId)
1849 Q_ENUM_NS(ScrollPhase)
1850 Q_ENUM_NS(MouseEventSource)
1851 Q_FLAG_NS(MouseEventFlags)
1852 Q_ENUM_NS(ChecksumType)
1853 Q_ENUM_NS(HighDpiScaleFactorRoundingPolicy)
1854 Q_ENUM_NS(TabFocusBehavior)
1855 Q_ENUM_NS(PermissionStatus)
1856#endif // Q_DOC
1857
1858}
1859
1860typedef bool (*qInternalCallback)(void **);
1861
1862class Q_CORE_EXPORT QInternal {
1863public:
1864 enum PaintDeviceFlags {
1865 UnknownDevice = 0x00,
1866 Widget = 0x01,
1867 Pixmap = 0x02,
1868 Image = 0x03,
1869 Printer = 0x04,
1870 Picture = 0x05,
1871 Pbuffer = 0x06, // GL pbuffer
1872 FramebufferObject = 0x07, // GL framebuffer object
1873 CustomRaster = 0x08,
1874 PaintBuffer = 0x0a,
1875 OpenGL = 0x0b
1876 };
1877 enum RelayoutType {
1878 RelayoutNormal,
1879 RelayoutDragging,
1880 RelayoutDropped
1881 };
1882
1883 enum DockPosition {
1884 LeftDock,
1885 RightDock,
1886 TopDock,
1887 BottomDock,
1888 DockCount
1889 };
1890
1891 enum Callback {
1892 EventNotifyCallback,
1893 LastCallback
1894 };
1895 static bool registerCallback(Callback, qInternalCallback);
1896 static bool unregisterCallback(Callback, qInternalCallback);
1897 static bool activateCallbacks(Callback, void **);
1898};
1899
1900class QKeyCombination
1901{
1902 int combination;
1903
1904public:
1905 constexpr Q_IMPLICIT QKeyCombination(Qt::Key key = Qt::Key_unknown) noexcept
1906 : combination(int(key))
1907 {}
1908
1909 constexpr explicit QKeyCombination(Qt::Modifiers modifiers, Qt::Key key = Qt::Key_unknown) noexcept
1910 : combination(modifiers.toInt() | int(key))
1911 {}
1912
1913 constexpr explicit QKeyCombination(Qt::KeyboardModifiers modifiers, Qt::Key key = Qt::Key_unknown) noexcept
1914 : combination(modifiers.toInt() | int(key))
1915 {}
1916
1917 constexpr Qt::KeyboardModifiers keyboardModifiers() const noexcept
1918 {
1919 return Qt::KeyboardModifiers(combination & Qt::KeyboardModifierMask);
1920 }
1921
1922 constexpr Qt::Key key() const noexcept
1923 {
1924 return Qt::Key(combination & ~int(Qt::KeyboardModifierMask));
1925 }
1926
1927 static constexpr QKeyCombination fromCombined(int combined)
1928 {
1929 QKeyCombination result;
1930 result.combination = combined;
1931 return result;
1932 }
1933
1934 constexpr int toCombined() const noexcept
1935 {
1936 return combination;
1937 }
1938
1939#if QT_DEPRECATED_SINCE(6, 0)
1940 QT_DEPRECATED_VERSION_X(6, 0, "Use QKeyCombination instead of int")
1941 constexpr Q_IMPLICIT operator int() const noexcept
1942 {
1943 return combination;
1944 }
1945#endif
1946 bool operator<(QKeyCombination) const = delete;
1947private:
1948 friend constexpr bool comparesEqual(const QKeyCombination &lhs,
1949 const QKeyCombination &rhs) noexcept
1950 {
1951 return lhs.combination == rhs.combination;
1952 }
1953 Q_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE(QKeyCombination)
1954};
1955
1956Q_DECLARE_TYPEINFO(QKeyCombination, Q_RELOCATABLE_TYPE);
1957
1958namespace Qt {
1959constexpr QKeyCombination operator|(Qt::Modifier modifier, Qt::Key key) noexcept
1960{
1961 return QKeyCombination(modifier, key);
1962}
1963
1964constexpr QKeyCombination operator|(Qt::Modifiers modifiers, Qt::Key key) noexcept
1965{
1966 return QKeyCombination(modifiers, key);
1967}
1968
1969constexpr QKeyCombination operator|(Qt::KeyboardModifier modifier, Qt::Key key) noexcept
1970{
1971 return QKeyCombination(modifier, key);
1972}
1973
1974constexpr QKeyCombination operator|(Qt::KeyboardModifiers modifiers, Qt::Key key) noexcept
1975{
1976 return QKeyCombination(modifiers, key);
1977}
1978
1979constexpr QKeyCombination operator|(Qt::Key key, Qt::Modifier modifier) noexcept
1980{
1981 return QKeyCombination(modifier, key);
1982}
1983
1984constexpr QKeyCombination operator|(Qt::Key key, Qt::Modifiers modifiers) noexcept
1985{
1986 return QKeyCombination(modifiers, key);
1987}
1988
1989constexpr QKeyCombination operator|(Qt::Key key, Qt::KeyboardModifier modifier) noexcept
1990{
1991 return QKeyCombination(modifier, key);
1992}
1993
1994constexpr QKeyCombination operator|(Qt::Key key, Qt::KeyboardModifiers modifiers) noexcept
1995{
1996 return QKeyCombination(modifiers, key);
1997}
1998
1999#if QT_DEPRECATED_SINCE(6, 0)
2000QT_DEPRECATED_VERSION_X(6, 0, "Use operator| instead")
2001constexpr QKeyCombination operator+(Qt::Modifier modifier, Qt::Key key) noexcept
2002{
2003 return QKeyCombination(modifier, key);
2004}
2005
2006QT_DEPRECATED_VERSION_X(6, 0, "Use operator| instead")
2007constexpr QKeyCombination operator+(Qt::Modifiers modifiers, Qt::Key key) noexcept
2008{
2009 return QKeyCombination(modifiers, key);
2010}
2011
2012QT_DEPRECATED_VERSION_X(6, 0, "Use operator| instead")
2013constexpr QKeyCombination operator+(Qt::KeyboardModifier modifier, Qt::Key key) noexcept
2014{
2015 return QKeyCombination(modifier, key);
2016}
2017
2018QT_DEPRECATED_VERSION_X(6, 0, "Use operator| instead")
2019constexpr QKeyCombination operator+(Qt::KeyboardModifiers modifiers, Qt::Key key) noexcept
2020{
2021 return QKeyCombination(modifiers, key);
2022}
2023
2024QT_DEPRECATED_VERSION_X(6, 0, "Use operator| instead")
2025constexpr QKeyCombination operator+(Qt::Key key, Qt::Modifier modifier) noexcept
2026{
2027 return QKeyCombination(modifier, key);
2028}
2029
2030QT_DEPRECATED_VERSION_X(6, 0, "Use operator| instead")
2031constexpr QKeyCombination operator+(Qt::Key key, Qt::Modifiers modifiers) noexcept
2032{
2033 return QKeyCombination(modifiers, key);
2034}
2035
2036QT_DEPRECATED_VERSION_X(6, 0, "Use operator| instead")
2037constexpr QKeyCombination operator+(Qt::Key key, Qt::KeyboardModifier modifier) noexcept
2038{
2039 return QKeyCombination(modifier, key);
2040}
2041
2042QT_DEPRECATED_VERSION_X(6, 0, "Use operator| instead")
2043constexpr QKeyCombination operator+(Qt::Key key, Qt::KeyboardModifiers modifiers) noexcept
2044{
2045 return QKeyCombination(modifiers, key);
2046}
2047#endif
2048}
2049
2050QT_END_NAMESPACE
2051
2052#endif // QNAMESPACE_H
2053

source code of qtbase/src/corelib/global/qnamespace.h