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