12#include <QMutexLocker>
38 count +=
d->availableColorspaces.size();
40 for(QHash<KoColorSpace*, QString>::const_iterator it =
d->stackInformation.constBegin();
41 it !=
d->stackInformation.constEnd(); ++it)
43 errorPigment <<
"*******************************************";
44 errorPigment << it.key()->id() <<
" still in used, and grabbed in: ";
61 return existingProfile;
71 QMutexLocker l(&
d->mutex);
73 auto it =
d->availableColorspaces.find(profile->
name());
76 if (it ==
d->availableColorspaces.end()) {
78 KIS_ASSERT_X(cs !=
nullptr,
"KoColorSpaceFactory::grabColorSpace",
"createColorSpace returned nullptr.");
80 d->availableColorspaces[profile->
name()] = cs;
#define KIS_ASSERT_X(cond, where, what)
virtual bool valid() const =0
virtual void registerNewProfile(KoColorProfile *profile)=0
virtual const KoColorProfile * profileByName(const QString &profileName) const =0
virtual KoColorSpace * createColorSpace(const KoColorProfile *) const =0
QHash< QString, KoColorSpace * > availableColorspaces
virtual KoColorProfile * createColorProfile(const QByteArray &rawData) const =0
QList< KoColorProfile * > colorprofiles
virtual ~KoColorSpaceFactory()
const KoColorProfile * colorProfile(const QByteArray &rawData, ProfileRegistrationInterface *registrationInterface) const
QHash< KoColorSpace *, QString > stackInformation
const KoColorSpace * grabColorSpace(const KoColorProfile *profile)
static KoColorSpaceRegistry * instance()
void removeProfile(KoColorProfile *profile)