19#include <tqcombobox.h>
21#include <tqbuttongroup.h>
23#include "kis_factory.h"
24#include "kis_colorspace_factory_registry.h"
26#include "kis_profile.h"
27#include "kis_colorspace.h"
28#include "kis_dlg_apply_profile.h"
29#include "kis_config.h"
31#include <kis_meta_registry.h>
32#include "kis_cmb_idlist.h"
34#include "wdgapplyprofile.h"
37KisDlgApplyProfile::KisDlgApplyProfile(TQWidget *parent,
const char *name)
38 : super(parent, name, true,
"", Ok | Cancel)
41 setCaption(i18n(
"Apply Image Profile to Clipboard Data"));
42 m_page =
new WdgApplyProfile(
this);
44 setMainWidget(m_page);
45 resize(m_page->sizeHint());
48 fillCmbProfiles(
KisID(
"RGBA",
""));
50 m_page->grpRenderIntent->setButton(cfg.renderIntent());
54KisDlgApplyProfile::~KisDlgApplyProfile()
60KisProfile * KisDlgApplyProfile::profile()
const
64 profileName = m_page->cmbProfile->currentText();
66 return KisMetaRegistry::instance()->csRegistry()->
getProfileByName(profileName);
69int KisDlgApplyProfile::renderIntent()
const
71 return m_page->grpRenderIntent->selectedId();
76void KisDlgApplyProfile::fillCmbProfiles(
const KisID & s)
78 m_page->cmbProfile->clear();
80 if (!KisMetaRegistry::instance()->csRegistry()->exists(s)) {
84 KisColorSpaceFactory * csf = KisMetaRegistry::instance()->csRegistry()->
get(s);
87 TQValueVector<KisProfile *> profileList = KisMetaRegistry::instance()->csRegistry()->
profilesFor( csf );
88 TQValueVector<KisProfile *> ::iterator it;
89 for ( it = profileList.begin(); it != profileList.end(); ++it ) {
90 m_page->cmbProfile->insertItem((*it)->productName());
92 m_page->cmbProfile->setCurrentText(csf->defaultProfile());
95#include "kis_dlg_apply_profile.moc"
TQValueVector< KisProfile * > profilesFor(KisColorSpaceFactory *cs)
Return the vector of profiles for this colorspacefactory.
KisProfile * getProfileByName(const TQString &name)
Return the profile associated with the given product name, or 0.
_T get(const KisID &name) const
This function allow to get an object from its KisID.
Chalk has a large number of extensible resources.