7#ifndef KOCHANNELINFO_H_
8#define KOCHANNELINFO_H_
78 const QColor &
color = QColor(0, 0, 0),
120 if (!uiMinMax.isValid()) {
158 for (
int i = 0; i < channels.size(); ++i) {
168 QList <KoChannelInfo*> sortedChannels;
169 for (
int i = 0; i < channels.size(); ++i) {
172 sortedChannels << channel;
177 Q_ASSERT(channels.size() == sortedChannels.size());
178 return sortedChannels;
191 inline qint32
pos()
const {
enumChannelType
enum to define the type of the channel
@ ALPHA
The channel represents the opacity of a pixel.
@ COLOR
The channel represents a color.
bool operator<(const KoChannelInfo &info)
enumChannelValueType
enum to define the value of the channel
@ UINT8
use this for an unsigned integer 8bits channel
@ UINT16
use this for an integer 16bits channel
@ OTHER
Use this if the channel is neither an integer or a float.
@ INT16
use this for an integer 16bits channel
@ INT8
use this for an integer 8bits channel
@ FLOAT32
use this for a float 32bits channel
@ FLOAT16
use this for a float 16bits channel
@ UINT32
use this for an unsigned integer 21bits channel
@ FLOAT64
use this for a float 64bits channel
enumChannelType channelType() const
KoChannelInfo(const QString &name, qint32 npos, qint32 displayPosition, enumChannelType channelType, enumChannelValueType channelValueType, qint32 size=-1, const QColor &color=QColor(0, 0, 0), const DoubleRange &uiMinMax=DoubleRange())
static int displayPositionToChannelIndex(int displayPosition, const QList< KoChannelInfo * > &channels)
enumChannelType m_channelType
enumChannelValueType channelValueType() const
double getUIUnitValue(void) const
getUIUnitValue Gets the unit value for this channel. This is suitable for converting between represen...
static QList< KoChannelInfo * > displayOrderSorted(const QList< KoChannelInfo * > &channels)
double getUIMin(void) const
enumChannelValueType m_channelValueType
qint32 displayPosition() const
double getUIMax(void) const
DoubleRange(void)
creates an invalid range of 0,0
DoubleRange(qreal _minVal, qreal _maxVal)
creates
bool isValid(void) const
true if this range is usable