File indexing completed on 2024-05-12 15:27:41

0001 
0002 /****************************************************************************
0003 ** Copyright (c) 2006 - 2011, the LibQxt project.
0004 ** See the Qxt AUTHORS file for a list of authors and copyright holders.
0005 ** All rights reserved.
0006 **
0007 ** Redistribution and use in source and binary forms, with or without
0008 ** modification, are permitted provided that the following conditions are met:
0009 **     * Redistributions of source code must retain the above copyright
0010 **       notice, this list of conditions and the following disclaimer.
0011 **     * Redistributions in binary form must reproduce the above copyright
0012 **       notice, this list of conditions and the following disclaimer in the
0013 **       documentation and/or other materials provided with the distribution.
0014 **     * Neither the name of the LibQxt project nor the
0015 **       names of its contributors may be used to endorse or promote products
0016 **       derived from this software without specific prior written permission.
0017 **
0018 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
0019 ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
0020 ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
0021 ** DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
0022 ** DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
0023 ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
0024 ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
0025 ** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0026 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
0027 ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0028 **
0029 ** <http://libqxt.org>  <foundation@libqxt.org>
0030 *****************************************************************************/
0031 
0032 #ifndef QXTNAMESPACE_H
0033 #define QXTNAMESPACE_H
0034 
0035 #include "qxtglobal.h"
0036 
0037 #if (defined BUILD_QXT | defined Q_MOC_RUN) && !defined(QXT_DOXYGEN_RUN)
0038 #include <QObject>
0039 
0040 class QXT_CORE_EXPORT Qxt  : public QObject {
0041     Q_OBJECT
0042     Q_ENUMS(Rotation)
0043     Q_ENUMS(DecorationStyle)
0044     Q_ENUMS(ErrorCode)
0045 
0046 public:
0047 #else
0048 namespace Qxt {
0049 #endif
0050     enum Rotation {
0051         NoRotation  = 0,
0052         UpsideDown  = 180,
0053         Clockwise  = 90,
0054         CounterClockwise = 270
0055     };
0056 
0057     enum DecorationStyle {
0058         NoDecoration,
0059         Buttonlike,
0060         Menulike
0061     };
0062 
0063     enum ErrorCode {
0064         NoError,
0065         UnknownError,
0066         LogicalError,
0067         Bug,
0068         UnexpectedEndOfFunction,
0069         NotImplemented,
0070         CodecError,
0071         NotInitialised,
0072         EndOfFile,
0073         FileIOError,
0074         FormatError,
0075         DeviceError,
0076         SDLError,
0077         InsufficientMemory,
0078         SeeErrorString,
0079         UnexpectedNullParameter,
0080         ClientTimeout,
0081         SocketIOError,
0082         ParserError,
0083         HeaderTooLong,
0084         Auth,
0085         Overflow
0086     };
0087 
0088     enum QxtItemDataRole {
0089         ItemStartTimeRole  = Qt::UserRole + 1,
0090         ItemDurationRole   = ItemStartTimeRole + 1,
0091         UserRole           = ItemDurationRole + 23
0092     };
0093 
0094     enum Timeunit {
0095         Second,
0096         Minute,
0097         Hour,
0098         Day,
0099         Week,
0100         Month,
0101         Year
0102     };
0103 };
0104 
0105 #endif // QXTNAMESPACE_H