We now have a current svn snapshot of libqxt in our contrib dir, and
[quassel.git] / src / contrib / libqxt-2007-10-24 / src / core / qxtnamespace.h
1 /****************************************************************************
2 **
3 ** Copyright (C) Qxt Foundation. Some rights reserved.
4 **
5 ** This file is part of the QxtCore module of the Qt eXTension library
6 **
7 ** This library is free software; you can redistribute it and/or modify it
8 ** under the terms of th Common Public License, version 1.0, as published by
9 ** IBM.
10 **
11 ** This file is provided "AS IS", without WARRANTIES OR CONDITIONS OF ANY
12 ** KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
13 ** WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR
14 ** FITNESS FOR A PARTICULAR PURPOSE.
15 **
16 ** You should have received a copy of the CPL along with this file.
17 ** See the LICENSE file and the cpl1.0.txt file included with the source
18 ** distribution for more information. If you did not receive a copy of the
19 ** license, contact the Qxt Foundation.
20 **
21 ** <http://libqxt.sourceforge.net>  <foundation@libqxt.org>
22 **
23 ****************************************************************************/
24
25 #ifndef QXTNAMSPACE_GUARD_H
26 #define QXTNAMSPACE_GUARD_H
27
28 #include <qxtglobal.h>
29
30
31 /**
32     \namespace Qxt
33     \ingroup QxtCore
34     \brief The Qxt Namespace
35
36     The Qxt Namespace
37
38 */
39
40
41 #if defined BUILD_QXT | defined Q_MOC_RUN
42 #include <QObject>
43
44 class QXT_CORE_EXPORT Qxt  : public QObject
45 {
46     Q_OBJECT
47     Q_ENUMS(Rotation)
48     Q_ENUMS(DecorationStyle)
49     Q_ENUMS(ErrorCode)
50
51
52 public:
53 #else
54 namespace Qxt
55 {
56 #endif
57
58
59
60
61     /*!
62     \enum Qxt::Rotation
63     This enum describes the rotation.
64     */
65     enum Rotation
66     {
67         NoRotation              = 0,            /*!< No rotation. */
68         UpsideDown              = 180,          /*!< Upside down (180 degrees). */
69         Clockwise               = 90,           /*!< Clockwise (90 degrees). */
70         CounterClockwise        = 270           /*!< CounterClockwise (-90 degrees).  */
71     };
72
73     /*!
74     \enum Qxt::DecorationStyle
75
76     This enum describes the decoration style.
77     */
78
79     enum DecorationStyle
80     {
81         NoDecoration,                           /*!< No decoration */
82         Buttonlike,                             /*!< A style like in Qt Designer's Widget Box. */
83         Menulike                                /*!< A menu alike style. */
84     };
85
86
87     /*!
88     \enum Qxt::ErrorCode
89     The error Code dropped by QxtError
90     */
91     enum ErrorCode
92     {
93         NoError,                                /*!< everything fine  */
94         UnknownError,                           /*!< a not defined error */
95         LogicalError,                           /*!< something happened that makes no sense (e.g. you tryed to compare apples and bananas) */
96         Bug,                                    /*!< that should not happen. please report any ocurence of it. */
97         UnexpectedEndOfFunction,                /*!< suddenly the function returned where it should not. please report this behaiviour */
98         NotImplemented,                         /*!< the feature you requested has not been implemented for this situation. this could also mean you are trying to compare apples and bananas. */
99         CodecError,                             /*!< Something went wrong with some codec. Please check if your codec is supported */
100         NotInitialised,                         /*!< Somone tryed to call a function of an object that needs to be start() ed  or something like it. */
101         EndOfFile,                              /*!< The end of the Input has been reached. There is no more data. */
102         FileIOError,                            /*!< File Input/Output Error*/
103         FormatError,                            /*!< The Format of the input is corupted or not supported. */   //10
104         DeviceError,                            /*!< The Device of the Computer reported failure or we are not able to comunicate with it.*/
105         SDLError,                               /*!< SDL reported an error */
106         InsufficientMemory,                     /*!< Not enough memory to perform the action. */
107         SeeErrorString,                         /*!< The Error has no definition here, but the Error String should tell you more. This is mostly used for third party errors. */
108         UnexpectedNullParameter,                /*!< NULL was passed where it shouldn't. */
109         ClientTimeout,                          /*!< The Client didn't answer within the expected time rang. */
110         SocketIOError,                          /*!< Socket Input/Output Error*/
111         ParserError,                            /*!< Unable to parse the requested string or file.*/
112         HeaderTooLong,                          /*!< The Header that was passed for parsing was too long.*/
113         Auth,                                   /*!< Authentification failed.*/
114         Overflow                                /*!< Overflow protection triggered.*/
115
116     };
117
118 };
119
120 #endif
121