Commit 30232dc7 authored by Cyrille Berger's avatar Cyrille Berger

add a category field to composite ops

svn path=/trunk/koffice/; revision=709551
parent 0ae0b798
......@@ -26,6 +26,7 @@ struct KoCompositeOp::Private {
KoColorSpace * colorSpace;
QString id;
QString description;
QString category;
bool userVisible;
QBitArray defaultChannelFlags;
};
......@@ -36,13 +37,14 @@ KoCompositeOp::KoCompositeOp() : d(new Private)
}
KoCompositeOp::KoCompositeOp(KoColorSpace * cs, const QString& id, const QString& description, const bool userVisible)
KoCompositeOp::KoCompositeOp(KoColorSpace * cs, const QString& id, const QString& description, QString category, const bool userVisible)
: d(new Private)
{
d->colorSpace = cs;
d->id = id;
d->description = description;
d->userVisible = userVisible;
d->category = category;
}
void KoCompositeOp::composite(quint8 *dstRowStart, qint32 dstRowStride,
......@@ -58,6 +60,11 @@ void KoCompositeOp::composite(quint8 *dstRowStart, qint32 dstRowStride,
opacity, d->defaultChannelFlags);
}
QString KoCompositeOp::category() const
{
return d->category;
}
KoColorSpace* KoCompositeOp::colorSpace()
{
return d->colorSpace;
......
......@@ -69,13 +69,15 @@ const QString COMPOSITE_COPY_OPACITY = "copy_opacity";
class PIGMENT_EXPORT KoCompositeOp {
public:
KoCompositeOp(KoColorSpace * cs, const QString& id, const QString& description, const bool userVisible = true);
KoCompositeOp(KoColorSpace * cs, const QString& id, const QString& description, QString category = "", const bool userVisible = true);
virtual ~KoCompositeOp() {}
QString id() const;
QString description() const;
KoColorSpace * colorSpace() const;
bool userVisible() const;
QString category() const;
/**
@param dstRowStart pointer to the start of the byte array we will composite the source on
@param dstRowStride length of the rows of the block of destination pixels in bytes
......
......@@ -44,7 +44,7 @@
KoRgbU8CompositeOp::KoRgbU8CompositeOp(KoColorSpace * cs, const QString& id, const QString& description, const bool userVisible)
: KoCompositeOp(cs, id, description, userVisible)
: KoCompositeOp(cs, id, description, "", userVisible)
{
m_pixelSize = cs->pixelSize();
}
......
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