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

Last change on this file since 357 was 58, checked in by Dmitry A. Kuminov, 16 years ago

OS/2: Qt::HANDLE is unsigned long.

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