source: trunk/src/corelib/global/qnamespace.h@ 769

Last change on this file since 769 was 769, checked in by Dmitry A. Kuminov, 15 years ago

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

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