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: ";
62 return existingProfile;
72 QMutexLocker l(&
d->mutex);
74 auto it =
d->availableColorspaces.find(profile->
name());
77 if (it ==
d->availableColorspaces.end()) {
79 KIS_ASSERT_X(cs !=
nullptr,
"KoColorSpaceFactory::grabColorSpace",
"createColorSpace returned nullptr.");
81 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()
QHash< QString, QString > CustomProfileNameAlias
QHash< KoColorSpace *, QString > stackInformation
const KoColorSpace * grabColorSpace(const KoColorProfile *profile)
const KoColorProfile * colorProfile(const QByteArray &rawData, ProfileRegistrationInterface *registrationInterface, const CustomProfileNameAlias &customProfileNameAlias) const
static KoColorSpaceRegistry * instance()
void removeProfile(KoColorProfile *profile)