home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / qt3_emx.zip / include / qnamespace.h < prev    next >
C/C++ Source or Header  |  2001-10-11  |  19KB  |  773 lines

  1. /****************************************************************************
  2. ** $Id$
  3. **
  4. ** Definition of Qt namespace (as class for compiler compatibility)
  5. **
  6. ** Created : 980927
  7. **
  8. ** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
  9. **
  10. ** This file is part of the kernel module of the Qt GUI Toolkit.
  11. **
  12. ** This file may be distributed under the terms of the Q Public License
  13. ** as defined by Trolltech AS of Norway and appearing in the file
  14. ** LICENSE.QPL included in the packaging of this file.
  15. **
  16. ** This file may be distributed and/or modified under the terms of the
  17. ** GNU General Public License version 2 as published by the Free Software
  18. ** Foundation and appearing in the file LICENSE.GPL included in the
  19. ** packaging of this file.
  20. **
  21. ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
  22. ** licenses may use this file in accordance with the Qt Commercial License
  23. ** Agreement provided with the Software.
  24. **
  25. ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  26. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  27. **
  28. ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
  29. **   information about Qt Commercial License Agreements.
  30. ** See http://www.trolltech.com/qpl/ for QPL licensing information.
  31. ** See http://www.trolltech.com/gpl/ for GPL licensing information.
  32. **
  33. ** Contact info@trolltech.com if any conditions of this licensing are
  34. ** not clear to you.
  35. **
  36. **********************************************************************/
  37.  
  38. #ifndef QNAMESPACE_H
  39. #define QNAMESPACE_H
  40.  
  41. #ifndef QT_H
  42. #include "qglobal.h"
  43. #endif // QT_H
  44.  
  45.  
  46. class QColor;
  47. class QCursor;
  48.  
  49.  
  50. class Q_EXPORT Qt {
  51. public:
  52.     QT_STATIC_CONST QColor & color0;
  53.     QT_STATIC_CONST QColor & color1;
  54.     QT_STATIC_CONST QColor & black;
  55.     QT_STATIC_CONST QColor & white;
  56.     QT_STATIC_CONST QColor & darkGray;
  57.     QT_STATIC_CONST QColor & gray;
  58.     QT_STATIC_CONST QColor & lightGray;
  59.     QT_STATIC_CONST QColor & red;
  60.     QT_STATIC_CONST QColor & green;
  61.     QT_STATIC_CONST QColor & blue;
  62.     QT_STATIC_CONST QColor & cyan;
  63.     QT_STATIC_CONST QColor & magenta;
  64.     QT_STATIC_CONST QColor & yellow;
  65.     QT_STATIC_CONST QColor & darkRed;
  66.     QT_STATIC_CONST QColor & darkGreen;
  67.     QT_STATIC_CONST QColor & darkBlue;
  68.     QT_STATIC_CONST QColor & darkCyan;
  69.     QT_STATIC_CONST QColor & darkMagenta;
  70.     QT_STATIC_CONST QColor & darkYellow;
  71.  
  72.     // documented in qevent.cpp
  73.     enum ButtonState {                // mouse/keyboard state values
  74.     NoButton    = 0x0000,
  75.     LeftButton    = 0x0001,
  76.     RightButton    = 0x0002,
  77.     MidButton    = 0x0004,
  78.     MouseButtonMask = 0x00ff,
  79.     ShiftButton    = 0x0100,
  80.     ControlButton   = 0x0200,
  81.     AltButton    = 0x0400,
  82.     MetaButton    = 0x0800,
  83.     KeyButtonMask    = 0x0fff,
  84.     Keypad        = 0x4000
  85.     };
  86.  
  87.     // documented in qobject.cpp
  88.     // ideally would start at 1, as in QSizePolicy, but that breaks other things
  89.     enum Orientation {
  90.         Horizontal = 0,
  91.     Vertical
  92.     };
  93.  
  94.     // Text formatting flags for QPainter::drawText and QLabel
  95.     // the following four enums can be combined to one integer which
  96.     // is passed as textflag to drawText and qt_format_text.
  97.  
  98.     // documented in qpainter.cpp
  99.     enum AlignmentFlags {
  100.     AlignAuto        = 0x0000,     // text alignment
  101.     AlignLeft        = 0x0001,
  102.     AlignRight        = 0x0002,
  103.     AlignHCenter        = 0x0004,
  104.     AlignJustify        = 0x0008,
  105.     AlignHorizontal_Mask    = AlignLeft | AlignRight | AlignHCenter | AlignJustify,
  106.     AlignTop        = 0x0010,
  107.     AlignBottom        = 0x0020,
  108.     AlignVCenter        = 0x0040,
  109.     AlignVertical_Mask     = AlignTop | AlignBottom | AlignVCenter,
  110.     AlignCenter        = AlignVCenter | AlignHCenter
  111.     };
  112.  
  113.     // documented in qpainter.cpp
  114.     enum TextFlags {
  115.     SingleLine    = 0x0080,        // misc. flags
  116.     DontClip    = 0x0100,
  117.     ExpandTabs    = 0x0200,
  118.     ShowPrefix    = 0x0400,
  119.     WordBreak    = 0x0800,
  120.     BreakAnywhere = 0x1000,
  121.     DontPrint    = 0x2000,        // internal
  122.     NoAccel = 0x4000
  123.     };
  124.  
  125.     // Widget flags; documented in qwidget.cpp
  126.     typedef uint WState;
  127.  
  128.     // QWidget state flags (internal, barely documented in qwidget.cpp)
  129.     enum WidgetState {
  130.     WState_Created        = 0x00000001,
  131.     WState_Disabled        = 0x00000002,
  132.     WState_Visible        = 0x00000004,
  133.     WState_ForceHide    = 0x00000008,
  134.     WState_OwnCursor    = 0x00000010,
  135.     WState_MouseTracking    = 0x00000020,
  136.     WState_CompressKeys    = 0x00000040,
  137.     WState_BlockUpdates    = 0x00000080,
  138.     WState_InPaintEvent    = 0x00000100,
  139.     WState_Reparented    = 0x00000200,
  140.     WState_ConfigPending    = 0x00000400,
  141.     WState_Resized        = 0x00000800,
  142.     WState_AutoMask        = 0x00001000,
  143.     WState_Polished        = 0x00002000,
  144.     WState_DND        = 0x00004000,
  145.     WState_Reserved0    = 0x00008000,
  146.     WState_Reserved1    = 0x00010000,
  147.     WState_Reserved2    = 0x00020000,
  148.     WState_Reserved3    = 0x00040000,
  149.     WState_Maximized    = 0x00080000,
  150.     WState_Minimized    = 0x00100000,
  151.     WState_ForceDisabled    = 0x00200000,
  152.     WState_Exposed        = 0x00400000,
  153.     WState_HasMouse        = 0x00800000
  154.     };
  155.  
  156.     // Widget flags2; documented in qwidget.cpp
  157.     typedef uint WFlags;
  158.  
  159.     // documented in qwidget.cpp
  160.     enum WidgetFlags {
  161.     WType_TopLevel        = 0x00000001,    // widget type flags
  162.     WType_Dialog        = 0x00000002,
  163.     WType_Popup        = 0x00000004,
  164.     WType_Desktop        = 0x00000008,
  165.     WType_Mask        = 0x0000000f,
  166.  
  167.     WStyle_Customize    = 0x00000010,    // window style flags
  168.     WStyle_NormalBorder    = 0x00000020,
  169.     WStyle_DialogBorder    = 0x00000040, // MS-Windows only
  170.     WStyle_NoBorder        = 0x00002000,
  171.     WStyle_Title        = 0x00000080,
  172.     WStyle_SysMenu        = 0x00000100,
  173.     WStyle_Minimize        = 0x00000200,
  174.     WStyle_Maximize        = 0x00000400,
  175.     WStyle_MinMax        = WStyle_Minimize | WStyle_Maximize,
  176.     WStyle_Tool        = 0x00000800,
  177.     WStyle_StaysOnTop    = 0x00001000,
  178.     WStyle_ContextHelp    = 0x00004000,
  179.     WStyle_Reserved        = 0x00008000,
  180.     WStyle_Mask        = 0x0000fff0,
  181.  
  182.     WDestructiveClose    = 0x00010000,    // misc flags
  183.     WPaintDesktop        = 0x00020000,
  184.     WPaintUnclipped        = 0x00040000,
  185.     WPaintClever        = 0x00080000,
  186.     WResizeNoErase        = 0x00100000,
  187.     WMouseNoMask        = 0x00200000,
  188.     WStaticContents        = 0x00400000,
  189.     WRepaintNoErase        = 0x00800000,
  190. #ifdef Q_WS_X11
  191.     WX11BypassWM        = 0x01000000,
  192.     WWinOwnDC        = 0x00000000,
  193. #else
  194.     WX11BypassWM        = 0x00000000,
  195.     WWinOwnDC        = 0x01000000,
  196. #endif
  197.     WGroupLeader         = 0x02000000,
  198.     WShowModal                = 0x04000000,
  199.     WNoMousePropagation    = 0x08000000,
  200.     WSubWindow              = 0x10000000
  201. #ifndef QT_NO_COMPAT
  202.     ,
  203.     WNorthWestGravity    = WStaticContents,
  204.     WType_Modal        = WType_Dialog | WShowModal,
  205.     WStyle_Dialog         = WType_Dialog,
  206.     WStyle_NoBorderEx    = WStyle_NoBorder
  207. #endif
  208.     };
  209.  
  210.     // Image conversion flags.  The unusual ordering is caused by
  211.     // compatibility and default requirements.
  212.     // Documented in qimage.cpp
  213.  
  214.     enum ImageConversionFlags {
  215.     ColorMode_Mask        = 0x00000003,
  216.     AutoColor        = 0x00000000,
  217.     ColorOnly        = 0x00000003,
  218.     MonoOnly        = 0x00000002,
  219.     //      Reserved    = 0x00000001,
  220.  
  221.     AlphaDither_Mask    = 0x0000000c,
  222.     ThresholdAlphaDither    = 0x00000000,
  223.     OrderedAlphaDither    = 0x00000004,
  224.     DiffuseAlphaDither    = 0x00000008,
  225.     NoAlpha            = 0x0000000c, // Not supported
  226.  
  227.     Dither_Mask        = 0x00000030,
  228.     DiffuseDither        = 0x00000000,
  229.     OrderedDither        = 0x00000010,
  230.     ThresholdDither        = 0x00000020,
  231.     //      ReservedDither= 0x00000030,
  232.  
  233.     DitherMode_Mask        = 0x000000c0,
  234.     AutoDither        = 0x00000000,
  235.     PreferDither        = 0x00000040,
  236.     AvoidDither        = 0x00000080
  237.     };
  238.  
  239.     // documented in qpainter.cpp
  240.     enum BGMode    {                // background mode
  241.     TransparentMode,
  242.     OpaqueMode
  243.     };
  244.  
  245. #ifndef QT_NO_COMPAT
  246.     // documented in qpainter.cpp
  247.     enum PaintUnit {                // paint unit
  248.     PixelUnit,
  249.     LoMetricUnit, // OBSOLETE
  250.     HiMetricUnit, // OBSOLETE
  251.     LoEnglishUnit, // OBSOLETE
  252.     HiEnglishUnit, // OBSOLETE
  253.     TwipsUnit // OBSOLETE
  254.     };
  255. #endif
  256.  
  257.     // documented in qstyle.cpp
  258. #ifdef QT_NO_COMPAT
  259.     enum GUIStyle {
  260.     WindowsStyle,
  261.     MotifStyle
  262.     };
  263. #else
  264.     enum GUIStyle {
  265.     MacStyle, // OBSOLETE
  266.     WindowsStyle,
  267.     Win3Style, // OBSOLETE
  268.     PMStyle, // OBSOLETE
  269.     MotifStyle
  270.     };
  271. #endif
  272.  
  273.     // documented in qevent.cpp
  274.     enum Modifier {        // accelerator modifiers
  275.     SHIFT         = 0x00200000,
  276.     CTRL          = 0x00400000,
  277.     ALT           = 0x00800000,
  278.     MODIFIER_MASK = 0x00e00000,
  279.     UNICODE_ACCEL = 0x10000000,
  280.  
  281.     ASCII_ACCEL = UNICODE_ACCEL // 1.x compat
  282.     };
  283.  
  284.     // documented in qevent.cpp
  285.     enum Key {
  286.     Key_Escape = 0x1000,        // misc keys
  287.     Key_Tab = 0x1001,
  288.     Key_Backtab = 0x1002, Key_BackTab = Key_Backtab,
  289.     Key_Backspace = 0x1003, Key_BackSpace = Key_Backspace,
  290.     Key_Return = 0x1004,
  291.     Key_Enter = 0x1005,
  292.     Key_Insert = 0x1006,
  293.     Key_Delete = 0x1007,
  294.     Key_Pause = 0x1008,
  295.     Key_Print = 0x1009,
  296.     Key_SysReq = 0x100a,
  297.     Key_Home = 0x1010,        // cursor movement
  298.     Key_End = 0x1011,
  299.     Key_Left = 0x1012,
  300.     Key_Up = 0x1013,
  301.     Key_Right = 0x1014,
  302.     Key_Down = 0x1015,
  303.     Key_Prior = 0x1016, Key_PageUp = Key_Prior,
  304.     Key_Next = 0x1017, Key_PageDown = Key_Next,
  305.     Key_Shift = 0x1020,        // modifiers
  306.     Key_Control = 0x1021,
  307.     Key_Meta = 0x1022,
  308.     Key_Alt = 0x1023,
  309.     Key_CapsLock = 0x1024,
  310.     Key_NumLock = 0x1025,
  311.     Key_ScrollLock = 0x1026,
  312.     Key_F1 = 0x1030,        // function keys
  313.     Key_F2 = 0x1031,
  314.     Key_F3 = 0x1032,
  315.     Key_F4 = 0x1033,
  316.     Key_F5 = 0x1034,
  317.     Key_F6 = 0x1035,
  318.     Key_F7 = 0x1036,
  319.     Key_F8 = 0x1037,
  320.     Key_F9 = 0x1038,
  321.     Key_F10 = 0x1039,
  322.     Key_F11 = 0x103a,
  323.     Key_F12 = 0x103b,
  324.     Key_F13 = 0x103c,
  325.     Key_F14 = 0x103d,
  326.     Key_F15 = 0x103e,
  327.     Key_F16 = 0x103f,
  328.     Key_F17 = 0x1040,
  329.     Key_F18 = 0x1041,
  330.     Key_F19 = 0x1042,
  331.     Key_F20 = 0x1043,
  332.     Key_F21 = 0x1044,
  333.     Key_F22 = 0x1045,
  334.     Key_F23 = 0x1046,
  335.     Key_F24 = 0x1047,
  336.     Key_F25 = 0x1048,        // F25 .. F35 only on X11
  337.     Key_F26 = 0x1049,
  338.     Key_F27 = 0x104a,
  339.     Key_F28 = 0x104b,
  340.     Key_F29 = 0x104c,
  341.     Key_F30 = 0x104d,
  342.     Key_F31 = 0x104e,
  343.     Key_F32 = 0x104f,
  344.     Key_F33 = 0x1050,
  345.     Key_F34 = 0x1051,
  346.     Key_F35 = 0x1052,
  347.     Key_Super_L = 0x1053,         // extra keys
  348.     Key_Super_R = 0x1054,
  349.     Key_Menu = 0x1055,
  350.     Key_Hyper_L = 0x1056,
  351.     Key_Hyper_R = 0x1057,
  352.     Key_Help = 0x1058,
  353.     Key_Direction_L = 0x1059,
  354.     Key_Direction_R = 0x1060,
  355.     Key_Space = 0x20,        // 7 bit printable ASCII
  356.     Key_Any = Key_Space,
  357.     Key_Exclam = 0x21,
  358.     Key_QuoteDbl = 0x22,
  359.     Key_NumberSign = 0x23,
  360.     Key_Dollar = 0x24,
  361.     Key_Percent = 0x25,
  362.     Key_Ampersand = 0x26,
  363.     Key_Apostrophe = 0x27,
  364.     Key_ParenLeft = 0x28,
  365.     Key_ParenRight = 0x29,
  366.     Key_Asterisk = 0x2a,
  367.     Key_Plus = 0x2b,
  368.     Key_Comma = 0x2c,
  369.     Key_Minus = 0x2d,
  370.     Key_Period = 0x2e,
  371.     Key_Slash = 0x2f,
  372.     Key_0 = 0x30,
  373.     Key_1 = 0x31,
  374.     Key_2 = 0x32,
  375.     Key_3 = 0x33,
  376.     Key_4 = 0x34,
  377.     Key_5 = 0x35,
  378.     Key_6 = 0x36,
  379.     Key_7 = 0x37,
  380.     Key_8 = 0x38,
  381.     Key_9 = 0x39,
  382.     Key_Colon = 0x3a,
  383.     Key_Semicolon = 0x3b,
  384.     Key_Less = 0x3c,
  385.     Key_Equal = 0x3d,
  386.     Key_Greater = 0x3e,
  387.     Key_Question = 0x3f,
  388.     Key_At = 0x40,
  389.     Key_A = 0x41,
  390.     Key_B = 0x42,
  391.     Key_C = 0x43,
  392.     Key_D = 0x44,
  393.     Key_E = 0x45,
  394.     Key_F = 0x46,
  395.     Key_G = 0x47,
  396.     Key_H = 0x48,
  397.     Key_I = 0x49,
  398.     Key_J = 0x4a,
  399.     Key_K = 0x4b,
  400.     Key_L = 0x4c,
  401.     Key_M = 0x4d,
  402.     Key_N = 0x4e,
  403.     Key_O = 0x4f,
  404.     Key_P = 0x50,
  405.     Key_Q = 0x51,
  406.     Key_R = 0x52,
  407.     Key_S = 0x53,
  408.     Key_T = 0x54,
  409.     Key_U = 0x55,
  410.     Key_V = 0x56,
  411.     Key_W = 0x57,
  412.     Key_X = 0x58,
  413.     Key_Y = 0x59,
  414.     Key_Z = 0x5a,
  415.     Key_BracketLeft = 0x5b,
  416.     Key_Backslash = 0x5c,
  417.     Key_BracketRight = 0x5d,
  418.     Key_AsciiCircum = 0x5e,
  419.     Key_Underscore = 0x5f,
  420.     Key_QuoteLeft = 0x60,
  421.     Key_BraceLeft = 0x7b,
  422.     Key_Bar = 0x7c,
  423.     Key_BraceRight = 0x7d,
  424.     Key_AsciiTilde = 0x7e,
  425.  
  426.     // Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06
  427.  
  428.     Key_nobreakspace = 0x0a0,
  429.     Key_exclamdown = 0x0a1,
  430.     Key_cent = 0x0a2,
  431.     Key_sterling = 0x0a3,
  432.     Key_currency = 0x0a4,
  433.     Key_yen = 0x0a5,
  434.     Key_brokenbar = 0x0a6,
  435.     Key_section = 0x0a7,
  436.     Key_diaeresis = 0x0a8,
  437.     Key_copyright = 0x0a9,
  438.     Key_ordfeminine = 0x0aa,
  439.     Key_guillemotleft = 0x0ab,    // left angle quotation mark
  440.     Key_notsign = 0x0ac,
  441.     Key_hyphen = 0x0ad,
  442.     Key_registered = 0x0ae,
  443.     Key_macron = 0x0af,
  444.     Key_degree = 0x0b0,
  445.     Key_plusminus = 0x0b1,
  446.     Key_twosuperior = 0x0b2,
  447.     Key_threesuperior = 0x0b3,
  448.     Key_acute = 0x0b4,
  449.     Key_mu = 0x0b5,
  450.     Key_paragraph = 0x0b6,
  451.     Key_periodcentered = 0x0b7,
  452.     Key_cedilla = 0x0b8,
  453.     Key_onesuperior = 0x0b9,
  454.     Key_masculine = 0x0ba,
  455.     Key_guillemotright = 0x0bb,    // right angle quotation mark
  456.     Key_onequarter = 0x0bc,
  457.     Key_onehalf = 0x0bd,
  458.     Key_threequarters = 0x0be,
  459.     Key_questiondown = 0x0bf,
  460.     Key_Agrave = 0x0c0,
  461.     Key_Aacute = 0x0c1,
  462.     Key_Acircumflex = 0x0c2,
  463.     Key_Atilde = 0x0c3,
  464.     Key_Adiaeresis = 0x0c4,
  465.     Key_Aring = 0x0c5,
  466.     Key_AE = 0x0c6,
  467.     Key_Ccedilla = 0x0c7,
  468.     Key_Egrave = 0x0c8,
  469.     Key_Eacute = 0x0c9,
  470.     Key_Ecircumflex = 0x0ca,
  471.     Key_Ediaeresis = 0x0cb,
  472.     Key_Igrave = 0x0cc,
  473.     Key_Iacute = 0x0cd,
  474.     Key_Icircumflex = 0x0ce,
  475.     Key_Idiaeresis = 0x0cf,
  476.     Key_ETH = 0x0d0,
  477.     Key_Ntilde = 0x0d1,
  478.     Key_Ograve = 0x0d2,
  479.     Key_Oacute = 0x0d3,
  480.     Key_Ocircumflex = 0x0d4,
  481.     Key_Otilde = 0x0d5,
  482.     Key_Odiaeresis = 0x0d6,
  483.     Key_multiply = 0x0d7,
  484.     Key_Ooblique = 0x0d8,
  485.     Key_Ugrave = 0x0d9,
  486.     Key_Uacute = 0x0da,
  487.     Key_Ucircumflex = 0x0db,
  488.     Key_Udiaeresis = 0x0dc,
  489.     Key_Yacute = 0x0dd,
  490.     Key_THORN = 0x0de,
  491.     Key_ssharp = 0x0df,
  492.     Key_agrave = 0x0e0,
  493.     Key_aacute = 0x0e1,
  494.     Key_acircumflex = 0x0e2,
  495.     Key_atilde = 0x0e3,
  496.     Key_adiaeresis = 0x0e4,
  497.     Key_aring = 0x0e5,
  498.     Key_ae = 0x0e6,
  499.     Key_ccedilla = 0x0e7,
  500.     Key_egrave = 0x0e8,
  501.     Key_eacute = 0x0e9,
  502.     Key_ecircumflex = 0x0ea,
  503.     Key_ediaeresis = 0x0eb,
  504.     Key_igrave = 0x0ec,
  505.     Key_iacute = 0x0ed,
  506.     Key_icircumflex = 0x0ee,
  507.     Key_idiaeresis = 0x0ef,
  508.     Key_eth = 0x0f0,
  509.     Key_ntilde = 0x0f1,
  510.     Key_ograve = 0x0f2,
  511.     Key_oacute = 0x0f3,
  512.     Key_ocircumflex = 0x0f4,
  513.     Key_otilde = 0x0f5,
  514.     Key_odiaeresis = 0x0f6,
  515.     Key_division = 0x0f7,
  516.     Key_oslash = 0x0f8,
  517.     Key_ugrave = 0x0f9,
  518.     Key_uacute = 0x0fa,
  519.     Key_ucircumflex = 0x0fb,
  520.     Key_udiaeresis = 0x0fc,
  521.     Key_yacute = 0x0fd,
  522.     Key_thorn = 0x0fe,
  523.     Key_ydiaeresis = 0x0ff,
  524.  
  525.     Key_unknown = 0xffff
  526.     };
  527.  
  528.     // documented in qcommonstyle.cpp
  529.     enum ArrowType {
  530.     UpArrow,
  531.     DownArrow,
  532.     LeftArrow,
  533.     RightArrow
  534.     };
  535.  
  536.     // documented in qpainter.cpp
  537.     enum RasterOp { // raster op mode
  538.     CopyROP,
  539.     OrROP,
  540.     XorROP,
  541.     NotAndROP, EraseROP=NotAndROP,
  542.     NotCopyROP,
  543.     NotOrROP,
  544.     NotXorROP,
  545.     AndROP,    NotEraseROP=AndROP,
  546.     NotROP,
  547.     ClearROP,
  548.     SetROP,
  549.     NopROP,
  550.     AndNotROP,
  551.     OrNotROP,
  552.     NandROP,
  553.     NorROP,    LastROP=NorROP
  554.     };
  555.  
  556.     // documented in qpainter.cpp
  557.     enum PenStyle { // pen style
  558.     NoPen,
  559.     SolidLine,
  560.     DashLine,
  561.     DotLine,
  562.     DashDotLine,
  563.     DashDotDotLine,
  564.     MPenStyle = 0x0f
  565.     };
  566.  
  567.     // documented in qpainter.cpp
  568.     enum PenCapStyle { // line endcap style
  569.     FlatCap = 0x00,
  570.     SquareCap = 0x10,
  571.     RoundCap = 0x20,
  572.     MPenCapStyle = 0x30
  573.     };
  574.  
  575.     // documented in qpainter.cpp
  576.     enum PenJoinStyle { // line join style
  577.     MiterJoin = 0x00,
  578.     BevelJoin = 0x40,
  579.     RoundJoin = 0x80,
  580.     MPenJoinStyle = 0xc0
  581.     };
  582.  
  583.     // documented in qpainter.cpp
  584.     enum BrushStyle { // brush style
  585.     NoBrush,
  586.     SolidPattern,
  587.     Dense1Pattern,
  588.     Dense2Pattern,
  589.     Dense3Pattern,
  590.     Dense4Pattern,
  591.     Dense5Pattern,
  592.     Dense6Pattern,
  593.     Dense7Pattern,
  594.     HorPattern,
  595.     VerPattern,
  596.     CrossPattern,
  597.     BDiagPattern,
  598.     FDiagPattern,
  599.     DiagCrossPattern,
  600.     CustomPattern=24
  601.     };
  602.  
  603.     // documented in qapplication_win.cpp
  604.     enum WindowsVersion {
  605.     WV_32s         = 0x0001,
  606.     WV_95         = 0x0002,
  607.     WV_98        = 0x0003,
  608.     WV_Me        = 0x0004,
  609.     WV_DOS_based    = 0x000f,
  610.  
  611.     WV_NT         = 0x0010,
  612.     WV_2000     = 0x0020,
  613.     WV_XP        = 0x0030,
  614.     WV_NT_based    = 0x00f0
  615.     };
  616.  
  617.     // documented in qstyle.cpp
  618.     enum UIEffect {
  619.     UI_General,
  620.     UI_AnimateMenu,
  621.     UI_FadeMenu,
  622.     UI_AnimateCombo,
  623.     UI_AnimateTooltip,
  624.     UI_FadeTooltip
  625.     };
  626.  
  627.     // documented in qcursor.cpp
  628.     enum CursorShape {
  629.     ArrowCursor,
  630.     UpArrowCursor,
  631.     CrossCursor,
  632.     WaitCursor,
  633.     IbeamCursor,
  634.     SizeVerCursor,
  635.     SizeHorCursor,
  636.     SizeBDiagCursor,
  637.     SizeFDiagCursor,
  638.     SizeAllCursor,
  639.     BlankCursor,
  640.     SplitVCursor,
  641.     SplitHCursor,
  642.     PointingHandCursor,
  643.     ForbiddenCursor,
  644.     WhatsThisCursor,
  645.     LastCursor    = WhatsThisCursor,
  646.     BitmapCursor    = 24
  647.     };
  648.  
  649.     // Global cursors
  650.  
  651.     QT_STATIC_CONST QCursor & arrowCursor;    // standard arrow cursor
  652.     QT_STATIC_CONST QCursor & upArrowCursor;    // upwards arrow
  653.     QT_STATIC_CONST QCursor & crossCursor;    // crosshair
  654.     QT_STATIC_CONST QCursor & waitCursor;    // hourglass/watch
  655.     QT_STATIC_CONST QCursor & ibeamCursor;    // ibeam/text entry
  656.     QT_STATIC_CONST QCursor & sizeVerCursor;    // vertical resize
  657.     QT_STATIC_CONST QCursor & sizeHorCursor;    // horizontal resize
  658.     QT_STATIC_CONST QCursor & sizeBDiagCursor;    // diagonal resize (/)
  659.     QT_STATIC_CONST QCursor & sizeFDiagCursor;    // diagonal resize (\)
  660.     QT_STATIC_CONST QCursor & sizeAllCursor;    // all directions resize
  661.     QT_STATIC_CONST QCursor & blankCursor;    // blank/invisible cursor
  662.     QT_STATIC_CONST QCursor & splitVCursor;    // vertical bar with left-right
  663.                         // arrows
  664.     QT_STATIC_CONST QCursor & splitHCursor;    // horizontal bar with up-down
  665.                         // arrows
  666.     QT_STATIC_CONST QCursor & pointingHandCursor;    // pointing hand
  667.     QT_STATIC_CONST QCursor & forbiddenCursor;    // forbidden cursor (slashed circle)
  668.     QT_STATIC_CONST QCursor & whatsThisCursor;  // arrow with a question mark
  669.  
  670.  
  671.     enum TextFormat {
  672.     PlainText,
  673.     RichText,
  674.     AutoText
  675.     };
  676.  
  677.     // Documented in qmainwindow.cpp
  678.     enum Dock {
  679.     DockUnmanaged,
  680.     DockTornOff,
  681.     DockTop,
  682.     DockBottom,
  683.     DockRight,
  684.     DockLeft,
  685.     DockMinimized
  686. #ifndef QT_NO_COMPAT
  687.         ,
  688.     Unmanaged = DockUnmanaged,
  689.     TornOff = DockTornOff,
  690.     Top = DockTop,
  691.     Bottom = DockBottom,
  692.     Right = DockRight,
  693.     Left = DockLeft,
  694.     Minimized = DockMinimized
  695. #endif
  696.     };
  697.     // compatibility
  698.     typedef Dock ToolBarDock;
  699.  
  700.     // documented in qdatetime.cpp
  701.     enum DateFormat {
  702.     TextDate,      // default Qt
  703.     ISODate,       // ISO 8601
  704.     LocalDate      // locale dependant
  705.     };
  706.  
  707.     // documented in qwidget.cpp
  708.     enum BackgroundMode {
  709.     FixedColor,
  710.     FixedPixmap,
  711.     NoBackground,
  712.     PaletteForeground,
  713.     PaletteButton,
  714.     PaletteLight,
  715.     PaletteMidlight,
  716.     PaletteDark,
  717.     PaletteMid,
  718.     PaletteText,
  719.     PaletteBrightText,
  720.     PaletteBase,
  721.     PaletteBackground,
  722.     PaletteShadow,
  723.     PaletteHighlight,
  724.     PaletteHighlightedText,
  725.     PaletteButtonText,
  726.     PaletteLink,
  727.     PaletteLinkVisited,
  728.     X11ParentRelative
  729.     };
  730.  
  731.     typedef uint ComparisonFlags;
  732.  
  733.     // Documented in qstring.cpp
  734.     enum StringComparisonMode {
  735.         CaseSensitive   = 0x00001, // 0 0001
  736.         BeginsWith      = 0x00002, // 0 0010
  737.         EndsWith        = 0x00004, // 0 0100
  738.         Contains        = 0x00008, // 0 1000
  739.         ExactMatch      = 0x00010  // 1 0000
  740.     };
  741.  
  742.     // "handle" type for system objects. Documented as \internal in
  743.     // qapplication.cpp
  744. #if defined(Q_WS_MAC)
  745.     typedef void * HANDLE;
  746. #elif defined(Q_WS_WIN)
  747.     typedef void *HANDLE;
  748. #elif defined(Q_WS_X11)
  749.     typedef unsigned long HANDLE;
  750. #elif defined(Q_WS_QWS)
  751.     typedef void * HANDLE;
  752. #endif
  753. };
  754.  
  755.  
  756. class Q_EXPORT QInternal {
  757. public:
  758.     enum PaintDeviceFlags {
  759.     UndefinedDevice = 0x00,
  760.     Widget = 0x01,
  761.     Pixmap = 0x02,
  762.     Printer = 0x03,
  763.     Picture = 0x04,
  764.     System = 0x05,
  765.     DeviceTypeMask = 0x0f,
  766.     ExternalDevice = 0x10,
  767.     // used to emulate some of the behaviour different between Qt2 and Qt3 (mainly for printing)
  768.     CompatibilityMode = 0x20
  769.     };
  770. };
  771.  
  772. #endif // QNAMESPACE_H
  773.