KoColorSpaceEngine.cpp 1.9 KB
Newer Older
1 2 3 4 5 6
/*
 *  Copyright (c) 2008 Cyrille Berger <cberger@cberger.net>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
7
 * version 2.1 of the License, or (at your option) any later version.
8 9 10 11 12 13 14 15 16 17 18 19 20
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#include <KoColorSpaceEngine.h>
21
#include <QGlobalStatic>
22 23
#include <QString>

24

Boudewijn Rempt's avatar
Boudewijn Rempt committed
25
Q_GLOBAL_STATIC(KoColorSpaceEngineRegistry, s_instance)
26

27
struct Q_DECL_HIDDEN KoColorSpaceEngine::Private {
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
    QString id;
    QString name;
};

KoColorSpaceEngine::KoColorSpaceEngine(const QString& id, const QString& name) : d(new Private)
{
    d->id = id;
    d->name = name;
}

KoColorSpaceEngine::~KoColorSpaceEngine()
{
    delete d;
}

const QString& KoColorSpaceEngine::id() const
{
    return d->id;
}

const QString& KoColorSpaceEngine::name() const
{
    return d->name;
}

53 54 55 56 57 58 59 60 61
bool KoColorSpaceEngine::supportsColorSpace(const QString &colorModelId, const QString &colorDepthId, const KoColorProfile *profile) const
{
    Q_UNUSED(colorModelId);
    Q_UNUSED(colorDepthId);
    Q_UNUSED(profile);

    return true;
}

Boudewijn Rempt's avatar
Boudewijn Rempt committed
62
KoColorSpaceEngineRegistry::KoColorSpaceEngineRegistry()
63 64 65 66 67
{
}

KoColorSpaceEngineRegistry::~KoColorSpaceEngineRegistry()
{
68
    Q_FOREACH (KoColorSpaceEngine* item, values()) {
69 70
        delete item;
    }
71 72 73 74
}

KoColorSpaceEngineRegistry* KoColorSpaceEngineRegistry::instance()
{
Boudewijn Rempt's avatar
Boudewijn Rempt committed
75
    return s_instance;
76
}