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())); }
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(); }
const KisPainterlyOverlayColorSpace * KisPainterlyOverlayColorSpace::instance() { if (!Private::s_instance) { Private::s_instance = new KisPainterlyOverlayColorSpace(painterlyOverlayColorModelID.id(), painterlyOverlayColorModelID.name()); } return Private::s_instance; }
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(); }
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; }
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()); }
bool KoCompositeOpRegistry::colorSpaceHasCompositeOp(const KoColorSpace* colorSpace, const KoID& compositeOp) const { return colorSpace ? colorSpace->hasCompositeOp(compositeOp.id()) : false; }