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