F:/KPlato/koffice/libs/pigment/KoChannelInfo.h

Aller à la documentation de ce fichier.
00001 /*
00002  *  Copyright (c) 2004 Boudewijn Rempt <boud@valdyas.org>
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Library General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Library General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Library General Public License
00015  * along with this library; see the file COPYING.LIB.  If not, write to
00016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 #ifndef KIS_CHANNELINFO_H_
00020 #define KIS_CHANNELINFO_H_
00021 
00022 #include <QColor>
00023 #include "qstring.h"
00024 #include "ksharedptr.h"
00025 
00031 class KoChannelInfo : public KShared {
00032 public:
00034     enum enumChannelType {
00035         COLOR, 
00036         ALPHA, 
00037         SUBSTANCE, 
00038         SUBSTRATE 
00039     };
00041     enum enumChannelValueType {
00042         UINT8,
00043         UINT16,
00044         UINT32,
00045         FLOAT16,
00046         FLOAT32,
00047         INT8,
00048         INT16,
00049         OTHER 
00050     };
00051     enum enumChannelFlags {
00052         FLAG_COLOR = 1,
00053         FLAG_ALPHA = (1 << 1),
00054         FLAG_SUBSTANCE = (1 << 2),
00055         FLAG_SUBSTRATE = (1 << 3)
00056     };
00057 
00058 public:
00059     KoChannelInfo() { };
00060     KoChannelInfo( const QString & name, qint32 npos, enumChannelType channelType, enumChannelValueType channelValueType, qint32 size = 1, QColor color = QColor(0,0,0))
00061     : m_name (name), m_pos (npos), m_channelType(channelType), m_channelValueType(channelValueType), m_size(size), m_color(color) { };
00062 public:
00066     inline QString name() const { return m_name; };
00067     
00071     inline qint32 pos() const { return m_pos; };
00072     
00076     inline qint32 size() const { return m_size; };
00077 
00081     inline enumChannelType channelType() const { return m_channelType; };
00085     inline enumChannelValueType channelValueType() const { return m_channelValueType; };
00090     inline QColor color() const { return m_color; }
00091 
00092 private:
00093 
00094     QString m_name;
00095     qint32 m_pos;
00096     enumChannelType m_channelType;
00097     enumChannelValueType m_channelValueType;
00098     qint32 m_size;
00099     QColor m_color;
00100 
00101 };
00102 
00103 #endif // KIS_CHANNELINFO_H_

Généré le Wed Nov 22 23:41:13 2006 pour KPlato par  doxygen 1.5.1-p1