summaryrefslogtreecommitdiffstats
path: root/krita/plugins/viewplugins/scripting
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /krita/plugins/viewplugins/scripting
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krita/plugins/viewplugins/scripting')
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/kritacoremodule.cpp60
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/kritacoremodule.h16
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/krs_color.cpp2
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/krs_color.h10
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/krs_doc.cpp2
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/krs_doc.h2
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/krs_filter.cpp12
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/krs_filter.h2
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/krs_filter_configuration.cpp12
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/krs_filter_configuration.h2
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/krs_histogram.cpp2
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/krs_histogram.h2
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/krs_image.cpp8
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/krs_image.h2
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/krs_iterator.h61
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/krs_paint_layer.cpp26
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/krs_paint_layer.h2
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/krs_painter.cpp50
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/krs_painter.h6
-rw-r--r--krita/plugins/viewplugins/scripting/kritacore/krs_wavelet.cpp20
-rw-r--r--krita/plugins/viewplugins/scripting/kritascripting/kis_script_monitor.cpp4
-rw-r--r--krita/plugins/viewplugins/scripting/kritascripting/kis_script_monitor.h5
-rw-r--r--krita/plugins/viewplugins/scripting/kritascripting/kis_script_progress.cpp10
-rw-r--r--krita/plugins/viewplugins/scripting/kritascripting/kis_script_progress.h14
-rw-r--r--krita/plugins/viewplugins/scripting/samples/python/reshapehisto.py2
-rw-r--r--krita/plugins/viewplugins/scripting/samples/ruby/randompaint.rb16
-rw-r--r--krita/plugins/viewplugins/scripting/samples/ruby/torture-painting.rb16
-rw-r--r--krita/plugins/viewplugins/scripting/scripting.cc30
-rw-r--r--krita/plugins/viewplugins/scripting/scripting.h3
29 files changed, 201 insertions, 198 deletions
diff --git a/krita/plugins/viewplugins/scripting/kritacore/kritacoremodule.cpp b/krita/plugins/viewplugins/scripting/kritacore/kritacoremodule.cpp
index 899291ce..d4eea16f 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/kritacoremodule.cpp
+++ b/krita/plugins/viewplugins/scripting/kritacore/kritacoremodule.cpp
@@ -21,7 +21,7 @@
#include <kdebug.h>
//#include <api/variant.h>
-#include <api/qtobject.h>
+#include <api/tqtobject.h>
#include <main/manager.h>
#include <kis_autobrush_resource.h>
@@ -60,7 +60,7 @@ extern "C"
using namespace Kross::KritaCore;
-KritaCoreFactory::KritaCoreFactory(QString packagePath) : Kross::Api::Event<KritaCoreFactory>("KritaCoreFactory"), m_packagePath(packagePath)
+KritaCoreFactory::KritaCoreFactory(TQString packagePath) : Kross::Api::Event<KritaCoreFactory>("KritaCoreFactory"), m_packagePath(packagePath)
{
addFunction("newRGBColor", &KritaCoreFactory::newRGBColor);
addFunction("newHSVColor", &KritaCoreFactory::newHSVColor);
@@ -77,22 +77,22 @@ KritaCoreFactory::KritaCoreFactory(QString packagePath) : Kross::Api::Event<Krit
Kross::Api::Object::Ptr KritaCoreFactory::newRGBColor(Kross::Api::List::Ptr args)
{
- Color* c = new Color(Kross::Api::Variant::toUInt(args->item(0)), Kross::Api::Variant::toUInt(args->item(1)), Kross::Api::Variant::toUInt(args->item(2)), QColor::Rgb);
+ Color* c = new Color(Kross::Api::Variant::toUInt(args->item(0)), Kross::Api::Variant::toUInt(args->item(1)), Kross::Api::Variant::toUInt(args->item(2)), TQColor::Rgb);
return c;
}
Kross::Api::Object::Ptr KritaCoreFactory::newHSVColor(Kross::Api::List::Ptr args)
{
- return new Color(Kross::Api::Variant::toUInt(args->item(0)), Kross::Api::Variant::toUInt(args->item(1)), Kross::Api::Variant::toUInt(args->item(2)), QColor::Hsv);
+ return new Color(Kross::Api::Variant::toUInt(args->item(0)), Kross::Api::Variant::toUInt(args->item(1)), Kross::Api::Variant::toUInt(args->item(2)), TQColor::Hsv);
}
Kross::Api::Object::Ptr KritaCoreFactory::getPattern(Kross::Api::List::Ptr args)
{
KisResourceServerBase* rServer = KisResourceServerRegistry::instance()->get("PatternServer");
- QValueList<KisResource*> resources = rServer->resources();
+ TQValueList<KisResource*> resources = rServer->resources();
- QString name = Kross::Api::Variant::toString(args->item(0));
+ TQString name = Kross::Api::Variant::toString(args->item(0));
- for (QValueList<KisResource*>::iterator it = resources.begin(); it != resources.end(); ++it )
+ for (TQValueList<KisResource*>::iterator it = resources.begin(); it != resources.end(); ++it )
{
if((*it)->name() == name)
{
@@ -106,7 +106,7 @@ Kross::Api::Object::Ptr KritaCoreFactory::getPattern(Kross::Api::List::Ptr args)
Kross::Api::Object::Ptr KritaCoreFactory::loadPattern(Kross::Api::List::Ptr args)
{
- QString filename = Kross::Api::Variant::toString(args->item(0));
+ TQString filename = Kross::Api::Variant::toString(args->item(0));
KisPattern* pattern = new KisPattern(filename);
if(pattern->load())
{
@@ -121,11 +121,11 @@ Kross::Api::Object::Ptr KritaCoreFactory::loadPattern(Kross::Api::List::Ptr args
Kross::Api::Object::Ptr KritaCoreFactory::getBrush(Kross::Api::List::Ptr args)
{
KisResourceServerBase* rServer = KisResourceServerRegistry::instance()->get("BrushServer");
- QValueList<KisResource*> resources = rServer->resources();
+ TQValueList<KisResource*> resources = rServer->resources();
- QString name = Kross::Api::Variant::toString(args->item(0));
+ TQString name = Kross::Api::Variant::toString(args->item(0));
- for (QValueList<KisResource*>::iterator it = resources.begin(); it != resources.end(); ++it )
+ for (TQValueList<KisResource*>::iterator it = resources.begin(); it != resources.end(); ++it )
{
if((*it)->name() == name)
{
@@ -138,7 +138,7 @@ Kross::Api::Object::Ptr KritaCoreFactory::getBrush(Kross::Api::List::Ptr args)
Kross::Api::Object::Ptr KritaCoreFactory::loadBrush(Kross::Api::List::Ptr args)
{
- QString filename = Kross::Api::Variant::toString(args->item(0));
+ TQString filename = Kross::Api::Variant::toString(args->item(0));
KisBrush* brush = new KisBrush(filename);
if(brush->load())
{
@@ -152,7 +152,7 @@ Kross::Api::Object::Ptr KritaCoreFactory::loadBrush(Kross::Api::List::Ptr args)
Kross::Api::Object::Ptr KritaCoreFactory::getFilter(Kross::Api::List::Ptr args)
{
- QString name = Kross::Api::Variant::toString(args->item(0));
+ TQString name = Kross::Api::Variant::toString(args->item(0));
KisFilter* filter = KisFilterRegistry::instance()->get(name);
if(filter)
{
@@ -164,8 +164,8 @@ Kross::Api::Object::Ptr KritaCoreFactory::getFilter(Kross::Api::List::Ptr args)
Kross::Api::Object::Ptr KritaCoreFactory::newCircleBrush(Kross::Api::List::Ptr args)
{
- uint w = QMAX(1, Kross::Api::Variant::toUInt(args->item(0)));
- uint h = QMAX(1, Kross::Api::Variant::toUInt(args->item(1)));
+ uint w = TQMAX(1, Kross::Api::Variant::toUInt(args->item(0)));
+ uint h = TQMAX(1, Kross::Api::Variant::toUInt(args->item(1)));
uint hf = 0;
uint vf = 0;
if( args.count() > 2)
@@ -174,14 +174,14 @@ Kross::Api::Object::Ptr KritaCoreFactory::newCircleBrush(Kross::Api::List::Ptr a
vf = Kross::Api::Variant::toUInt(args->item(3));
}
KisAutobrushShape* kas = new KisAutobrushCircleShape(w, h, hf, vf);
- QImage* brsh = new QImage();
+ TQImage* brsh = new TQImage();
kas->createBrush(brsh);
return new Brush(new KisAutobrushResource(*brsh), false);
}
Kross::Api::Object::Ptr KritaCoreFactory::newRectBrush(Kross::Api::List::Ptr args)
{
- uint w = QMAX(1, Kross::Api::Variant::toUInt(args->item(0)));
- uint h = QMAX(1, Kross::Api::Variant::toUInt(args->item(1)));
+ uint w = TQMAX(1, Kross::Api::Variant::toUInt(args->item(0)));
+ uint h = TQMAX(1, Kross::Api::Variant::toUInt(args->item(1)));
uint hf = 0;
uint vf = 0;
if( args.count() > 2)
@@ -190,7 +190,7 @@ Kross::Api::Object::Ptr KritaCoreFactory::newRectBrush(Kross::Api::List::Ptr arg
vf = Kross::Api::Variant::toUInt(args->item(3));
}
KisAutobrushShape* kas = new KisAutobrushRectShape(w, h, hf, vf);
- QImage* brsh = new QImage();
+ TQImage* brsh = new TQImage();
kas->createBrush(brsh);
return new Brush(new KisAutobrushResource(*brsh), false);;
}
@@ -199,8 +199,8 @@ Kross::Api::Object::Ptr KritaCoreFactory::newImage(Kross::Api::List::Ptr args)
{
int w = Kross::Api::Variant::toInt(args->item(0));
int h = Kross::Api::Variant::toInt(args->item(1));
- QString csname = Kross::Api::Variant::toString(args->item(2));
- QString name = Kross::Api::Variant::toString(args->item(3));
+ TQString csname = Kross::Api::Variant::toString(args->item(2));
+ TQString name = Kross::Api::Variant::toString(args->item(3));
if( w < 0 || h < 0)
{
throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("Invalid image size") ) );
@@ -209,7 +209,7 @@ Kross::Api::Object::Ptr KritaCoreFactory::newImage(Kross::Api::List::Ptr args)
KisColorSpace * cs = KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID(csname, ""), "");
if(!cs)
{
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("Colorspace %0 is not available, please check your installation.").arg(csname ) ) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("Colorspace %0 is not available, please check your installation.").tqarg(csname ) ) );
return 0;
}
@@ -225,9 +225,9 @@ KritaCoreModule::KritaCoreModule(Kross::Api::Manager* manager)
: Kross::Api::Module("kritacore") , m_manager(manager), m_factory(0)
{
- QMap<QString, Object::Ptr> children = manager->getChildren();
- kdDebug(41011) << " there are " << children.size() << endl;
- for(QMap<QString, Object::Ptr>::const_iterator it = children.begin(); it != children.end(); it++)
+ TQMap<TQString, Object::Ptr> tqchildren = manager->getChildren();
+ kdDebug(41011) << " there are " << tqchildren.size() << endl;
+ for(TQMap<TQString, Object::Ptr>::const_iterator it = tqchildren.begin(); it != tqchildren.end(); it++)
{
kdDebug(41011) << it.key() << " " << it.data() << endl;
}
@@ -235,7 +235,7 @@ KritaCoreModule::KritaCoreModule(Kross::Api::Manager* manager)
// Wrap doc
Kross::Api::Object::Ptr kritadocument = manager->getChild("KritaDocument");
if(kritadocument) {
- Kross::Api::QtObject* kritadocumentqt = (Kross::Api::QtObject*)( kritadocument.data() );
+ Kross::Api::TQtObject* kritadocumentqt = (Kross::Api::TQtObject*)( kritadocument.data() );
if(kritadocumentqt) {
::KisDoc* document = (::KisDoc*)( kritadocumentqt->getObject() );
if(document) {
@@ -246,10 +246,10 @@ KritaCoreModule::KritaCoreModule(Kross::Api::Manager* manager)
}
}
// Wrap KritaScriptProgress
- QString packagePath;
+ TQString packagePath;
Kross::Api::Object::Ptr kritascriptprogress = manager->getChild("KritaScriptProgress");
if(kritadocument) {
- Kross::Api::QtObject* kritascriptprogressqt = (Kross::Api::QtObject*)( kritascriptprogress.data() );
+ Kross::Api::TQtObject* kritascriptprogressqt = (Kross::Api::TQtObject*)( kritascriptprogress.data() );
if(kritascriptprogressqt) {
::KisScriptProgress* scriptprogress = (::KisScriptProgress*)( kritascriptprogressqt->getObject() );
scriptprogress->activateAsSubject();
@@ -271,12 +271,12 @@ KritaCoreModule::~KritaCoreModule()
}
-const QString KritaCoreModule::getClassName() const
+const TQString KritaCoreModule::getClassName() const
{
return "Kross::KritaCore::KritaCoreModule";
}
-Kross::Api::Object::Ptr KritaCoreModule::call(const QString& name, Kross::Api::List::Ptr arguments)
+Kross::Api::Object::Ptr KritaCoreModule::call(const TQString& name, Kross::Api::List::Ptr arguments)
{
kdDebug(41011) << "KritaCoreModule::call = " << name << endl;
if( m_factory->isAFunction(name))
diff --git a/krita/plugins/viewplugins/scripting/kritacore/kritacoremodule.h b/krita/plugins/viewplugins/scripting/kritacore/kritacoremodule.h
index 97abc8b9..f3cc28c9 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/kritacoremodule.h
+++ b/krita/plugins/viewplugins/scripting/kritacore/kritacoremodule.h
@@ -19,8 +19,8 @@
#ifndef KRITA_KROSS_KRITACOREMODULE_H
#define KRITA_KROSS_KRITACOREMODULE_H
-#include <qstring.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqvariant.h>
#define KROSS_MAIN_EXPORT KDE_EXPORT
@@ -38,7 +38,7 @@ namespace Kross { namespace KritaCore {
class KritaCoreFactory : public Kross::Api::Event<KritaCoreFactory>
{
public:
- KritaCoreFactory(QString packagePath);
+ KritaCoreFactory(TQString packagePath);
private:
/**
* This function return a new Image.
@@ -108,7 +108,7 @@ namespace Kross { namespace KritaCore {
*/
Kross::Api::Object::Ptr getBrush(Kross::Api::List::Ptr);
/**
- * This function return a Brush with a circular shape
+ * This function return a Brush with a circular tqshape
* It takes at least two arguments :
* - width
* - height
@@ -127,7 +127,7 @@ namespace Kross { namespace KritaCore {
*/
Kross::Api::Object::Ptr newCircleBrush(Kross::Api::List::Ptr);
/**
- * This function return a Brush with a rectangular shape
+ * This function return a Brush with a rectangular tqshape
* It takes at least two arguments :
* - width
* - height
@@ -172,7 +172,7 @@ namespace Kross { namespace KritaCore {
*/
Kross::Api::Object::Ptr getPackagePath(Kross::Api::List::Ptr);
private:
- QString m_packagePath;
+ TQString m_packagePath;
};
/**
*
@@ -191,8 +191,8 @@ namespace Kross { namespace KritaCore {
virtual ~KritaCoreModule();
/// \see Kross::Api::Object::getClassName
- virtual const QString getClassName() const;
- virtual Kross::Api::Object::Ptr call(const QString& name, Kross::Api::List::Ptr arguments);
+ virtual const TQString getClassName() const;
+ virtual Kross::Api::Object::Ptr call(const TQString& name, Kross::Api::List::Ptr arguments);
private:
Kross::Api::Manager* m_manager;
KritaCoreFactory* m_factory;
diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_color.cpp b/krita/plugins/viewplugins/scripting/kritacore/krs_color.cpp
index e459b1cd..cbea1890 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/krs_color.cpp
+++ b/krita/plugins/viewplugins/scripting/kritacore/krs_color.cpp
@@ -22,7 +22,7 @@ namespace Kross {
namespace KritaCore {
-Color::Color ( int x, int y, int z, QColor::Spec colorSpec )
+Color::Color ( int x, int y, int z, TQColor::Spec colorSpec )
: Kross::Api::Class<Color>("KritaColor"), m_color(x,y,z,colorSpec)
{
}
diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_color.h b/krita/plugins/viewplugins/scripting/kritacore/krs_color.h
index 8d46760b..4c6283ee 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/krs_color.h
+++ b/krita/plugins/viewplugins/scripting/kritacore/krs_color.h
@@ -19,7 +19,7 @@
#ifndef KROSS_APIKRS_COLOR_H
#define KROSS_APIKRS_COLOR_H
-#include <qcolor.h>
+#include <tqcolor.h>
#include <api/class.h>
@@ -30,16 +30,16 @@ namespace KritaCore {
class Color : public Kross::Api::Class<Color>
{
public:
- Color ( int x, int y, int z, QColor::Spec colorSpec );
+ Color ( int x, int y, int z, TQColor::Spec colorSpec );
Color ();
~Color();
public:
- inline const QString getClassName() const
+ inline const TQString getClassName() const
{ return "Kross::Krita::Color"; };
- inline QColor toQColor() { return m_color; };
+ inline TQColor toTQColor() { return m_color; };
private:
- QColor m_color;
+ TQColor m_color;
};
}
diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_doc.cpp b/krita/plugins/viewplugins/scripting/kritacore/krs_doc.cpp
index 23dffabb..4c4d029b 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/krs_doc.cpp
+++ b/krita/plugins/viewplugins/scripting/kritacore/krs_doc.cpp
@@ -33,7 +33,7 @@ Doc::~Doc() {
}
-const QString Doc::getClassName() const {
+const TQString Doc::getClassName() const {
return "Kross::KritaCore::Doc";
}
diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_doc.h b/krita/plugins/viewplugins/scripting/kritacore/krs_doc.h
index 16336f94..4ac72d3d 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/krs_doc.h
+++ b/krita/plugins/viewplugins/scripting/kritacore/krs_doc.h
@@ -30,7 +30,7 @@ class Doc : public Kross::Api::Class<Doc>
public:
explicit Doc(::KisDoc* doc);
virtual ~Doc();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
/**
* This function return the Image associated with this Doc.
diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_filter.cpp b/krita/plugins/viewplugins/scripting/kritacore/krs_filter.cpp
index ee11d35d..4b382b65 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/krs_filter.cpp
+++ b/krita/plugins/viewplugins/scripting/kritacore/krs_filter.cpp
@@ -39,7 +39,7 @@ Filter::~Filter()
{
}
-const QString Filter::getClassName() const {
+const TQString Filter::getClassName() const {
return "Kross::KritaCore::Filter";
}
@@ -53,19 +53,19 @@ Kross::Api::Object::Ptr Filter::process(Kross::Api::List::Ptr args)
PaintLayer* src = (PaintLayer*)args->item(0).data();
if(!m_filter->workWith( src->paintLayer()->paintDevice()->colorSpace()))
{
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").arg("process") ) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").tqarg("process") ) );
}
- QRect rect;
+ TQRect rect;
if( args->count() >1)
{
uint x = Kross::Api::Variant::toVariant(args->item(1)).toUInt();
uint y = Kross::Api::Variant::toVariant(args->item(2)).toUInt();
uint w = Kross::Api::Variant::toVariant(args->item(3)).toUInt();
uint h = Kross::Api::Variant::toVariant(args->item(4)).toUInt();
- rect = QRect(x, y, w, h);
+ rect = TQRect(x, y, w, h);
} else {
- QRect r1 = src->paintLayer()->paintDevice()->extent();
- QRect r2 = src->paintLayer()->image()->bounds();
+ TQRect r1 = src->paintLayer()->paintDevice()->extent();
+ TQRect r2 = src->paintLayer()->image()->bounds();
rect = r1.intersect(r2);
}
m_filter->process( src->paintLayer()->paintDevice(), src->paintLayer()->paintDevice(), m_config->filterConfiguration(), rect );
diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_filter.h b/krita/plugins/viewplugins/scripting/kritacore/krs_filter.h
index 62554ef9..0788edbd 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/krs_filter.h
+++ b/krita/plugins/viewplugins/scripting/kritacore/krs_filter.h
@@ -64,7 +64,7 @@ class Filter : public Kross::Api::Class<Filter>
*/
Kross::Api::Object::Ptr process(Kross::Api::List::Ptr args);
public:
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
KisFilter* m_filter;
FilterConfiguration* m_config;
diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_filter_configuration.cpp b/krita/plugins/viewplugins/scripting/kritacore/krs_filter_configuration.cpp
index 3479cf38..eaecb0bf 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/krs_filter_configuration.cpp
+++ b/krita/plugins/viewplugins/scripting/kritacore/krs_filter_configuration.cpp
@@ -37,22 +37,22 @@ FilterConfiguration::~FilterConfiguration()
{
}
-const QString FilterConfiguration::getClassName() const {
+const TQString FilterConfiguration::getClassName() const {
return "Kross::KritaCore::FilterConfiguration";
}
Kross::Api::Object::Ptr FilterConfiguration::setProperty(Kross::Api::List::Ptr args)
{
- QString name = Kross::Api::Variant::toString(args->item(0));
- QVariant value = Kross::Api::Variant::toVariant(args->item(1));
+ TQString name = Kross::Api::Variant::toString(args->item(0));
+ TQVariant value = Kross::Api::Variant::toVariant(args->item(1));
m_fConfig->setProperty(name, value);
return 0;
}
Kross::Api::Object::Ptr FilterConfiguration::getProperty(Kross::Api::List::Ptr args)
{
- QString name = Kross::Api::Variant::toString(args->item(0));
- QVariant value;
+ TQString name = Kross::Api::Variant::toString(args->item(0));
+ TQVariant value;
if(m_fConfig->getProperty( name, value))
{
return new Kross::Api::Variant(value);
@@ -63,7 +63,7 @@ Kross::Api::Object::Ptr FilterConfiguration::getProperty(Kross::Api::List::Ptr a
Kross::Api::Object::Ptr FilterConfiguration::fromXML(Kross::Api::List::Ptr args)
{
- QString xml = Kross::Api::Variant::toString(args->item(0));
+ TQString xml = Kross::Api::Variant::toString(args->item(0));
m_fConfig->fromXML( xml );
return 0;
}
diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_filter_configuration.h b/krita/plugins/viewplugins/scripting/kritacore/krs_filter_configuration.h
index 7c8c3020..466c91dc 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/krs_filter_configuration.h
+++ b/krita/plugins/viewplugins/scripting/kritacore/krs_filter_configuration.h
@@ -35,7 +35,7 @@ class FilterConfiguration : public Kross::Api::Class<FilterConfiguration>
FilterConfiguration(KisFilterConfiguration*);
~FilterConfiguration();
public:
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
inline KisFilterConfiguration* filterConfiguration() { return m_fConfig; };
private:
/**
diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_histogram.cpp b/krita/plugins/viewplugins/scripting/kritacore/krs_histogram.cpp
index 953eb868..83342070 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/krs_histogram.cpp
+++ b/krita/plugins/viewplugins/scripting/kritacore/krs_histogram.cpp
@@ -47,7 +47,7 @@ Histogram::~Histogram()
{
}
-const QString Histogram::getClassName() const {
+const TQString Histogram::getClassName() const {
return "Kross::KritaCore::Histogram";
}
diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_histogram.h b/krita/plugins/viewplugins/scripting/kritacore/krs_histogram.h
index b238c5db..bb8af6fa 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/krs_histogram.h
+++ b/krita/plugins/viewplugins/scripting/kritacore/krs_histogram.h
@@ -50,7 +50,7 @@ class Histogram : public Kross::Api::Class<Histogram>
public:
Histogram(KisPaintLayerSP layer, KisHistogramProducerSP producer, const enumHistogramType type);
~Histogram();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
/**
* This function return the maximum bound of the histogram
diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_image.cpp b/krita/plugins/viewplugins/scripting/kritacore/krs_image.cpp
index b274ad33..bf1c281f 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/krs_image.cpp
+++ b/krita/plugins/viewplugins/scripting/kritacore/krs_image.cpp
@@ -52,7 +52,7 @@ Image::~Image()
{
}
-const QString Image::getClassName() const {
+const TQString Image::getClassName() const {
return "Kross::KritaCore::Image";
}
@@ -80,7 +80,7 @@ Kross::Api::Object::Ptr Image::convertToColorspace(Kross::Api::List::Ptr args)
KisColorSpace * dstCS = KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID(Kross::Api::Variant::toString(args->item(0)), ""), "");
if(!dstCS)
{
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("Colorspace %0 is not available, please check your installation.").arg(Kross::Api::Variant::toString(args->item(0))) ) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("Colorspace %0 is not available, please check your installation.").tqarg(Kross::Api::Variant::toString(args->item(0))) ) );
return 0;
}
m_image->convertTo(dstCS);
@@ -95,10 +95,10 @@ Kross::Api::Object::Ptr Image::colorSpaceId(Kross::Api::List::Ptr )
Kross::Api::Object::Ptr Image::createPaintLayer(Kross::Api::List::Ptr args)
{
- QString name = Kross::Api::Variant::toString(args->item(0));
+ TQString name = Kross::Api::Variant::toString(args->item(0));
int opacity = Kross::Api::Variant::toInt(args->item(1));
opacity = CLAMP(opacity, 0, 255);
- QString csname;
+ TQString csname;
if(args->count() > 2)
{
csname = Kross::Api::Variant::toString(args->item(2));
diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_image.h b/krita/plugins/viewplugins/scripting/kritacore/krs_image.h
index 0be2e46f..19e9ba6b 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/krs_image.h
+++ b/krita/plugins/viewplugins/scripting/kritacore/krs_image.h
@@ -34,7 +34,7 @@ class Image : public Kross::Api::Class<Image>
public:
Image(KisImageSP image, KisDoc* doc = 0);
~Image();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
/**
* Return the active PaintLayer, if any.
diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_iterator.h b/krita/plugins/viewplugins/scripting/kritacore/krs_iterator.h
index 9493f49a..acd9b061 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/krs_iterator.h
+++ b/krita/plugins/viewplugins/scripting/kritacore/krs_iterator.h
@@ -19,7 +19,7 @@
#ifndef KROSS_KRITACOREKRS_ITERATOR_H
#define KROSS_KRITACOREKRS_ITERATOR_H
-#include <qobject.h>
+#include <tqobject.h>
#include <api/class.h>
//#include <api/proxy.h>
//#include <api/variant.h>
@@ -36,25 +36,26 @@ namespace Kross {
namespace KritaCore {
-//<beurk> stupid Qt which doesn't support templated QObject
+//<beurk> stupid TQt which doesn't support templated TQObject
class IteratorMemoryManaged {
public:
- virtual void invalidateIterator() = 0;
+ virtual void tqinvalidateIterator() = 0;
};
-class IteratorMemoryManager : public QObject {
+class IteratorMemoryManager : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
IteratorMemoryManager(IteratorMemoryManaged* it) : m_it(it)
{
// Connect the Monitor to know when the invalidating of iterator is needed
- connect(KisScriptMonitor::instance(), SIGNAL(executionFinished(const Kross::Api::ScriptAction* )), this, SLOT(invalidateIterator()));
+ connect(KisScriptMonitor::instance(), TQT_SIGNAL(executionFinished(const Kross::Api::ScriptAction* )), this, TQT_SLOT(tqinvalidateIterator()));
}
public slots:
- void invalidateIterator()
+ void tqinvalidateIterator()
{
- m_it->invalidateIterator();
+ m_it->tqinvalidateIterator();
}
private:
IteratorMemoryManaged* m_it;
@@ -97,9 +98,9 @@ class Iterator : public Kross::Api::Class<Iterator<_T_It> >, private IteratorMem
>(this, &Iterator<_T_It>::isDone));
// get/set value
- QValueVector<KisChannelInfo *> channels = layer->paintDevice()->colorSpace()->channels();
- QString initiales = "";
- for(QValueVector<KisChannelInfo *>::iterator itC = channels.begin(); itC != channels.end(); itC++)
+ TQValueVector<KisChannelInfo *> channels = layer->paintDevice()->colorSpace()->channels();
+ TQString initiales = "";
+ for(TQValueVector<KisChannelInfo *>::iterator itC = channels.begin(); itC != channels.end(); itC++)
{
KisChannelInfo * ci = *itC;
initiales += ci->name().left(1);
@@ -146,10 +147,10 @@ class Iterator : public Kross::Api::Class<Iterator<_T_It> >, private IteratorMem
~Iterator()
{
- invalidateIterator();
+ tqinvalidateIterator();
delete m_itmm;
}
- virtual const QString getClassName() const {
+ virtual const TQString getClassName() const {
return "Kross::KritaCore::KrsDoc";
};
private:
@@ -163,7 +164,7 @@ class Iterator : public Kross::Api::Class<Iterator<_T_It> >, private IteratorMem
*/
Kross::Api::Object::Ptr darken(Kross::Api::List::Ptr args)
{
- Q_INT32 shade = Kross::Api::Variant::toUInt( args->item(0) );
+ TQ_INT32 shade = Kross::Api::Variant::toUInt( args->item(0) );
bool compensate = (args->count() == 2);
double compensation = compensate ? Kross::Api::Variant::toDouble( args->item(2) ) : 0.;
m_layer->paintDevice()->colorSpace()->darken(m_it->rawData(), m_it->rawData(), shade, compensate, compensation, 1);
@@ -194,23 +195,23 @@ class Iterator : public Kross::Api::Class<Iterator<_T_It> >, private IteratorMem
}
Kross::Api::Object::Ptr getChannelUINT8(Kross::Api::List::Ptr, uint channelpos)
{
- Q_UINT8* data = (Q_UINT8*)(m_it->rawData() + channelpos);
+ TQ_UINT8* data = (TQ_UINT8*)(m_it->rawData() + channelpos);
return new Kross::Api::Variant( * data);
}
Kross::Api::Object::Ptr setChannelUINT8(Kross::Api::List::Ptr args, uint channelpos)
{
- Q_UINT8* data = (Q_UINT8*)(m_it->rawData() + channelpos); //*(uint*)channelpos);
+ TQ_UINT8* data = (TQ_UINT8*)(m_it->rawData() + channelpos); //*(uint*)channelpos);
*data = Kross::Api::Variant::toUInt( args->item(0) );
return 0;
}
Kross::Api::Object::Ptr getChannelUINT16(Kross::Api::List::Ptr, uint channelpos)
{
- Q_UINT16* data = (Q_UINT16*)(m_it->rawData() + channelpos);
+ TQ_UINT16* data = (TQ_UINT16*)(m_it->rawData() + channelpos);
return new Kross::Api::Variant( * data);
}
Kross::Api::Object::Ptr setChannelUINT16(Kross::Api::List::Ptr args, uint channelpos)
{
- Q_UINT16* data = (Q_UINT16*)(m_it->rawData() + channelpos);
+ TQ_UINT16* data = (TQ_UINT16*)(m_it->rawData() + channelpos);
*data = Kross::Api::Variant::toUInt( args->item(0) );
return 0;
}
@@ -227,25 +228,25 @@ class Iterator : public Kross::Api::Class<Iterator<_T_It> >, private IteratorMem
}
Kross::Api::Object::Ptr getPixel(Kross::Api::List::Ptr)
{
- QValueVector<KisChannelInfo *> channels = m_layer->paintDevice()->colorSpace()->channels();
- QValueList<QVariant> pixel;
- for(QValueVector<KisChannelInfo *>::iterator itC = channels.begin(); itC != channels.end(); itC++)
+ TQValueVector<KisChannelInfo *> channels = m_layer->paintDevice()->colorSpace()->channels();
+ TQValueList<TQVariant> pixel;
+ for(TQValueVector<KisChannelInfo *>::iterator itC = channels.begin(); itC != channels.end(); itC++)
{
KisChannelInfo * ci = *itC;
- Q_UINT8* data = (Q_UINT8*)(m_it->rawData() + ci->pos());
+ TQ_UINT8* data = (TQ_UINT8*)(m_it->rawData() + ci->pos());
switch(ci->channelValueType())
{
case KisChannelInfo::UINT8:
pixel.push_back( *data);
break;
case KisChannelInfo::UINT16:
- pixel.push_back( *((Q_UINT16*) data) );
+ pixel.push_back( *((TQ_UINT16*) data) );
break;
case KisChannelInfo::FLOAT32:
pixel.push_back( *((float*) data) );
break;
default:
- kdDebug(41011) << i18n("An error has occurred in %1").arg("getPixel") << endl;
+ kdDebug(41011) << i18n("An error has occurred in %1").tqarg("getPixel") << endl;
kdDebug(41011) << i18n("unsupported data format in scripts") << endl;
break;
}
@@ -254,26 +255,26 @@ class Iterator : public Kross::Api::Class<Iterator<_T_It> >, private IteratorMem
}
Kross::Api::Object::Ptr setPixel(Kross::Api::List::Ptr args)
{
- QValueList<QVariant> pixel = Kross::Api::Variant::toList( args->item(0) );
- QValueVector<KisChannelInfo *> channels = m_layer->paintDevice()->colorSpace()->channels();
+ TQValueList<TQVariant> pixel = Kross::Api::Variant::toList( args->item(0) );
+ TQValueVector<KisChannelInfo *> channels = m_layer->paintDevice()->colorSpace()->channels();
uint i = 0;
- for(QValueVector<KisChannelInfo *>::iterator itC = channels.begin(); itC != channels.end(); itC++, i++)
+ for(TQValueVector<KisChannelInfo *>::iterator itC = channels.begin(); itC != channels.end(); itC++, i++)
{
KisChannelInfo * ci = *itC;
- Q_UINT8* data = (Q_UINT8*)(m_it->rawData() + ci->pos());
+ TQ_UINT8* data = (TQ_UINT8*)(m_it->rawData() + ci->pos());
switch(ci->channelValueType())
{
case KisChannelInfo::UINT8:
*data = pixel[i].toUInt();
break;
case KisChannelInfo::UINT16:
- *((Q_UINT16*) data) = pixel[i].toUInt();
+ *((TQ_UINT16*) data) = pixel[i].toUInt();
break;
case KisChannelInfo::FLOAT32:
*((float*) data) = pixel[i].toDouble();
break;
default:
- kdDebug(41011) << i18n("An error has occurred in %1").arg("setPixel") << endl;
+ kdDebug(41011) << i18n("An error has occurred in %1").tqarg("setPixel") << endl;
kdDebug(41011) << i18n("unsupported data format in scripts") << endl;
break;
}
@@ -281,7 +282,7 @@ class Iterator : public Kross::Api::Class<Iterator<_T_It> >, private IteratorMem
return 0;
}
private:
- virtual void invalidateIterator()
+ virtual void tqinvalidateIterator()
{
kdDebug(41011) << "invalidating iterator" << endl;
if(m_it)
diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_paint_layer.cpp b/krita/plugins/viewplugins/scripting/kritacore/krs_paint_layer.cpp
index 1f79b22c..519a63d9 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/krs_paint_layer.cpp
+++ b/krita/plugins/viewplugins/scripting/kritacore/krs_paint_layer.cpp
@@ -60,7 +60,7 @@ PaintLayer::~PaintLayer()
{
}
-const QString PaintLayer::getClassName() const {
+const TQString PaintLayer::getClassName() const {
return "Kross::KritaCore::PaintLayer";
}
@@ -91,22 +91,22 @@ Kross::Api::Object::Ptr PaintLayer::createVLineIterator(Kross::Api::List::Ptr ar
}
Kross::Api::Object::Ptr PaintLayer::getWidth(Kross::Api::List::Ptr)
{
- QRect r1 = paintLayer()->extent();
- QRect r2 = paintLayer()->image()->bounds();
- QRect rect = r1.intersect(r2);
+ TQRect r1 = paintLayer()->extent();
+ TQRect r2 = paintLayer()->image()->bounds();
+ TQRect rect = r1.intersect(r2);
return new Kross::Api::Variant(rect.width());
}
Kross::Api::Object::Ptr PaintLayer::getHeight(Kross::Api::List::Ptr)
{
- QRect r1 = paintLayer()->extent();
- QRect r2 = paintLayer()->image()->bounds();
- QRect rect = r1.intersect(r2);
+ TQRect r1 = paintLayer()->extent();
+ TQRect r2 = paintLayer()->image()->bounds();
+ TQRect rect = r1.intersect(r2);
return new Kross::Api::Variant(rect.height());
}
Kross::Api::Object::Ptr PaintLayer::createHistogram(Kross::Api::List::Ptr args)
{
- QString histoname = Kross::Api::Variant::toString(args->item(0));
+ TQString histoname = Kross::Api::Variant::toString(args->item(0));
KisHistogramProducerFactory* factory = KisHistogramProducerFactoryRegistry::instance()->get(histoname);
/* KisIDList listID = KisHistogramProducerFactoryRegistry::instance()->listKeys();
@@ -130,7 +130,7 @@ Kross::Api::Object::Ptr PaintLayer::createHistogram(Kross::Api::List::Ptr args)
{
return new Histogram( paintLayer().data(), factory->generate() , type);
} else {
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").arg("createHistogram") + "\n" + i18n("The histogram %1 is not available").arg(histoname) ) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").tqarg("createHistogram") + "\n" + i18n("The histogram %1 is not available").tqarg(histoname) ) );
}
return 0;
}
@@ -142,7 +142,7 @@ Kross::Api::Object::Ptr PaintLayer::createPainter(Kross::Api::List::Ptr )
Kross::Api::Object::Ptr PaintLayer::beginPainting(Kross::Api::List::Ptr args)
{
- QString name = Kross::Api::Variant::toString(args->item(0));
+ TQString name = Kross::Api::Variant::toString(args->item(0));
if(m_cmd != 0)
{
delete m_cmd;
@@ -172,7 +172,7 @@ Kross::Api::Object::Ptr PaintLayer::convertToColorspace(Kross::Api::List::Ptr ar
if(!dstCS)
{
// FIXME: inform user
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").arg("convertToColorspace") + "\n" + i18n("Colorspace %1 is not available, please check your installation.").arg(Kross::Api::Variant::toString(args->item(0))) ) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").tqarg("convertToColorspace") + "\n" + i18n("Colorspace %1 is not available, please check your installation.").tqarg(Kross::Api::Variant::toString(args->item(0))) ) );
return 0;
}
paintLayer()->paintDevice()->convertTo(dstCS);
@@ -188,7 +188,7 @@ Kross::Api::Object::Ptr PaintLayer::colorSpaceId(Kross::Api::List::Ptr )
Kross::Api::Object::Ptr PaintLayer::fastWaveletTransformation(Kross::Api::List::Ptr )
{
KisMathToolbox* mathToolbox = KisMetaRegistry::instance()->mtRegistry()->get( paintLayer()->paintDevice()->colorSpace()->mathToolboxID() );
- QRect rect = paintLayer()->exactBounds();
+ TQRect rect = paintLayer()->exactBounds();
KisMathToolbox::KisWavelet* wav = mathToolbox->fastWaveletTransformation(paintLayer()->paintDevice(), rect);
return new Wavelet(wav);
}
@@ -196,7 +196,7 @@ Kross::Api::Object::Ptr PaintLayer::fastWaveletUntransformation(Kross::Api::List
{
Wavelet* wav = (Wavelet*)args->item(0).data();
KisMathToolbox* mathToolbox = KisMetaRegistry::instance()->mtRegistry()->get( paintLayer()->paintDevice()->colorSpace()->mathToolboxID() );
- QRect rect = paintLayer()->exactBounds();
+ TQRect rect = paintLayer()->exactBounds();
mathToolbox->fastWaveletUntransformation( paintLayer()->paintDevice(), rect, wav->wavelet() );
return 0;
}
diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_paint_layer.h b/krita/plugins/viewplugins/scripting/kritacore/krs_paint_layer.h
index 4ddfd4bd..9e00bf91 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/krs_paint_layer.h
+++ b/krita/plugins/viewplugins/scripting/kritacore/krs_paint_layer.h
@@ -39,7 +39,7 @@ class PaintLayer : public Kross::Api::Class<PaintLayer>
public:
explicit PaintLayer(KisPaintLayerSP layer, KisDoc* doc = 0);
virtual ~PaintLayer();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
/**
* Create an iterator over a layer, it will iterate on a rectangle area.
diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_painter.cpp b/krita/plugins/viewplugins/scripting/kritacore/krs_painter.cpp
index 621a173d..370f78c5 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/krs_painter.cpp
+++ b/krita/plugins/viewplugins/scripting/kritacore/krs_painter.cpp
@@ -77,7 +77,7 @@ Painter::~Painter()
Kross::Api::Object::Ptr Painter::convolve(Kross::Api::List::Ptr args)
{
KisConvolutionPainter* cp = new KisConvolutionPainter(m_painter->device());
- QRect rect;
+ TQRect rect;
KisKernel kernel;
kernel.factor = Kross::Api::Variant::toInt(args->item(1));
kernel.offset = Kross::Api::Variant::toInt(args->item(2));
@@ -98,43 +98,43 @@ Kross::Api::Object::Ptr Painter::convolve(Kross::Api::List::Ptr args)
uint y = Kross::Api::Variant::toUInt(args->item(6));
uint w = Kross::Api::Variant::toUInt(args->item(7));
uint h = Kross::Api::Variant::toUInt(args->item(8));
- rect = QRect(x,y,w,h);
+ rect = TQRect(x,y,w,h);
} else {
- QRect r1 = paintLayer()->paintDevice()->extent();
- QRect r2 = paintLayer()->image()->bounds();
+ TQRect r1 = paintLayer()->paintDevice()->extent();
+ TQRect r2 = paintLayer()->image()->bounds();
rect = r1.intersect(r2);
}
- QValueList<QVariant> kernelH = Kross::Api::Variant::toList( args->item(0) );
+ TQValueList<TQVariant> kernelH = Kross::Api::Variant::toList( args->item(0) );
- QVariant firstlineVariant = *kernelH.begin();
- if(firstlineVariant.type() != QVariant::List)
+ TQVariant firstlineVariant = *kernelH.begin();
+ if(firstlineVariant.type() != TQVariant::List)
{
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(i18n("An error has occured in %1").arg("applyConvolution")) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(i18n("An error has occured in %1").tqarg("applyConvolution")) );
}
- QValueList<QVariant> firstline = firstlineVariant.toList();
+ TQValueList<TQVariant> firstline = firstlineVariant.toList();
kernel.height = kernelH.size();
kernel.width = firstline.size();
- kernel.data = new Q_INT32[kernel.height * kernel.width];
+ kernel.data = new TQ_INT32[kernel.height * kernel.width];
uint i = 0;
- for(QValueList<QVariant>::iterator itK = kernelH.begin(); itK != kernelH.end(); itK++, i ++ )
+ for(TQValueList<TQVariant>::iterator itK = kernelH.begin(); itK != kernelH.end(); itK++, i ++ )
{
- QVariant lineVariant = *kernelH.begin();
- if(lineVariant.type() != QVariant::List)
+ TQVariant lineVariant = *kernelH.begin();
+ if(lineVariant.type() != TQVariant::List)
{
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(i18n("An error has occured in %1").arg("applyConvolution")) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(i18n("An error has occured in %1").tqarg("applyConvolution")) );
}
- QValueList<QVariant> line = firstlineVariant.toList();
+ TQValueList<TQVariant> line = firstlineVariant.toList();
if(line.size() != kernel.width)
{
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(i18n("An error has occured in %1").arg("applyConvolution")) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(i18n("An error has occured in %1").tqarg("applyConvolution")) );
}
uint j = 0;
- for(QValueList<QVariant>::iterator itLine = line.begin(); itLine != line.end(); itLine++, j ++ )
+ for(TQValueList<TQVariant>::iterator itLine = line.begin(); itLine != line.end(); itLine++, j ++ )
{
kernel.data[ j + i * kernel.width ] = (*itLine).toInt();
}
@@ -221,7 +221,7 @@ Kross::Api::Object::Ptr Painter::setFillStyle(Kross::Api::List::Ptr args)
Kross::Api::Object::Ptr Painter::setOpacity(Kross::Api::List::Ptr args)
{
- Q_UINT8 opacity = Kross::Api::Variant::toVariant(args->item(0)).toUInt();
+ TQ_UINT8 opacity = Kross::Api::Variant::toVariant(args->item(0)).toUInt();
m_painter->setOpacity(opacity);
return 0;
}
@@ -236,8 +236,8 @@ Kross::Api::Object::Ptr Painter::setDuplicateOffset(Kross::Api::List::Ptr args)
Kross::Api::Object::Ptr Painter::paintPolyline(Kross::Api::List::Ptr args)
{
- QValueList<QVariant> pointsX = Kross::Api::Variant::toList( args->item(0) );
- QValueList<QVariant> pointsY = Kross::Api::Variant::toList( args->item(1) );
+ TQValueList<TQVariant> pointsX = Kross::Api::Variant::toList( args->item(0) );
+ TQValueList<TQVariant> pointsY = Kross::Api::Variant::toList( args->item(1) );
if(pointsX.size() != pointsY.size())
{
throw Kross::Api::Exception::Ptr( new Kross::Api::Exception("the two lists should have the same size.") );
@@ -287,8 +287,8 @@ Kross::Api::Object::Ptr Painter::paintEllipse(Kross::Api::List::Ptr args)
Kross::Api::Object::Ptr Painter::paintPolygon(Kross::Api::List::Ptr args)
{
- QValueList<QVariant> pointsX = Kross::Api::Variant::toList( args->item(0) );
- QValueList<QVariant> pointsY = Kross::Api::Variant::toList( args->item(1) );
+ TQValueList<TQVariant> pointsX = Kross::Api::Variant::toList( args->item(0) );
+ TQValueList<TQVariant> pointsY = Kross::Api::Variant::toList( args->item(1) );
if(pointsX.size() != pointsY.size())
{
throw Kross::Api::Exception::Ptr( new Kross::Api::Exception("the two lists should have the same size.") );
@@ -320,14 +320,14 @@ Kross::Api::Object::Ptr Painter::paintAt(Kross::Api::List::Ptr args)
Kross::Api::Object::Ptr Painter::setBackgroundColor(Kross::Api::List::Ptr args)
{
Color* c = (Color*)args->item(0).data();
- m_painter->setBackgroundColor( KisColor(c->toQColor(), paintLayer()->paintDevice()->colorSpace() ));
+ m_painter->setBackgroundColor( KisColor(c->toTQColor(), paintLayer()->paintDevice()->colorSpace() ));
return 0;
}
Kross::Api::Object::Ptr Painter::setPaintColor(Kross::Api::List::Ptr args)
{
Color* c = (Color*)args->item(0).data();
- m_painter->setPaintColor( KisColor(c->toQColor(), paintLayer()->paintDevice()->colorSpace() ));
+ m_painter->setPaintColor( KisColor(c->toTQColor(), paintLayer()->paintDevice()->colorSpace() ));
return 0;
}
@@ -347,7 +347,7 @@ Kross::Api::Object::Ptr Painter::setBrush(Kross::Api::List::Ptr args)
}
Kross::Api::Object::Ptr Painter::setPaintOp(Kross::Api::List::Ptr args)
{
- QString id = Kross::Api::Variant::toString(args->item(0));
+ TQString id = Kross::Api::Variant::toString(args->item(0));
KisPaintOp* op = KisPaintOpRegistry::instance()->paintOp( id, 0, m_painter );
m_painter->setPaintOp( op );
return 0;
diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_painter.h b/krita/plugins/viewplugins/scripting/kritacore/krs_painter.h
index 37ae7993..64cf6940 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/krs_painter.h
+++ b/krita/plugins/viewplugins/scripting/kritacore/krs_painter.h
@@ -217,11 +217,11 @@ class Painter : public Kross::Api::Class<Painter>
protected:
inline KisPaintLayerSP paintLayer() { return m_layer; }
private:
- inline vKisPoint createPointsVector( QValueList<QVariant> xs, QValueList<QVariant> ys)
+ inline vKisPoint createPointsVector( TQValueList<TQVariant> xs, TQValueList<TQVariant> ys)
{
vKisPoint a;
- QValueList<QVariant>::iterator itx = xs.begin();
- QValueList<QVariant>::iterator ity = ys.begin();
+ TQValueList<TQVariant>::iterator itx = xs.begin();
+ TQValueList<TQVariant>::iterator ity = ys.begin();
for(; itx != xs.end(); ++itx, ++ity)
{
a.push_back(KisPoint( (*itx).toDouble(), (*ity).toDouble()));
diff --git a/krita/plugins/viewplugins/scripting/kritacore/krs_wavelet.cpp b/krita/plugins/viewplugins/scripting/kritacore/krs_wavelet.cpp
index d2786780..9c652a07 100644
--- a/krita/plugins/viewplugins/scripting/kritacore/krs_wavelet.cpp
+++ b/krita/plugins/viewplugins/scripting/kritacore/krs_wavelet.cpp
@@ -49,21 +49,21 @@ Wavelet::~Wavelet()
Kross::Api::Object::Ptr Wavelet::getNCoeff(Kross::Api::List::Ptr args)
{
- Q_UINT32 n = Kross::Api::Variant::toUInt(args->item(0));
+ TQ_UINT32 n = Kross::Api::Variant::toUInt(args->item(0));
if( n > m_numCoeff)
{
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").arg("getNCoeff") + "\n" + i18n("Index out of bound") ) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").tqarg("getNCoeff") + "\n" + i18n("Index out of bound") ) );
}
return new Kross::Api::Variant(*(m_wavelet->coeffs + n ));
}
Kross::Api::Object::Ptr Wavelet::setNCoeff(Kross::Api::List::Ptr args)
{
- Q_UINT32 n = Kross::Api::Variant::toUInt(args->item(0));
+ TQ_UINT32 n = Kross::Api::Variant::toUInt(args->item(0));
double v = Kross::Api::Variant::toDouble(args->item(1));
if( n > m_numCoeff)
{
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").arg("setNCoeff") + "\n" + i18n("Index out of bound") ) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").tqarg("setNCoeff") + "\n" + i18n("Index out of bound") ) );
}
*(m_wavelet->coeffs + n ) = v;
return 0;
@@ -71,23 +71,23 @@ Kross::Api::Object::Ptr Wavelet::setNCoeff(Kross::Api::List::Ptr args)
Kross::Api::Object::Ptr Wavelet::getXYCoeff(Kross::Api::List::Ptr args)
{
- Q_UINT32 x = Kross::Api::Variant::toUInt(args->item(0));
- Q_UINT32 y = Kross::Api::Variant::toUInt(args->item(1));
+ TQ_UINT32 x = Kross::Api::Variant::toUInt(args->item(0));
+ TQ_UINT32 y = Kross::Api::Variant::toUInt(args->item(1));
if( x > m_wavelet->size && y > m_wavelet->size)
{
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").arg("getXYCoeff") + "\n" + i18n("Index out of bound") ) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").tqarg("getXYCoeff") + "\n" + i18n("Index out of bound") ) );
}
return new Kross::Api::Variant(*(m_wavelet->coeffs + (x + y * m_wavelet->size ) * m_wavelet->depth ));
}
Kross::Api::Object::Ptr Wavelet::setXYCoeff(Kross::Api::List::Ptr args)
{
- Q_UINT32 x = Kross::Api::Variant::toUInt(args->item(0));
- Q_UINT32 y = Kross::Api::Variant::toUInt(args->item(1));
+ TQ_UINT32 x = Kross::Api::Variant::toUInt(args->item(0));
+ TQ_UINT32 y = Kross::Api::Variant::toUInt(args->item(1));
double v = Kross::Api::Variant::toDouble(args->item(2));
if( x > m_wavelet->size && y > m_wavelet->size)
{
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").arg("setXYCoeff") + "\n" + i18n("Index out of bound") ));
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").tqarg("setXYCoeff") + "\n" + i18n("Index out of bound") ));
}
*(m_wavelet->coeffs + (x + y * m_wavelet->size ) * m_wavelet->depth ) = v;
return 0;
diff --git a/krita/plugins/viewplugins/scripting/kritascripting/kis_script_monitor.cpp b/krita/plugins/viewplugins/scripting/kritascripting/kis_script_monitor.cpp
index 8bb12596..3967ffe7 100644
--- a/krita/plugins/viewplugins/scripting/kritascripting/kis_script_monitor.cpp
+++ b/krita/plugins/viewplugins/scripting/kritascripting/kis_script_monitor.cpp
@@ -34,8 +34,8 @@ KisScriptMonitor::~KisScriptMonitor()
void KisScriptMonitor::monitor(Kross::Api::ScriptGUIClient* guiClient)
{
- connect(guiClient, SIGNAL(executionFinished( const Kross::Api::ScriptAction* )), SIGNAL(executionFinished( const Kross::Api::ScriptAction* )));
- connect(guiClient, SIGNAL(executionStarted( const Kross::Api::ScriptAction* )), SIGNAL(executionStarted( const Kross::Api::ScriptAction* )));
+ connect(guiClient, TQT_SIGNAL(executionFinished( const Kross::Api::ScriptAction* )), TQT_SIGNAL(executionFinished( const Kross::Api::ScriptAction* )));
+ connect(guiClient, TQT_SIGNAL(executionStarted( const Kross::Api::ScriptAction* )), TQT_SIGNAL(executionStarted( const Kross::Api::ScriptAction* )));
}
KisScriptMonitor* KisScriptMonitor::s_instance = 0;
diff --git a/krita/plugins/viewplugins/scripting/kritascripting/kis_script_monitor.h b/krita/plugins/viewplugins/scripting/kritascripting/kis_script_monitor.h
index de1e0380..c1ee64c0 100644
--- a/krita/plugins/viewplugins/scripting/kritascripting/kis_script_monitor.h
+++ b/krita/plugins/viewplugins/scripting/kritascripting/kis_script_monitor.h
@@ -19,7 +19,7 @@
#ifndef KIS_SCRIPT_MONITOR_H
#define KIS_SCRIPT_MONITOR_H
-#include <qobject.h>
+#include <tqobject.h>
namespace Kross {
namespace Api {
@@ -31,8 +31,9 @@ namespace Kross {
/**
@author Cyrille Berger <[email protected]>
*/
-class KisScriptMonitor : public QObject {
+class KisScriptMonitor : public TQObject {
Q_OBJECT
+ TQ_OBJECT
private:
KisScriptMonitor();
~KisScriptMonitor();
diff --git a/krita/plugins/viewplugins/scripting/kritascripting/kis_script_progress.cpp b/krita/plugins/viewplugins/scripting/kritascripting/kis_script_progress.cpp
index c3629304..d7af4eb4 100644
--- a/krita/plugins/viewplugins/scripting/kritascripting/kis_script_progress.cpp
+++ b/krita/plugins/viewplugins/scripting/kritascripting/kis_script_progress.cpp
@@ -26,7 +26,7 @@ void KisScriptProgress::activateAsSubject()
m_view->canvasSubject()->progressDisplay()->setSubject( this, true, false /* TODO: how to cancel a script ? */ );
}
-void KisScriptProgress::setProgressTotalSteps(Q_INT32 totalSteps)
+void KisScriptProgress::setProgressTotalSteps(TQ_INT32 totalSteps)
{
m_progressTotalSteps = totalSteps;
m_progressSteps = 0;
@@ -34,10 +34,10 @@ void KisScriptProgress::setProgressTotalSteps(Q_INT32 totalSteps)
emit notifyProgress(0);
}
-void KisScriptProgress::setProgress(Q_INT32 progress)
+void KisScriptProgress::setProgress(TQ_INT32 progress)
{
m_progressSteps = progress;
- Q_INT32 progressPerCent = (m_progressSteps * 100) / (m_progressTotalSteps > 0 ? m_progressTotalSteps : 1);
+ TQ_INT32 progressPerCent = (m_progressSteps * 100) / (m_progressTotalSteps > 0 ? m_progressTotalSteps : 1);
if (progressPerCent != m_lastProgressPerCent) {
@@ -51,9 +51,9 @@ void KisScriptProgress::incProgress()
setProgress( ++m_progressSteps );
}
-void KisScriptProgress::setProgressStage(const QString& stage, Q_INT32 progress)
+void KisScriptProgress::setProgressStage(const TQString& stage, TQ_INT32 progress)
{
- Q_INT32 progressPerCent = (progress * 100) / (m_progressTotalSteps > 0 ? m_progressTotalSteps : 1);
+ TQ_INT32 progressPerCent = (progress * 100) / (m_progressTotalSteps > 0 ? m_progressTotalSteps : 1);
m_lastProgressPerCent = progress;
emit notifyProgressStage( stage, progressPerCent);
}
diff --git a/krita/plugins/viewplugins/scripting/kritascripting/kis_script_progress.h b/krita/plugins/viewplugins/scripting/kritascripting/kis_script_progress.h
index 864a6760..48af433c 100644
--- a/krita/plugins/viewplugins/scripting/kritascripting/kis_script_progress.h
+++ b/krita/plugins/viewplugins/scripting/kritascripting/kis_script_progress.h
@@ -38,17 +38,17 @@ class KisScriptProgress : public KisProgressSubject
void activateAsSubject();
virtual void cancel() {};
public:
- void setProgressTotalSteps(Q_INT32 totalSteps);
- void setProgress(Q_INT32 progress);
+ void setProgressTotalSteps(TQ_INT32 totalSteps);
+ void setProgress(TQ_INT32 progress);
void incProgress();
- void setProgressStage(const QString& stage, Q_INT32 progress);
+ void setProgressStage(const TQString& stage, TQ_INT32 progress);
void progressDone();
- inline void setPackagePath(QString path) { m_packagePath = path; };
- inline QString packagePath() { return m_packagePath; }
+ inline void setPackagePath(TQString path) { m_packagePath = path; };
+ inline TQString packagePath() { return m_packagePath; }
private:
- Q_INT32 m_progressSteps, m_progressTotalSteps, m_lastProgressPerCent;
+ TQ_INT32 m_progressSteps, m_progressTotalSteps, m_lastProgressPerCent;
KisView * m_view;
- QString m_packagePath;
+ TQString m_packagePath;
};
#endif
diff --git a/krita/plugins/viewplugins/scripting/samples/python/reshapehisto.py b/krita/plugins/viewplugins/scripting/samples/python/reshapehisto.py
index 4a79e68c..02371826 100644
--- a/krita/plugins/viewplugins/scripting/samples/python/reshapehisto.py
+++ b/krita/plugins/viewplugins/scripting/samples/python/reshapehisto.py
@@ -18,7 +18,7 @@
import math
-# it's an experimental script to try to reshape histogram, while the results are far to be convincing yet
+# it's an experimental script to try to reshape.histogram, while the results are far to be convincing yet
# it is still an example on how to use histogram in a script
def sign(a):
diff --git a/krita/plugins/viewplugins/scripting/samples/ruby/randompaint.rb b/krita/plugins/viewplugins/scripting/samples/ruby/randompaint.rb
index 9e2f504f..ab5f6205 100644
--- a/krita/plugins/viewplugins/scripting/samples/ruby/randompaint.rb
+++ b/krita/plugins/viewplugins/scripting/samples/ruby/randompaint.rb
@@ -60,11 +60,11 @@ for i in 1..100
painter.setBrush( Krosskritacore::newCircleBrush(rand*20,rand*20,rand*10,rand*10) )
end
# paint a point
- shape = rand * 7
+ tqshape = rand * 7
painter.setStrokeStyle(1)
- if( shape < 1 )
+ if( tqshape < 1 )
painter.paintAt(rand * width , rand * height,1.1)
- elsif(shape < 2 )
+ elsif(tqshape < 2 )
xs = Array.new
ys = Array.new
for i in 0..6
@@ -72,14 +72,14 @@ for i in 1..100
ys[i] = rand*height
end
painter.paintPolyline(xs,ys)
- elsif(shape < 3)
+ elsif(tqshape < 3)
painter.paintLine(rand * width, rand * height, 1.1, rand * width, rand * height,1.1)
- elsif(shape < 4)
+ elsif(tqshape < 4)
painter.paintBezierCurve(rand * width, rand * height, 1.1, rand * width, rand * height, rand * width , rand * height, rand * width, rand * height, 1.1)
- elsif(shape < 5)
+ elsif(tqshape < 5)
randomizeStyle(painter)
painter.paintEllipse(rand * width, rand * height, rand * width, rand * height, 1.1)
- elsif(shape < 6)
+ elsif(tqshape < 6)
xs = Array.new
ys = Array.new
for i in 0..6
@@ -88,7 +88,7 @@ for i in 1..100
end
randomizeStyle(painter)
painter.paintPolygon(xs, ys)
- elsif(shape < 7)
+ elsif(tqshape < 7)
randomizeStyle(painter)
painter.paintRect(rand * width, rand * height, rand * width, rand * height, 1.1)
end
diff --git a/krita/plugins/viewplugins/scripting/samples/ruby/torture-painting.rb b/krita/plugins/viewplugins/scripting/samples/ruby/torture-painting.rb
index 67042de2..47216761 100644
--- a/krita/plugins/viewplugins/scripting/samples/ruby/torture-painting.rb
+++ b/krita/plugins/viewplugins/scripting/samples/ruby/torture-painting.rb
@@ -91,11 +91,11 @@ class TorturePainting
painter.setBrush( Krosskritacore::newCircleBrush(rand*20,rand*20,rand*10,rand*10) )
end
# paint a point
- shape = rand * 7
+ tqshape = rand * 7
painter.setStrokeStyle(1)
- if( shape < 1 )
+ if( tqshape < 1 )
painter.paintAt(rand * @width , rand * @height,1.1)
- elsif(shape < 2 )
+ elsif(tqshape < 2 )
xs = Array.new
ys = Array.new
for i in 0..6
@@ -103,14 +103,14 @@ class TorturePainting
ys[i] = rand*@height
end
painter.paintPolyline(xs,ys)
- elsif(shape < 3)
+ elsif(tqshape < 3)
painter.paintLine(rand * @width, rand * @height, 1.1, rand * @width, rand * @height,1.1)
- elsif(shape < 4)
+ elsif(tqshape < 4)
painter.paintBezierCurve(rand * @width, rand * @height, 1.1, rand * @width, rand * @height, rand * @width , rand * @height, rand * @width, rand * @height, 1.1)
- elsif(shape < 5)
+ elsif(tqshape < 5)
randomizeStyle(painter)
painter.paintEllipse(rand * @width, rand * @height, rand * @width, rand * @height, 1.1)
- elsif(shape < 6)
+ elsif(tqshape < 6)
xs = Array.new
ys = Array.new
for i in 0..6
@@ -119,7 +119,7 @@ class TorturePainting
end
randomizeStyle(painter)
painter.paintPolygon(xs, ys)
- elsif(shape < 7)
+ elsif(tqshape < 7)
randomizeStyle(painter)
painter.paintRect(rand * @width, rand * @height, rand * @width, rand * @height, 1.1)
end
diff --git a/krita/plugins/viewplugins/scripting/scripting.cc b/krita/plugins/viewplugins/scripting/scripting.cc
index d7f5fde7..210b8eff 100644
--- a/krita/plugins/viewplugins/scripting/scripting.cc
+++ b/krita/plugins/viewplugins/scripting/scripting.cc
@@ -21,8 +21,8 @@
#include <stdlib.h>
#include <vector>
-#include <qapplication.h>
-#include <qpoint.h>
+#include <tqapplication.h>
+#include <tqpoint.h>
#include <kdebug.h>
#include <kfiledialog.h>
@@ -54,36 +54,36 @@
typedef KGenericFactory<Scripting> KritaScriptingFactory;
K_EXPORT_COMPONENT_FACTORY( kritascripting, KritaScriptingFactory( "krita" ) )
-Scripting::Scripting(QObject *parent, const char *name, const QStringList &)
- : KParts::Plugin(parent, name)
+Scripting::Scripting(TQObject *tqparent, const char *name, const TQStringList &)
+ : KParts::Plugin(tqparent, name)
{
setInstance(KritaScriptingFactory::instance());
- if ( parent->inherits("KisView") )
+ if ( tqparent->inherits("KisView") )
{
setInstance(Scripting::instance());
- m_view = (KisView*) parent;
+ m_view = (KisView*) tqparent;
m_scriptguiclient = new Kross::Api::ScriptGUIClient( m_view, m_view );
// m_scriptguiclient ->setXMLFile(locate("data","kritaplugins/scripting.rc"), true);
//BEGIN TODO: understand why the ScriptGUIClient doesn't "link" its actions to the menu
setXMLFile(locate("data","kritaplugins/scripting.rc"), true);
- new KAction(i18n("Execute Script File..."), 0, 0, m_scriptguiclient, SLOT(executeScriptFile()), actionCollection(), "executescriptfile");
- new KAction(i18n("Script Manager..."), 0, 0, m_scriptguiclient, SLOT(showScriptManager()), actionCollection(), "configurescripts");
+ new KAction(i18n("Execute Script File..."), 0, 0, m_scriptguiclient, TQT_SLOT(executeScriptFile()), actionCollection(), "executescriptfile");
+ new KAction(i18n("Script Manager..."), 0, 0, m_scriptguiclient, TQT_SLOT(showScriptManager()), actionCollection(), "configurescripts");
//END TODO
- QWidget * w = new Kross::Api::WdgScriptsManager(m_scriptguiclient, m_view);
+ TQWidget * w = new Kross::Api::WdgScriptsManager(m_scriptguiclient, m_view);
m_view->canvasSubject()->paletteManager()->addWidget(w, "Scripts Manager", krita::LAYERBOX, 10, PALETTE_DOCKER, false);
- connect(m_scriptguiclient, SIGNAL(executionFinished( const Kross::Api::ScriptAction* )), this, SLOT(executionFinished(const Kross::Api::ScriptAction*)));
- connect(m_scriptguiclient, SIGNAL(executionStarted( const Kross::Api::ScriptAction* )), this, SLOT(executionStarted(const Kross::Api::ScriptAction*)));
+ connect(m_scriptguiclient, TQT_SIGNAL(executionFinished( const Kross::Api::ScriptAction* )), this, TQT_SLOT(executionFinished(const Kross::Api::ScriptAction*)));
+ connect(m_scriptguiclient, TQT_SIGNAL(executionStarted( const Kross::Api::ScriptAction* )), this, TQT_SLOT(executionStarted(const Kross::Api::ScriptAction*)));
KisScriptMonitor::instance()->monitor( m_scriptguiclient );
- Kross::Api::Manager::scriptManager()->addQObject(m_view->canvasSubject()->document(), "KritaDocument");
- Kross::Api::Manager::scriptManager()->addQObject(m_view, "KritaView");
+ Kross::Api::Manager::scriptManager()->addTQObject(m_view->canvasSubject()->document(), "KritaDocument");
+ Kross::Api::Manager::scriptManager()->addTQObject(m_view, "KritaView");
m_scriptProgress = new KisScriptProgress(m_view);
- Kross::Api::Manager::scriptManager()->addQObject(m_scriptProgress, "KritaScriptProgress");
+ Kross::Api::Manager::scriptManager()->addTQObject(m_scriptProgress, "KritaScriptProgress");
}
@@ -98,7 +98,7 @@ void Scripting::executionFinished(const Kross::Api::ScriptAction*)
m_view->canvasSubject()->document()->setModified(true);
m_view->canvasSubject()->document()->currentImage()->activeLayer()->setDirty();
m_scriptProgress->progressDone();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
void Scripting::executionStarted(const Kross::Api::ScriptAction* act)
diff --git a/krita/plugins/viewplugins/scripting/scripting.h b/krita/plugins/viewplugins/scripting/scripting.h
index 238483c8..20675043 100644
--- a/krita/plugins/viewplugins/scripting/scripting.h
+++ b/krita/plugins/viewplugins/scripting/scripting.h
@@ -37,8 +37,9 @@ namespace Kross {
class Scripting : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- Scripting(QObject *parent, const char *name, const QStringList &);
+ Scripting(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~Scripting();
private slots:
void executionFinished(const Kross::Api::ScriptAction*);