1 /****************************************************************************
3 ** This file is based on sources of the Qt GUI Toolkit, used under the terms
4 ** of the GNU General Public License version 2 (see the original copyright
6 ** All further contributions to this file are (and are required to be)
7 ** licensed under the terms of the GNU General Public License as published by
8 ** the Free Software Foundation; either version 2 of the License, or
9 ** (at your option) any later version.
11 ** The original Qt license header follows:
14 ** Definition of Qt namespace (as class for compiler compatibility)
18 ** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
20 ** This file is part of the kernel module of the Qt GUI Toolkit.
22 ** This file may be distributed under the terms of the Q Public License
23 ** as defined by Trolltech AS of Norway and appearing in the file
24 ** LICENSE.QPL included in the packaging of this file.
26 ** This file may be distributed and/or modified under the terms of the
27 ** GNU General Public License version 2 as published by the Free Software
28 ** Foundation and appearing in the file LICENSE.GPL included in the
29 ** packaging of this file.
31 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
32 ** licenses may use this file in accordance with the Qt Commercial License
33 ** Agreement provided with the Software.
35 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
36 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
38 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
39 ** information about Qt Commercial License Agreements.
40 ** See http://www.trolltech.com/qpl/ for QPL licensing information.
41 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
43 ** Contact info@trolltech.com if any conditions of this licensing are
46 **********************************************************************/
62 QT_STATIC_CONST QColor
& color0
;
63 QT_STATIC_CONST QColor
& color1
;
64 QT_STATIC_CONST QColor
& black
;
65 QT_STATIC_CONST QColor
& white
;
66 QT_STATIC_CONST QColor
& darkGray
;
67 QT_STATIC_CONST QColor
& gray
;
68 QT_STATIC_CONST QColor
& lightGray
;
69 QT_STATIC_CONST QColor
& red
;
70 QT_STATIC_CONST QColor
& green
;
71 QT_STATIC_CONST QColor
& blue
;
72 QT_STATIC_CONST QColor
& cyan
;
73 QT_STATIC_CONST QColor
& magenta
;
74 QT_STATIC_CONST QColor
& yellow
;
75 QT_STATIC_CONST QColor
& darkRed
;
76 QT_STATIC_CONST QColor
& darkGreen
;
77 QT_STATIC_CONST QColor
& darkBlue
;
78 QT_STATIC_CONST QColor
& darkCyan
;
79 QT_STATIC_CONST QColor
& darkMagenta
;
80 QT_STATIC_CONST QColor
& darkYellow
;
82 // documented in qevent.cpp
83 enum ButtonState
{ // mouse/keyboard state values
88 MouseButtonMask
= 0x0007,
90 ControlButton
= 0x0200,
93 KeyButtonMask
= 0x0f00,
97 // documented in qobject.cpp
98 // ideally would start at 1, as in QSizePolicy, but that breaks other things
104 // documented in qlistview.cpp
110 // Text formatting flags for QPainter::drawText and QLabel
111 // the following four enums can be combined to one integer which
112 // is passed as textflag to drawText and qt_format_text.
114 // documented in qpainter.cpp
115 enum AlignmentFlags
{
116 AlignAuto
= 0x0000, // text alignment
119 AlignHCenter
= 0x0004,
120 AlignJustify
= 0x0008,
121 AlignHorizontal_Mask
= AlignLeft
| AlignRight
| AlignHCenter
| AlignJustify
,
123 AlignBottom
= 0x0020,
124 AlignVCenter
= 0x0040,
125 AlignVertical_Mask
= AlignTop
| AlignBottom
| AlignVCenter
,
126 AlignCenter
= AlignVCenter
| AlignHCenter
129 // documented in qpainter.cpp
131 SingleLine
= 0x0080, // misc. flags
136 BreakAnywhere
= 0x1000,
139 Underline
= 0x01000000,
140 Overline
= 0x02000000,
141 StrikeOut
= 0x04000000,
142 IncludeTrailingSpaces
= 0x08000000,
147 // Widget flags; documented in qwidget.cpp
150 // QWidget state flags (internal, barely documented in qwidget.cpp)
152 WState_Created
= 0x00000001,
153 WState_Disabled
= 0x00000002,
154 WState_Visible
= 0x00000004,
155 WState_ForceHide
= 0x00000008,
156 WState_OwnCursor
= 0x00000010,
157 WState_MouseTracking
= 0x00000020,
158 WState_CompressKeys
= 0x00000040,
159 WState_BlockUpdates
= 0x00000080,
160 WState_InPaintEvent
= 0x00000100,
161 WState_Reparented
= 0x00000200,
162 WState_ConfigPending
= 0x00000400,
163 WState_Resized
= 0x00000800,
164 WState_AutoMask
= 0x00001000,
165 WState_Polished
= 0x00002000,
166 WState_DND
= 0x00004000,
167 WState_Reserved0
= 0x00008000,
168 WState_FullScreen
= 0x00010000,
169 WState_OwnSizePolicy
= 0x00020000,
170 WState_CreatedHidden
= 0x00040000,
171 WState_Maximized
= 0x00080000,
172 WState_Minimized
= 0x00100000,
173 WState_ForceDisabled
= 0x00200000,
174 WState_Exposed
= 0x00400000,
175 WState_HasMouse
= 0x00800000
178 // Widget flags2; documented in qwidget.cpp
181 // documented in qwidget.cpp
183 WType_TopLevel
= 0x00000001, // widget type flags
184 WType_Dialog
= 0x00000002,
185 WType_Popup
= 0x00000004,
186 WType_Desktop
= 0x00000008,
187 WType_Mask
= 0x0000000f,
189 WStyle_Customize
= 0x00000010, // window style flags
190 WStyle_NormalBorder
= 0x00000020,
191 WStyle_DialogBorder
= 0x00000040, // MS-Windows only
192 WStyle_NoBorder
= 0x00002000,
193 WStyle_Title
= 0x00000080,
194 WStyle_SysMenu
= 0x00000100,
195 WStyle_Minimize
= 0x00000200,
196 WStyle_Maximize
= 0x00000400,
197 WStyle_MinMax
= WStyle_Minimize
| WStyle_Maximize
,
198 WStyle_Tool
= 0x00000800,
199 WStyle_StaysOnTop
= 0x00001000,
200 WStyle_ContextHelp
= 0x00004000,
201 WStyle_Reserved
= 0x00008000,
202 WStyle_Mask
= 0x0000fff0,
204 WDestructiveClose
= 0x00010000, // misc flags
205 WPaintDesktop
= 0x00020000,
206 WPaintUnclipped
= 0x00040000,
207 WPaintClever
= 0x00080000,
208 WResizeNoErase
= 0x00100000, // OBSOLETE
209 WMouseNoMask
= 0x00200000,
210 WStaticContents
= 0x00400000,
211 WRepaintNoErase
= 0x00800000, // OBSOLETE
212 #if defined(Q_WS_X11)
213 WX11BypassWM
= 0x01000000,
214 WWinOwnDC
= 0x00000000,
215 WMacNoSheet
= 0x00000000,
216 WMacDrawer
= 0x00000000,
217 #elif defined(Q_WS_MAC)
218 WX11BypassWM
= 0x00000000,
219 WWinOwnDC
= 0x00000000,
220 WMacNoSheet
= 0x01000000,
221 WMacDrawer
= 0x20000000,
223 WX11BypassWM
= 0x00000000,
224 WWinOwnDC
= 0x01000000,
225 WMacNoSheet
= 0x00000000,
226 WMacDrawer
= 0x00000000,
228 WGroupLeader
= 0x02000000,
229 WShowModal
= 0x04000000,
230 WNoMousePropagation
= 0x08000000,
231 WSubWindow
= 0x10000000,
232 #if defined(Q_WS_X11)
233 WStyle_Splash
= 0x20000000,
235 WStyle_Splash
= WStyle_NoBorder
| WMacNoSheet
| WStyle_Tool
| WWinOwnDC
,
237 WNoAutoErase
= WRepaintNoErase
| WResizeNoErase
240 WNorthWestGravity
= WStaticContents
,
241 WType_Modal
= WType_Dialog
| WShowModal
,
242 WStyle_Dialog
= WType_Dialog
,
243 WStyle_NoBorderEx
= WStyle_NoBorder
248 WindowNoState
= 0x00000000,
249 WindowMinimized
= 0x00000001,
250 WindowMaximized
= 0x00000002,
251 WindowFullScreen
= 0x00000004,
252 WindowActive
= 0x00000008
256 // Image conversion flags. The unusual ordering is caused by
257 // compatibility and default requirements.
258 // Documented in qimage.cpp
260 enum ImageConversionFlags
{
261 ColorMode_Mask
= 0x00000003,
262 AutoColor
= 0x00000000,
263 ColorOnly
= 0x00000003,
264 MonoOnly
= 0x00000002,
265 // Reserved = 0x00000001,
267 AlphaDither_Mask
= 0x0000000c,
268 ThresholdAlphaDither
= 0x00000000,
269 OrderedAlphaDither
= 0x00000004,
270 DiffuseAlphaDither
= 0x00000008,
271 NoAlpha
= 0x0000000c, // Not supported
273 Dither_Mask
= 0x00000030,
274 DiffuseDither
= 0x00000000,
275 OrderedDither
= 0x00000010,
276 ThresholdDither
= 0x00000020,
277 // ReservedDither= 0x00000030,
279 DitherMode_Mask
= 0x000000c0,
280 AutoDither
= 0x00000000,
281 PreferDither
= 0x00000040,
282 AvoidDither
= 0x00000080
285 // documented in qpainter.cpp
286 enum BGMode
{ // background mode
292 // documented in qpainter.cpp
293 enum PaintUnit
{ // paint unit
295 LoMetricUnit
, // OBSOLETE
296 HiMetricUnit
, // OBSOLETE
297 LoEnglishUnit
, // OBSOLETE
298 HiEnglishUnit
, // OBSOLETE
299 TwipsUnit
// OBSOLETE
303 // documented in qstyle.cpp
306 WindowsStyle
= 1, // ### Qt 4.0: either remove the obsolete enums or clean up compat vs.
307 MotifStyle
= 4 // ### QT_NO_COMPAT by reordering or combination into one enum.
311 MacStyle
, // OBSOLETE
313 Win3Style
, // OBSOLETE
319 // documented in qkeysequence.cpp
326 // documented in qevent.cpp
327 enum Modifier
{ // accelerator modifiers
332 MODIFIER_MASK
= 0x00f00000,
333 UNICODE_ACCEL
= 0x10000000,
335 ASCII_ACCEL
= UNICODE_ACCEL
// 1.x compat
338 // documented in qevent.cpp
340 Key_Escape
= 0x1000, // misc keys
342 Key_Backtab
= 0x1002, Key_BackTab
= Key_Backtab
,
343 Key_Backspace
= 0x1003, Key_BackSpace
= Key_Backspace
,
352 Key_Home
= 0x1010, // cursor movement
358 Key_Prior
= 0x1016, Key_PageUp
= Key_Prior
,
359 Key_Next
= 0x1017, Key_PageDown
= Key_Next
,
360 Key_Shift
= 0x1020, // modifiers
361 Key_Control
= 0x1021,
364 Key_CapsLock
= 0x1024,
365 Key_NumLock
= 0x1025,
366 Key_ScrollLock
= 0x1026,
367 Key_F1
= 0x1030, // function keys
391 Key_F25
= 0x1048, // F25 .. F35 only on X11
402 Key_Super_L
= 0x1053, // extra keys
403 Key_Super_R
= 0x1054,
405 Key_Hyper_L
= 0x1056,
406 Key_Hyper_R
= 0x1057,
408 Key_Direction_L
= 0x1059,
409 Key_Direction_R
= 0x1060,
410 Key_Space
= 0x20, // 7 bit printable ASCII
414 Key_NumberSign
= 0x23,
417 Key_Ampersand
= 0x26,
418 Key_Apostrophe
= 0x27,
419 Key_ParenLeft
= 0x28,
420 Key_ParenRight
= 0x29,
438 Key_Semicolon
= 0x3b,
470 Key_BracketLeft
= 0x5b,
471 Key_Backslash
= 0x5c,
472 Key_BracketRight
= 0x5d,
473 Key_AsciiCircum
= 0x5e,
474 Key_Underscore
= 0x5f,
475 Key_QuoteLeft
= 0x60,
476 Key_BraceLeft
= 0x7b,
478 Key_BraceRight
= 0x7d,
479 Key_AsciiTilde
= 0x7e,
481 // Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06
483 Key_nobreakspace
= 0x0a0,
484 Key_exclamdown
= 0x0a1,
486 Key_sterling
= 0x0a3,
487 Key_currency
= 0x0a4,
489 Key_brokenbar
= 0x0a6,
491 Key_diaeresis
= 0x0a8,
492 Key_copyright
= 0x0a9,
493 Key_ordfeminine
= 0x0aa,
494 Key_guillemotleft
= 0x0ab, // left angle quotation mark
497 Key_registered
= 0x0ae,
500 Key_plusminus
= 0x0b1,
501 Key_twosuperior
= 0x0b2,
502 Key_threesuperior
= 0x0b3,
505 Key_paragraph
= 0x0b6,
506 Key_periodcentered
= 0x0b7,
508 Key_onesuperior
= 0x0b9,
509 Key_masculine
= 0x0ba,
510 Key_guillemotright
= 0x0bb, // right angle quotation mark
511 Key_onequarter
= 0x0bc,
513 Key_threequarters
= 0x0be,
514 Key_questiondown
= 0x0bf,
517 Key_Acircumflex
= 0x0c2,
519 Key_Adiaeresis
= 0x0c4,
522 Key_Ccedilla
= 0x0c7,
525 Key_Ecircumflex
= 0x0ca,
526 Key_Ediaeresis
= 0x0cb,
529 Key_Icircumflex
= 0x0ce,
530 Key_Idiaeresis
= 0x0cf,
535 Key_Ocircumflex
= 0x0d4,
537 Key_Odiaeresis
= 0x0d6,
538 Key_multiply
= 0x0d7,
539 Key_Ooblique
= 0x0d8,
542 Key_Ucircumflex
= 0x0db,
543 Key_Udiaeresis
= 0x0dc,
549 Key_acircumflex
= 0x0e2,
551 Key_adiaeresis
= 0x0e4,
554 Key_ccedilla
= 0x0e7,
557 Key_ecircumflex
= 0x0ea,
558 Key_ediaeresis
= 0x0eb,
561 Key_icircumflex
= 0x0ee,
562 Key_idiaeresis
= 0x0ef,
567 Key_ocircumflex
= 0x0f4,
569 Key_odiaeresis
= 0x0f6,
570 Key_division
= 0x0f7,
574 Key_ucircumflex
= 0x0fb,
575 Key_udiaeresis
= 0x0fc,
578 Key_ydiaeresis
= 0x0ff,
580 // multimedia/internet keys - ignored by default - see QKeyEvent c'tor
583 Key_Forward
= 0x1062,
585 Key_Refresh
= 0x1064,
587 Key_VolumeDown
= 0x1070,
588 Key_VolumeMute
= 0x1071,
589 Key_VolumeUp
= 0x1072,
590 Key_BassBoost
= 0x1073,
592 Key_BassDown
= 0x1075,
593 Key_TrebleUp
= 0x1076,
594 Key_TrebleDown
= 0x1077,
596 Key_MediaPlay
= 0x1080,
597 Key_MediaStop
= 0x1081,
598 Key_MediaPrev
= 0x1082,
599 Key_MediaNext
= 0x1083,
600 Key_MediaRecord
= 0x1084,
602 Key_HomePage
= 0x1090,
603 Key_Favorites
= 0x1091,
605 Key_Standby
= 0x1093,
606 Key_OpenUrl
= 0x1094,
608 Key_LaunchMail
= 0x10a0,
609 Key_LaunchMedia
= 0x10a1,
610 Key_Launch0
= 0x10a2,
611 Key_Launch1
= 0x10a3,
612 Key_Launch2
= 0x10a4,
613 Key_Launch3
= 0x10a5,
614 Key_Launch4
= 0x10a6,
615 Key_Launch5
= 0x10a7,
616 Key_Launch6
= 0x10a8,
617 Key_Launch7
= 0x10a9,
618 Key_Launch8
= 0x10aa,
619 Key_Launch9
= 0x10ab,
620 Key_LaunchA
= 0x10ac,
621 Key_LaunchB
= 0x10ad,
622 Key_LaunchC
= 0x10ae,
623 Key_LaunchD
= 0x10af,
624 Key_LaunchE
= 0x10b0,
625 Key_LaunchF
= 0x10b1,
627 Key_MediaLast
= 0x1fff,
632 // documented in qcommonstyle.cpp
640 // documented in qpainter.cpp
641 enum RasterOp
{ // raster op mode
645 NotAndROP
, EraseROP
=NotAndROP
,
649 AndROP
, NotEraseROP
=AndROP
,
657 NorROP
, LastROP
=NorROP
660 // documented in qpainter.cpp
661 enum PenStyle
{ // pen style
671 // documented in qpainter.cpp
672 enum PenCapStyle
{ // line endcap style
679 // documented in qpainter.cpp
680 enum PenJoinStyle
{ // line join style
687 // documented in qpainter.cpp
688 enum BrushStyle
{ // brush style
707 // documented in qapplication_mac.cpp
708 enum MacintoshVersion
{
714 MV_10_DOT_0
= 0x0002,
715 MV_10_DOT_1
= 0x0003,
716 MV_10_DOT_2
= 0x0004,
717 MV_10_DOT_3
= 0x0005,
720 MV_CHEETAH
= MV_10_DOT_0
,
721 MV_PUMA
= MV_10_DOT_1
,
722 MV_JAGUAR
= MV_10_DOT_2
,
723 MV_PANTHER
= MV_10_DOT_3
726 // documented in qapplication_win.cpp
727 enum WindowsVersion
{
732 WV_DOS_based
= 0x000f,
738 WV_NT_based
= 0x00f0,
745 // documented in qstyle.cpp
756 // documented in qcursor.cpp
775 LastCursor
= BusyCursor
,
781 QT_STATIC_CONST QCursor
& arrowCursor
; // standard arrow cursor
782 QT_STATIC_CONST QCursor
& upArrowCursor
; // upwards arrow
783 QT_STATIC_CONST QCursor
& crossCursor
; // crosshair
784 QT_STATIC_CONST QCursor
& waitCursor
; // hourglass/watch
785 QT_STATIC_CONST QCursor
& ibeamCursor
; // ibeam/text entry
786 QT_STATIC_CONST QCursor
& sizeVerCursor
; // vertical resize
787 QT_STATIC_CONST QCursor
& sizeHorCursor
; // horizontal resize
788 QT_STATIC_CONST QCursor
& sizeBDiagCursor
; // diagonal resize (/)
789 QT_STATIC_CONST QCursor
& sizeFDiagCursor
; // diagonal resize (\)
790 QT_STATIC_CONST QCursor
& sizeAllCursor
; // all directions resize
791 QT_STATIC_CONST QCursor
& blankCursor
; // blank/invisible cursor
792 QT_STATIC_CONST QCursor
& splitVCursor
; // vertical bar with left-right
794 QT_STATIC_CONST QCursor
& splitHCursor
; // horizontal bar with up-down
796 QT_STATIC_CONST QCursor
& pointingHandCursor
; // pointing hand
797 QT_STATIC_CONST QCursor
& forbiddenCursor
; // forbidden cursor (slashed circle)
798 QT_STATIC_CONST QCursor
& whatsThisCursor
; // arrow with a question mark
799 QT_STATIC_CONST QCursor
& busyCursor
; // arrow with hourglass
809 // Documented in qtextedit.cpp
810 enum AnchorAttribute
{
815 // Documented in qmainwindow.cpp
826 Unmanaged
= DockUnmanaged
,
827 TornOff
= DockTornOff
,
832 Minimized
= DockMinimized
836 typedef Dock ToolBarDock
;
838 // documented in qdatetime.cpp
840 TextDate
, // default Qt
842 LocalDate
// locale dependent
845 // documented in qdatetime.cpp
851 // documented in qwidget.cpp
852 enum BackgroundMode
{
868 PaletteHighlightedText
,
875 typedef uint ComparisonFlags
;
877 // Documented in qstring.cpp
878 enum StringComparisonMode
{
879 CaseSensitive
= 0x00001, // 0 0001
880 BeginsWith
= 0x00002, // 0 0010
881 EndsWith
= 0x00004, // 0 0100
882 Contains
= 0x00008, // 0 1000
883 ExactMatch
= 0x00010 // 1 0000
886 // Documented in qtabwidget.cpp
890 BottomLeft
= 0x00002,
891 BottomRight
= 0x00003
894 // "handle" type for system objects. Documented as \internal in
896 #if defined(Q_WS_MAC)
897 typedef void * HANDLE
;
898 #elif defined(Q_WS_WIN)
899 typedef void *HANDLE
;
900 #elif defined(Q_WS_X11)
901 typedef unsigned long HANDLE
;
902 #elif defined(Q_WS_QWS)
903 typedef void * HANDLE
;
908 class Q_EXPORT QInternal
{
910 enum PaintDeviceFlags
{
911 UndefinedDevice
= 0x00,
917 DeviceTypeMask
= 0x0f,
918 ExternalDevice
= 0x10,
919 // used to emulate some of the behaviour different between Qt2 and Qt3 (mainly for printing)
920 CompatibilityMode
= 0x20
924 #endif // QNAMESPACE_H