/****************************************************************************
**
** Definition of TQt namespace (as class for compiler compatibility)
**
** Created : 980927
**
** Copyright (C) 2010 Timothy Pearson and (C) 1992-2008 Trolltech ASA.
**
** This file is part of the kernel module of the TQt GUI Toolkit.
**
** This file may be used under the terms of the GNU General
** Public License versions 2.0 or 3.0 as published by the Free
** Software Foundation and appearing in the files LICENSE.GPL2
** and LICENSE.GPL3 included in the packaging of this file.
** Alternatively you may (at your option) use any later version
** of the GNU General Public License if such license has been
** publicly approved by Trolltech ASA (or its successors, if any)
** and the KDE Free TQt Foundation.
**
** Please review the following information to ensure GNU General
** Public Licensing requirements will be met:
** http://trolltech.com/products/qt/licenses/licensing/opensource/.
** If you are unsure which license is appropriate for your use, please
** review the following information:
** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
** or contact the sales department at sales@trolltech.com.
**
** This file may be used under the terms of the Q Public License as
** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
** included in the packaging of this file.  Licensees holding valid TQt
** Commercial licenses may use this file in accordance with the TQt
** Commercial License Agreement provided with the Software.
**
** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
** herein.
**
**********************************************************************/

#ifndef TQNAMESPACE_H
#define TQNAMESPACE_H

#ifndef TQT_H
#include "tqglobal.h"
#endif // TQT_H

#include "tqtglobalsettings.h"
#include "tqtglobaldefines.h"

#ifdef USE_QT4

#include <Qt/qglobal.h>
#include <Qt/qnamespace.h>
#include "tqtenuminheritance.h"

#endif // USE_QT4

#ifdef USE_QT4

enum AspectRatioMode {
	IgnoreAspectRatio,
	KeepAspectRatio,
	KeepAspectRatioByExpanding,
	ScaleFree = IgnoreAspectRatio,
	ScaleMin = KeepAspectRatio,
	ScaleMax = KeepAspectRatioByExpanding
};
typedef AspectRatioMode ScaleMode;

enum CursorShape {
	ArrowCursor,
	UpArrowCursor,
	CrossCursor,
	WaitCursor,
	IBeamCursor,
	SizeVerCursor,
	SizeHorCursor,
	SizeBDiagCursor,
	SizeFDiagCursor,
	SizeAllCursor,
	BlankCursor,
	SplitVCursor,
	SplitHCursor,
	PointingHandCursor,
	ForbiddenCursor,
	WhatsThisCursor,
	BusyCursor,
	OpenHandCursor,
	ClosedHandCursor,
	DragCopyCursor,
	DragMoveCursor,
	DragLinkCursor,
	LastCursor = DragLinkCursor,
	BitmapCursor = 24,
	CustomCursor = 25
};

#endif

class TQColor;
class TQCursor;

class TQ_EXPORT TQt {
public:
    TQT_STATIC_CONST TQColor & color0;
    TQT_STATIC_CONST TQColor & color1;
    TQT_STATIC_CONST TQColor & black;
    TQT_STATIC_CONST TQColor & white;
    TQT_STATIC_CONST TQColor & darkGray;
    TQT_STATIC_CONST TQColor & gray;
    TQT_STATIC_CONST TQColor & lightGray;
    TQT_STATIC_CONST TQColor & red;
    TQT_STATIC_CONST TQColor & green;
    TQT_STATIC_CONST TQColor & blue;
    TQT_STATIC_CONST TQColor & cyan;
    TQT_STATIC_CONST TQColor & magenta;
    TQT_STATIC_CONST TQColor & yellow;
    TQT_STATIC_CONST TQColor & darkRed;
    TQT_STATIC_CONST TQColor & darkGreen;
    TQT_STATIC_CONST TQColor & darkBlue;
    TQT_STATIC_CONST TQColor & darkCyan;
    TQT_STATIC_CONST TQColor & darkMagenta;
    TQT_STATIC_CONST TQColor & darkYellow;

#ifdef USE_QT4

    enum ButtonState_enum {
        ShiftButton     = ((int)Qt::ShiftModifier),
        ControlButton   = ((int)Qt::ControlModifier),
        AltButton       = ((int)Qt::AltModifier),
        MetaButton      = ((int)Qt::MetaModifier),
        Keypad          = ((int)Qt::KeypadModifier),
        KeyButtonMask   = ((int)Qt::KeyboardModifierMask)
    };
    typedef int ButtonState;

#else // USE_QT4

    // documented in qevent.cpp
    enum ButtonState {				// mouse/keyboard state values
	NoButton	= 0x0000,
	LeftButton	= 0x0001,
	RightButton	= 0x0002,
	MidButton	= 0x0004,
	MouseButtonMask = 0x0007,
	ShiftButton	= 0x0100,
	ControlButton   = 0x0200,
	AltButton	= 0x0400,
	MetaButton	= 0x0800,
	KeyButtonMask	= 0x0f00,
	Keypad		= 0x4000
    };

#endif // USE_QT4


#ifdef USE_QT4

typedef Qt::Orientation Orientation;

#else // USE_QT4

    // documented in qobject.cpp
    // ideally would start at 1, as in TQSizePolicy, but that breaks other things
    enum Orientation {
        Horizontal = 0,
	Vertical
    };

#endif // USE_QT4

    // documented in qlistview.cpp
    enum SortOrder {
	Ascending,
	Descending
    };

    // Text formatting flags for TQPainter::drawText and TQLabel
    // the following four enums can be combined to one integer which
    // is passed as textflag to drawText and qt_format_text.

    // documented in qpainter.cpp

#ifdef USE_QT4
    enum AlignmentFlags {
	AlignAuto		= ((int)Qt::AlignLeft), 	// text tqalignment
	AlignLeft		= ((int)Qt::AlignLeft),
	AlignRight		= ((int)Qt::AlignRight),
	AlignHCenter		= ((int)Qt::AlignHCenter),
	AlignJustify		= ((int)Qt::AlignJustify),
	AlignAbsolute		= ((int)Qt::AlignAbsolute),
	AlignHorizontal_Mask	= AlignLeft | AlignRight | AlignHCenter | AlignJustify | AlignAbsolute,
	AlignTop		= ((int)Qt::AlignTop),
	AlignBottom		= ((int)Qt::AlignBottom),
	AlignVCenter		= ((int)Qt::AlignVCenter),
	AlignVertical_Mask 	= AlignTop | AlignBottom | AlignVCenter,
	AlignCenter		= AlignVCenter | AlignHCenter
    };
#else // USE_QT4
    enum AlignmentFlags {
	AlignAuto		= 0x0000, 	// text tqalignment
	AlignLeft		= 0x0001,
	AlignRight		= 0x0002,
	AlignHCenter		= 0x0004,
	AlignJustify		= 0x0008,
	AlignHorizontal_Mask	= AlignLeft | AlignRight | AlignHCenter | AlignJustify,
	AlignTop		= 0x0010,
	AlignBottom		= 0x0020,
	AlignVCenter		= 0x0040,
	AlignVertical_Mask 	= AlignTop | AlignBottom | AlignVCenter,
	AlignCenter		= AlignVCenter | AlignHCenter
    };
#endif // USE_QT4

#ifdef USE_QT4
    enum TextFlags {
	SingleLine	= Qt::TextSingleLine,
	DontClip	= Qt::TextDontClip,
	ExpandTabs	= Qt::TextExpandTabs,
	ShowPrefix	= Qt::TextShowMnemonic,
	WordBreak	= Qt::TextWordWrap,
	BreakAnywhere   = Qt::TextWrapAnywhere,
#ifndef TQ_TQDOC
	DontPrint	= Qt::TextDontPrint,
	Underline       = 0x01000000,
	Overline        = 0x02000000,
	StrikeOut       = 0x04000000,
	IncludeTrailingSpaces = Qt::TextIncludeTrailingSpaces,
#endif
	NoAccel = 0x4000
    };
#else // USE_QT4
    // documented in qpainter.cpp
    enum TextFlags {
	SingleLine	= 0x0080,		// misc. flags
	DontClip	= 0x0100,
	ExpandTabs	= 0x0200,
	ShowPrefix	= 0x0400,
	WordBreak	= 0x0800,
	BreakAnywhere = 0x1000,
#ifndef TQ_TQDOC
	DontPrint	= 0x2000,
	Underline = 0x01000000,
	Overline  = 0x02000000,
	StrikeOut = 0x04000000,
	IncludeTrailingSpaces = 0x08000000,
#endif
	NoAccel = 0x4000
    };
#endif // USE_QT4

#ifdef USE_QT4
    typedef Qt::WindowStates WState;
#else // USE_QT4
    // Widget flags; documented in qwidget.cpp
    typedef uint WState;
#endif // USE_QT4

    // TQWidget state flags (internal, barely documented in qwidget.cpp)
    enum WidgetState {
	WState_Created		= 0x00000001,
	WState_Disabled		= 0x00000002,
	WState_Visible		= 0x00000004,
	WState_ForceHide	= 0x00000008,
	WState_OwnCursor	= 0x00000010,
	WState_MouseTracking	= 0x00000020,
	WState_CompressKeys	= 0x00000040,
	WState_BlockUpdates	= 0x00000080,
	WState_InPaintEvent	= 0x00000100,
	WState_Reparented	= 0x00000200,
	WState_ConfigPending	= 0x00000400,
	WState_Resized		= 0x00000800,
	WState_AutoMask		= 0x00001000,
	WState_Polished		= 0x00002000,
	WState_DND		= 0x00004000,
	WState_Reserved0	= 0x00008000,
	WState_FullScreen	= 0x00010000,
	WState_OwnSizePolicy	= 0x00020000,
	WState_CreatedHidden	= 0x00040000,
	WState_Maximized	= 0x00080000,
	WState_Minimized	= 0x00100000,
	WState_ForceDisabled	= 0x00200000,
	WState_Exposed		= 0x00400000,
	WState_HasMouse		= 0x00800000
    };

// #ifdef USE_QT4
// 
//     typedef Qt::WindowFlags WindowFlags;
// 
// #else // USE_QT4
// 
//     // Widget flags2; documented in qwidget.cpp
//     typedef uint WFlags;
// 
// #endif // USE_QT4

// typedef unsigned long long WFlags;

#ifdef USE_QT4

    // documented in qwidget.cpp
    enum WidgetFlags {
	WType_TopLevel		= ((int)Qt::Window),	// widget type flags
	WType_Dialog		= 0x00000002 | WType_TopLevel,
	WType_Popup		= 0x00000008 | WType_TopLevel,
	WType_Desktop		= 0x00000010 | WType_TopLevel,
	WType_Mask		= 0x000000ff,

	WStyle_Customize	= 0x00000000,		// window style flags
	WStyle_NormalBorder	= 0x00000000,
	WStyle_DialogBorder	= ((int)Qt::MSWindowsFixedSizeDialogHint), // MS-Windows only
	WStyle_NoBorder		= ((int)Qt::FramelessWindowHint),
	WStyle_Title		= ((int)Qt::WindowTitleHint),
	WStyle_SysMenu		= ((int)Qt::WindowSystemMenuHint),
	WStyle_Minimize		= ((int)Qt::WindowMinimizeButtonHint),
	WStyle_Maximize		= ((int)Qt::WindowMaximizeButtonHint),
	WStyle_MinMax		= WStyle_Minimize | WStyle_Maximize,
// 	WStyle_Tool		= ((int)Qt::Tool),	// This is NOT the Qt4 equivalent...using Qt::Tool will cause undocked toolbar handles to stay in the top left corner of the screen
	WStyle_Tool		= ((int)0),		// [FIXME] Huh?  Why do the toolbars work in Qt4 when Qt::Tool is not set?!?!? [FIXME] [UNDEFINED BEHAVIOUR]
	WStyle_StaysOnTop	= ((int)Qt::WindowStaysOnTopHint),
	WStyle_ContextHelp	= ((int)Qt::WindowContextHelpButtonHint),
// 	WStyle_Reserved		= 0x00008000,
	WStyle_Reserved		= 0x00000000,
	WStyle_Mask		= 0x0000fff0,

	WDestructiveClose	= 0x00100000,	// misc flags
	WPaintDesktop		= 0x00000000,
	WPaintClever		= 0x00000000,
	WStaticContents		= 0x00200000,

	WX11BypassWM		= ((int)Qt::X11BypassWindowManagerHint),
	WWinOwnDC		= ((int)Qt::MSWindowsOwnDC),
	WMacNoSheet             = 0x00000000,
        WMacDrawer              = ((int)Qt::Drawer),

	WGroupLeader		= 0x00400000,
	WShowModal		= 0x00800000,
	WNoMousePropagation	= 0x01000000,
	WSubWindow              = ((int)Qt::SubWindow),

        WStyle_Splash           = ((int)Qt::SplashScreen),

	// TQt specific flags
	WNoAutoErase		= 0x0000000100000000ULL,
	WRepaintNoErase		= WNoAutoErase,			// OBSOLETE
	WResizeNoErase		= WNoAutoErase,			// OBSOLETE
	WMouseNoMask		= 0x0000000200000000ULL,
	WPaintOnScreen		= 0x0000000400000000ULL,	// NOTE: This disables Qt4 composition (i.e. transparent windows) to allow fast direct access to the X11 screen.  Use with caution!
	WPaintUnclipped		= 0x0000000800000000ULL,	// NOTE: This implicitly enables WPaintOnScreen, which disables composition
	WTQtFlagMask		= 0xffffffff00000000ULL
#ifndef TQT_NO_COMPAT
	,
	WNorthWestGravity	= WStaticContents,
	WType_Modal		= WType_Dialog | WShowModal,
	WStyle_Dialog		= WType_Dialog,
	WStyle_NoBorderEx	= WStyle_NoBorder
#endif
    };

    typedef unsigned long long WFlags;

#else // USE_QT4

    // documented in qwidget.cpp
    enum WidgetFlags {
	WType_TopLevel		= 0x00000001,	// widget type flags
	WType_Dialog		= 0x00000002,
	WType_Popup		= 0x00000004,
	WType_Desktop		= 0x00000008,
	WType_Mask		= 0x0000000f,

	WStyle_Customize	= 0x00000010,	// window style flags
	WStyle_NormalBorder	= 0x00000020,
	WStyle_DialogBorder	= 0x00000040, // MS-Windows only
	WStyle_NoBorder		= 0x00002000,
	WStyle_Title		= 0x00000080,
	WStyle_SysMenu		= 0x00000100,
	WStyle_Minimize		= 0x00000200,
	WStyle_Maximize		= 0x00000400,
	WStyle_MinMax		= WStyle_Minimize | WStyle_Maximize,
	WStyle_Tool		= 0x00000800,
	WStyle_StaysOnTop	= 0x00001000,
	WStyle_ContextHelp	= 0x00004000,
	WStyle_Reserved		= 0x00008000,
	WStyle_Mask		= 0x0000fff0,

	WDestructiveClose	= 0x00010000,	// misc flags
	WPaintDesktop		= 0x00020000,
	WPaintUnclipped		= 0x00040000,
	WPaintClever		= 0x00080000,
	WResizeNoErase		= 0x00100000, // OBSOLETE
	WMouseNoMask		= 0x00200000,
	WStaticContents		= 0x00400000,
	WRepaintNoErase		= 0x00800000, // OBSOLETE
#if defined(TQ_WS_X11)
	WX11BypassWM		= 0x01000000,
	WWinOwnDC		= 0x00000000,
	WMacNoSheet             = 0x00000000,
        WMacDrawer              = 0x00000000,
#elif defined(TQ_WS_MAC)
	WX11BypassWM		= 0x00000000,
	WWinOwnDC		= 0x00000000,
	WMacNoSheet             = 0x01000000,
        WMacDrawer              = 0x20000000,
#else
	WX11BypassWM		= 0x00000000,
	WWinOwnDC		= 0x01000000,
	WMacNoSheet             = 0x00000000,
        WMacDrawer              = 0x00000000,
#endif
	WGroupLeader		= 0x02000000,
	WShowModal		= 0x04000000,
	WNoMousePropagation	= 0x08000000,
	WSubWindow              = 0x10000000,
#if defined(TQ_WS_X11)
        WStyle_Splash           = 0x20000000,
#else
	WStyle_Splash           = WStyle_NoBorder | WMacNoSheet | WStyle_Tool | WWinOwnDC,
#endif
	WNoAutoErase		= WRepaintNoErase | WResizeNoErase
#ifndef TQT_NO_COMPAT
	,
	WNorthWestGravity	= WStaticContents,
	WType_Modal		= WType_Dialog | WShowModal,
	WStyle_Dialog		= WType_Dialog,
	WStyle_NoBorderEx	= WStyle_NoBorder
#endif
    };

#endif // USE_QT4

    enum WindowState {
	WindowNoState   = 0x00000000,
	WindowMinimized = 0x00000001,
	WindowMaximized = 0x00000002,
	WindowFullScreen = 0x00000004,
	WindowActive = 0x00000008
    };


    // Image conversion flags.  The unusual ordering is caused by
    // compatibility and default requirements.
    // Documented in qimage.cpp

    enum ImageConversionFlags {
	ColorMode_Mask		= 0x00000003,
	AutoColor		= 0x00000000,
	ColorOnly		= 0x00000003,
	MonoOnly		= 0x00000002,
	//	  Reserved	= 0x00000001,

	AlphaDither_Mask	= 0x0000000c,
	ThresholdAlphaDither	= 0x00000000,
	OrderedAlphaDither	= 0x00000004,
	DiffuseAlphaDither	= 0x00000008,
	NoAlpha			= 0x0000000c, // Not supported

	Dither_Mask		= 0x00000030,
	DiffuseDither		= 0x00000000,
	OrderedDither		= 0x00000010,
	ThresholdDither		= 0x00000020,
	//	  ReservedDither= 0x00000030,

	DitherMode_Mask		= 0x000000c0,
	AutoDither		= 0x00000000,
	PreferDither		= 0x00000040,
	AvoidDither		= 0x00000080
    };

    // documented in qpainter.cpp
    enum BGMode	{				// background mode
	TransparentMode,
	OpaqueMode
    };

#ifdef USE_QT4

    enum PaintUnit {                                // paint unit
        PixelUnit,
        LoMetricUnit, // obsolete
        HiMetricUnit, // obsolete
        LoEnglishUnit, // obsolete
        HiEnglishUnit, // obsolete
        TwipsUnit // obsolete
    };

    enum GUIStyle {
        MacStyle,
        WindowsStyle,
        Win3Style,
        PMStyle,
        MotifStyle,
	GtkStyle = 6          // Gtk compability mode
    };

#else // USE_QT4

#ifndef TQT_NO_COMPAT
    // documented in qpainter.cpp
    enum PaintUnit {				// paint unit
	PixelUnit,
	LoMetricUnit, // OBSOLETE
	HiMetricUnit, // OBSOLETE
	LoEnglishUnit, // OBSOLETE
	HiEnglishUnit, // OBSOLETE
	TwipsUnit // OBSOLETE
    };
#endif

    // documented in qstyle.cpp
#ifdef TQT_NO_COMPAT
    enum GUIStyle {
	WindowsStyle = 1,     // ### TQt 4.0: either remove the obsolete enums or clean up compat vs.
	MotifStyle = 4,       // ### TQT_NO_COMPAT by reordering or combination into one enum.
	GtkStyle = 6          // Gtk compability mode
    };
#else
    enum GUIStyle {
	MacStyle, // OBSOLETE
	WindowsStyle,
	Win3Style, // OBSOLETE
	PMStyle, // OBSOLETE
	MotifStyle,
	GtkStyle = 6          // Gtk compability mode
    };
#endif

#endif // USE_QT4

    // documented in qkeysequence.cpp
    enum SequenceMatch {
	NoMatch,
	PartialMatch,
	Identical
    };

#ifdef USE_QT4
    //shorter names for shortcuts
    enum Modifier {
        META          = Qt::MetaModifier,
        SHIFT         = Qt::ShiftModifier,
        CTRL          = Qt::ControlModifier,
        ALT           = Qt::AltModifier,
        MODIFIER_MASK = Qt::KeyboardModifierMask,
        UNICODE_ACCEL = 0x00000000,

	ASCII_ACCEL   = UNICODE_ACCEL // 1.x compat
    };
#else // USE_QT4
    // documented in qevent.cpp
    enum Modifier {		// accelerator modifiers
	META          = 0x00100000,
	SHIFT         = 0x00200000,
	CTRL          = 0x00400000,
	ALT           = 0x00800000,
	MODIFIER_MASK = 0x00f00000,
	UNICODE_ACCEL = 0x10000000,

	ASCII_ACCEL = UNICODE_ACCEL // 1.x compat
    };
#endif // USE_QT4

    // documented in tqevent.cpp
    enum Key {
	Key_Escape = (int)Qt::Key_Escape,		// misc keys
	Key_Tab = (int)Qt::Key_Tab,
	Key_Backtab = (int)Qt::Key_Backtab, Key_BackTab = Key_Backtab,
	Key_Backspace = (int)Qt::Key_Backspace, Key_BackSpace = Key_Backspace,
	Key_Return = (int)Qt::Key_Return,
	Key_Enter = (int)Qt::Key_Enter,
	Key_Insert = (int)Qt::Key_Insert,
	Key_Delete = (int)Qt::Key_Delete,
	Key_Pause = (int)Qt::Key_Pause,
	Key_Print = (int)Qt::Key_Print,
	Key_SysReq = (int)Qt::Key_SysReq,
	Key_Clear = (int)Qt::Key_Clear,
	Key_Home = (int)Qt::Key_Home,		// cursor movement
	Key_End = (int)Qt::Key_End,
	Key_Left = (int)Qt::Key_Left,
	Key_Up = (int)Qt::Key_Up,
	Key_Right = (int)Qt::Key_Right,
	Key_Down = (int)Qt::Key_Down,
	Key_Prior = (int)Qt::Key_PageUp, Key_PageUp = Key_Prior,
	Key_Next = (int)Qt::Key_PageDown, Key_PageDown = Key_Next,
	Key_Shift = (int)Qt::Key_Shift,		// modifiers
	Key_Control = (int)Qt::Key_Control,
	Key_Meta = (int)Qt::Key_Meta,
	Key_Alt = (int)Qt::Key_Alt,
	Key_CapsLock = (int)Qt::Key_CapsLock,
	Key_NumLock = (int)Qt::Key_NumLock,
	Key_ScrollLock = (int)Qt::Key_ScrollLock,
	Key_F1 = (int)Qt::Key_F1,		// function keys
	Key_F2 = (int)Qt::Key_F2,
	Key_F3 = (int)Qt::Key_F3,
	Key_F4 = (int)Qt::Key_F4,
	Key_F5 = (int)Qt::Key_F5,
	Key_F6 = (int)Qt::Key_F6,
	Key_F7 = (int)Qt::Key_F7,
	Key_F8 = (int)Qt::Key_F8,
	Key_F9 = (int)Qt::Key_F9,
	Key_F10 = (int)Qt::Key_F10,
	Key_F11 = (int)Qt::Key_F11,
	Key_F12 = (int)Qt::Key_F12,
	Key_F13 = (int)Qt::Key_F13,
	Key_F14 = (int)Qt::Key_F14,
	Key_F15 = (int)Qt::Key_F15,
	Key_F16 = (int)Qt::Key_F16,
	Key_F17 = (int)Qt::Key_F17,
	Key_F18 = (int)Qt::Key_F18,
	Key_F19 = (int)Qt::Key_F19,
	Key_F20 = (int)Qt::Key_F20,
	Key_F21 = (int)Qt::Key_F21,
	Key_F22 = (int)Qt::Key_F22,
	Key_F23 = (int)Qt::Key_F23,
	Key_F24 = (int)Qt::Key_F24,
	Key_F25 = (int)Qt::Key_F25,		// F25 .. F35 only on X11
	Key_F26 = (int)Qt::Key_F26,
	Key_F27 = (int)Qt::Key_F27,
	Key_F28 = (int)Qt::Key_F28,
	Key_F29 = (int)Qt::Key_F29,
	Key_F30 = (int)Qt::Key_F30,
	Key_F31 = (int)Qt::Key_F31,
	Key_F32 = (int)Qt::Key_F32,
	Key_F33 = (int)Qt::Key_F33,
	Key_F34 = (int)Qt::Key_F34,
	Key_F35 = (int)Qt::Key_F35,
	Key_Super_L = (int)Qt::Key_Super_L, 		// extra keys
	Key_Super_R = (int)Qt::Key_Super_R,
	Key_Menu = (int)Qt::Key_Menu,
	Key_Hyper_L = (int)Qt::Key_Hyper_L,
	Key_Hyper_R = (int)Qt::Key_Hyper_R,
	Key_Help = (int)Qt::Key_Help,
	Key_Direction_L = (int)Qt::Key_Direction_L,
	Key_Direction_R = (int)Qt::Key_Direction_R,

	// International input method support (X keycode - 0xEE00, the
	// definition follows TQt/Embedded 2.3.7) Only interesting if
	// you are writing your own input method
        
	// International & multi-key character composition
	Key_Multi_key           = 0x1120,  // Multi-key character compose
	Key_Codeinput           = 0x1137,
	Key_SingleCandidate     = 0x113c,
	Key_MultipleCandidate   = 0x113d,
	Key_PreviousCandidate   = 0x113e,

	// Misc Functions
	Key_Mode_switch         = 0x117e,  // Character set switch
	//Key_script_switch       = 0x117e,  // Alias for mode_switch

	// Japanese keyboard support
	Key_Kanji               = 0x1121,  // Kanji, Kanji convert
	Key_Muhenkan            = 0x1122,  // Cancel Conversion
	//Key_Henkan_Mode         = 0x1123,  // Start/Stop Conversion
	Key_Henkan              = 0x1123,  // Alias for Henkan_Mode
	Key_Romaji              = 0x1124,  // to Romaji
	Key_Hiragana            = 0x1125,  // to Hiragana
	Key_Katakana            = 0x1126,  // to Katakana
	Key_Hiragana_Katakana   = 0x1127,  // Hiragana/Katakana toggle
	Key_Zenkaku             = 0x1128,  // to Zenkaku
	Key_Hankaku             = 0x1129,  // to Hankaku
	Key_Zenkaku_Hankaku     = 0x112a,  // Zenkaku/Hankaku toggle
	Key_Touroku             = 0x112b,  // Add to Dictionary
	Key_Massyo              = 0x112c,  // Delete from Dictionary
	Key_Kana_Lock           = 0x112d,  // Kana Lock
	Key_Kana_Shift          = 0x112e,  // Kana Shift
	Key_Eisu_Shift          = 0x112f,  // Alphanumeric Shift
	Key_Eisu_toggle         = 0x1130,  // Alphanumeric toggle
	//Key_Kanji_Bangou        = 0x1137,  // Codeinput
	//Key_Zen_Koho            = 0x113d,  // Multiple/All Candidate(s)
	//Key_Mae_Koho            = 0x113e,  // Previous Candidate

	// Korean keyboard support
	//
	// In fact, many Korean users need only 2 keys, Key_Hangul and
	// Key_Hangul_Hanja. But rest of the keys are good for future.

	Key_Hangul              = 0x1131,  // Hangul start/stop(toggle)
	Key_Hangul_Start        = 0x1132,  // Hangul start
	Key_Hangul_End          = 0x1133,  // Hangul end, English start
	Key_Hangul_Hanja        = 0x1134,  // Start Hangul->Hanja Conversion
	Key_Hangul_Jamo         = 0x1135,  // Hangul Jamo mode
	Key_Hangul_Romaja       = 0x1136,  // Hangul Romaja mode
	//Key_Hangul_Codeinput    = 0x1137,  // Hangul code input mode
	Key_Hangul_Jeonja       = 0x1138,  // Jeonja mode
	Key_Hangul_Banja        = 0x1139,  // Banja mode
	Key_Hangul_PreHanja     = 0x113a,  // Pre Hanja conversion
	Key_Hangul_PostHanja    = 0x113b,  // Post Hanja conversion
	//Key_Hangul_SingleCandidate   = 0x113c,  // Single candidate
	//Key_Hangul_MultipleCandidate = 0x113d,  // Multiple candidate
	//Key_Hangul_PreviousCandidate = 0x113e,  // Previous candidate
	Key_Hangul_Special      = 0x113f,  // Special symbols
	//Key_Hangul_switch       = 0x117e,  // Alias for mode_switch

        // dead keys (X keycode - 0xED00 to avoid the conflict)
        Key_Dead_Grave          = 0x1250,
        Key_Dead_Acute          = 0x1251,
        Key_Dead_Circumflex     = 0x1252,
        Key_Dead_Tilde          = 0x1253,
        Key_Dead_Macron         = 0x1254,
        Key_Dead_Breve          = 0x1255,
        Key_Dead_Abovedot       = 0x1256,
        Key_Dead_Diaeresis      = 0x1257,
        Key_Dead_Abovering      = 0x1258,
        Key_Dead_Doubleacute    = 0x1259,
        Key_Dead_Caron          = 0x125a,
        Key_Dead_Cedilla        = 0x125b,
        Key_Dead_Ogonek         = 0x125c,
        Key_Dead_Iota           = 0x125d,
        Key_Dead_Voiced_Sound   = 0x125e,
        Key_Dead_Semivoiced_Sound = 0x125f,
        Key_Dead_Belowdot       = 0x1260,
        Key_Dead_Hook           = 0x1261,
        Key_Dead_Horn           = 0x1262,

	Key_Space = (int)Qt::Key_Space,		// 7 bit printable ASCII
	Key_Any = Key_Space,
	Key_Exclam = (int)Qt::Key_Exclam,
	Key_QuoteDbl = (int)Qt::Key_QuoteDbl,
	Key_NumberSign = (int)Qt::Key_NumberSign,
	Key_Dollar = (int)Qt::Key_Dollar,
	Key_Percent = (int)Qt::Key_Percent,
	Key_Ampersand = (int)Qt::Key_Ampersand,
	Key_Apostrophe = (int)Qt::Key_Apostrophe,
	Key_ParenLeft = (int)Qt::Key_ParenLeft,
	Key_ParenRight = (int)Qt::Key_ParenRight,
	Key_Asterisk = (int)Qt::Key_Asterisk,
	Key_Plus = (int)Qt::Key_Plus,
	Key_Comma = (int)Qt::Key_Comma,
	Key_Minus = (int)Qt::Key_Minus,
	Key_Period = (int)Qt::Key_Period,
	Key_Slash = (int)Qt::Key_Slash,
	Key_0 = (int)Qt::Key_0,
	Key_1 = (int)Qt::Key_1,
	Key_2 = (int)Qt::Key_2,
	Key_3 = (int)Qt::Key_3,
	Key_4 = (int)Qt::Key_4,
	Key_5 = (int)Qt::Key_5,
	Key_6 = (int)Qt::Key_6,
	Key_7 = (int)Qt::Key_7,
	Key_8 = (int)Qt::Key_8,
	Key_9 = (int)Qt::Key_9,
	Key_Colon = (int)Qt::Key_Colon,
	Key_Semicolon = (int)Qt::Key_Semicolon,
	Key_Less = (int)Qt::Key_Less,
	Key_Equal = (int)Qt::Key_Equal,
	Key_Greater = (int)Qt::Key_Greater,
	Key_Question = (int)Qt::Key_Question,
	Key_At = (int)Qt::Key_At,
	Key_A = (int)Qt::Key_A,
	Key_B = (int)Qt::Key_B,
	Key_C = (int)Qt::Key_C,
	Key_D = (int)Qt::Key_D,
	Key_E = (int)Qt::Key_E,
	Key_F = (int)Qt::Key_F,
	Key_G = (int)Qt::Key_G,
	Key_H = (int)Qt::Key_H,
	Key_I = (int)Qt::Key_I,
	Key_J = (int)Qt::Key_J,
	Key_K = (int)Qt::Key_K,
	Key_L = (int)Qt::Key_L,
	Key_M = (int)Qt::Key_M,
	Key_N = (int)Qt::Key_N,
	Key_O = (int)Qt::Key_O,
	Key_P = (int)Qt::Key_P,
	Key_Q = (int)Qt::Key_Q,
	Key_R = (int)Qt::Key_R,
	Key_S = (int)Qt::Key_S,
	Key_T = (int)Qt::Key_T,
	Key_U = (int)Qt::Key_U,
	Key_V = (int)Qt::Key_V,
	Key_W = (int)Qt::Key_W,
	Key_X = (int)Qt::Key_X,
	Key_Y = (int)Qt::Key_Y,
	Key_Z = (int)Qt::Key_Z,
	Key_BracketLeft = (int)Qt::Key_BracketLeft,
	Key_Backslash = (int)Qt::Key_Backslash,
	Key_BracketRight = (int)Qt::Key_BracketRight,
	Key_AsciiCircum = (int)Qt::Key_AsciiCircum,
	Key_Underscore = (int)Qt::Key_Underscore,
	Key_QuoteLeft = (int)Qt::Key_QuoteLeft,
	Key_BraceLeft = (int)Qt::Key_BraceLeft,
	Key_Bar = (int)Qt::Key_Bar,
	Key_BraceRight = (int)Qt::Key_BraceRight,
	Key_AsciiTilde = (int)Qt::Key_AsciiTilde,

	// Latin 1 codes adapted from X: keysymdef.h,v 1.21 94/08/28 16:17:06
	//
	// This is mainly for compatibility - applications and input
	// methods should not use the TQt keycodes between 128 and 255,
	// but should rather use the TQKeyEvent::text(). See
	// TQETWidget::translateKeyEventInternal() for more details.

	Key_nobreakspace = (int)Qt::Key_nobreakspace,
	Key_exclamdown = (int)Qt::Key_exclamdown,
	Key_cent = (int)Qt::Key_cent,
	Key_sterling = (int)Qt::Key_sterling,
	Key_currency = (int)Qt::Key_currency,
	Key_yen = (int)Qt::Key_yen,
	Key_brokenbar = (int)Qt::Key_brokenbar,
	Key_section = (int)Qt::Key_section,
	Key_diaeresis = (int)Qt::Key_diaeresis,
	Key_copyright = (int)Qt::Key_copyright,
	Key_ordfeminine = (int)Qt::Key_ordfeminine,
	Key_guillemotleft = (int)Qt::Key_guillemotleft,	// left angle quotation mark
	Key_notsign = (int)Qt::Key_notsign,
	Key_hyphen = (int)Qt::Key_hyphen,
	Key_registered = (int)Qt::Key_registered,
	Key_macron = (int)Qt::Key_macron,
	Key_degree = (int)Qt::Key_degree,
	Key_plusminus = (int)Qt::Key_plusminus,
	Key_twosuperior = (int)Qt::Key_twosuperior,
	Key_threesuperior = (int)Qt::Key_threesuperior,
	Key_acute = (int)Qt::Key_acute,
	Key_mu = (int)Qt::Key_mu,
	Key_paragraph = (int)Qt::Key_paragraph,
	Key_periodcentered = (int)Qt::Key_periodcentered,
	Key_cedilla = (int)Qt::Key_cedilla,
	Key_onesuperior = (int)Qt::Key_onesuperior,
	Key_masculine = (int)Qt::Key_masculine,
	Key_guillemotright = (int)Qt::Key_guillemotright,	// right angle quotation mark
	Key_onequarter = (int)Qt::Key_onequarter,
	Key_onehalf = (int)Qt::Key_onehalf,
	Key_threequarters = (int)Qt::Key_threequarters,
	Key_questiondown = (int)Qt::Key_questiondown,
	Key_Agrave = (int)Qt::Key_Agrave,
	Key_Aacute = (int)Qt::Key_Aacute,
	Key_Acircumflex = (int)Qt::Key_Acircumflex,
	Key_Atilde = (int)Qt::Key_Atilde,
	Key_Adiaeresis = (int)Qt::Key_Adiaeresis,
	Key_Aring = (int)Qt::Key_Aring,
	Key_AE = (int)Qt::Key_AE,
	Key_Ccedilla = (int)Qt::Key_Ccedilla,
	Key_Egrave = (int)Qt::Key_Egrave,
	Key_Eacute = (int)Qt::Key_Eacute,
	Key_Ecircumflex = (int)Qt::Key_Ecircumflex,
	Key_Ediaeresis = (int)Qt::Key_Ediaeresis,
	Key_Igrave = (int)Qt::Key_Igrave,
	Key_Iacute = (int)Qt::Key_Iacute,
	Key_Icircumflex = (int)Qt::Key_Icircumflex,
	Key_Idiaeresis = (int)Qt::Key_Idiaeresis,
	Key_ETH = (int)Qt::Key_ETH,
	Key_Ntilde = (int)Qt::Key_Ntilde,
	Key_Ograve = (int)Qt::Key_Ograve,
	Key_Oacute = (int)Qt::Key_Oacute,
	Key_Ocircumflex = (int)Qt::Key_Ocircumflex,
	Key_Otilde = (int)Qt::Key_Otilde,
	Key_Odiaeresis = (int)Qt::Key_Odiaeresis,
	Key_multiply = (int)Qt::Key_multiply,
	Key_Ooblique = (int)Qt::Key_Ooblique,
	Key_Ugrave = (int)Qt::Key_Ugrave,
	Key_Uacute = (int)Qt::Key_Uacute,
	Key_Ucircumflex = (int)Qt::Key_Ucircumflex,
	Key_Udiaeresis = (int)Qt::Key_Udiaeresis,
	Key_Yacute = (int)Qt::Key_Yacute,
	Key_THORN = (int)Qt::Key_THORN,
	Key_ssharp = (int)Qt::Key_ssharp,
	Key_agrave = (int)Qt::Key_Agrave,
	Key_aacute = (int)Qt::Key_Aacute,
	Key_acircumflex = (int)Qt::Key_Acircumflex,
	Key_atilde = (int)Qt::Key_Atilde,
	Key_adiaeresis = (int)Qt::Key_Adiaeresis,
	Key_aring = (int)Qt::Key_Aring,
	Key_ae = (int)Qt::Key_AE,
	Key_ccedilla = (int)Qt::Key_Ccedilla,
	Key_egrave = (int)Qt::Key_Egrave,
	Key_eacute = (int)Qt::Key_Eacute,
	Key_ecircumflex = (int)Qt::Key_Ecircumflex,
	Key_ediaeresis = (int)Qt::Key_Ediaeresis,
	Key_igrave = (int)Qt::Key_Igrave,
	Key_iacute = (int)Qt::Key_Iacute,
	Key_icircumflex = (int)Qt::Key_Icircumflex,
	Key_idiaeresis = (int)Qt::Key_Idiaeresis,
	Key_eth = (int)Qt::Key_ETH ,
	Key_ntilde = (int)Qt::Key_Ntilde,
	Key_ograve = (int)Qt::Key_Ograve,
	Key_oacute = (int)Qt::Key_Oacute,
	Key_ocircumflex = (int)Qt::Key_Ocircumflex,
	Key_otilde = (int)Qt::Key_Otilde,
	Key_odiaeresis = (int)Qt::Key_Odiaeresis,
	Key_division = (int)Qt::Key_division,
	Key_oslash = (int)Qt::Key_Ooblique,
	Key_ugrave = (int)Qt::Key_Ugrave,
	Key_uacute = (int)Qt::Key_Uacute,
	Key_ucircumflex = (int)Qt::Key_Ucircumflex,
	Key_udiaeresis = (int)Qt::Key_Udiaeresis,
	Key_yacute = (int)Qt::Key_Yacute,
	Key_thorn = (int)Qt::Key_THORN,
	Key_ydiaeresis = (int)Qt::Key_ydiaeresis,

	// multimedia/internet keys - ignored by default - see TQKeyEvent c'tor

	Key_Back  = (int)Qt::Key_Back,
	Key_Forward  = (int)Qt::Key_Forward,
	Key_Stop  = (int)Qt::Key_Stop,
	Key_Refresh  = (int)Qt::Key_Refresh,

	Key_VolumeDown = (int)Qt::Key_VolumeDown,
	Key_VolumeMute  = (int)Qt::Key_VolumeMute,
	Key_VolumeUp = (int)Qt::Key_VolumeUp,
	Key_BassBoost = (int)Qt::Key_BassBoost,
	Key_BassUp = (int)Qt::Key_BassUp,
	Key_BassDown = (int)Qt::Key_BassDown,
	Key_TrebleUp = (int)Qt::Key_TrebleUp,
	Key_TrebleDown = (int)Qt::Key_TrebleDown,

	Key_MediaPlay  = (int)Qt::Key_MediaPlay,
	Key_MediaStop  = (int)Qt::Key_MediaStop,
	Key_MediaPrev  = (int)Qt::Key_MediaPrevious,
	Key_MediaNext  = (int)Qt::Key_MediaNext,
	Key_MediaRecord = (int)Qt::Key_MediaRecord,

	Key_HomePage  = (int)Qt::Key_HomePage,
	Key_Favorites  = (int)Qt::Key_Favorites,
	Key_Search  = (int)Qt::Key_Search,
	Key_Standby = (int)Qt::Key_Standby,
	Key_OpenUrl = (int)Qt::Key_OpenUrl,

	Key_LaunchMail  = (int)Qt::Key_LaunchMail,
	Key_LaunchMedia = (int)Qt::Key_LaunchMedia,
	Key_Launch0  = (int)Qt::Key_Launch0,
	Key_Launch1  = (int)Qt::Key_Launch1,
	Key_Launch2  = (int)Qt::Key_Launch2,
	Key_Launch3  = (int)Qt::Key_Launch3,
	Key_Launch4  = (int)Qt::Key_Launch4,
	Key_Launch5  = (int)Qt::Key_Launch5,
	Key_Launch6  = (int)Qt::Key_Launch6,
	Key_Launch7  = (int)Qt::Key_Launch7,
	Key_Launch8  = (int)Qt::Key_Launch8,
	Key_Launch9  = (int)Qt::Key_Launch9,
	Key_LaunchA  = (int)Qt::Key_LaunchA,
	Key_LaunchB  = (int)Qt::Key_LaunchB,
	Key_LaunchC  = (int)Qt::Key_LaunchC,
	Key_LaunchD  = (int)Qt::Key_LaunchD,
	Key_LaunchE  = (int)Qt::Key_LaunchE,
	Key_LaunchF  = (int)Qt::Key_LaunchF,

	Key_MediaLast = (int)Qt::Key_MediaLast,

	Key_unknown = (int)Qt::Key_unknown
    };

    // documented in qcommonstyle.cpp
    enum ArrowType {
	UpArrow,
	DownArrow,
	LeftArrow,
	RightArrow
    };

    // documented in qpainter.cpp
    enum RasterOp { // raster op mode
	CopyROP,
	OrROP,
	XorROP,
	NotAndROP, EraseROP=NotAndROP,
	NotCopyROP,
	NotOrROP,
	NotXorROP,
	AndROP,	NotEraseROP=AndROP,
	NotROP,
	ClearROP,
	SetROP,
	NopROP,
	AndNotROP,
	OrNotROP,
	NandROP,
	NorROP,	LastROP=NorROP
    };

    // documented in qpainter.cpp
    enum PenStyle { // pen style
	NoPen,
	SolidLine,
	DashLine,
	DotLine,
	DashDotLine,
	DashDotDotLine,
	MPenStyle = 0x0f
    };

    // documented in qpainter.cpp
    enum PenCapStyle { // line endcap style
	FlatCap = 0x00,
	SquareCap = 0x10,
	RoundCap = 0x20,
	MPenCapStyle = 0x30
    };

    // documented in qpainter.cpp
    enum PenJoinStyle { // line join style
	MiterJoin = 0x00,
	BevelJoin = 0x40,
	RoundJoin = 0x80,
	MPenJoinStyle = 0xc0
    };

    // documented in qpainter.cpp
    enum BrushStyle { // brush style
	NoBrush,
	SolidPattern,
	Dense1Pattern,
	Dense2Pattern,
	Dense3Pattern,
	Dense4Pattern,
	Dense5Pattern,
	Dense6Pattern,
	Dense7Pattern,
	HorPattern,
	VerPattern,
	CrossPattern,
	BDiagPattern,
	FDiagPattern,
	DiagCrossPattern,
	CustomPattern=24
    };

    // documented in qapplication_mac.cpp
    enum MacintoshVersion {
	//Unknown
	MV_Unknown      = 0x0000,

	//Version numbers
	MV_9            = 0x0001,
	MV_10_DOT_0     = 0x0002,
	MV_10_DOT_1     = 0x0003,
	MV_10_DOT_2     = 0x0004,
	MV_10_DOT_3     = 0x0005,
	MV_10_DOT_4     = 0x0006,

	//Code names
	MV_CHEETAH      = MV_10_DOT_0,
	MV_PUMA         = MV_10_DOT_1,
	MV_JAGUAR       = MV_10_DOT_2,
	MV_PANTHER      = MV_10_DOT_3,
	MV_TIGER        = MV_10_DOT_4
    };

    // documented in qapplication_win.cpp
    enum WindowsVersion {
	WV_32s 		= 0x0001,
	WV_95 		= 0x0002,
	WV_98		= 0x0003,
	WV_Me		= 0x0004,
	WV_DOS_based	= 0x000f,

	WV_NT 		= 0x0010,
	WV_2000 	= 0x0020,
	WV_XP		= 0x0030,
	WV_2003		= 0x0040,
	WV_VISTA 	= 0x0080,
	WV_NT_based	= 0x00f0,

	WV_CE           = 0x0100,
	WV_CENET	= 0x0200,
	WV_CE_based	= 0x0f00
    };

    // documented in qstyle.cpp
    enum UIEffect {
	UI_General,
	UI_AnimateMenu,
	UI_FadeMenu,
	UI_AnimateCombo,
	UI_AnimateTooltip,
	UI_FadeTooltip,
	UI_AnimateToolBox
    };

    // documented in qcursor.cpp
    enum tqCursorShape {
	ArrowCursor,
	UpArrowCursor,
	CrossCursor,
	WaitCursor,
	IbeamCursor,
	SizeVerCursor,
	SizeHorCursor,
	SizeBDiagCursor,
	SizeFDiagCursor,
	SizeAllCursor,
	BlankCursor,
	SplitVCursor,
	SplitHCursor,
	PointingHandCursor,
	ForbiddenCursor,
	WhatsThisCursor,
	BusyCursor,
	LastCursor	= BusyCursor,
	BitmapCursor	= 24
    };

    // Global cursors
    TQT_STATIC_CONST TQCursor & arrowCursor;	// standard arrow cursor
    TQT_STATIC_CONST TQCursor & upArrowCursor;	// upwards arrow
    TQT_STATIC_CONST TQCursor & crossCursor;	// crosshair
    TQT_STATIC_CONST TQCursor & waitCursor;	// hourglass/watch
    TQT_STATIC_CONST TQCursor & ibeamCursor;	// ibeam/text entry
    TQT_STATIC_CONST TQCursor & sizeVerCursor;	// vertical resize
    TQT_STATIC_CONST TQCursor & sizeHorCursor;	// horizontal resize
    TQT_STATIC_CONST TQCursor & sizeBDiagCursor;	// diagonal resize (/)
    TQT_STATIC_CONST TQCursor & sizeFDiagCursor;	// diagonal resize (\)
    TQT_STATIC_CONST TQCursor & sizeAllCursor;	// all directions resize
    TQT_STATIC_CONST TQCursor & blankCursor;	// blank/invisible cursor
    TQT_STATIC_CONST TQCursor & splitVCursor;	// vertical bar with left-right
						// arrows
    TQT_STATIC_CONST TQCursor & splitHCursor;	// horizontal bar with up-down
						// arrows
    TQT_STATIC_CONST TQCursor & pointingHandCursor;	// pointing hand
    TQT_STATIC_CONST TQCursor & forbiddenCursor;	// forbidden cursor (slashed circle)
    TQT_STATIC_CONST TQCursor & whatsThisCursor;  // arrow with a question mark
    TQT_STATIC_CONST TQCursor & busyCursor;	// arrow with hourglass

    enum TextFormat {
	PlainText,
	RichText,
	AutoText,
	LogText
    };

    // Documented in qtextedit.cpp
    enum AnchorAttribute {
	AnchorName,
	AnchorHref
    };

    // Documented in qmainwindow.cpp
    enum Dock {
	DockUnmanaged,
	DockTornOff,
	DockTop,
	DockBottom,
	DockRight,
	DockLeft,
	DockMinimized
#ifndef TQT_NO_COMPAT
        ,
	Unmanaged = DockUnmanaged,
	TornOff = DockTornOff,
	Top = DockTop,
	Bottom = DockBottom,
	Right = DockRight,
	Left = DockLeft,
	Minimized = DockMinimized
#endif
    };
    // compatibility
    typedef Dock ToolBarDock;

#ifdef USE_QT4
    enum DateFormat_NewTypes {
	TextDate = Qt::TextDate,
	ISODate = Qt::ISODate,
	LocalDate = Qt::LocalDate
    };
//     typedef TQTInheritEnum< DateFormat_NewTypes, Qt::DateFormat > DateFormat;
    typedef int DateFormat_NewTypes;
#else // USE_QT4
    // documented in qdatetime.cpp
    enum DateFormat {
	TextDate,      // default TQt
	ISODate,       // ISO 8601
	LocalDate      // locale dependent
    };
#endif

    // documented in qdatetime.cpp
    enum TimeSpec {
	LocalTime,
	UTC
    };

    // documented in qwidget.cpp
    enum BackgroundMode {
	FixedColor,
	FixedPixmap,
	NoBackground,
	PaletteForeground,
	PaletteButton,
	PaletteLight,
	PaletteMidlight,
	PaletteDark,
	PaletteMid,
	PaletteText,
	PaletteBrightText,
	PaletteBase,
	PaletteBackground,
	PaletteShadow,
	PaletteHighlight,
	PaletteHighlightedText,
	PaletteButtonText,
	PaletteLink,
	PaletteLinkVisited,
	X11ParentRelative
    };

    typedef uint ComparisonFlags;

    // Documented in qstring.cpp
    enum StringComparisonMode {
        CaseSensitive   = 0x00001, // 0 0001
        BeginsWith      = 0x00002, // 0 0010
        EndsWith        = 0x00004, // 0 0100
        Contains        = 0x00008, // 0 1000
        ExactMatch      = 0x00010  // 1 0000
    };

    // Documented in qtabwidget.cpp
    enum Corner {
	TopLeft     = 0x00000,
	TopRight    = 0x00001,
	BottomLeft  = 0x00002,
	BottomRight = 0x00003
    };

    // "handle" type for system objects. Documented as \internal in
    // qapplication.cpp
#if defined(TQ_WS_MAC)
    typedef void * HANDLE;
#elif defined(TQ_WS_WIN)
    typedef void *HANDLE;
#elif defined(TQ_WS_X11)
    typedef unsigned long HANDLE;
#elif defined(TQ_WS_TQWS)
    typedef void * HANDLE;
#endif
};


class TQ_EXPORT TQInternal {
public:
    enum PaintDeviceFlags {
	UndefinedDevice = 0x00,
	Widget = 0x01,
	Pixmap = 0x02,
	Printer = 0x03,
	Picture = 0x04,
	System = 0x05,
	DeviceTypeMask = 0x0f,
	ExternalDevice = 0x10,
	// used to emulate some of the behaviour different between TQt2 and TQt3 (mainly for printing)
	CompatibilityMode = 0x20
    };
};

#endif // TQNAMESPACE_H
