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_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 WA_ContentsMarginsRespectsSafeArea = 130,
481
482 // Add new attributes before this line
483 WA_AttributeCount
484 };
485
486 enum ApplicationAttribute
487 {
488 AA_ImmediateWidgetCreation = 0,
489 AA_MSWindowsUseDirect3DByDefault = 1, // Win only
490 AA_DontShowIconsInMenus = 2,
491 AA_NativeWindows = 3,
492 AA_DontCreateNativeWidgetSiblings = 4,
493 AA_PluginApplication = 5,
494 AA_MacPluginApplication = AA_PluginApplication, // ### Qt 6: remove me
495 AA_DontUseNativeMenuBar = 6,
496 AA_MacDontSwapCtrlAndMeta = 7,
497 AA_Use96Dpi = 8,
498 AA_X11InitThreads = 10,
499 AA_SynthesizeTouchForUnhandledMouseEvents = 11,
500 AA_SynthesizeMouseForUnhandledTouchEvents = 12,
501 AA_UseHighDpiPixmaps = 13,
502 AA_ForceRasterWidgets = 14,
503 AA_UseDesktopOpenGL = 15,
504 AA_UseOpenGLES = 16,
505 AA_UseSoftwareOpenGL = 17,
506 AA_ShareOpenGLContexts = 18,
507 AA_SetPalette = 19,
508 AA_EnableHighDpiScaling = 20,
509 AA_DisableHighDpiScaling = 21,
510 AA_UseStyleSheetPropagationInWidgetStyles = 22, // ### Qt 6: remove me
511 AA_DontUseNativeDialogs = 23,
512 AA_SynthesizeMouseForUnhandledTabletEvents = 24,
513 AA_CompressHighFrequencyEvents = 25,
514 AA_DontCheckOpenGLContextThreadAffinity = 26,
515 AA_DisableShaderDiskCache = 27,
516 AA_DontShowShortcutsInContextMenus = 28,
517 AA_CompressTabletEvents = 29,
518 AA_DisableWindowContextHelpButton = 30, // ### Qt 6: remove me
519
520 // Add new attributes before this line
521 AA_AttributeCount
522 };
523
524
525 // Image conversion flags. The unusual ordering is caused by
526 // compatibility and default requirements.
527
528 enum ImageConversionFlag {
529 ColorMode_Mask = 0x00000003,
530 AutoColor = 0x00000000,
531 ColorOnly = 0x00000003,
532 MonoOnly = 0x00000002,
533 // Reserved = 0x00000001,
534
535 AlphaDither_Mask = 0x0000000c,
536 ThresholdAlphaDither = 0x00000000,
537 OrderedAlphaDither = 0x00000004,
538 DiffuseAlphaDither = 0x00000008,
539 NoAlpha = 0x0000000c, // Not supported
540
541 Dither_Mask = 0x00000030,
542 DiffuseDither = 0x00000000,
543 OrderedDither = 0x00000010,
544 ThresholdDither = 0x00000020,
545 // ReservedDither = 0x00000030,
546
547 DitherMode_Mask = 0x000000c0,
548 AutoDither = 0x00000000,
549 PreferDither = 0x00000040,
550 AvoidDither = 0x00000080,
551
552 NoOpaqueDetection = 0x00000100,
553 NoFormatConversion = 0x00000200
554 };
555 Q_DECLARE_FLAGS(ImageConversionFlags, ImageConversionFlag)
556
557 enum BGMode {
558 TransparentMode,
559 OpaqueMode
560 };
561
562 enum Key {
563 Key_Escape = 0x01000000, // misc keys
564 Key_Tab = 0x01000001,
565 Key_Backtab = 0x01000002,
566 Key_Backspace = 0x01000003,
567 Key_Return = 0x01000004,
568 Key_Enter = 0x01000005,
569 Key_Insert = 0x01000006,
570 Key_Delete = 0x01000007,
571 Key_Pause = 0x01000008,
572 Key_Print = 0x01000009, // print screen
573 Key_SysReq = 0x0100000a,
574 Key_Clear = 0x0100000b,
575 Key_Home = 0x01000010, // cursor movement
576 Key_End = 0x01000011,
577 Key_Left = 0x01000012,
578 Key_Up = 0x01000013,
579 Key_Right = 0x01000014,
580 Key_Down = 0x01000015,
581 Key_PageUp = 0x01000016,
582 Key_PageDown = 0x01000017,
583 Key_Shift = 0x01000020, // modifiers
584 Key_Control = 0x01000021,
585 Key_Meta = 0x01000022,
586 Key_Alt = 0x01000023,
587 Key_CapsLock = 0x01000024,
588 Key_NumLock = 0x01000025,
589 Key_ScrollLock = 0x01000026,
590 Key_F1 = 0x01000030, // function keys
591 Key_F2 = 0x01000031,
592 Key_F3 = 0x01000032,
593 Key_F4 = 0x01000033,
594 Key_F5 = 0x01000034,
595 Key_F6 = 0x01000035,
596 Key_F7 = 0x01000036,
597 Key_F8 = 0x01000037,
598 Key_F9 = 0x01000038,
599 Key_F10 = 0x01000039,
600 Key_F11 = 0x0100003a,
601 Key_F12 = 0x0100003b,
602 Key_F13 = 0x0100003c,
603 Key_F14 = 0x0100003d,
604 Key_F15 = 0x0100003e,
605 Key_F16 = 0x0100003f,
606 Key_F17 = 0x01000040,
607 Key_F18 = 0x01000041,
608 Key_F19 = 0x01000042,
609 Key_F20 = 0x01000043,
610 Key_F21 = 0x01000044,
611 Key_F22 = 0x01000045,
612 Key_F23 = 0x01000046,
613 Key_F24 = 0x01000047,
614 Key_F25 = 0x01000048, // F25 .. F35 only on X11
615 Key_F26 = 0x01000049,
616 Key_F27 = 0x0100004a,
617 Key_F28 = 0x0100004b,
618 Key_F29 = 0x0100004c,
619 Key_F30 = 0x0100004d,
620 Key_F31 = 0x0100004e,
621 Key_F32 = 0x0100004f,
622 Key_F33 = 0x01000050,
623 Key_F34 = 0x01000051,
624 Key_F35 = 0x01000052,
625 Key_Super_L = 0x01000053, // extra keys
626 Key_Super_R = 0x01000054,
627 Key_Menu = 0x01000055,
628 Key_Hyper_L = 0x01000056,
629 Key_Hyper_R = 0x01000057,
630 Key_Help = 0x01000058,
631 Key_Direction_L = 0x01000059,
632 Key_Direction_R = 0x01000060,
633 Key_Space = 0x20, // 7 bit printable ASCII
634 Key_Any = Key_Space,
635 Key_Exclam = 0x21,
636 Key_QuoteDbl = 0x22,
637 Key_NumberSign = 0x23,
638 Key_Dollar = 0x24,
639 Key_Percent = 0x25,
640 Key_Ampersand = 0x26,
641 Key_Apostrophe = 0x27,
642 Key_ParenLeft = 0x28,
643 Key_ParenRight = 0x29,
644 Key_Asterisk = 0x2a,
645 Key_Plus = 0x2b,
646 Key_Comma = 0x2c,
647 Key_Minus = 0x2d,
648 Key_Period = 0x2e,
649 Key_Slash = 0x2f,
650 Key_0 = 0x30,
651 Key_1 = 0x31,
652 Key_2 = 0x32,
653 Key_3 = 0x33,
654 Key_4 = 0x34,
655 Key_5 = 0x35,
656 Key_6 = 0x36,
657 Key_7 = 0x37,
658 Key_8 = 0x38,
659 Key_9 = 0x39,
660 Key_Colon = 0x3a,
661 Key_Semicolon = 0x3b,
662 Key_Less = 0x3c,
663 Key_Equal = 0x3d,
664 Key_Greater = 0x3e,
665 Key_Question = 0x3f,
666 Key_At = 0x40,
667 Key_A = 0x41,
668 Key_B = 0x42,
669 Key_C = 0x43,
670 Key_D = 0x44,
671 Key_E = 0x45,
672 Key_F = 0x46,
673 Key_G = 0x47,
674 Key_H = 0x48,
675 Key_I = 0x49,
676 Key_J = 0x4a,
677 Key_K = 0x4b,
678 Key_L = 0x4c,
679 Key_M = 0x4d,
680 Key_N = 0x4e,
681 Key_O = 0x4f,
682 Key_P = 0x50,
683 Key_Q = 0x51,
684 Key_R = 0x52,
685 Key_S = 0x53,
686 Key_T = 0x54,
687 Key_U = 0x55,
688 Key_V = 0x56,
689 Key_W = 0x57,
690 Key_X = 0x58,
691 Key_Y = 0x59,
692 Key_Z = 0x5a,
693 Key_BracketLeft = 0x5b,
694 Key_Backslash = 0x5c,
695 Key_BracketRight = 0x5d,
696 Key_AsciiCircum = 0x5e,
697 Key_Underscore = 0x5f,
698 Key_QuoteLeft = 0x60,
699 Key_BraceLeft = 0x7b,
700 Key_Bar = 0x7c,
701 Key_BraceRight = 0x7d,
702 Key_AsciiTilde = 0x7e,
703
704 Key_nobreakspace = 0x0a0,
705 Key_exclamdown = 0x0a1,
706 Key_cent = 0x0a2,
707 Key_sterling = 0x0a3,
708 Key_currency = 0x0a4,
709 Key_yen = 0x0a5,
710 Key_brokenbar = 0x0a6,
711 Key_section = 0x0a7,
712 Key_diaeresis = 0x0a8,
713 Key_copyright = 0x0a9,
714 Key_ordfeminine = 0x0aa,
715 Key_guillemotleft = 0x0ab, // left angle quotation mark
716 Key_notsign = 0x0ac,
717 Key_hyphen = 0x0ad,
718 Key_registered = 0x0ae,
719 Key_macron = 0x0af,
720 Key_degree = 0x0b0,
721 Key_plusminus = 0x0b1,
722 Key_twosuperior = 0x0b2,
723 Key_threesuperior = 0x0b3,
724 Key_acute = 0x0b4,
725 Key_mu = 0x0b5,
726 Key_paragraph = 0x0b6,
727 Key_periodcentered = 0x0b7,
728 Key_cedilla = 0x0b8,
729 Key_onesuperior = 0x0b9,
730 Key_masculine = 0x0ba,
731 Key_guillemotright = 0x0bb, // right angle quotation mark
732 Key_onequarter = 0x0bc,
733 Key_onehalf = 0x0bd,
734 Key_threequarters = 0x0be,
735 Key_questiondown = 0x0bf,
736 Key_Agrave = 0x0c0,
737 Key_Aacute = 0x0c1,
738 Key_Acircumflex = 0x0c2,
739 Key_Atilde = 0x0c3,
740 Key_Adiaeresis = 0x0c4,
741 Key_Aring = 0x0c5,
742 Key_AE = 0x0c6,
743 Key_Ccedilla = 0x0c7,
744 Key_Egrave = 0x0c8,
745 Key_Eacute = 0x0c9,
746 Key_Ecircumflex = 0x0ca,
747 Key_Ediaeresis = 0x0cb,
748 Key_Igrave = 0x0cc,
749 Key_Iacute = 0x0cd,
750 Key_Icircumflex = 0x0ce,
751 Key_Idiaeresis = 0x0cf,
752 Key_ETH = 0x0d0,
753 Key_Ntilde = 0x0d1,
754 Key_Ograve = 0x0d2,
755 Key_Oacute = 0x0d3,
756 Key_Ocircumflex = 0x0d4,
757 Key_Otilde = 0x0d5,
758 Key_Odiaeresis = 0x0d6,
759 Key_multiply = 0x0d7,
760 Key_Ooblique = 0x0d8,
761 Key_Ugrave = 0x0d9,
762 Key_Uacute = 0x0da,
763 Key_Ucircumflex = 0x0db,
764 Key_Udiaeresis = 0x0dc,
765 Key_Yacute = 0x0dd,
766 Key_THORN = 0x0de,
767 Key_ssharp = 0x0df,
768 Key_division = 0x0f7,
769 Key_ydiaeresis = 0x0ff,
770
771 // International input method support (X keycode - 0xEE00, the
772 // definition follows Qt/Embedded 2.3.7) Only interesting if
773 // you are writing your own input method
774
775 // International & multi-key character composition
776 Key_AltGr = 0x01001103,
777 Key_Multi_key = 0x01001120, // Multi-key character compose
778 Key_Codeinput = 0x01001137,
779 Key_SingleCandidate = 0x0100113c,
780 Key_MultipleCandidate = 0x0100113d,
781 Key_PreviousCandidate = 0x0100113e,
782
783 // Misc Functions
784 Key_Mode_switch = 0x0100117e, // Character set switch
785 //Key_script_switch = 0x0100117e, // Alias for mode_switch
786
787 // Japanese keyboard support
788 Key_Kanji = 0x01001121, // Kanji, Kanji convert
789 Key_Muhenkan = 0x01001122, // Cancel Conversion
790 //Key_Henkan_Mode = 0x01001123, // Start/Stop Conversion
791 Key_Henkan = 0x01001123, // Alias for Henkan_Mode
792 Key_Romaji = 0x01001124, // to Romaji
793 Key_Hiragana = 0x01001125, // to Hiragana
794 Key_Katakana = 0x01001126, // to Katakana
795 Key_Hiragana_Katakana = 0x01001127, // Hiragana/Katakana toggle
796 Key_Zenkaku = 0x01001128, // to Zenkaku
797 Key_Hankaku = 0x01001129, // to Hankaku
798 Key_Zenkaku_Hankaku = 0x0100112a, // Zenkaku/Hankaku toggle
799 Key_Touroku = 0x0100112b, // Add to Dictionary
800 Key_Massyo = 0x0100112c, // Delete from Dictionary
801 Key_Kana_Lock = 0x0100112d, // Kana Lock
802 Key_Kana_Shift = 0x0100112e, // Kana Shift
803 Key_Eisu_Shift = 0x0100112f, // Alphanumeric Shift
804 Key_Eisu_toggle = 0x01001130, // Alphanumeric toggle
805 //Key_Kanji_Bangou = 0x01001137, // Codeinput
806 //Key_Zen_Koho = 0x0100113d, // Multiple/All Candidate(s)
807 //Key_Mae_Koho = 0x0100113e, // Previous Candidate
808
809 // Korean keyboard support
810 //
811 // In fact, many Korean users need only 2 keys, Key_Hangul and
812 // Key_Hangul_Hanja. But rest of the keys are good for future.
813
814 Key_Hangul = 0x01001131, // Hangul start/stop(toggle)
815 Key_Hangul_Start = 0x01001132, // Hangul start
816 Key_Hangul_End = 0x01001133, // Hangul end, English start
817 Key_Hangul_Hanja = 0x01001134, // Start Hangul->Hanja Conversion
818 Key_Hangul_Jamo = 0x01001135, // Hangul Jamo mode
819 Key_Hangul_Romaja = 0x01001136, // Hangul Romaja mode
820 //Key_Hangul_Codeinput = 0x01001137, // Hangul code input mode
821 Key_Hangul_Jeonja = 0x01001138, // Jeonja mode
822 Key_Hangul_Banja = 0x01001139, // Banja mode
823 Key_Hangul_PreHanja = 0x0100113a, // Pre Hanja conversion
824 Key_Hangul_PostHanja = 0x0100113b, // Post Hanja conversion
825 //Key_Hangul_SingleCandidate = 0x0100113c, // Single candidate
826 //Key_Hangul_MultipleCandidate = 0x0100113d, // Multiple candidate
827 //Key_Hangul_PreviousCandidate = 0x0100113e, // Previous candidate
828 Key_Hangul_Special = 0x0100113f, // Special symbols
829 //Key_Hangul_switch = 0x0100117e, // Alias for mode_switch
830
831 // dead keys (X keycode - 0xED00 to avoid the conflict)
832 Key_Dead_Grave = 0x01001250,
833 Key_Dead_Acute = 0x01001251,
834 Key_Dead_Circumflex = 0x01001252,
835 Key_Dead_Tilde = 0x01001253,
836 Key_Dead_Macron = 0x01001254,
837 Key_Dead_Breve = 0x01001255,
838 Key_Dead_Abovedot = 0x01001256,
839 Key_Dead_Diaeresis = 0x01001257,
840 Key_Dead_Abovering = 0x01001258,
841 Key_Dead_Doubleacute = 0x01001259,
842 Key_Dead_Caron = 0x0100125a,
843 Key_Dead_Cedilla = 0x0100125b,
844 Key_Dead_Ogonek = 0x0100125c,
845 Key_Dead_Iota = 0x0100125d,
846 Key_Dead_Voiced_Sound = 0x0100125e,
847 Key_Dead_Semivoiced_Sound = 0x0100125f,
848 Key_Dead_Belowdot = 0x01001260,
849 Key_Dead_Hook = 0x01001261,
850 Key_Dead_Horn = 0x01001262,
851
852 // multimedia/internet keys - ignored by default - see QKeyEvent c'tor
853 Key_Back = 0x01000061,
854 Key_Forward = 0x01000062,
855 Key_Stop = 0x01000063,
856 Key_Refresh = 0x01000064,
857 Key_VolumeDown = 0x01000070,
858 Key_VolumeMute = 0x01000071,
859 Key_VolumeUp = 0x01000072,
860 Key_BassBoost = 0x01000073,
861 Key_BassUp = 0x01000074,
862 Key_BassDown = 0x01000075,
863 Key_TrebleUp = 0x01000076,
864 Key_TrebleDown = 0x01000077,
865 Key_MediaPlay = 0x01000080,
866 Key_MediaStop = 0x01000081,
867 Key_MediaPrevious = 0x01000082,
868 Key_MediaNext = 0x01000083,
869 Key_MediaRecord = 0x01000084,
870 Key_MediaPause = 0x1000085,
871 Key_MediaTogglePlayPause = 0x1000086,
872 Key_HomePage = 0x01000090,
873 Key_Favorites = 0x01000091,
874 Key_Search = 0x01000092,
875 Key_Standby = 0x01000093,
876 Key_OpenUrl = 0x01000094,
877 Key_LaunchMail = 0x010000a0,
878 Key_LaunchMedia = 0x010000a1,
879 Key_Launch0 = 0x010000a2,
880 Key_Launch1 = 0x010000a3,
881 Key_Launch2 = 0x010000a4,
882 Key_Launch3 = 0x010000a5,
883 Key_Launch4 = 0x010000a6,
884 Key_Launch5 = 0x010000a7,
885 Key_Launch6 = 0x010000a8,
886 Key_Launch7 = 0x010000a9,
887 Key_Launch8 = 0x010000aa,
888 Key_Launch9 = 0x010000ab,
889 Key_LaunchA = 0x010000ac,
890 Key_LaunchB = 0x010000ad,
891 Key_LaunchC = 0x010000ae,
892 Key_LaunchD = 0x010000af,
893 Key_LaunchE = 0x010000b0,
894 Key_LaunchF = 0x010000b1,
895 Key_MonBrightnessUp = 0x010000b2,
896 Key_MonBrightnessDown = 0x010000b3,
897 Key_KeyboardLightOnOff = 0x010000b4,
898 Key_KeyboardBrightnessUp = 0x010000b5,
899 Key_KeyboardBrightnessDown = 0x010000b6,
900 Key_PowerOff = 0x010000b7,
901 Key_WakeUp = 0x010000b8,
902 Key_Eject = 0x010000b9,
903 Key_ScreenSaver = 0x010000ba,
904 Key_WWW = 0x010000bb,
905 Key_Memo = 0x010000bc,
906 Key_LightBulb = 0x010000bd,
907 Key_Shop = 0x010000be,
908 Key_History = 0x010000bf,
909 Key_AddFavorite = 0x010000c0,
910 Key_HotLinks = 0x010000c1,
911 Key_BrightnessAdjust = 0x010000c2,
912 Key_Finance = 0x010000c3,
913 Key_Community = 0x010000c4,
914 Key_AudioRewind = 0x010000c5, // Media rewind
915 Key_BackForward = 0x010000c6,
916 Key_ApplicationLeft = 0x010000c7,
917 Key_ApplicationRight = 0x010000c8,
918 Key_Book = 0x010000c9,
919 Key_CD = 0x010000ca,
920 Key_Calculator = 0x010000cb,
921 Key_ToDoList = 0x010000cc,
922 Key_ClearGrab = 0x010000cd,
923 Key_Close = 0x010000ce,
924 Key_Copy = 0x010000cf,
925 Key_Cut = 0x010000d0,
926 Key_Display = 0x010000d1, // Output switch key
927 Key_DOS = 0x010000d2,
928 Key_Documents = 0x010000d3,
929 Key_Excel = 0x010000d4,
930 Key_Explorer = 0x010000d5,
931 Key_Game = 0x010000d6,
932 Key_Go = 0x010000d7,
933 Key_iTouch = 0x010000d8,
934 Key_LogOff = 0x010000d9,
935 Key_Market = 0x010000da,
936 Key_Meeting = 0x010000db,
937 Key_MenuKB = 0x010000dc,
938 Key_MenuPB = 0x010000dd,
939 Key_MySites = 0x010000de,
940 Key_News = 0x010000df,
941 Key_OfficeHome = 0x010000e0,
942 Key_Option = 0x010000e1,
943 Key_Paste = 0x010000e2,
944 Key_Phone = 0x010000e3,
945 Key_Calendar = 0x010000e4,
946 Key_Reply = 0x010000e5,
947 Key_Reload = 0x010000e6,
948 Key_RotateWindows = 0x010000e7,
949 Key_RotationPB = 0x010000e8,
950 Key_RotationKB = 0x010000e9,
951 Key_Save = 0x010000ea,
952 Key_Send = 0x010000eb,
953 Key_Spell = 0x010000ec,
954 Key_SplitScreen = 0x010000ed,
955 Key_Support = 0x010000ee,
956 Key_TaskPane = 0x010000ef,
957 Key_Terminal = 0x010000f0,
958 Key_Tools = 0x010000f1,
959 Key_Travel = 0x010000f2,
960 Key_Video = 0x010000f3,
961 Key_Word = 0x010000f4,
962 Key_Xfer = 0x010000f5,
963 Key_ZoomIn = 0x010000f6,
964 Key_ZoomOut = 0x010000f7,
965 Key_Away = 0x010000f8,
966 Key_Messenger = 0x010000f9,
967 Key_WebCam = 0x010000fa,
968 Key_MailForward = 0x010000fb,
969 Key_Pictures = 0x010000fc,
970 Key_Music = 0x010000fd,
971 Key_Battery = 0x010000fe,
972 Key_Bluetooth = 0x010000ff,
973 Key_WLAN = 0x01000100,
974 Key_UWB = 0x01000101,
975 Key_AudioForward = 0x01000102, // Media fast-forward
976 Key_AudioRepeat = 0x01000103, // Toggle repeat mode
977 Key_AudioRandomPlay = 0x01000104, // Toggle shuffle mode
978 Key_Subtitle = 0x01000105,
979 Key_AudioCycleTrack = 0x01000106,
980 Key_Time = 0x01000107,
981 Key_Hibernate = 0x01000108,
982 Key_View = 0x01000109,
983 Key_TopMenu = 0x0100010a,
984 Key_PowerDown = 0x0100010b,
985 Key_Suspend = 0x0100010c,
986 Key_ContrastAdjust = 0x0100010d,
987
988 Key_LaunchG = 0x0100010e,
989 Key_LaunchH = 0x0100010f,
990
991 Key_TouchpadToggle = 0x01000110,
992 Key_TouchpadOn = 0x01000111,
993 Key_TouchpadOff = 0x01000112,
994
995 Key_MicMute = 0x01000113,
996
997 Key_Red = 0x01000114,
998 Key_Green = 0x01000115,
999 Key_Yellow = 0x01000116,
1000 Key_Blue = 0x01000117,
1001
1002 Key_ChannelUp = 0x01000118,
1003 Key_ChannelDown = 0x01000119,
1004
1005 Key_Guide = 0x0100011a,
1006 Key_Info = 0x0100011b,
1007 Key_Settings = 0x0100011c,
1008
1009 Key_MicVolumeUp = 0x0100011d,
1010 Key_MicVolumeDown = 0x0100011e,
1011
1012 Key_New = 0x01000120,
1013 Key_Open = 0x01000121,
1014 Key_Find = 0x01000122,
1015 Key_Undo = 0x01000123,
1016 Key_Redo = 0x01000124,
1017
1018 Key_MediaLast = 0x0100ffff,
1019
1020 // Keypad navigation keys
1021 Key_Select = 0x01010000,
1022 Key_Yes = 0x01010001,
1023 Key_No = 0x01010002,
1024
1025 // Newer misc keys
1026 Key_Cancel = 0x01020001,
1027 Key_Printer = 0x01020002,
1028 Key_Execute = 0x01020003,
1029 Key_Sleep = 0x01020004,
1030 Key_Play = 0x01020005, // Not the same as Key_MediaPlay
1031 Key_Zoom = 0x01020006,
1032 //Key_Jisho = 0x01020007, // IME: Dictionary key
1033 //Key_Oyayubi_Left = 0x01020008, // IME: Left Oyayubi key
1034 //Key_Oyayubi_Right = 0x01020009, // IME: Right Oyayubi key
1035 Key_Exit = 0x0102000a,
1036
1037 // Device keys
1038 Key_Context1 = 0x01100000,
1039 Key_Context2 = 0x01100001,
1040 Key_Context3 = 0x01100002,
1041 Key_Context4 = 0x01100003,
1042 Key_Call = 0x01100004, // set absolute state to in a call (do not toggle state)
1043 Key_Hangup = 0x01100005, // set absolute state to hang up (do not toggle state)
1044 Key_Flip = 0x01100006,
1045 Key_ToggleCallHangup = 0x01100007, // a toggle key for answering, or hanging up, based on current call state
1046 Key_VoiceDial = 0x01100008,
1047 Key_LastNumberRedial = 0x01100009,
1048
1049 Key_Camera = 0x01100020,
1050 Key_CameraFocus = 0x01100021,
1051
1052 Key_unknown = 0x01ffffff
1053 };
1054
1055 enum ArrowType {
1056 NoArrow,
1057 UpArrow,
1058 DownArrow,
1059 LeftArrow,
1060 RightArrow
1061 };
1062
1063 enum PenStyle { // pen style
1064 NoPen,
1065 SolidLine,
1066 DashLine,
1067 DotLine,
1068 DashDotLine,
1069 DashDotDotLine,
1070 CustomDashLine
1071#ifndef Q_MOC_RUN
1072 , MPenStyle = 0x0f
1073#endif
1074 };
1075
1076 enum PenCapStyle { // line endcap style
1077 FlatCap = 0x00,
1078 SquareCap = 0x10,
1079 RoundCap = 0x20,
1080 MPenCapStyle = 0x30
1081 };
1082
1083 enum PenJoinStyle { // line join style
1084 MiterJoin = 0x00,
1085 BevelJoin = 0x40,
1086 RoundJoin = 0x80,
1087 SvgMiterJoin = 0x100,
1088 MPenJoinStyle = 0x1c0
1089 };
1090
1091 enum BrushStyle { // brush style
1092 NoBrush,
1093 SolidPattern,
1094 Dense1Pattern,
1095 Dense2Pattern,
1096 Dense3Pattern,
1097 Dense4Pattern,
1098 Dense5Pattern,
1099 Dense6Pattern,
1100 Dense7Pattern,
1101 HorPattern,
1102 VerPattern,
1103 CrossPattern,
1104 BDiagPattern,
1105 FDiagPattern,
1106 DiagCrossPattern,
1107 LinearGradientPattern,
1108 RadialGradientPattern,
1109 ConicalGradientPattern,
1110 TexturePattern = 24
1111 };
1112
1113 enum SizeMode {
1114 AbsoluteSize,
1115 RelativeSize
1116 };
1117
1118 enum UIEffect {
1119 UI_General,
1120 UI_AnimateMenu,
1121 UI_FadeMenu,
1122 UI_AnimateCombo,
1123 UI_AnimateTooltip,
1124 UI_FadeTooltip,
1125 UI_AnimateToolBox
1126 };
1127
1128 enum CursorShape {
1129 ArrowCursor,
1130 UpArrowCursor,
1131 CrossCursor,
1132 WaitCursor,
1133 IBeamCursor,
1134 SizeVerCursor,
1135 SizeHorCursor,
1136 SizeBDiagCursor,
1137 SizeFDiagCursor,
1138 SizeAllCursor,
1139 BlankCursor,
1140 SplitVCursor,
1141 SplitHCursor,
1142 PointingHandCursor,
1143 ForbiddenCursor,
1144 WhatsThisCursor,
1145 BusyCursor,
1146 OpenHandCursor,
1147 ClosedHandCursor,
1148 DragCopyCursor,
1149 DragMoveCursor,
1150 DragLinkCursor,
1151 LastCursor = DragLinkCursor,
1152 BitmapCursor = 24,
1153 CustomCursor = 25
1154 };
1155
1156 enum TextFormat {
1157 PlainText,
1158 RichText,
1159 AutoText
1160 };
1161
1162 enum AspectRatioMode {
1163 IgnoreAspectRatio,
1164 KeepAspectRatio,
1165 KeepAspectRatioByExpanding
1166 };
1167
1168 enum DockWidgetArea {
1169 LeftDockWidgetArea = 0x1,
1170 RightDockWidgetArea = 0x2,
1171 TopDockWidgetArea = 0x4,
1172 BottomDockWidgetArea = 0x8,
1173
1174 DockWidgetArea_Mask = 0xf,
1175 AllDockWidgetAreas = DockWidgetArea_Mask,
1176 NoDockWidgetArea = 0
1177 };
1178 enum DockWidgetAreaSizes {
1179 NDockWidgetAreas = 4
1180 };
1181
1182 Q_DECLARE_FLAGS(DockWidgetAreas, DockWidgetArea)
1183
1184 enum ToolBarArea {
1185 LeftToolBarArea = 0x1,
1186 RightToolBarArea = 0x2,
1187 TopToolBarArea = 0x4,
1188 BottomToolBarArea = 0x8,
1189
1190 ToolBarArea_Mask = 0xf,
1191 AllToolBarAreas = ToolBarArea_Mask,
1192 NoToolBarArea = 0
1193 };
1194
1195 enum ToolBarAreaSizes {
1196 NToolBarAreas = 4
1197 };
1198
1199 Q_DECLARE_FLAGS(ToolBarAreas, ToolBarArea)
1200
1201 enum DateFormat {
1202 TextDate, // default Qt
1203 ISODate, // ISO 8601
1204 SystemLocaleDate, // deprecated
1205 LocalDate = SystemLocaleDate, // deprecated
1206 LocaleDate, // deprecated
1207 SystemLocaleShortDate,
1208 SystemLocaleLongDate,
1209 DefaultLocaleShortDate,
1210 DefaultLocaleLongDate,
1211 RFC2822Date, // RFC 2822 (+ 850 and 1036 during parsing)
1212 ISODateWithMs
1213 };
1214
1215 enum TimeSpec {
1216 LocalTime,
1217 UTC,
1218 OffsetFromUTC,
1219 TimeZone
1220 };
1221
1222 enum DayOfWeek {
1223 Monday = 1,
1224 Tuesday = 2,
1225 Wednesday = 3,
1226 Thursday = 4,
1227 Friday = 5,
1228 Saturday = 6,
1229 Sunday = 7
1230 };
1231
1232 enum ScrollBarPolicy {
1233 ScrollBarAsNeeded,
1234 ScrollBarAlwaysOff,
1235 ScrollBarAlwaysOn
1236 };
1237
1238 enum CaseSensitivity {
1239 CaseInsensitive,
1240 CaseSensitive
1241 };
1242
1243 enum Corner {
1244 TopLeftCorner = 0x00000,
1245 TopRightCorner = 0x00001,
1246 BottomLeftCorner = 0x00002,
1247 BottomRightCorner = 0x00003
1248 };
1249
1250 enum Edge {
1251 TopEdge = 0x00001,
1252 LeftEdge = 0x00002,
1253 RightEdge = 0x00004,
1254 BottomEdge = 0x00008
1255 };
1256
1257 Q_DECLARE_FLAGS(Edges, Edge)
1258
1259 enum ConnectionType {
1260 AutoConnection,
1261 DirectConnection,
1262 QueuedConnection,
1263 BlockingQueuedConnection,
1264 UniqueConnection = 0x80
1265 };
1266
1267 enum ShortcutContext {
1268 WidgetShortcut,
1269 WindowShortcut,
1270 ApplicationShortcut,
1271 WidgetWithChildrenShortcut
1272 };
1273
1274 enum FillRule {
1275 OddEvenFill,
1276 WindingFill
1277 };
1278
1279 enum MaskMode {
1280 MaskInColor,
1281 MaskOutColor
1282 };
1283
1284 enum ClipOperation {
1285 NoClip,
1286 ReplaceClip,
1287 IntersectClip
1288 };
1289
1290 // Shape = 0x1, BoundingRect = 0x2
1291 enum ItemSelectionMode {
1292 ContainsItemShape = 0x0,
1293 IntersectsItemShape = 0x1,
1294 ContainsItemBoundingRect = 0x2,
1295 IntersectsItemBoundingRect = 0x3
1296 };
1297
1298 enum ItemSelectionOperation {
1299 ReplaceSelection,
1300 AddToSelection
1301 };
1302
1303 enum TransformationMode {
1304 FastTransformation,
1305 SmoothTransformation
1306 };
1307
1308 enum Axis {
1309 XAxis,
1310 YAxis,
1311 ZAxis
1312 };
1313
1314 enum FocusReason {
1315 MouseFocusReason,
1316 TabFocusReason,
1317 BacktabFocusReason,
1318 ActiveWindowFocusReason,
1319 PopupFocusReason,
1320 ShortcutFocusReason,
1321 MenuBarFocusReason,
1322 OtherFocusReason,
1323 NoFocusReason
1324 };
1325
1326 enum ContextMenuPolicy {
1327 NoContextMenu,
1328 DefaultContextMenu,
1329 ActionsContextMenu,
1330 CustomContextMenu,
1331 PreventContextMenu
1332 };
1333
1334 enum InputMethodQuery {
1335 ImEnabled = 0x1,
1336 ImCursorRectangle = 0x2,
1337 ImMicroFocus = 0x2, // deprecated
1338 ImFont = 0x4,
1339 ImCursorPosition = 0x8,
1340 ImSurroundingText = 0x10,
1341 ImCurrentSelection = 0x20,
1342 ImMaximumTextLength = 0x40,
1343 ImAnchorPosition = 0x80,
1344 ImHints = 0x100,
1345 ImPreferredLanguage = 0x200,
1346
1347 ImAbsolutePosition = 0x400,
1348 ImTextBeforeCursor = 0x800,
1349 ImTextAfterCursor = 0x1000,
1350 ImEnterKeyType = 0x2000,
1351 ImAnchorRectangle = 0x4000,
1352 ImInputItemClipRectangle = 0x8000,
1353
1354 ImPlatformData = 0x80000000,
1355 ImQueryInput = ImCursorRectangle | ImCursorPosition | ImSurroundingText |
1356 ImCurrentSelection | ImAnchorRectangle | ImAnchorPosition,
1357 ImQueryAll = 0xffffffff
1358 };
1359 Q_DECLARE_FLAGS(InputMethodQueries, InputMethodQuery)
1360
1361 enum InputMethodHint {
1362 ImhNone = 0x0,
1363
1364 ImhHiddenText = 0x1,
1365 ImhSensitiveData = 0x2,
1366 ImhNoAutoUppercase = 0x4,
1367 ImhPreferNumbers = 0x8,
1368 ImhPreferUppercase = 0x10,
1369 ImhPreferLowercase = 0x20,
1370 ImhNoPredictiveText = 0x40,
1371
1372 ImhDate = 0x80,
1373 ImhTime = 0x100,
1374
1375 ImhPreferLatin = 0x200,
1376
1377 ImhMultiLine = 0x400,
1378
1379 ImhDigitsOnly = 0x10000,
1380 ImhFormattedNumbersOnly = 0x20000,
1381 ImhUppercaseOnly = 0x40000,
1382 ImhLowercaseOnly = 0x80000,
1383 ImhDialableCharactersOnly = 0x100000,
1384 ImhEmailCharactersOnly = 0x200000,
1385 ImhUrlCharactersOnly = 0x400000,
1386 ImhLatinOnly = 0x800000,
1387
1388 ImhExclusiveInputMask = 0xffff0000
1389 };
1390 Q_DECLARE_FLAGS(InputMethodHints, InputMethodHint)
1391
1392 enum EnterKeyType {
1393 EnterKeyDefault,
1394 EnterKeyReturn,
1395 EnterKeyDone,
1396 EnterKeyGo,
1397 EnterKeySend,
1398 EnterKeySearch,
1399 EnterKeyNext,
1400 EnterKeyPrevious
1401 };
1402
1403 enum ToolButtonStyle {
1404 ToolButtonIconOnly,
1405 ToolButtonTextOnly,
1406 ToolButtonTextBesideIcon,
1407 ToolButtonTextUnderIcon,
1408 ToolButtonFollowStyle
1409 };
1410
1411 enum LayoutDirection {
1412 LeftToRight,
1413 RightToLeft,
1414 LayoutDirectionAuto
1415 };
1416
1417 enum AnchorPoint {
1418 AnchorLeft = 0,
1419 AnchorHorizontalCenter,
1420 AnchorRight,
1421 AnchorTop,
1422 AnchorVerticalCenter,
1423 AnchorBottom
1424 };
1425
1426 enum FindChildOption {
1427 FindDirectChildrenOnly = 0x0,
1428 FindChildrenRecursively = 0x1
1429 };
1430 Q_DECLARE_FLAGS(FindChildOptions, FindChildOption)
1431
1432 enum DropAction {
1433 CopyAction = 0x1,
1434 MoveAction = 0x2,
1435 LinkAction = 0x4,
1436 ActionMask = 0xff,
1437 TargetMoveAction = 0x8002,
1438 IgnoreAction = 0x0
1439 };
1440 Q_DECLARE_FLAGS(DropActions, DropAction)
1441
1442 enum CheckState {
1443 Unchecked,
1444 PartiallyChecked,
1445 Checked
1446 };
1447
1448 enum ItemDataRole {
1449 DisplayRole = 0,
1450 DecorationRole = 1,
1451 EditRole = 2,
1452 ToolTipRole = 3,
1453 StatusTipRole = 4,
1454 WhatsThisRole = 5,
1455 // Metadata
1456 FontRole = 6,
1457 TextAlignmentRole = 7,
1458 BackgroundColorRole = 8,
1459 BackgroundRole = 8,
1460 TextColorRole = 9,
1461 ForegroundRole = 9,
1462 CheckStateRole = 10,
1463 // Accessibility
1464 AccessibleTextRole = 11,
1465 AccessibleDescriptionRole = 12,
1466 // More general purpose
1467 SizeHintRole = 13,
1468 InitialSortOrderRole = 14,
1469 // Internal UiLib roles. Start worrying when public roles go that high.
1470 DisplayPropertyRole = 27,
1471 DecorationPropertyRole = 28,
1472 ToolTipPropertyRole = 29,
1473 StatusTipPropertyRole = 30,
1474 WhatsThisPropertyRole = 31,
1475 // Reserved
1476 UserRole = 0x0100
1477 };
1478
1479 enum ItemFlag {
1480 NoItemFlags = 0,
1481 ItemIsSelectable = 1,
1482 ItemIsEditable = 2,
1483 ItemIsDragEnabled = 4,
1484 ItemIsDropEnabled = 8,
1485 ItemIsUserCheckable = 16,
1486 ItemIsEnabled = 32,
1487 ItemIsAutoTristate = 64,
1488#if QT_DEPRECATED_SINCE(5, 6)
1489 ItemIsTristate = ItemIsAutoTristate,
1490#endif
1491 ItemNeverHasChildren = 128,
1492 ItemIsUserTristate = 256
1493 };
1494 Q_DECLARE_FLAGS(ItemFlags, ItemFlag)
1495
1496 enum MatchFlag {
1497 MatchExactly = 0,
1498 MatchContains = 1,
1499 MatchStartsWith = 2,
1500 MatchEndsWith = 3,
1501 MatchRegExp = 4,
1502 MatchWildcard = 5,
1503 MatchFixedString = 8,
1504 MatchCaseSensitive = 16,
1505 MatchWrap = 32,
1506 MatchRecursive = 64
1507 };
1508 Q_DECLARE_FLAGS(MatchFlags, MatchFlag)
1509
1510 typedef void * HANDLE;
1511#if QT_DEPRECATED_SINCE(5, 0)
1512 typedef WindowFlags WFlags;
1513#endif
1514
1515 enum WindowModality {
1516 NonModal,
1517 WindowModal,
1518 ApplicationModal
1519 };
1520
1521 enum TextInteractionFlag {
1522 NoTextInteraction = 0,
1523 TextSelectableByMouse = 1,
1524 TextSelectableByKeyboard = 2,
1525 LinksAccessibleByMouse = 4,
1526 LinksAccessibleByKeyboard = 8,
1527 TextEditable = 16,
1528
1529 TextEditorInteraction = TextSelectableByMouse | TextSelectableByKeyboard | TextEditable,
1530 TextBrowserInteraction = TextSelectableByMouse | LinksAccessibleByMouse | LinksAccessibleByKeyboard
1531 };
1532 Q_DECLARE_FLAGS(TextInteractionFlags, TextInteractionFlag)
1533
1534 enum EventPriority {
1535 HighEventPriority = 1,
1536 NormalEventPriority = 0,
1537 LowEventPriority = -1
1538 };
1539
1540 enum SizeHint {
1541 MinimumSize,
1542 PreferredSize,
1543 MaximumSize,
1544 MinimumDescent,
1545 NSizeHints
1546 };
1547
1548 enum WindowFrameSection {
1549 NoSection,
1550 LeftSection, // For resize
1551 TopLeftSection,
1552 TopSection,
1553 TopRightSection,
1554 RightSection,
1555 BottomRightSection,
1556 BottomSection,
1557 BottomLeftSection,
1558 TitleBarArea // For move
1559 };
1560
1561#if defined(Q_COMPILER_CLASS_ENUM) && defined(Q_COMPILER_CONSTEXPR)
1562 enum class Initialization {
1563 Uninitialized
1564 };
1565 static constexpr Q_DECL_UNUSED Initialization Uninitialized = Initialization::Uninitialized;
1566#else
1567 enum Initialization {
1568 Uninitialized
1569 };
1570#endif
1571
1572 enum CoordinateSystem {
1573 DeviceCoordinates,
1574 LogicalCoordinates
1575 };
1576
1577 enum TouchPointState {
1578 TouchPointPressed = 0x01,
1579 TouchPointMoved = 0x02,
1580 TouchPointStationary = 0x04,
1581 TouchPointReleased = 0x08
1582 };
1583 Q_DECLARE_FLAGS(TouchPointStates, TouchPointState)
1584
1585#ifndef QT_NO_GESTURES
1586 enum GestureState
1587 {
1588 NoGesture,
1589 GestureStarted = 1,
1590 GestureUpdated = 2,
1591 GestureFinished = 3,
1592 GestureCanceled = 4
1593 };
1594
1595 enum GestureType
1596 {
1597 TapGesture = 1,
1598 TapAndHoldGesture = 2,
1599 PanGesture = 3,
1600 PinchGesture = 4,
1601 SwipeGesture = 5,
1602
1603 CustomGesture = 0x0100,
1604
1605 LastGestureType = ~0u
1606 };
1607
1608 enum GestureFlag
1609 {
1610 DontStartGestureOnChildren = 0x01,
1611 ReceivePartialGestures = 0x02,
1612 IgnoredGesturesPropagateToParent = 0x04
1613 };
1614 Q_DECLARE_FLAGS(GestureFlags, GestureFlag)
1615
1616 enum NativeGestureType
1617 {
1618 BeginNativeGesture,
1619 EndNativeGesture,
1620 PanNativeGesture,
1621 ZoomNativeGesture,
1622 SmartZoomNativeGesture,
1623 RotateNativeGesture,
1624 SwipeNativeGesture
1625 };
1626
1627#endif // QT_NO_GESTURES
1628
1629 enum NavigationMode
1630 {
1631 NavigationModeNone,
1632 NavigationModeKeypadTabOrder,
1633 NavigationModeKeypadDirectional,
1634 NavigationModeCursorAuto,
1635 NavigationModeCursorForceVisible
1636 };
1637
1638 enum CursorMoveStyle {
1639 LogicalMoveStyle,
1640 VisualMoveStyle
1641 };
1642
1643 enum TimerType {
1644 PreciseTimer,
1645 CoarseTimer,
1646 VeryCoarseTimer
1647 };
1648
1649 enum ScrollPhase {
1650 NoScrollPhase = 0,
1651 ScrollBegin,
1652 ScrollUpdate,
1653 ScrollEnd
1654 };
1655
1656 enum MouseEventSource {
1657 MouseEventNotSynthesized,
1658 MouseEventSynthesizedBySystem,
1659 MouseEventSynthesizedByQt,
1660 MouseEventSynthesizedByApplication
1661 };
1662
1663 enum MouseEventFlag {
1664 MouseEventCreatedDoubleClick = 0x01,
1665 MouseEventFlagMask = 0xFF
1666 };
1667 Q_DECLARE_FLAGS(MouseEventFlags, MouseEventFlag)
1668
1669 enum ChecksumType {
1670 ChecksumIso3309,
1671 ChecksumItuV41
1672 };
1673
1674#ifndef Q_QDOC
1675 // NOTE: Generally, do not add QT_Q_ENUM if a corresponding Q_Q_FLAG exists.
1676 QT_Q_ENUM(ScrollBarPolicy)
1677 QT_Q_ENUM(FocusPolicy)
1678 QT_Q_ENUM(ContextMenuPolicy)
1679 QT_Q_ENUM(ArrowType)
1680 QT_Q_ENUM(ToolButtonStyle)
1681 QT_Q_ENUM(PenStyle)
1682 QT_Q_ENUM(PenCapStyle)
1683 QT_Q_ENUM(PenJoinStyle)
1684 QT_Q_ENUM(BrushStyle)
1685 QT_Q_ENUM(FillRule)
1686 QT_Q_ENUM(MaskMode)
1687 QT_Q_ENUM(BGMode)
1688 QT_Q_ENUM(ClipOperation)
1689 QT_Q_ENUM(SizeMode)
1690 QT_Q_ENUM(Axis)
1691 QT_Q_ENUM(Corner)
1692 QT_Q_ENUM(Edge)
1693 QT_Q_ENUM(LayoutDirection)
1694 QT_Q_ENUM(SizeHint)
1695 QT_Q_ENUM(Orientation)
1696 QT_Q_ENUM(DropAction)
1697 QT_Q_FLAG(Alignment)
1698 QT_Q_ENUM(TextFlag)
1699 QT_Q_FLAG(Orientations)
1700 QT_Q_FLAG(DropActions)
1701 QT_Q_FLAG(Edges)
1702 QT_Q_FLAG(DockWidgetAreas)
1703 QT_Q_FLAG(ToolBarAreas)
1704 QT_Q_ENUM(DockWidgetArea)
1705 QT_Q_ENUM(ToolBarArea)
1706 QT_Q_ENUM(TextFormat)
1707 QT_Q_ENUM(TextElideMode)
1708 QT_Q_ENUM(DateFormat)
1709 QT_Q_ENUM(TimeSpec)
1710 QT_Q_ENUM(DayOfWeek)
1711 QT_Q_ENUM(CursorShape)
1712 QT_Q_ENUM(GlobalColor)
1713 QT_Q_ENUM(AspectRatioMode)
1714 QT_Q_ENUM(TransformationMode)
1715 QT_Q_FLAG(ImageConversionFlags)
1716 QT_Q_ENUM(Key)
1717 QT_Q_ENUM(ShortcutContext)
1718 QT_Q_ENUM(TextInteractionFlag)
1719 QT_Q_FLAG(TextInteractionFlags)
1720 QT_Q_ENUM(ItemSelectionMode)
1721 QT_Q_ENUM(ItemSelectionOperation)
1722 QT_Q_FLAG(ItemFlags)
1723 QT_Q_ENUM(CheckState)
1724 QT_Q_ENUM(ItemDataRole)
1725 QT_Q_ENUM(SortOrder)
1726 QT_Q_ENUM(CaseSensitivity)
1727 QT_Q_FLAG(MatchFlags)
1728 QT_Q_FLAG(KeyboardModifiers)
1729 QT_Q_FLAG(MouseButtons)
1730 QT_Q_ENUM(WindowType)
1731 QT_Q_ENUM(WindowState)
1732 QT_Q_ENUM(WindowModality)
1733 QT_Q_ENUM(WidgetAttribute)
1734 QT_Q_ENUM(ApplicationAttribute)
1735 QT_Q_FLAG(WindowFlags)
1736 QT_Q_FLAG(WindowStates)
1737 QT_Q_ENUM(FocusReason)
1738 QT_Q_ENUM(InputMethodHint)
1739 QT_Q_ENUM(InputMethodQuery)
1740 QT_Q_FLAG(InputMethodHints)
1741 QT_Q_ENUM(EnterKeyType)
1742 QT_Q_FLAG(InputMethodQueries)
1743 QT_Q_FLAG(TouchPointStates)
1744 QT_Q_ENUM(ScreenOrientation)
1745 QT_Q_FLAG(ScreenOrientations)
1746 QT_Q_ENUM(ConnectionType)
1747 QT_Q_ENUM(ApplicationState)
1748#ifndef QT_NO_GESTURES
1749 QT_Q_ENUM(GestureState)
1750 QT_Q_ENUM(GestureType)
1751 QT_Q_ENUM(NativeGestureType)
1752#endif
1753 QT_Q_ENUM(CursorMoveStyle)
1754 QT_Q_ENUM(TimerType)
1755 QT_Q_ENUM(ScrollPhase)
1756 QT_Q_ENUM(MouseEventSource)
1757 QT_Q_FLAG(MouseEventFlag)
1758 QT_Q_ENUM(ChecksumType)
1759 QT_Q_ENUM(TabFocusBehavior)
1760#endif // Q_DOC
1761
1762}
1763#ifdef Q_MOC_RUN
1764 ;
1765#endif
1766
1767#undef QT_Q_ENUM
1768#undef QT_Q_FLAG
1769
1770Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::MouseButtons)
1771Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::Orientations)
1772Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::KeyboardModifiers)
1773Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::WindowFlags)
1774Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::Alignment)
1775Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::Edges)
1776Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::ImageConversionFlags)
1777Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::DockWidgetAreas)
1778Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::ToolBarAreas)
1779Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::WindowStates)
1780Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::ScreenOrientations)
1781Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::DropActions)
1782Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::ItemFlags)
1783Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::MatchFlags)
1784Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::TextInteractionFlags)
1785Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::InputMethodQueries)
1786Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::InputMethodHints)
1787Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::TouchPointStates)
1788Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::MouseEventFlags)
1789#ifndef QT_NO_GESTURES
1790Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::GestureFlags)
1791#endif
1792
1793typedef bool (*qInternalCallback)(void **);
1794
1795class Q_CORE_EXPORT QInternal {
1796public:
1797 enum PaintDeviceFlags {
1798 UnknownDevice = 0x00,
1799 Widget = 0x01,
1800 Pixmap = 0x02,
1801 Image = 0x03,
1802 Printer = 0x04,
1803 Picture = 0x05,
1804 Pbuffer = 0x06, // GL pbuffer
1805 FramebufferObject = 0x07, // GL framebuffer object
1806 CustomRaster = 0x08,
1807 MacQuartz = 0x09,
1808 PaintBuffer = 0x0a,
1809 OpenGL = 0x0b
1810 };
1811 enum RelayoutType {
1812 RelayoutNormal,
1813 RelayoutDragging,
1814 RelayoutDropped
1815 };
1816
1817 enum DockPosition {
1818 LeftDock,
1819 RightDock,
1820 TopDock,
1821 BottomDock,
1822 DockCount
1823 };
1824
1825 enum Callback {
1826 EventNotifyCallback,
1827 LastCallback
1828 };
1829 static bool registerCallback(Callback, qInternalCallback);
1830 static bool unregisterCallback(Callback, qInternalCallback);
1831 static bool activateCallbacks(Callback, void **);
1832};
1833
1834QT_END_NAMESPACE
1835
1836#endif // QNAMESPACE_H
1837