Renaming of files in preparation for code style tools.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/13/head
Michele Calgaro 2 years ago
parent 95834e2bdc
commit 8b78a8791b
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -2,13 +2,13 @@ INCLUDES = $(KOFFICE_INCLUDES) $(KOPAINTER_INCLUDES) $(all_includes)
## The common lib, shared between the part, the plugins, and the filters
lib_LTLIBRARIES = libchalkcommon.la
libchalkcommon_la_SOURCES = dummy.cc
libchalkcommon_la_SOURCES = dummy.cpp
libchalkcommon_la_LDFLAGS = $(all_libraries) $(LIB_TQT) -version-info 1:0 -no-undefined
libchalkcommon_la_LIBADD = sdk/libchalksdk.la core/libchalkimage.la ui/libchalkui.la chalkcolor/libchalkcolor.la $(LCMS_LIBS) $(LIB_KOFFICEUI) $(LIB_KOPAINTER) $(LIB_KOPALETTE) $(LIB_XINPUTEXT)
## The part
kde_module_LTLIBRARIES = libchalkpart.la
libchalkpart_la_SOURCES = chalk_part_init.cc
libchalkpart_la_SOURCES = chalk_part_init.cpp
libchalkpart_la_LDFLAGS = $(all_libraries) $(LIB_TQT) -module $(KDE_PLUGIN)
libchalkpart_la_LIBADD = $(KOFFICE_LIBS) libchalkcommon.la ../chalk/ui/libchalkui.la
@ -17,7 +17,7 @@ METASOURCES = AUTO
## The tdeinit loadable module and executable
tdeinit_LTLIBRARIES = chalk.la
bin_PROGRAMS =
chalk_la_SOURCES = main.cc
chalk_la_SOURCES = main.cpp
chalk_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) $(LIB_TQT)
chalk_la_LIBADD = $(LIB_KOFFICECORE)
@ -30,14 +30,14 @@ rc_DATA = chalk.rc chalk_readonly.rc
SUBDIRS = sdk chalkcolor core ui . dtd colorspaces plugins data pics
# Needed to compile libchalkcommon.la, which has no source files to itself
# but everything in static libs.
dummy.cc:
echo > dummy.cc
dummy.cpp:
echo > dummy.cpp
messages: rc.cpp
$(EXTRACTRC) `find . -name \*.ui` >> rc.cpp
$(EXTRACTRC) `find . -name \*.rc` >> rc.cpp
perl extracti18n.pl > i18ndata
$(XGETTEXT) i18ndata rc.cpp `find . -name \*.cc -o -name \*.h -o -name \*.cpp` ui/kis_aboutdata.h -o $(podir)/chalk.pot
$(XGETTEXT) i18ndata rc.cpp `find . -name \*.cpp -o -name \*.h -o -name \*.cpp` ui/kis_aboutdata.h -o $(podir)/chalk.pot
rm -f i18ndata
DOXYGEN_EXCLUDE = CImg.h colorspaces plugins chalkcolor/colorspaces core/tiles

@ -1,23 +0,0 @@
/*
* kis_part_init.cc - part of Krayon
*
* Copyright (c) 1999 Matthias Elter <elter@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "ui/kis_factory.h"
K_EXPORT_COMPONENT_FACTORY( libchalkpart, KisFactory )

@ -0,0 +1,23 @@
/*
* kis_part_init.cpp - part of Krayon
*
* Copyright (c) 1999 Matthias Elter <elter@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "ui/kis_factory.h"
K_EXPORT_COMPONENT_FACTORY( libchalkpart, KisFactory )

@ -11,14 +11,14 @@ CXXFLAGS += $(OPENEXR_CXXFLAGS)
lib_LTLIBRARIES = libchalkcolor.la
if have_openexr
OPENEXR_SOURCES=kis_f16half_base_colorspace.cc
OPENEXR_SOURCES=kis_f16half_base_colorspace.cpp
endif
libchalkcolor_la_SOURCES = kis_color.cc kis_colorspace.cc \
kis_colorspace_iface.cc kis_colorspace_iface.skel kis_composite_op.cc kis_profile.cc \
kis_histogram_producer.cc kis_basic_histogram_producers.cc kis_abstract_colorspace.cc \
kis_colorspace_factory_registry.cc kis_color_conversions.cc kis_u8_base_colorspace.cc \
kis_u16_base_colorspace.cc kis_f32_base_colorspace.cc $(OPENEXR_SOURCES)
libchalkcolor_la_SOURCES = kis_color.cpp kis_colorspace.cpp \
kis_colorspace_iface.cpp kis_colorspace_iface.skel kis_composite_op.cpp kis_profile.cpp \
kis_histogram_producer.cpp kis_basic_histogram_producers.cpp kis_abstract_colorspace.cpp \
kis_colorspace_factory_registry.cpp kis_color_conversions.cpp kis_u8_base_colorspace.cpp \
kis_u16_base_colorspace.cpp kis_f32_base_colorspace.cpp $(OPENEXR_SOURCES)
libchalkcolor_la_LDFLAGS = -version-info 1:0:0 -no-undefined $(all_libraries)
libchalkcolor_la_LIBADD = colorspaces/libchalkcolorspaces.la $(LCMS_LIBS) $(LIB_TDEPARTS) $(LIB_TDECORE) $(LIB_TQT) $(OPENEXR_LIBS)

@ -6,8 +6,8 @@ INCLUDES = -I$(srcdir)/.. \
noinst_LTLIBRARIES = libchalkcolorspaces.la
libchalkcolorspaces_la_SOURCES = \
kis_alpha_colorspace.cc \
kis_lab_colorspace.cc
kis_alpha_colorspace.cpp \
kis_lab_colorspace.cpp
noinst_HEADERS = \
kis_alpha_colorspace.h \

@ -1,208 +0,0 @@
/*
* kis_profile.cc - part of Krayon
*
* Copyright (c) 2000 Matthias Elter <elter@kde.org>
* 2001 John Califf
* 2004 Boudewijn Rempt <boud@valdyas.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <cfloat>
#include <cmath>
#include <config.h>
#include LCMS_HEADER
#include <tqimage.h>
#include <tqtextstream.h>
#include <tqfile.h>
#include <kdebug.h>
#include "kis_profile.h"
#include "kis_global.h"
#include "ksharedptr.h"
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <fixx11h.h>
KisProfile::KisProfile(TQByteArray rawData)
: m_rawData(rawData),
m_filename( TQString() ),
m_valid( false ),
m_suitableForOutput(false)
{
m_profile = cmsOpenProfileFromMem(rawData.data(), (DWORD)rawData.size());
init();
}
KisProfile::KisProfile(const TQString& file)
: m_filename(file),
m_valid( false ),
m_suitableForOutput( false )
{
}
KisProfile::KisProfile(const cmsHPROFILE profile)
: m_profile(profile),
m_filename( TQString() ),
m_valid( true )
{
size_t bytesNeeded=0;
// Make a raw data image ready for saving
_cmsSaveProfileToMem(m_profile, 0, &bytesNeeded); // calc size
if(m_rawData.resize(bytesNeeded))
{
_cmsSaveProfileToMem(m_profile, m_rawData.data(), &bytesNeeded); // fill buffer
cmsHPROFILE newprofile = cmsOpenProfileFromMem(m_rawData.data(), (DWORD) bytesNeeded);
cmsCloseProfile(m_profile);
m_profile = newprofile;
}
else
m_rawData.resize(0);
init();
}
KisProfile::~KisProfile()
{
cmsCloseProfile(m_profile);
}
bool KisProfile::load()
{
TQFile file(m_filename);
file.open(IO_ReadOnly);
m_rawData = file.readAll();
m_profile = cmsOpenProfileFromMem(m_rawData.data(), (DWORD)m_rawData.size());
file.close();
if (m_profile == 0) {
kdWarning() << "Failed to load profile from " << m_filename << endl;
}
return init();
}
bool KisProfile::init()
{
if (m_profile) {
m_colorSpaceSignature = cmsGetColorSpace(m_profile);
m_deviceClass = cmsGetDeviceClass(m_profile);
m_productName = cmsTakeProductName(m_profile);
m_productDescription = cmsTakeProductDesc(m_profile);
m_productInfo = cmsTakeProductInfo(m_profile);
m_valid = true;
// Check if the profile can convert (something->this)
// LPMATSHAPER OutMatShaper = cmsBuildOutputMatrixShaper(m_profile);
// if( OutMatShaper )
// {
// m_suitableForOutput = true;
// }
cmsCIEXYZTRIPLE Primaries;
if (cmsTakeColorants(&Primaries, m_profile))
{
m_suitableForOutput = true;
}
#if 0
// XXX: It wasn't that easy to save a little memory: thsi gives an lcms error
// Okay, we know enough. Free the memory; we'll load it again if needed.
cmsCloseProfile(m_profile);
m_profile = 0;
#endif
return true;
}
return false;
}
cmsHPROFILE KisProfile::profile()
{
#if 0
if (m_profile = 0) {
TQFile file(m_filename);
file.open(IO_ReadOnly);
m_rawData = file.readAll();
m_profile = cmsOpenProfileFromMem(m_rawData.data(), (DWORD)m_rawData.size());
file.close();
}
#endif
return m_profile;
}
bool KisProfile::save()
{
return false;
}
KisAnnotationSP KisProfile::annotation() const
{
// XXX we hardcode icc, this is correct for lcms?
// XXX productName(), or just "ICC Profile"?
if (!m_rawData.isEmpty())
return new KisAnnotation("icc", productName(), m_rawData);
else
return 0;
}
KisProfile * KisProfile::getScreenProfile (int screen)
{
#ifdef Q_WS_X11
Atom type;
int format;
unsigned long nitems;
unsigned long bytes_after;
TQ_UINT8 * str;
static Atom icc_atom = XInternAtom( tqt_xdisplay(), "_ICC_PROFILE", False );
if ( XGetWindowProperty ( tqt_xdisplay(),
tqt_xrootwin( screen ),
icc_atom,
0,
INT_MAX,
False,
XA_CARDINAL,
&type,
&format,
&nitems,
&bytes_after,
(unsigned char **) &str)
) {
TQByteArray bytes (nitems);
bytes.assign((char*)str, (TQ_UINT32)nitems);
return new KisProfile(bytes);
} else {
return NULL;
}
#else
return NULL;
#endif
}

@ -0,0 +1,208 @@
/*
* kis_profile.cpp - part of Krayon
*
* Copyright (c) 2000 Matthias Elter <elter@kde.org>
* 2001 John Califf
* 2004 Boudewijn Rempt <boud@valdyas.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <cfloat>
#include <cmath>
#include <config.h>
#include LCMS_HEADER
#include <tqimage.h>
#include <tqtextstream.h>
#include <tqfile.h>
#include <kdebug.h>
#include "kis_profile.h"
#include "kis_global.h"
#include "ksharedptr.h"
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <fixx11h.h>
KisProfile::KisProfile(TQByteArray rawData)
: m_rawData(rawData),
m_filename( TQString() ),
m_valid( false ),
m_suitableForOutput(false)
{
m_profile = cmsOpenProfileFromMem(rawData.data(), (DWORD)rawData.size());
init();
}
KisProfile::KisProfile(const TQString& file)
: m_filename(file),
m_valid( false ),
m_suitableForOutput( false )
{
}
KisProfile::KisProfile(const cmsHPROFILE profile)
: m_profile(profile),
m_filename( TQString() ),
m_valid( true )
{
size_t bytesNeeded=0;
// Make a raw data image ready for saving
_cmsSaveProfileToMem(m_profile, 0, &bytesNeeded); // calc size
if(m_rawData.resize(bytesNeeded))
{
_cmsSaveProfileToMem(m_profile, m_rawData.data(), &bytesNeeded); // fill buffer
cmsHPROFILE newprofile = cmsOpenProfileFromMem(m_rawData.data(), (DWORD) bytesNeeded);
cmsCloseProfile(m_profile);
m_profile = newprofile;
}
else
m_rawData.resize(0);
init();
}
KisProfile::~KisProfile()
{
cmsCloseProfile(m_profile);
}
bool KisProfile::load()
{
TQFile file(m_filename);
file.open(IO_ReadOnly);
m_rawData = file.readAll();
m_profile = cmsOpenProfileFromMem(m_rawData.data(), (DWORD)m_rawData.size());
file.close();
if (m_profile == 0) {
kdWarning() << "Failed to load profile from " << m_filename << endl;
}
return init();
}
bool KisProfile::init()
{
if (m_profile) {
m_colorSpaceSignature = cmsGetColorSpace(m_profile);
m_deviceClass = cmsGetDeviceClass(m_profile);
m_productName = cmsTakeProductName(m_profile);
m_productDescription = cmsTakeProductDesc(m_profile);
m_productInfo = cmsTakeProductInfo(m_profile);
m_valid = true;
// Check if the profile can convert (something->this)
// LPMATSHAPER OutMatShaper = cmsBuildOutputMatrixShaper(m_profile);
// if( OutMatShaper )
// {
// m_suitableForOutput = true;
// }
cmsCIEXYZTRIPLE Primaries;
if (cmsTakeColorants(&Primaries, m_profile))
{
m_suitableForOutput = true;
}
#if 0
// XXX: It wasn't that easy to save a little memory: thsi gives an lcms error
// Okay, we know enough. Free the memory; we'll load it again if needed.
cmsCloseProfile(m_profile);
m_profile = 0;
#endif
return true;
}
return false;
}
cmsHPROFILE KisProfile::profile()
{
#if 0
if (m_profile = 0) {
TQFile file(m_filename);
file.open(IO_ReadOnly);
m_rawData = file.readAll();
m_profile = cmsOpenProfileFromMem(m_rawData.data(), (DWORD)m_rawData.size());
file.close();
}
#endif
return m_profile;
}
bool KisProfile::save()
{
return false;
}
KisAnnotationSP KisProfile::annotation() const
{
// XXX we hardcode icc, this is correct for lcms?
// XXX productName(), or just "ICC Profile"?
if (!m_rawData.isEmpty())
return new KisAnnotation("icc", productName(), m_rawData);
else
return 0;
}
KisProfile * KisProfile::getScreenProfile (int screen)
{
#ifdef Q_WS_X11
Atom type;
int format;
unsigned long nitems;
unsigned long bytes_after;
TQ_UINT8 * str;
static Atom icc_atom = XInternAtom( tqt_xdisplay(), "_ICC_PROFILE", False );
if ( XGetWindowProperty ( tqt_xdisplay(),
tqt_xrootwin( screen ),
icc_atom,
0,
INT_MAX,
False,
XA_CARDINAL,
&type,
&format,
&nitems,
&bytes_after,
(unsigned char **) &str)
) {
TQByteArray bytes (nitems);
bytes.assign((char*)str, (TQ_UINT32)nitems);
return new KisProfile(bytes);
} else {
return NULL;
}
#else
return NULL;
#endif
}

@ -7,7 +7,7 @@ INCLUDES = -I$(srcdir)/../../sdk \
$(all_includes)
lib_LTLIBRARIES = libchalk_cmyk_u16.la
libchalk_cmyk_u16_la_SOURCES = kis_cmyk_u16_colorspace.cc
libchalk_cmyk_u16_la_SOURCES = kis_cmyk_u16_colorspace.cpp
libchalk_cmyk_u16_la_LDFLAGS = $(all_libraries)
libchalk_cmyk_u16_la_LIBADD = ../../chalkcolor/libchalkcolor.la
@ -15,7 +15,7 @@ libchalk_cmyk_u16_la_LIBADD = ../../chalkcolor/libchalkcolor.la
kde_module_LTLIBRARIES = chalk_cmyk_u16_plugin.la
# Srcs for the plugin
chalk_cmyk_u16_plugin_la_SOURCES = cmyk_u16_plugin.cc
chalk_cmyk_u16_plugin_la_SOURCES = cmyk_u16_plugin.cpp
noinst_HEADERS = cmyk_u16_plugin.h kis_cmyk_u16_colorspace.h
chalk_cmyk_u16_plugin_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) $(LIB_TQT) -ltdecore -ltdeui -lkjs -ltdefx -ltdeio -ltdeparts -llcms

@ -1,61 +0,0 @@
/*
* cmyk_u16_plugin.cc -- Part of Chalk
*
* Copyright (c) 2004 Boudewijn Rempt (boud@valdyas.org)
* Copyright (c) 2005 Adrian Page <adrian@pagenet.plus.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <kinstance.h>
#include <kgenericfactory.h>
#include <kdebug.h>
#include <kis_debug_areas.h>
#include <kis_colorspace_factory_registry.h>
#include <kis_basic_histogram_producers.h>
#include <kis_debug_areas.h>
#include "cmyk_u16_plugin.h"
#include "kis_cmyk_u16_colorspace.h"
typedef KGenericFactory<CMYKU16Plugin> CMYKU16PluginFactory;
K_EXPORT_COMPONENT_FACTORY( chalk_cmyk_u16_plugin, CMYKU16PluginFactory( "chalk" ) )
CMYKU16Plugin::CMYKU16Plugin(TQObject *parent, const char *name, const TQStringList &)
: KParts::Plugin(parent, name)
{
setInstance(CMYKU16PluginFactory::instance());
if ( parent->inherits("KisColorSpaceFactoryRegistry") )
{
KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( parent );
KisColorSpace * colorSpaceCMYKU16 = new KisCmykU16ColorSpace(f, 0);
KisColorSpaceFactory * csf = new KisCmykU16ColorSpaceFactory();
TQ_CHECK_PTR(colorSpaceCMYKU16);
f->add(csf);
KisHistogramProducerFactoryRegistry::instance()->add(
new KisBasicHistogramProducerFactory<KisBasicU16HistogramProducer>
(KisID("CMYK16HISTO", i18n("CMYK16")), colorSpaceCMYKU16) );
}
}
CMYKU16Plugin::~CMYKU16Plugin()
{
}
#include "cmyk_u16_plugin.moc"

@ -0,0 +1,61 @@
/*
* cmyk_u16_plugin.cpp -- Part of Chalk
*
* Copyright (c) 2004 Boudewijn Rempt (boud@valdyas.org)
* Copyright (c) 2005 Adrian Page <adrian@pagenet.plus.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <kinstance.h>
#include <kgenericfactory.h>
#include <kdebug.h>
#include <kis_debug_areas.h>
#include <kis_colorspace_factory_registry.h>
#include <kis_basic_histogram_producers.h>
#include <kis_debug_areas.h>
#include "cmyk_u16_plugin.h"
#include "kis_cmyk_u16_colorspace.h"
typedef KGenericFactory<CMYKU16Plugin> CMYKU16PluginFactory;
K_EXPORT_COMPONENT_FACTORY( chalk_cmyk_u16_plugin, CMYKU16PluginFactory( "chalk" ) )
CMYKU16Plugin::CMYKU16Plugin(TQObject *parent, const char *name, const TQStringList &)
: KParts::Plugin(parent, name)
{
setInstance(CMYKU16PluginFactory::instance());
if ( parent->inherits("KisColorSpaceFactoryRegistry") )
{
KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( parent );
KisColorSpace * colorSpaceCMYKU16 = new KisCmykU16ColorSpace(f, 0);
KisColorSpaceFactory * csf = new KisCmykU16ColorSpaceFactory();
TQ_CHECK_PTR(colorSpaceCMYKU16);
f->add(csf);
KisHistogramProducerFactoryRegistry::instance()->add(
new KisBasicHistogramProducerFactory<KisBasicU16HistogramProducer>
(KisID("CMYK16HISTO", i18n("CMYK16")), colorSpaceCMYKU16) );
}
}
CMYKU16Plugin::~CMYKU16Plugin()
{
}
#include "cmyk_u16_plugin.moc"

@ -8,7 +8,7 @@ INCLUDES = -I$(srcdir)/../../sdk \
kde_module_LTLIBRARIES = chalkcmykplugin.la
chalkcmykplugin_la_SOURCES = cmyk_plugin.cc kis_cmyk_colorspace.cc
chalkcmykplugin_la_SOURCES = cmyk_plugin.cpp kis_cmyk_colorspace.cpp
noinst_HEADERS = cmyk_plugin.h kis_cmyk_colorspace.h
chalkcmykplugin_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) $(LIB_TQT) -ltdecore -ltdeui -lkjs -ltdefx -ltdeio -ltdeparts -llcms

@ -1,66 +0,0 @@
/*
* cmyk_plugin.cc -- Part of Chalk
*
* Copyright (c) 2004 Boudewijn Rempt (boud@valdyas.org)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <tdelocale.h>
#include <kiconloader.h>
#include <kinstance.h>
#include <tdemessagebox.h>
#include <kstandarddirs.h>
#include <tdetempfile.h>
#include <kdebug.h>
#include <kgenericfactory.h>
#include <kis_debug_areas.h>
#include <kis_colorspace_factory_registry.h>
#include <kis_basic_histogram_producers.h>
#include "cmyk_plugin.h"
#include "kis_cmyk_colorspace.h"
typedef KGenericFactory<CMYKPlugin> CMYKPluginFactory;
K_EXPORT_COMPONENT_FACTORY( chalkcmykplugin, CMYKPluginFactory( "chalk" ) )
CMYKPlugin::CMYKPlugin(TQObject *parent, const char *name, const TQStringList &)
: KParts::Plugin(parent, name)
{
setInstance(CMYKPluginFactory::instance());
if ( parent->inherits("KisColorSpaceFactoryRegistry") )
{
KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( parent );
KisColorSpace * colorSpaceCMYK = new KisCmykColorSpace(f, 0);
KisColorSpaceFactory * csf = new KisCmykColorSpaceFactory();
TQ_CHECK_PTR(colorSpaceCMYK);
f->add(csf);
KisHistogramProducerFactoryRegistry::instance()->add(
new KisBasicHistogramProducerFactory<KisBasicU8HistogramProducer>
(KisID("CMYKHISTO", i18n("CMYK")), colorSpaceCMYK) );
}
}
CMYKPlugin::~CMYKPlugin()
{
}
#include "cmyk_plugin.moc"

@ -0,0 +1,66 @@
/*
* cmyk_plugin.cpp -- Part of Chalk
*
* Copyright (c) 2004 Boudewijn Rempt (boud@valdyas.org)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <tdelocale.h>
#include <kiconloader.h>
#include <kinstance.h>
#include <tdemessagebox.h>
#include <kstandarddirs.h>
#include <tdetempfile.h>
#include <kdebug.h>
#include <kgenericfactory.h>
#include <kis_debug_areas.h>
#include <kis_colorspace_factory_registry.h>
#include <kis_basic_histogram_producers.h>
#include "cmyk_plugin.h"
#include "kis_cmyk_colorspace.h"
typedef KGenericFactory<CMYKPlugin> CMYKPluginFactory;
K_EXPORT_COMPONENT_FACTORY( chalkcmykplugin, CMYKPluginFactory( "chalk" ) )
CMYKPlugin::CMYKPlugin(TQObject *parent, const char *name, const TQStringList &)
: KParts::Plugin(parent, name)
{
setInstance(CMYKPluginFactory::instance());
if ( parent->inherits("KisColorSpaceFactoryRegistry") )
{
KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( parent );
KisColorSpace * colorSpaceCMYK = new KisCmykColorSpace(f, 0);
KisColorSpaceFactory * csf = new KisCmykColorSpaceFactory();
TQ_CHECK_PTR(colorSpaceCMYK);
f->add(csf);
KisHistogramProducerFactoryRegistry::instance()->add(
new KisBasicHistogramProducerFactory<KisBasicU8HistogramProducer>
(KisID("CMYKHISTO", i18n("CMYK")), colorSpaceCMYK) );
}
}
CMYKPlugin::~CMYKPlugin()
{
}
#include "cmyk_plugin.moc"

@ -8,7 +8,7 @@ INCLUDES = -I$(srcdir)/../../sdk \
$(all_includes)
lib_LTLIBRARIES = libchalk_gray_u16.la
libchalk_gray_u16_la_SOURCES = kis_gray_u16_colorspace.cc
libchalk_gray_u16_la_SOURCES = kis_gray_u16_colorspace.cpp
libchalk_gray_u16_la_LDFLAGS = $(all_libraries)
libchalk_gray_u16_la_LIBADD = ../../chalkcolor/libchalkcolor.la
@ -16,7 +16,7 @@ libchalk_gray_u16_la_LIBADD = ../../chalkcolor/libchalkcolor.la
kde_module_LTLIBRARIES = chalk_gray_u16_plugin.la
# Srcs for the plugin
chalk_gray_u16_plugin_la_SOURCES = gray_u16_plugin.cc
chalk_gray_u16_plugin_la_SOURCES = gray_u16_plugin.cpp
noinst_HEADERS = gray_u16_plugin.h kis_gray_u16_colorspace.h
chalk_gray_u16_plugin_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) $(LIB_TQT) -ltdecore -ltdeui -lkjs -ltdefx -ltdeio -ltdeparts -llcms

@ -1,63 +0,0 @@
/*
* gray_u16_plugin.cc -- Part of Chalk
*
* Copyright (c) 2004 Boudewijn Rempt (boud@valdyas.org)
* Copyright (c) 2005 Adrian Page <adrian@pagenet.plus.com>
*
* This program is free software; you can grayistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <kinstance.h>
#include <kgenericfactory.h>
#include <kdebug.h>
#include <kis_debug_areas.h>
#include <kis_colorspace_factory_registry.h>
#include <kis_basic_histogram_producers.h>
#include "gray_u16_plugin.h"
#include "kis_gray_u16_colorspace.h"
typedef KGenericFactory<GRAYU16Plugin> GRAYU16PluginFactory;
K_EXPORT_COMPONENT_FACTORY( chalk_gray_u16_plugin, GRAYU16PluginFactory( "chalk" ) )
GRAYU16Plugin::GRAYU16Plugin(TQObject *parent, const char *name, const TQStringList &)
: KParts::Plugin(parent, name)
{
setInstance(GRAYU16PluginFactory::instance());
if ( parent->inherits("KisColorSpaceFactoryRegistry") )
{
KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( parent );
KisColorSpace * colorSpaceGRAYU16 = new KisGrayU16ColorSpace(f, 0);
KisColorSpaceFactory * csf = new KisGrayU16ColorSpaceFactory();
TQ_CHECK_PTR(colorSpaceGRAYU16);
f->add(csf);
KisHistogramProducerFactoryRegistry::instance()->add(
new KisBasicHistogramProducerFactory<KisBasicU16HistogramProducer>
(KisID("GRAYA16HISTO", i18n("GRAY/Alpha16")), colorSpaceGRAYU16) );
}
}
GRAYU16Plugin::~GRAYU16Plugin()
{
}
#include "gray_u16_plugin.moc"

@ -0,0 +1,63 @@
/*
* gray_u16_plugin.cpp -- Part of Chalk
*
* Copyright (c) 2004 Boudewijn Rempt (boud@valdyas.org)
* Copyright (c) 2005 Adrian Page <adrian@pagenet.plus.com>
*
* This program is free software; you can grayistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <kinstance.h>
#include <kgenericfactory.h>
#include <kdebug.h>
#include <kis_debug_areas.h>
#include <kis_colorspace_factory_registry.h>
#include <kis_basic_histogram_producers.h>
#include "gray_u16_plugin.h"
#include "kis_gray_u16_colorspace.h"
typedef KGenericFactory<GRAYU16Plugin> GRAYU16PluginFactory;
K_EXPORT_COMPONENT_FACTORY( chalk_gray_u16_plugin, GRAYU16PluginFactory( "chalk" ) )
GRAYU16Plugin::GRAYU16Plugin(TQObject *parent, const char *name, const TQStringList &)
: KParts::Plugin(parent, name)
{
setInstance(GRAYU16PluginFactory::instance());
if ( parent->inherits("KisColorSpaceFactoryRegistry") )
{
KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( parent );
KisColorSpace * colorSpaceGRAYU16 = new KisGrayU16ColorSpace(f, 0);
KisColorSpaceFactory * csf = new KisGrayU16ColorSpaceFactory();
TQ_CHECK_PTR(colorSpaceGRAYU16);
f->add(csf);
KisHistogramProducerFactoryRegistry::instance()->add(
new KisBasicHistogramProducerFactory<KisBasicU16HistogramProducer>
(KisID("GRAYA16HISTO", i18n("GRAY/Alpha16")), colorSpaceGRAYU16) );
}
}
GRAYU16Plugin::~GRAYU16Plugin()
{
}
#include "gray_u16_plugin.moc"

@ -9,13 +9,13 @@ INCLUDES = -I$(srcdir)/../../sdk \
lib_LTLIBRARIES = libchalkgrayscale.la
libchalkgrayscale_la_SOURCES = kis_gray_colorspace.cc
libchalkgrayscale_la_SOURCES = kis_gray_colorspace.cpp
libchalkgrayscale_la_LDFLAGS = $(all_libraries)
libchalkgrayscale_la_LIBADD = ../../chalkcolor/libchalkcolor.la
kde_module_LTLIBRARIES = chalkgrayplugin.la
chalkgrayplugin_la_SOURCES = gray_plugin.cc
chalkgrayplugin_la_SOURCES = gray_plugin.cpp
noinst_HEADERS = gray_plugin.h kis_gray_colorspace.h
chalkgrayplugin_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) $(LIB_TQT) -ltdecore -ltdeui -lkjs -ltdefx -ltdeio -ltdeparts -llcms

@ -1,77 +0,0 @@
/*
* gray_plugin.cc -- Part of Chalk
*
* Copyright (c) 2004 Boudewijn Rempt (boud@valdyas.org)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <tdelocale.h>
#include <kiconloader.h>
#include <kinstance.h>
#include <tdemessagebox.h>
#include <kstandarddirs.h>
#include <tdetempfile.h>
#include <kdebug.h>
#include <kgenericfactory.h>
#include <kis_debug_areas.h>
#include <kis_colorspace_factory_registry.h>
#include <kis_basic_histogram_producers.h>
#include "gray_plugin.h"
#include "kis_gray_colorspace.h"
typedef KGenericFactory<GrayPlugin> GrayPluginFactory;
K_EXPORT_COMPONENT_FACTORY( chalkgrayplugin, GrayPluginFactory( "chalkcore" ) )
GrayPlugin::GrayPlugin(TQObject *parent, const char *name, const TQStringList &)
: KParts::Plugin(parent, name)
{
setInstance(GrayPluginFactory::instance());
// This is not a gui plugin; only load it when the doc is created.
if ( parent->inherits("KisColorSpaceFactoryRegistry") )
{
KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( parent );
// .22 gamma grayscale or something like that. Taken from the lcms tutorial...
LPGAMMATABLE Gamma = cmsBuildGamma(256, 2.2);
cmsHPROFILE hProfile = cmsCreateGrayProfile(cmsD50_xyY(), Gamma);
cmsFreeGamma(Gamma);
KisProfile *defProfile = new KisProfile(hProfile);
f->addProfile(defProfile);
KisColorSpace * colorSpaceGrayA = new KisGrayColorSpace(f, 0);
KisColorSpaceFactory * csf = new KisGrayColorSpaceFactory();
TQ_CHECK_PTR(colorSpaceGrayA);
f->add(csf);
KisHistogramProducerFactoryRegistry::instance()->add(
new KisBasicHistogramProducerFactory<KisBasicU8HistogramProducer>
(KisID("GRAYA8HISTO", i18n("GRAY/Alpha8")), colorSpaceGrayA) );
}
}
GrayPlugin::~GrayPlugin()
{
}
#include "gray_plugin.moc"

@ -0,0 +1,77 @@
/*
* gray_plugin.cpp -- Part of Chalk
*
* Copyright (c) 2004 Boudewijn Rempt (boud@valdyas.org)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <tdelocale.h>
#include <kiconloader.h>
#include <kinstance.h>
#include <tdemessagebox.h>
#include <kstandarddirs.h>
#include <tdetempfile.h>
#include <kdebug.h>
#include <kgenericfactory.h>
#include <kis_debug_areas.h>
#include <kis_colorspace_factory_registry.h>
#include <kis_basic_histogram_producers.h>
#include "gray_plugin.h"
#include "kis_gray_colorspace.h"
typedef KGenericFactory<GrayPlugin> GrayPluginFactory;
K_EXPORT_COMPONENT_FACTORY( chalkgrayplugin, GrayPluginFactory( "chalkcore" ) )
GrayPlugin::GrayPlugin(TQObject *parent, const char *name, const TQStringList &)
: KParts::Plugin(parent, name)
{
setInstance(GrayPluginFactory::instance());
// This is not a gui plugin; only load it when the doc is created.
if ( parent->inherits("KisColorSpaceFactoryRegistry") )
{
KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( parent );
// .22 gamma grayscale or something like that. Taken from the lcms tutorial...
LPGAMMATABLE Gamma = cmsBuildGamma(256, 2.2);
cmsHPROFILE hProfile = cmsCreateGrayProfile(cmsD50_xyY(), Gamma);
cmsFreeGamma(Gamma);
KisProfile *defProfile = new KisProfile(hProfile);
f->addProfile(defProfile);
KisColorSpace * colorSpaceGrayA = new KisGrayColorSpace(f, 0);
KisColorSpaceFactory * csf = new KisGrayColorSpaceFactory();
TQ_CHECK_PTR(colorSpaceGrayA);
f->add(csf);
KisHistogramProducerFactoryRegistry::instance()->add(
new KisBasicHistogramProducerFactory<KisBasicU8HistogramProducer>
(KisID("GRAYA8HISTO", i18n("GRAY/Alpha8")), colorSpaceGrayA) );
}
}
GrayPlugin::~GrayPlugin()
{
}
#include "gray_plugin.moc"

@ -10,7 +10,7 @@ INCLUDES = \
lib_LTLIBRARIES = libchalk_lms_f32.la
libchalk_lms_f32_la_SOURCES = kis_lms_f32_colorspace.cc
libchalk_lms_f32_la_SOURCES = kis_lms_f32_colorspace.cpp
libchalk_lms_f32_la_LDFLAGS = $(all_libraries)
libchalk_lms_f32_la_LIBADD = ../../chalkcolor/libchalkcolor.la
@ -18,7 +18,7 @@ libchalk_lms_f32_la_LIBADD = ../../chalkcolor/libchalkcolor.la
kde_module_LTLIBRARIES = chalk_lms_f32_plugin.la
# Srcs for the plugin
chalk_lms_f32_plugin_la_SOURCES = lms_f32_plugin.cc
chalk_lms_f32_plugin_la_SOURCES = lms_f32_plugin.cpp
noinst_HEADERS = lms_f32_plugin.h kis_lms_f32_colorspace.h
chalk_lms_f32_plugin_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) $(LIB_TQT) -ltdecore -ltdeui -lkjs -ltdefx -ltdeio -ltdeparts -llcms

@ -1,64 +0,0 @@
/*
* lms_f32_plugin.cc -- Part of Chalk
*
* Copyright (c) 2004 Boudewijn Rempt (boud@valdyas.org)
* Copyright (c) 2005 Adrian Page <adrian@pagenet.plus.com>
* Copyright (c) 2005 Cyrille Berger <cberger@cberger.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include <kinstance.h>
#include <kgenericfactory.h>
#include <kdebug.h>
#include <kis_debug_areas.h>
#include <kis_colorspace_factory_registry.h>
#include <kis_basic_histogram_producers.h>
#include "lms_f32_plugin.h"
#include "kis_lms_f32_colorspace.h"
typedef KGenericFactory<LMSF32Plugin> LMSF32PluginFactory;
K_EXPORT_COMPONENT_FACTORY( chalk_lms_f32_plugin, LMSF32PluginFactory( "chalk" ) )
LMSF32Plugin::LMSF32Plugin(TQObject *parent, const char *name, const TQStringList &)
: KParts::Plugin(parent, name)
{
setInstance(LMSF32PluginFactory::instance());
if ( parent->inherits("KisColorSpaceFactoryRegistry") )
{
KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>(parent);
KisColorSpace * colorSpaceLMSF32 = new KisLmsF32ColorSpace(f, 0);
KisColorSpaceFactory * csf = new KisLmsF32ColorSpaceFactory();
f->add(csf);
KisHistogramProducerFactoryRegistry::instance()->add(
new KisBasicHistogramProducerFactory<KisBasicF32HistogramProducer>
(KisID("LMSF32HISTO", i18n("Float32")), colorSpaceLMSF32) );
}
}
LMSF32Plugin::~LMSF32Plugin()
{
}
#include "lms_f32_plugin.moc"