Commit ef4db147 authored by Thomas Zander's avatar Thomas Zander

More renames

svn path=/trunk/koffice/; revision=607949
parent 2db3d160
......@@ -169,7 +169,7 @@ Q3ValueVector<KoChannelInfo *> KisLmsF32ColorSpace::channels() const
return m_channels;
}
quint32 KisLmsF32ColorSpace::nChannels() const
quint32 KisLmsF32ColorSpace::channelCount() const
{
return MAX_CHANNEL_LMSA;
}
......
......@@ -60,7 +60,7 @@ public:
virtual void mixColors(const quint8 **colors, const quint8 *weights, quint32 nColors, quint8 *dst) const;
virtual Q3ValueVector<KoChannelInfo *> channels() const;
virtual quint32 nChannels() const;
virtual quint32 channelCount() const;
virtual quint32 nColorChannels() const;
virtual quint32 pixelSize() const;
......
......@@ -231,7 +231,7 @@ Q3ValueVector<KoChannelInfo *> KisRgbF16HalfColorSpace::channels() const
return m_channels;
}
quint32 KisRgbF16HalfColorSpace::nChannels() const
quint32 KisRgbF16HalfColorSpace::channelCount() const
{
return MAX_CHANNEL_RGBA;
}
......
......@@ -62,7 +62,7 @@ public:
virtual quint8 intensity8(const quint8 * src) const;
virtual Q3ValueVector<KoChannelInfo *> channels() const;
virtual quint32 nChannels() const;
virtual quint32 channelCount() const;
virtual quint32 nColorChannels() const;
virtual quint32 pixelSize() const;
......
......@@ -75,7 +75,7 @@ void KisRgbF16HalfColorSpaceTester::testBasics()
KisAbstractColorSpace * csSP = cs;
CHECK(cs->hasAlpha(), true);
CHECK(cs->nChannels(), NUM_CHANNELS);
CHECK(cs->channelCount(), NUM_CHANNELS);
CHECK(cs->nColorChannels(), NUM_COLOUR_CHANNELS);
CHECK(cs->pixelSize(), NUM_CHANNELS * CHANNEL_SIZE);
......
......@@ -230,7 +230,7 @@ Q3ValueVector<KoChannelInfo *> KisRgbF32ColorSpace::channels() const
return m_channels;
}
quint32 KisRgbF32ColorSpace::nChannels() const
quint32 KisRgbF32ColorSpace::channelCount() const
{
return MAX_CHANNEL_RGBA;
}
......
......@@ -72,7 +72,7 @@ public:
virtual quint8 intensity8(const quint8 * src) const;
virtual Q3ValueVector<KoChannelInfo *> channels() const;
virtual quint32 nChannels() const;
virtual quint32 channelCount() const;
virtual quint32 nColorChannels() const;
virtual quint32 pixelSize() const;
......
......@@ -70,7 +70,7 @@ void KisRgbF32ColorSpaceTester::testBasics()
KisAbstractColorSpace * csSP = cs;
CHECK(cs->hasAlpha(), true);
CHECK(cs->nChannels(), NUM_CHANNELS);
CHECK(cs->channelCount(), NUM_CHANNELS);
CHECK(cs->nColorChannels(), NUM_COLOUR_CHANNELS);
CHECK(cs->pixelSize(), NUM_CHANNELS * CHANNEL_SIZE);
......
......@@ -280,7 +280,7 @@ Q3ValueVector<KoChannelInfo *> KisWetColorSpace::channels() const
return m_channels;
}
quint32 KisWetColorSpace::nChannels() const
quint32 KisWetColorSpace::channelCount() const
{
return 16;
}
......@@ -500,7 +500,7 @@ KoCompositeOpList KisWetColorSpace::userVisiblecompositeOps() const
QString KisWetColorSpace::channelValueText(const quint8 *U8_pixel, quint32 channelIndex) const
{
Q_ASSERT(channelIndex < nChannels());
Q_ASSERT(channelIndex < channelCount());
const quint16 *pixel = reinterpret_cast<const quint16 *>(U8_pixel);
quint32 channelPosition = m_channels[channelIndex]->pos();
......@@ -509,7 +509,7 @@ QString KisWetColorSpace::channelValueText(const quint8 *U8_pixel, quint32 chann
QString KisWetColorSpace::normalisedChannelValueText(const quint8 *U8_pixel, quint32 channelIndex) const
{
Q_ASSERT(channelIndex < nChannels());
Q_ASSERT(channelIndex < channelCount());
const quint16 *pixel = reinterpret_cast<const quint16 *>(U8_pixel);
quint32 channelPosition = m_channels[channelIndex]->pos();
......
......@@ -128,7 +128,7 @@ public:
virtual void mixColors(const quint8 **colors, const quint8 *weights, quint32 nColors, quint8 *dst) const;
virtual Q3ValueVector<KoChannelInfo *> channels() const;
virtual quint32 nChannels() const;
virtual quint32 channelCount() const;
virtual quint32 nColorChannels() const;
virtual quint32 nSubstanceChannels() const;
virtual quint32 pixelSize() const;
......
......@@ -270,7 +270,7 @@ bool KisWetStickyColorSpace::hasAlpha() const
return true;
}
qint32 KisWetStickyColorSpace::nChannels() const
qint32 KisWetStickyColorSpace::channelCount() const
{
return 14;
}
......@@ -495,7 +495,7 @@ KoCompositeOpList KisWetStickyColorSpace::userVisiblecompositeOps() const
QString KisWetStickyColorSpace::channelValueText(const quint8 *U8_pixel, quint32 channelIndex) const
{
Q_ASSERT(channelIndex < nChannels());
Q_ASSERT(channelIndex < channelCount());
const CELL *pixel = reinterpret_cast<const CELL *>(U8_pixel);
switch (channelIndex) {
......@@ -549,7 +549,7 @@ QString KisWetStickyColorSpace::channelValueText(const quint8 *U8_pixel, quint32
QString KisWetStickyColorSpace::normalisedChannelValueText(const quint8 *U8_pixel, quint32 channelIndex) const
{
Q_ASSERT(channelIndex < nChannels());
Q_ASSERT(channelIndex < channelCount());
const CELL *pixel = reinterpret_cast<const CELL *>(U8_pixel);
//XXX: Are these right?
......
......@@ -96,7 +96,7 @@ public:
virtual Q3ValueVector<KoChannelInfo *> channels() const;
virtual bool hasAlpha() const;
virtual qint32 nChannels() const;
virtual qint32 channelCount() const;
virtual qint32 nColorChannels() const;
virtual qint32 nSubstanceChannels() const;
virtual qint32 pixelSize() const;
......
......@@ -64,7 +64,7 @@ Q3ValueVector<KoChannelInfo *> KisXyzColorSpace::channels() const
return m_channels;
}
quint32 KisXyzColorSpace::nChannels() const
quint32 KisXyzColorSpace::channelCount() const
{
return xyz::MAX_CHANNEL_XYZA;
}
......
......@@ -65,7 +65,7 @@ public:
// Information about the colorstrategy
virtual Q3ValueVector<KoChannelInfo *> channels() const;
virtual quint32 nChannels() const;
virtual quint32 channelCount() const;
virtual quint32 nColorChannels() const;
virtual quint32 pixelSize() const;
......
......@@ -164,7 +164,7 @@ QValueVector<KoChannelInfo *> KisYCbCrU16ColorSpace::channels() const {
return m_channels;
}
Q_UINT32 KisYCbCrU16ColorSpace::nChannels() const {
Q_UINT32 KisYCbCrU16ColorSpace::channelCount() const {
return MAX_CHANNEL_YCbCrA;
}
......
......@@ -51,7 +51,7 @@ class KisYCbCrU16ColorSpace : public KoU16ColorSpaceTrait
virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const;
virtual QValueVector<KoChannelInfo *> channels() const;
virtual Q_UINT32 nChannels() const;
virtual Q_UINT32 channelCount() const;
virtual Q_UINT32 nColorChannels() const;
virtual Q_UINT32 pixelSize() const;
......
......@@ -164,7 +164,7 @@ QValueVector<KoChannelInfo *> KisYCbCrU8ColorSpace::channels() const {
return m_channels;
}
Q_UINT32 KisYCbCrU8ColorSpace::nChannels() const {
Q_UINT32 KisYCbCrU8ColorSpace::channelCount() const {
return MAX_CHANNEL_YCbCrA;
}
......
......@@ -51,7 +51,7 @@ class KisYCbCrU8ColorSpace : public KoU8ColorSpaceTrait
virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const;
virtual QValueVector<KoChannelInfo *> channels() const;
virtual Q_UINT32 nChannels() const;
virtual Q_UINT32 channelCount() const;
virtual Q_UINT32 nColorChannels() const;
virtual Q_UINT32 pixelSize() const;
......
......@@ -213,7 +213,7 @@ KisPaintDevice::KisPaintDevice(KoColorSpace * colorSpace, const QString& name) :
m_y = 0;
m_pixelSize = colorSpace->pixelSize();
m_nChannels = colorSpace->nChannels();
m_nChannels = colorSpace->channelCount();
quint8* defPixel = new quint8 [ m_pixelSize ];
colorSpace->fromQColor(Qt::black, OPACITY_TRANSPARENT, defPixel);
......@@ -258,7 +258,7 @@ KisPaintDevice::KisPaintDevice(KisLayer *parent, KoColorSpace * colorSpace, cons
}
m_pixelSize = m_colorSpace->pixelSize();
m_nChannels = m_colorSpace->nChannels();
m_nChannels = m_colorSpace->channelCount();
quint8* defPixel = new quint8[ m_pixelSize ];
colorSpace->fromQColor(Qt::black, OPACITY_TRANSPARENT, defPixel);
......@@ -676,7 +676,7 @@ void KisPaintDevice::setData(KisDataManagerSP data, KoColorSpace * colorSpace)
m_datamanager = data;
m_colorSpace = colorSpace;
m_pixelSize = m_colorSpace->pixelSize();
m_nChannels = m_colorSpace->nChannels();
m_nChannels = m_colorSpace->channelCount();
if (m_parentLayer) {
m_parentLayer->setDirty(extent());
......
......@@ -376,7 +376,7 @@ public:
/**
* Return the number of channels a pixel takes
*/
virtual qint32 nChannels() const;
virtual qint32 channelCount() const;
/**
* Return the image that contains this paint device, or 0 if it is not
......@@ -597,7 +597,7 @@ inline qint32 KisPaintDevice::pixelSize() const
return m_pixelSize;
}
inline qint32 KisPaintDevice::nChannels() const
inline qint32 KisPaintDevice::channelCount() const
{
Q_ASSERT(m_nChannels > 0);
return m_nChannels;
......
......@@ -82,7 +82,7 @@ void KisChannelSeparator::separate(KisProgressDisplayInterface * progress, enumS
KoColorSpace * dstCs = 0;
quint32 numberOfChannels = src->nChannels();
quint32 numberOfChannels = src->channelCount();
KoColorSpace * srcCs = src->colorSpace();
Q3ValueVector<KoChannelInfo *> channels = srcCs->channels();
......
......@@ -74,7 +74,7 @@ void KisSeparateChannelsPlugin::slotSeparate()
dlgSeparate->setCaption(i18n("Separate Image"));
// If we're 8-bits, disable the downscale option
if (dev->pixelSize() == dev->nChannels()) {
if (dev->pixelSize() == dev->channelCount()) {
dlgSeparate->enableDownscale(false);
}
......
......@@ -92,7 +92,7 @@ void KoBasicHistogramProducer::makeExternalToInternal() {
// ------------ U8 ---------------------
KoBasicU8HistogramProducer::KoBasicU8HistogramProducer(const KoID& id, KoColorSpace *cs)
: KoBasicHistogramProducer(id, cs->nChannels(), 256, cs)
: KoBasicHistogramProducer(id, cs->channelCount(), 256, cs)
{
}
......@@ -140,7 +140,7 @@ void KoBasicU8HistogramProducer::addRegionToBin(const quint8 * pixels, const qui
// ------------ U16 ---------------------
KoBasicU16HistogramProducer::KoBasicU16HistogramProducer(const KoID& id, KoColorSpace *cs)
: KoBasicHistogramProducer(id, cs->nChannels(), 256, cs)
: KoBasicHistogramProducer(id, cs->channelCount(), 256, cs)
{
}
......@@ -209,7 +209,7 @@ void KoBasicU16HistogramProducer::addRegionToBin(const quint8 * pixels, const qu
// ------------ Float32 ---------------------
KoBasicF32HistogramProducer::KoBasicF32HistogramProducer(const KoID& id, KoColorSpace *cs)
: KoBasicHistogramProducer(id, cs->nChannels(), 256, cs)
: KoBasicHistogramProducer(id, cs->channelCount(), 256, cs)
{
}
......@@ -282,7 +282,7 @@ void KoBasicF32HistogramProducer::addRegionToBin(const quint8 * pixels, const qu
// ------------ Float16 Half ---------------------
KoBasicF16HalfHistogramProducer::KoBasicF16HalfHistogramProducer(const KoID& id,
KoColorSpace *cs)
: KoBasicHistogramProducer(id, cs->nChannels(), 256, cs) {
: KoBasicHistogramProducer(id, cs->channelCount(), 256, cs) {
}
QString KoBasicF16HalfHistogramProducer::positionToString(double pos) const {
......
......@@ -116,7 +116,7 @@ public:
/**
* The total number of channels for a single pixel in this color model
*/
virtual quint32 nChannels() const = 0;
virtual quint32 channelCount() const = 0;
/**
* The total number of color channels (excludes alpha and substance) for a single
......
......@@ -95,7 +95,7 @@ class KoColorSpaceAbstract : public KoColorSpace {
};
virtual quint32 nColorChannels() const { return _CSTraits::channels_nb - 1; }
virtual quint32 nChannels() const { return _CSTraits::channels_nb; };
virtual quint32 channelCount() const { return _CSTraits::channels_nb; };
virtual quint32 pixelSize() const { return _CSTraits::channels_nb * sizeof(typename _CSTraits::channels_type); }
virtual QString channelValueText(const quint8 *pixel, quint32 channelIndex) const
......
......@@ -43,7 +43,7 @@ void KoCompositeOp::composite(quint8 *dstRowStart, qint32 dstRowStride,
quint8 opacity) const
{
if (m_defaultChannelFlags.isNull() || m_defaultChannelFlags.isEmpty()) {
m_defaultChannelFlags.fill( true, m_colorSpace->nChannels() );
m_defaultChannelFlags.fill( true, m_colorSpace->channelCount() );
}
composite( dstRowStart, dstRowStride,
......
......@@ -95,7 +95,7 @@ void KoF16HalfColorSpaceTrait::applyInverseAlphaU8Mask(quint8 * U8_pixels, quint
QString KoF16HalfColorSpaceTrait::channelValueText(const quint8 *U8_pixel, quint32 channelIndex) const
{
Q_ASSERT(channelIndex < (quint32)nChannels());
Q_ASSERT(channelIndex < (quint32)channelCount());
const half *pixel = reinterpret_cast<const half *>(U8_pixel);
quint32 channelPosition = channels()[channelIndex] -> pos() / sizeof(half);
......@@ -104,7 +104,7 @@ QString KoF16HalfColorSpaceTrait::channelValueText(const quint8 *U8_pixel, quint
QString KoF16HalfColorSpaceTrait::normalisedChannelValueText(const quint8 *U8_pixel, quint32 channelIndex) const
{
Q_ASSERT(channelIndex < (quint32)nChannels());
Q_ASSERT(channelIndex < (quint32)channelCount());
const half *pixel = reinterpret_cast<const half *>(U8_pixel);
quint32 channelPosition = channels()[channelIndex] -> pos() / sizeof(half);
......
......@@ -95,7 +95,7 @@ void KoF32ColorSpaceTrait::applyInverseAlphaU8Mask(quint8 * U8_pixels, quint8 *
QString KoF32ColorSpaceTrait::channelValueText(const quint8 *U8_pixel, quint32 channelIndex) const
{
Q_ASSERT(channelIndex < (quint32)nChannels());
Q_ASSERT(channelIndex < (quint32)channelCount());
const float *pixel = reinterpret_cast<const float *>(U8_pixel);
quint32 channelPosition = channels()[channelIndex]->pos() / sizeof(float);
......@@ -104,7 +104,7 @@ QString KoF32ColorSpaceTrait::channelValueText(const quint8 *U8_pixel, quint32 c
QString KoF32ColorSpaceTrait::normalisedChannelValueText(const quint8 *U8_pixel, quint32 channelIndex) const
{
Q_ASSERT(channelIndex < (quint32)nChannels());
Q_ASSERT(channelIndex < (quint32)channelCount());
const float *pixel = reinterpret_cast<const float *>(U8_pixel);
quint32 channelPosition = channels()[channelIndex]->pos() / sizeof(float);
......
......@@ -354,7 +354,7 @@ bool KoAlphaColorSpace::convertPixelsTo(const quint8 *src,
QString KoAlphaColorSpace::channelValueText(const quint8 *pixel, quint32 channelIndex) const
{
Q_ASSERT(channelIndex < nChannels());
Q_ASSERT(channelIndex < channelCount());
quint32 channelPosition = m_channels[channelIndex]->pos();
return QString().setNum(pixel[channelPosition]);
......@@ -362,7 +362,7 @@ QString KoAlphaColorSpace::channelValueText(const quint8 *pixel, quint32 channel
QString KoAlphaColorSpace::normalisedChannelValueText(const quint8 *pixel, quint32 channelIndex) const
{
Q_ASSERT(channelIndex < nChannels());
Q_ASSERT(channelIndex < channelCount());
quint32 channelPosition = m_channels[channelIndex]->pos();
return QString().setNum(static_cast<float>(pixel[channelPosition]) / UINT8_MAX);
......
......@@ -49,7 +49,7 @@ bool KoLabColorSpace::willDegrade(ColorSpaceIndependence independence) const
QString KoLabColorSpace::normalisedChannelValueText(const quint8 *pixel, quint32 channelIndex) const
{
const LabU16Traits::channels_type *pix = reinterpret_cast<const LabU16Traits::channels_type *>(pixel);
Q_ASSERT(channelIndex < nChannels());
Q_ASSERT(channelIndex < channelCount());
// These convert from lcms encoded format to standard ranges.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment