diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-05 15:55:57 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-05 15:55:57 -0600 |
commit | 9ba04742771370f59740e32e11c5f3a1e6a1b70a (patch) | |
tree | c81c34dae2b3b1ea73801bf18a960265dc4207f7 /kjsembed/plugins | |
parent | 1a96c45b22d01378202d9dc7ed9c47acd30f966e (diff) | |
download | tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.tar.gz tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.zip |
Initial TQt conversion
Diffstat (limited to 'kjsembed/plugins')
-rw-r--r-- | kjsembed/plugins/customobject_plugin.cpp | 8 | ||||
-rw-r--r-- | kjsembed/plugins/customobject_plugin.h | 4 | ||||
-rw-r--r-- | kjsembed/plugins/customqobject_plugin.cpp | 28 | ||||
-rw-r--r-- | kjsembed/plugins/customqobject_plugin.desktop | 2 | ||||
-rw-r--r-- | kjsembed/plugins/customqobject_plugin.h | 24 | ||||
-rw-r--r-- | kjsembed/plugins/imagefx_plugin.cpp | 176 | ||||
-rw-r--r-- | kjsembed/plugins/imagefx_plugin.h | 24 | ||||
-rw-r--r-- | kjsembed/plugins/kfileitemloader.cpp | 6 | ||||
-rw-r--r-- | kjsembed/plugins/kfileitemloader.h | 2 | ||||
-rw-r--r-- | kjsembed/plugins/qprocess_plugin.cpp | 52 | ||||
-rw-r--r-- | kjsembed/plugins/qprocess_plugin.h | 22 |
11 files changed, 174 insertions, 174 deletions
diff --git a/kjsembed/plugins/customobject_plugin.cpp b/kjsembed/plugins/customobject_plugin.cpp index b883ff66..13bf0526 100644 --- a/kjsembed/plugins/customobject_plugin.cpp +++ b/kjsembed/plugins/customobject_plugin.cpp @@ -39,10 +39,10 @@ class MyCustomObject public: enum Mode { On, Off }; Mode mode; - TQString thing; + TTQString thing; }; -MyCustomObjectLoader::MyCustomObjectLoader( TQObject *parent, const char *name, const TQStringList &args ) : +MyCustomObjectLoader::MyCustomObjectLoader( TTQObject *parent, const char *name, const TTQStringList &args ) : JSBindingPlugin(parent, name, args) { } @@ -170,9 +170,9 @@ int MyCustomObjectImp::extractInt( KJS::ExecState *exec, const KJS::List &args, { return (args.size() > idx) ? args[idx].toInteger(exec) : 0; } -TQString MyCustomObjectImp::extractString(KJS::ExecState *exec, const KJS::List &args, int idx) +TTQString MyCustomObjectImp::extractString(KJS::ExecState *exec, const KJS::List &args, int idx) { - return (args.size() > idx) ? args[idx].toString(exec).qstring() : TQString::null; + return (args.size() > idx) ? args[idx].toString(exec).qstring() : TTQString::null; } } // namespace KJSEmbed::Bindings diff --git a/kjsembed/plugins/customobject_plugin.h b/kjsembed/plugins/customobject_plugin.h index 5f417e69..aef20616 100644 --- a/kjsembed/plugins/customobject_plugin.h +++ b/kjsembed/plugins/customobject_plugin.h @@ -31,7 +31,7 @@ namespace Bindings { class KJSEMBED_EXPORT MyCustomObjectLoader : public JSBindingPlugin { public: - MyCustomObjectLoader( TQObject *parent, const char *name, const TQStringList &args ); + MyCustomObjectLoader( TTQObject *parent, const char *name, const TTQStringList &args ); KJS::Object createBinding(KJSEmbedPart *jspart, KJS::ExecState *exec, const KJS::List &args) const; }; @@ -58,7 +58,7 @@ public: private: int extractInt( KJS::ExecState *exec, const KJS::List &args, int idx); - TQString extractString(KJS::ExecState *exec, const KJS::List &args, int idx); + TTQString extractString(KJS::ExecState *exec, const KJS::List &args, int idx); int mid; }; diff --git a/kjsembed/plugins/customqobject_plugin.cpp b/kjsembed/plugins/customqobject_plugin.cpp index 6d1fccc7..8538dffc 100644 --- a/kjsembed/plugins/customqobject_plugin.cpp +++ b/kjsembed/plugins/customqobject_plugin.cpp @@ -32,20 +32,20 @@ namespace KJSEmbed { namespace Bindings { -MyCustomQObjectLoader::MyCustomQObjectLoader( TQObject *parent, const char *name, const TQStringList &args ) : +MyCustomTQObjectLoader::MyCustomTQObjectLoader( TTQObject *parent, const char *name, const TTQStringList &args ) : JSBindingPlugin(parent, name, args) { } -KJS::Object MyCustomQObjectLoader::createBinding(KJSEmbedPart *jspart, KJS::ExecState *exec, const KJS::List &args) const +KJS::Object MyCustomTQObjectLoader::createBinding(KJSEmbedPart *jspart, KJS::ExecState *exec, const KJS::List &args) const { kdDebug() << "Loading a custom object" << endl; - TQObject *parent = 0L; + TTQObject *parent = 0L; JSObjectProxy *proxy = JSProxy::toObjectProxy( args[0].imp() ); if ( proxy ) parent = proxy->object(); - MyCustomQObjectImp *imp = new MyCustomQObjectImp(parent, "MyCustomQObject" ); + MyCustomTQObjectImp *imp = new MyCustomTQObjectImp(parent, "MyCustomTQObject" ); JSObjectProxy *prx = new JSObjectProxy( jspart, imp ); KJS::Object proxyObj( prx ); @@ -54,32 +54,32 @@ KJS::Object MyCustomQObjectLoader::createBinding(KJSEmbedPart *jspart, KJS::Exec return proxyObj; } -MyCustomQObjectImp::MyCustomQObjectImp(TQObject *parent, const char *name ) - : TQObject(parent, name) +MyCustomTQObjectImp::MyCustomTQObjectImp(TTQObject *parent, const char *name ) + : TTQObject(parent, name) { - kdDebug() << "New MyCustomQObjectImp " << endl; + kdDebug() << "New MyCustomTQObjectImp " << endl; } -MyCustomQObjectImp::~MyCustomQObjectImp() +MyCustomTQObjectImp::~MyCustomTQObjectImp() { } -MyCustomQObjectImp::Mode MyCustomQObjectImp::mode() const +MyCustomTQObjectImp::Mode MyCustomTQObjectImp::mode() const { kdDebug() << "mode() " << endl; return m_mode; } -void MyCustomQObjectImp::setMode( Mode md) +void MyCustomTQObjectImp::setMode( Mode md) { kdDebug() << "setMode() " << endl; m_mode = md; } -TQString MyCustomQObjectImp::thing() const +TTQString MyCustomTQObjectImp::thing() const { kdDebug() << "thing()" << endl; return m_thing; } -void MyCustomQObjectImp::setThing( const TQString &t) +void MyCustomTQObjectImp::setThing( const TTQString &t) { kdDebug() << "setThing() " << t << endl; m_thing = t; @@ -89,8 +89,8 @@ void MyCustomQObjectImp::setThing( const TQString &t) #include <kgenericfactory.h> -typedef KGenericFactory<KJSEmbed::Bindings::MyCustomQObjectLoader> MyCustomQObjectLoaderFactory; -K_EXPORT_COMPONENT_FACTORY( libcustomqobjectplugin, MyCustomQObjectLoaderFactory( "MyCustomQObjectLoader" ) ) +typedef KGenericFactory<KJSEmbed::Bindings::MyCustomTQObjectLoader> MyCustomTQObjectLoaderFactory; +K_EXPORT_COMPONENT_FACTORY( libcustomqobjectplugin, MyCustomTQObjectLoaderFactory( "MyCustomTQObjectLoader" ) ) #include "customqobject_plugin.moc" diff --git a/kjsembed/plugins/customqobject_plugin.desktop b/kjsembed/plugins/customqobject_plugin.desktop index 6be09b1b..7f4ae202 100644 --- a/kjsembed/plugins/customqobject_plugin.desktop +++ b/kjsembed/plugins/customqobject_plugin.desktop @@ -1,5 +1,5 @@ [Desktop Entry] -Name=MyCustomQObject +Name=MyCustomTQObject ServiceTypes=JSBindingPlugin/Binding Type=Service X-KDE-Library=libcustomqobjectplugin diff --git a/kjsembed/plugins/customqobject_plugin.h b/kjsembed/plugins/customqobject_plugin.h index b80ac67a..9af6aee6 100644 --- a/kjsembed/plugins/customqobject_plugin.h +++ b/kjsembed/plugins/customqobject_plugin.h @@ -19,8 +19,8 @@ * Boston, MA 02110-1301, USA. */ -#ifndef KJSEMBED_CUSTOMQOBJECT_PLUGIN_H -#define KJSEMBED_CUSTOMQOBJECT_PLUGIN_H +#ifndef KJSEMBED_CUSTOMTQOBJECT_PLUGIN_H +#define KJSEMBED_CUSTOMTQOBJECT_PLUGIN_H #include <kjsembed/jsbindingplugin.h> #include <kjsembed/jsproxy_imp.h> @@ -29,36 +29,36 @@ namespace KJSEmbed { namespace Bindings { -class MyCustomQObjectLoader : public JSBindingPlugin +class MyCustomTQObjectLoader : public JSBindingPlugin { public: - MyCustomQObjectLoader( TQObject *parent, const char *name, const TQStringList &args ); - virtual ~MyCustomQObjectLoader(){;} + MyCustomTQObjectLoader( TTQObject *parent, const char *name, const TTQStringList &args ); + virtual ~MyCustomTQObjectLoader(){;} KJS::Object createBinding(KJSEmbedPart *jspart, KJS::ExecState *exec, const KJS::List &args) const; }; -class MyCustomQObjectImp : public TQObject { +class MyCustomTQObjectImp : public TTQObject { Q_OBJECT /** Identifiers for the methods provided by this class. */ enum Mode { On, Off }; Q_PROPERTY(Mode mode READ mode WRITE setMode) - Q_PROPERTY(TQString thing READ thing WRITE setThing) + Q_PROPERTY(TTQString thing READ thing WRITE setThing) Q_ENUMS(Mode) public: - MyCustomQObjectImp( TQObject *parent, const char *name); - virtual ~MyCustomQObjectImp(); + MyCustomTQObjectImp( TTQObject *parent, const char *name); + virtual ~MyCustomTQObjectImp(); public slots: Mode mode() const; void setMode( Mode md); - TQString thing() const; - void setThing( const TQString &t); + TTQString thing() const; + void setThing( const TTQString &t); private: Mode m_mode; - TQString m_thing; + TTQString m_thing; }; diff --git a/kjsembed/plugins/imagefx_plugin.cpp b/kjsembed/plugins/imagefx_plugin.cpp index ba2181cc..7aa81b3c 100644 --- a/kjsembed/plugins/imagefx_plugin.cpp +++ b/kjsembed/plugins/imagefx_plugin.cpp @@ -36,7 +36,7 @@ namespace KJSEmbed { namespace Bindings { -ImageFXLoader::ImageFXLoader( TQObject *parent, const char *name, const TQStringList &args ) : +ImageFXLoader::ImageFXLoader( TTQObject *parent, const char *name, const TTQStringList &args ) : JSBindingPlugin(parent, name, args) { } @@ -206,116 +206,116 @@ KJS::Value ImageFX::call( KJS::ExecState *exec, KJS::Object &self, const KJS::Li KJS::Value retValue = KJS::Value(); switch ( mid ) { case Methodgradient: { - TQSize size = extractQSize(exec, args, 0); - TQColor ca = extractQColor(exec, args, 1); - TQColor cb = extractQColor(exec, args, 2); + TTQSize size = extractTQSize(exec, args, 0); + TTQColor ca = extractTQColor(exec, args, 1); + TTQColor cb = extractTQColor(exec, args, 2); int type = extractInt( exec, args, 3); int ncols = extractInt( exec, args, 4); - TQImage img = KImageEffect::gradient(size, ca, cb, (KImageEffect::GradientType)type, ncols); + TTQImage img = KImageEffect::gradient(size, ca, cb, (KImageEffect::GradientType)type, ncols); retValue = convertToValue(exec, img); break; } case MethodunbalancedGradient: { - TQSize size = extractQSize(exec, args, 0); - TQColor ca = extractQColor(exec, args, 1); - TQColor cb = extractQColor(exec, args, 2); + TTQSize size = extractTQSize(exec, args, 0); + TTQColor ca = extractTQColor(exec, args, 1); + TTQColor cb = extractTQColor(exec, args, 2); int type = extractInt( exec, args, 3); int xfactor = extractInt( exec, args, 4); int yfactor = extractInt( exec, args, 5); int ncols = extractInt( exec, args, 6); - TQImage img = KImageEffect::unbalancedGradient(size, ca, cb, (KImageEffect::GradientType)type, xfactor, yfactor, ncols); + TTQImage img = KImageEffect::unbalancedGradient(size, ca, cb, (KImageEffect::GradientType)type, xfactor, yfactor, ncols); retValue = convertToValue(exec, img); break; } case MethodblendColor: { - TQColor clr = extractQColor(exec, args, 0); - TQImage dst = extractQImage(exec, args, 1); + TTQColor clr = extractTQColor(exec, args, 0); + TTQImage dst = extractTQImage(exec, args, 1); float opacity = (float)extractDouble(exec, args, 2); - TQImage img = KImageEffect::blend(clr, dst, opacity); + TTQImage img = KImageEffect::blend(clr, dst, opacity); retValue = convertToValue(exec, img); break; } case MethodblendImage: { - TQImage src = extractQImage(exec, args, 0); - TQImage dst = extractQImage(exec, args, 1); + TTQImage src = extractTQImage(exec, args, 0); + TTQImage dst = extractTQImage(exec, args, 1); float opacity = (float)extractDouble(exec, args, 2); - TQImage img = KImageEffect::blend(src, dst, opacity); + TTQImage img = KImageEffect::blend(src, dst, opacity); retValue = convertToValue(exec, img); break; } case MethodcomputeDestinationRect: { - TQSize lowerSize = extractQSize(exec, args, 0); + TTQSize lowerSize = extractTQSize(exec, args, 0); int disposition = extractInt(exec, args, 1); - TQImage upper = extractQImage(exec, args, 2); - TQRect rect = KImageEffect::computeDestinationRect(lowerSize, (KImageEffect::Disposition) disposition, upper); + TTQImage upper = extractTQImage(exec, args, 2); + TTQRect rect = KImageEffect::computeDestinationRect(lowerSize, (KImageEffect::Disposition) disposition, upper); retValue = convertToValue(exec, rect); break; } case MethodchannelIntensity: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); float percent = (float)extractDouble(exec, args, 1); int channel = extractInt(exec, args, 2); - TQImage img = KImageEffect::channelIntensity(image, percent, (KImageEffect::RGBComponent)channel); + TTQImage img = KImageEffect::channelIntensity(image, percent, (KImageEffect::RGBComponent)channel); retValue = convertToValue(exec, img); break; } case Methodfade: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); float val = (float)extractDouble(exec, args, 1); - TQColor color = extractQColor(exec, args, 2); - TQImage img = KImageEffect::fade(image, val, color); + TTQColor color = extractTQColor(exec, args, 2); + TTQImage img = KImageEffect::fade(image, val, color); retValue = convertToValue(exec, img); break; } case Methodflatten: { - TQImage image = extractQImage(exec, args, 0); - TQColor ca = extractQColor(exec, args, 1); - TQColor cb = extractQColor(exec, args, 2); + TTQImage image = extractTQImage(exec, args, 0); + TTQColor ca = extractTQColor(exec, args, 1); + TTQColor cb = extractTQColor(exec, args, 2); int ncols = extractInt(exec, args, 3); - TQImage img = KImageEffect::flatten(image, ca, cb, ncols); + TTQImage img = KImageEffect::flatten(image, ca, cb, ncols); retValue = convertToValue(exec, img); break; } case Methodhash: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); int lite = extractInt(exec, args, 1); int spacing = extractInt(exec, args, 2); - TQImage img = KImageEffect::hash(image, (KImageEffect::Lighting)lite, spacing); + TTQImage img = KImageEffect::hash(image, (KImageEffect::Lighting)lite, spacing); retValue = convertToValue(exec, img); break; } case Methodintensity: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); float percent = (float)extractDouble(exec, args, 1); - TQImage img = KImageEffect::intensity(image, percent); + TTQImage img = KImageEffect::intensity(image, percent); retValue = convertToValue(exec, img); break; } case Methodmodulate: { - TQImage image = extractQImage(exec, args, 0); - TQImage modImage = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); + TTQImage modImage = extractTQImage(exec, args, 0); bool reverse = extractBool(exec, args, 1); int type = extractInt(exec, args, 2); int factor = extractInt(exec, args, 3); int channel = extractInt(exec, args, 4); - TQImage img = KImageEffect::modulate(image, modImage, reverse, (KImageEffect::ModulationType)type, factor, (KImageEffect::RGBComponent)channel); + TTQImage img = KImageEffect::modulate(image, modImage, reverse, (KImageEffect::ModulationType)type, factor, (KImageEffect::RGBComponent)channel); retValue = convertToValue(exec, img); break; } case MethodtoGray: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); bool fast = extractBool(exec, args, 1); - TQImage img = KImageEffect::toGray(image, fast); + TTQImage img = KImageEffect::toGray(image, fast); retValue = convertToValue(exec, img); break; } case Methoddesaturate: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); float desat = (float)extractDouble(exec, args, 1); - TQImage img = KImageEffect::desaturate(image, desat); + TTQImage img = KImageEffect::desaturate(image, desat); retValue = convertToValue(exec, img); break; } @@ -326,193 +326,193 @@ KJS::Value ImageFX::call( KJS::ExecState *exec, KJS::Object &self, const KJS::Li } case MethodselectedImage: { - TQImage image = extractQImage(exec, args, 0); - TQColor col = extractQColor(exec, args, 1); - TQImage img = KImageEffect::selectedImage(image, col); + TTQImage image = extractTQImage(exec, args, 0); + TTQColor col = extractTQColor(exec, args, 1); + TTQImage img = KImageEffect::selectedImage(image, col); retValue = convertToValue(exec, img); break; } case MethodcontrastHSV: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); bool sharpen = extractBool(exec, args, 1); KImageEffect::contrastHSV(image, sharpen); retValue = convertToValue(exec, image); break; } case Methodnormalize: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); KImageEffect::normalize(image); retValue = convertToValue(exec, image); break; } case Methodequalize: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); KImageEffect::equalize(image); retValue = convertToValue(exec, image); break; } case Methodthreshold: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); uint value = extractUInt(exec, args, 1); KImageEffect::threshold(image, value); retValue = convertToValue(exec, image); break; } case Methodsolarize: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); double factor = extractDouble(exec, args, 1); KImageEffect::solarize(image, factor); retValue = convertToValue(exec, image); break; } case Methodemboss: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); double radius = extractDouble(exec, args, 1); double sigma = extractDouble(exec, args, 2); - TQImage img = KImageEffect::emboss(image, radius, sigma); + TTQImage img = KImageEffect::emboss(image, radius, sigma); retValue = convertToValue(exec, img); break; } case Methoddespeckle: { - TQImage image = extractQImage(exec, args, 0); - TQImage img = KImageEffect::despeckle(image); + TTQImage image = extractTQImage(exec, args, 0); + TTQImage img = KImageEffect::despeckle(image); retValue = convertToValue(exec, img); break; } case Methodcharcoal: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); double factor = extractDouble(exec, args, 1); - TQImage img = KImageEffect::charcoal( image, factor); + TTQImage img = KImageEffect::charcoal( image, factor); retValue = convertToValue(exec, img); break; } case Methodcharcoal2: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); double radius = extractDouble(exec, args, 1); double sigma = extractDouble(exec, args, 2); - TQImage img = KImageEffect::charcoal(image, radius, sigma); + TTQImage img = KImageEffect::charcoal(image, radius, sigma); retValue = convertToValue(exec, img); break; } case Methodrotate: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); int r = extractInt(exec, args, 1); - TQImage img = KImageEffect::rotate(image, (KImageEffect::RotateDirection) r); + TTQImage img = KImageEffect::rotate(image, (KImageEffect::RotateDirection) r); retValue = convertToValue(exec, img); break; } case Methodsample: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); int width = extractInt(exec, args, 1); int height = extractInt(exec, args, 2); - TQImage img = KImageEffect::sample(image, width, height); + TTQImage img = KImageEffect::sample(image, width, height); retValue = convertToValue(exec, img); break; } case MethodaddNoise: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); int type = extractInt(exec, args, 1); - TQImage img = KImageEffect::addNoise(image, (KImageEffect::NoiseType) type); + TTQImage img = KImageEffect::addNoise(image, (KImageEffect::NoiseType) type); retValue = convertToValue(exec, img); break; } case Methodblur: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); double radius = extractDouble(exec, args, 1); double sigma = extractDouble(exec, args, 2); - TQImage img = KImageEffect::blur(image, radius, sigma); + TTQImage img = KImageEffect::blur(image, radius, sigma); retValue = convertToValue(exec, img); break; } case Methodedge: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); double radius = extractDouble(exec, args, 1); - TQImage img = KImageEffect::edge(image, radius); + TTQImage img = KImageEffect::edge(image, radius); retValue = convertToValue(exec, img); break; } case Methodimplode: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); double factor = extractDouble(exec, args, 1); uint background = extractUInt(exec, args, 2); - TQImage img = KImageEffect::implode(image, factor, background); + TTQImage img = KImageEffect::implode(image, factor, background); retValue = convertToValue(exec, img); break; } case MethodoilPaintConvolve: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); double radius = extractDouble(exec, args, 1); - TQImage img = KImageEffect::oilPaintConvolve(image, radius); + TTQImage img = KImageEffect::oilPaintConvolve(image, radius); retValue = convertToValue(exec, img); break; } case MethodoilPaint: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); int radius = extractInt(exec, args, 1); - TQImage img = KImageEffect::oilPaint(image, radius); + TTQImage img = KImageEffect::oilPaint(image, radius); retValue = convertToValue(exec, img); break; } case Methodsharpen: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); double factor = extractDouble(exec, args, 1); - TQImage img = KImageEffect::sharpen(image, factor); + TTQImage img = KImageEffect::sharpen(image, factor); retValue = convertToValue(exec, img); break; } case Methodsharpen2: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); double radius = extractDouble(exec, args, 1); double sigma = extractDouble(exec, args, 2); - TQImage img = KImageEffect::sharpen(image, radius, sigma); + TTQImage img = KImageEffect::sharpen(image, radius, sigma); retValue = convertToValue(exec, img); break; } case Methodspread: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); uint amount = extractUInt(exec, args, 1); - TQImage img = KImageEffect::spread(image, amount); + TTQImage img = KImageEffect::spread(image, amount); retValue = convertToValue(exec, img); break; } case Methodshade: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); bool color_shading = extractBool(exec, args, 1); double azimuth = extractDouble(exec, args, 2); double elevation = extractDouble(exec, args, 3); - TQImage img = KImageEffect::shade(image, color_shading, azimuth, elevation); + TTQImage img = KImageEffect::shade(image, color_shading, azimuth, elevation); retValue = convertToValue(exec, img); break; } case Methodswirl: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); double degrees = extractDouble(exec, args, 1); uint background = extractUInt(exec, args, 2); - TQImage img = KImageEffect::swirl(image, degrees, background); + TTQImage img = KImageEffect::swirl(image, degrees, background); retValue = convertToValue(exec, img); break; } case Methodwave: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); double amplitude = extractDouble(exec, args, 1); double frequency = extractDouble(exec, args, 2); uint background = extractUInt(exec, args, 3); - TQImage img = KImageEffect::wave(image, amplitude, frequency, background); + TTQImage img = KImageEffect::wave(image, amplitude, frequency, background); retValue = convertToValue(exec, img); break; } case Methodcontrast: { - TQImage image = extractQImage(exec, args, 0); + TTQImage image = extractTQImage(exec, args, 0); int c = extractInt(exec, args, 1); - TQImage img = KImageEffect::contrast(image, c); + TTQImage img = KImageEffect::contrast(image, c); retValue = convertToValue(exec, img); break; } case MethodbumpMap: { - TQImage mask = extractQImage(exec, args, 0); - TQImage img = bumpmap(img, + TTQImage mask = extractTQImage(exec, args, 0); + TTQImage img = bumpmap(img, mask, extractDouble(exec, args, 1), extractDouble(exec, args, 2), @@ -771,12 +771,12 @@ static void bumpmap_row( uint *src, * @return The destination image (dst) containing the result. * @author Zack Rusin <zack@kde.org> */ -TQImage ImageFX::bumpmap(TQImage &img, TQImage &map, double azimuth, double elevation, +TTQImage ImageFX::bumpmap(TTQImage &img, TTQImage &map, double azimuth, double elevation, int depth, int xofs, int yofs, int waterlevel, int ambient, bool compensate, bool invert, BumpmapType type, bool tiled) { - TQImage dst; + TTQImage dst; if ( img.depth() != 32 || img.depth() != 32 ) { qWarning( "Bump-mapping effect works only with 32 bit images"); diff --git a/kjsembed/plugins/imagefx_plugin.h b/kjsembed/plugins/imagefx_plugin.h index b4f4c6a6..7e1f10d0 100644 --- a/kjsembed/plugins/imagefx_plugin.h +++ b/kjsembed/plugins/imagefx_plugin.h @@ -34,7 +34,7 @@ namespace Bindings { class ImageFXLoader : public JSBindingPlugin { public: - ImageFXLoader( TQObject *parent, const char *name, const TQStringList &args ); + ImageFXLoader( TTQObject *parent, const char *name, const TTQStringList &args ); KJS::Object createBinding(KJSEmbedPart *jspart, KJS::ExecState *exec, const KJS::List &args) const; }; enum BumpmapType { @@ -76,23 +76,23 @@ class ImageFX : JSProxyImp private: // Image effects - void gradient(const TQSize &size, const TQColor &ca, const TQColor &cb, KImageEffect::GradientType type, int ncols); - void unbalancedGradient(const TQSize &size, const TQColor &ca,const TQColor &cb, KImageEffect::GradientType type, int xfactor,int yfactor, int ncols); - void blendColor(const TQColor& clr, float opacity); - void blendImage(TQImage& blendImage, float opacity); - TQRect computeDestinationRect(const TQSize &lowerSize,KImageEffect::Disposition disposition); + void gradient(const TTQSize &size, const TTQColor &ca, const TTQColor &cb, KImageEffect::GradientType type, int ncols); + void unbalancedGradient(const TTQSize &size, const TTQColor &ca,const TTQColor &cb, KImageEffect::GradientType type, int xfactor,int yfactor, int ncols); + void blendColor(const TTQColor& clr, float opacity); + void blendImage(TTQImage& blendImage, float opacity); + TTQRect computeDestinationRect(const TTQSize &lowerSize,KImageEffect::Disposition disposition); void channelIntensity(float percent,KImageEffect::RGBComponent channel); - void fade(float val, const TQColor &color); - void flatten(const TQColor &ca,const TQColor &cb, int ncols); + void fade(float val, const TTQColor &color); + void flatten(const TTQColor &ca,const TTQColor &cb, int ncols); void hash(KImageEffect::Lighting lite,uint spacing); void intensity(float percent); - void modulate(TQImage &modImage, bool reverse,KImageEffect::ModulationType type, int factor, KImageEffect::RGBComponent channel); + void modulate(TTQImage &modImage, bool reverse,KImageEffect::ModulationType type, int factor, KImageEffect::RGBComponent channel); void toGray(bool fast); void desaturate(float desat); void contrast(int c); - void dither(const TQColor *palette, int size); - void selectedImage( const TQColor &col ); + void dither(const TTQColor *palette, int size); + void selectedImage( const TTQColor &col ); void contrastHSV( bool sharpen); void normalize(); void equalize(); @@ -118,7 +118,7 @@ class ImageFX : JSProxyImp void swirl(double degrees, uint background); void wave(double amplitude, double frequency,uint background); - TQImage bumpmap(TQImage &img, TQImage &map, double azimuth=135.0, double elevation=45.0, int depth=3, int xofs=0, int yofs=0, int waterlevel=0, int ambient=0, bool compensate=false, bool invert=false, BumpmapType type=Linear, bool tiled=false); + TTQImage bumpmap(TTQImage &img, TTQImage &map, double azimuth=135.0, double elevation=45.0, int depth=3, int xofs=0, int yofs=0, int waterlevel=0, int ambient=0, bool compensate=false, bool invert=false, BumpmapType type=Linear, bool tiled=false); int mid; }; diff --git a/kjsembed/plugins/kfileitemloader.cpp b/kjsembed/plugins/kfileitemloader.cpp index 55e86f76..d548e4bd 100644 --- a/kjsembed/plugins/kfileitemloader.cpp +++ b/kjsembed/plugins/kfileitemloader.cpp @@ -31,7 +31,7 @@ namespace KJSEmbed { namespace Bindings { -KFileItemLoader::KFileItemLoader(TQObject *parent, const char *name, const TQStringList &args) +KFileItemLoader::KFileItemLoader(TTQObject *parent, const char *name, const TTQStringList &args) : JSBindingPlugin(parent, name, args) { } @@ -147,13 +147,13 @@ KJS::Value KJSEmbed::Bindings::KFileItemImp::call( KJS::ExecState * exec, KJS::O break; case Methodurl: { - TQString url = obj->url().url(); + TTQString url = obj->url().url(); retValue = KJS::String(url); break; } case MethodsetUrl: { - TQString url = extractQString(exec, args, 0); + TTQString url = extractTQString(exec, args, 0); obj->setURL(url); break; } diff --git a/kjsembed/plugins/kfileitemloader.h b/kjsembed/plugins/kfileitemloader.h index 384379f3..bfa0ad89 100644 --- a/kjsembed/plugins/kfileitemloader.h +++ b/kjsembed/plugins/kfileitemloader.h @@ -34,7 +34,7 @@ namespace Bindings { class KFileItemLoader : public JSBindingPlugin { public: - KFileItemLoader(TQObject *parent, const char *name, const TQStringList &args); + KFileItemLoader(TTQObject *parent, const char *name, const TTQStringList &args); ~KFileItemLoader(); diff --git a/kjsembed/plugins/qprocess_plugin.cpp b/kjsembed/plugins/qprocess_plugin.cpp index 3106fd8f..085334ef 100644 --- a/kjsembed/plugins/qprocess_plugin.cpp +++ b/kjsembed/plugins/qprocess_plugin.cpp @@ -32,7 +32,7 @@ namespace KJSEmbed { namespace Bindings { -ProcessLoader::ProcessLoader( TQObject *parent, const char *name, const TQStringList &args ) : +ProcessLoader::ProcessLoader( TTQObject *parent, const char *name, const TTQStringList &args ) : JSBindingPlugin(parent, name, args) { } @@ -41,7 +41,7 @@ KJS::Object ProcessLoader::createBinding(KJSEmbedPart *jspart, KJS::ExecState *e { kdDebug() << "Loading a process object" << endl; - TQObject *parent = 0L; + TTQObject *parent = 0L; JSObjectProxy *proxy = JSProxy::toObjectProxy( args[0].imp() ); if ( proxy ) parent = proxy->object(); @@ -54,8 +54,8 @@ KJS::Object ProcessLoader::createBinding(KJSEmbedPart *jspart, KJS::ExecState *e return proxyObj; } -ProcessImp::ProcessImp(TQObject *parent, const char *name ) - : TQProcess(parent, name) +ProcessImp::ProcessImp(TTQObject *parent, const char *name ) + : TTQProcess(parent, name) { kdDebug() << "New ProcessImp " << endl; } @@ -64,73 +64,73 @@ ProcessImp::~ProcessImp() { } -TQStringList ProcessImp::arguments() const +TTQStringList ProcessImp::arguments() const { - return TQProcess::arguments(); + return TTQProcess::arguments(); } -void ProcessImp::setArguments( const TQStringList args) +void ProcessImp::setArguments( const TTQStringList args) { - TQProcess::setArguments( args ); + TTQProcess::setArguments( args ); } ProcessImp::Communication ProcessImp::communication() const { - return (ProcessImp::Communication)TQProcess::communication(); + return (ProcessImp::Communication)TTQProcess::communication(); } void ProcessImp::setCommunication( Communication comm) { - TQProcess::setCommunication( comm ); + TTQProcess::setCommunication( comm ); } bool ProcessImp::canReadLineStdout() const { - return TQProcess::canReadLineStdout(); + return TTQProcess::canReadLineStdout(); } bool ProcessImp::canReadLineStderr() const { - return TQProcess::canReadLineStderr(); + return TTQProcess::canReadLineStderr(); } bool ProcessImp::isRunning() const { - return TQProcess::isRunning(); + return TTQProcess::isRunning(); } bool ProcessImp::normalExit() const { - return TQProcess::normalExit(); + return TTQProcess::normalExit(); } int ProcessImp::exitStatus() const { - return TQProcess::exitStatus(); + return TTQProcess::exitStatus(); } bool ProcessImp::start() { - return TQProcess::start( ); + return TTQProcess::start( ); } -TQString ProcessImp::readLineStdout () +TTQString ProcessImp::readLineStdout () { - return TQProcess::readLineStdout(); + return TTQProcess::readLineStdout(); } -TQString ProcessImp::readLineStderr () +TTQString ProcessImp::readLineStderr () { - return TQProcess::readLineStderr(); + return TTQProcess::readLineStderr(); } -TQDir ProcessImp::workingDirectory () const +TTQDir ProcessImp::workingDirectory () const { - return TQProcess::workingDirectory(); + return TTQProcess::workingDirectory(); } -void ProcessImp::setWorkingDirectory ( const TQDir & dir ) +void ProcessImp::setWorkingDirectory ( const TTQDir & dir ) { - TQProcess::setWorkingDirectory( dir ); + TTQProcess::setWorkingDirectory( dir ); } -void ProcessImp::addArgument ( const TQString & arg ) +void ProcessImp::addArgument ( const TTQString & arg ) { - TQProcess::addArgument( arg ); + TTQProcess::addArgument( arg ); } } // namespace KJSEmbed::Bindings diff --git a/kjsembed/plugins/qprocess_plugin.h b/kjsembed/plugins/qprocess_plugin.h index c5ffe4a5..66d79f99 100644 --- a/kjsembed/plugins/qprocess_plugin.h +++ b/kjsembed/plugins/qprocess_plugin.h @@ -33,20 +33,20 @@ namespace Bindings { class ProcessLoader : public JSBindingPlugin { public: - ProcessLoader( TQObject *parent, const char *name, const TQStringList &args ); + ProcessLoader( TTQObject *parent, const char *name, const TTQStringList &args ); virtual ~ProcessLoader(){;} KJS::Object createBinding(KJSEmbedPart *jspart, KJS::ExecState *exec, const KJS::List &args) const; }; -class ProcessImp : public TQProcess { +class ProcessImp : public TTQProcess { Q_OBJECT /** Identifiers for the methods provided by this class. */ enum Communication { Stdin = 0x01, Stdout = 0x02, Stderr = 0x04, DupStderr = 0x08 }; - Q_PROPERTY(TQStringList arguments READ arguments WRITE setArguments ) + Q_PROPERTY(TTQStringList arguments READ arguments WRITE setArguments ) Q_PROPERTY(Communication communication READ communication WRITE setCommunication) Q_PROPERTY(bool canReadLineStdout READ canReadLineStdout ) Q_PROPERTY(bool canReadLineStderr READ canReadLineStderr ) @@ -56,11 +56,11 @@ Q_OBJECT Q_ENUMS(Communication) public: - ProcessImp( TQObject *parent = 0, const char *name = 0); + ProcessImp( TTQObject *parent = 0, const char *name = 0); virtual ~ProcessImp(); - TQStringList arguments() const; - void setArguments( const TQStringList args); + TTQStringList arguments() const; + void setArguments( const TTQStringList args); Communication communication() const; void setCommunication( Communication comm); @@ -73,11 +73,11 @@ public: public slots: bool start(); - virtual TQString readLineStdout (); - virtual TQString readLineStderr (); - TQDir workingDirectory () const; - void setWorkingDirectory ( const TQDir & dir ); - void addArgument ( const TQString & arg ); + virtual TTQString readLineStdout (); + virtual TTQString readLineStderr (); + TTQDir workingDirectory () const; + void setWorkingDirectory ( const TTQDir & dir ); + void addArgument ( const TTQString & arg ); }; } // namespace |