foreach(KoID depthId, KoColorSpaceRegistry::instance()->colorDepthList(modelId, KoColorSpaceRegistry::AllColorSpaces)) {
     QList< const KoColorProfile * > profiles =
         KoColorSpaceRegistry::instance()->profilesFor(
             KoColorSpaceRegistry::instance()->colorSpaceId(modelId, depthId));
     foreach(const KoColorProfile * profile, profiles) {
         listModels.append(ModelDepthProfile(modelId.id(), depthId.id(), profile->name()));
     }
Esempio n. 2
0
void KisCompositeOpOption::changeCompositeOp(const KoID& compositeOp)
{
    if (compositeOp.id() == m_currCompositeOpID)
        return;

    m_currCompositeOpID = compositeOp.id();

    if (m_createConfigWidget) {
        m_label->setText(compositeOp.name());
    }

    emitSettingChanged();
}
Esempio n. 3
0
const KisPainterlyOverlayColorSpace * KisPainterlyOverlayColorSpace::instance()
{
    if (!Private::s_instance) {
        Private::s_instance = new KisPainterlyOverlayColorSpace(painterlyOverlayColorModelID.id(), painterlyOverlayColorModelID.name());
    }
    return Private::s_instance;
}
Esempio n. 4
0
void KisFilterOption::setCurrentFilter(const KoID& id)
{
    m_currentFilter = KisFilterRegistry::instance()->get(id.id());
    m_filterOptionWidget->filtersList->setCurrent(id);
    updateFilterConfigWidget();
    emitSettingChanged();
}
void KisCompositeOpOption::changeCompositeOp(const KoID& compositeOp)
{
    if(compositeOp.id() == m_currCompositeOpID)
        return;
    
    m_prevCompositeOpID = m_currCompositeOpID;
    m_currCompositeOpID = compositeOp.id();
    
    if(m_createConfigWidget) {
        m_label->setText(compositeOp.name());
        m_bnEraser->blockSignals(true);
        m_bnEraser->setChecked(m_currCompositeOpID == "erase");
        m_bnEraser->blockSignals(false);
    }
    
    emit sigSettingChanged();
}
Esempio n. 6
0
    KisPaintOpPresetSP defaultPreset(const KoID& paintOp)
    {
        QString defaultName = paintOp.id() + ".kpp";
        QString path = KGlobal::mainComponent().dirs()->findResource("kis_defaultpresets", defaultName);

        KisPaintOpPresetSP preset = new KisPaintOpPreset(path);

        if (!preset->load())
            preset = KisPaintOpRegistry::instance()->defaultPreset(paintOp);

        Q_ASSERT(preset);
        Q_ASSERT(preset->valid());

        return preset;
    }
Esempio n. 7
0
    void setCurrentPaintop(const KoID& paintop, KisPaintOpPresetSP preset)
    {
        preset = (!preset) ? defaultPreset(paintop) : preset;

        Q_ASSERT(preset && preset->settings());

        // handle the settings and expose it through a a simple QObject property
        //m_optionWidget->setConfiguration(preset->settings());
#if 0
        preset->settings()->setNode(view->resourceProvider()->currentNode());
#endif
        KisPaintOpFactory* paintOp     = KisPaintOpRegistry::instance()->get(paintop.id());
        QString            pixFilename = KisFactory::componentData().dirs()->findResource("kis_images", paintOp->pixmap());

        view->resourceProvider()->setPaintOpPreset(preset);
    }
void KisPaintOpPreset::setPaintOp(const KoID & paintOp)
{
    Q_ASSERT(m_d->settings);
    m_d->settings->setProperty("paintop", paintOp.id());
}
Esempio n. 9
0
bool KoCompositeOpRegistry::colorSpaceHasCompositeOp(const KoColorSpace* colorSpace, const KoID& compositeOp) const
{
    return colorSpace ? colorSpace->hasCompositeOp(compositeOp.id()) : false;
}