summaryrefslogtreecommitdiffstats
path: root/kig/scripting
diff options
context:
space:
mode:
Diffstat (limited to 'kig/scripting')
-rw-r--r--kig/scripting/newscriptwizard.cc18
-rw-r--r--kig/scripting/newscriptwizard.h3
-rw-r--r--kig/scripting/newscriptwizardbase.ui18
-rw-r--r--kig/scripting/python_type.cc22
-rw-r--r--kig/scripting/python_type.h12
-rw-r--r--kig/scripting/script-common.cc4
-rw-r--r--kig/scripting/script_mode.cc16
7 files changed, 47 insertions, 46 deletions
diff --git a/kig/scripting/newscriptwizard.cc b/kig/scripting/newscriptwizard.cc
index de959ce2..cc3e1771 100644
--- a/kig/scripting/newscriptwizard.cc
+++ b/kig/scripting/newscriptwizard.cc
@@ -56,8 +56,8 @@ NewScriptWizard::~NewScriptWizard()
}
}
-NewScriptWizard::NewScriptWizard( TQWidget* parent, ScriptModeBase* mode )
- : NewScriptWizardBase( parent, "New Script Wizard" ),
+NewScriptWizard::NewScriptWizard( TQWidget* tqparent, ScriptModeBase* mode )
+ : NewScriptWizardBase( tqparent, "New Script Wizard" ),
mmode( mode )
{
document = KTextEditor::EditorChooser::createDocument( 0, "KTextEditor::Document" );
@@ -97,11 +97,11 @@ NewScriptWizard::NewScriptWizard( TQWidget* parent, ScriptModeBase* mode )
KPopupMenu* pm = new KPopupMenu( editor );
// creating the actions for the code editor...
KActionCollection* ac = new KActionCollection( editor );
- KAction* undoAction = KStdAction::undo( this, TQT_SLOT( slotUndo() ), ac );
- KAction* redoAction = KStdAction::redo( this, TQT_SLOT( slotRedo() ), ac );
- KAction* cutAction = KStdAction::cut( this, TQT_SLOT( slotCut() ), ac );
- KAction* copyAction = KStdAction::copy( this, TQT_SLOT( slotCopy() ), ac );
- KAction* pasteAction = KStdAction::paste( this, TQT_SLOT( slotPaste() ), ac );
+ KAction* undoAction = KStdAction::undo( TQT_TQOBJECT(this), TQT_SLOT( slotUndo() ), ac );
+ KAction* redoAction = KStdAction::redo( TQT_TQOBJECT(this), TQT_SLOT( slotRedo() ), ac );
+ KAction* cutAction = KStdAction::cut( TQT_TQOBJECT(this), TQT_SLOT( slotCut() ), ac );
+ KAction* copyAction = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT( slotCopy() ), ac );
+ KAction* pasteAction = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT( slotPaste() ), ac );
// ... and plugging them into the popup menu (to build it, of course :) )
undoAction->plug( pm );
redoAction->plug( pm );
@@ -159,8 +159,8 @@ void NewScriptWizard::accept()
void NewScriptWizard::slotHelpClicked()
{
- kapp->invokeHelp( TQString::fromLatin1( "scripting" ),
- TQString::fromLatin1( "kig" ) );
+ kapp->invokeHelp( TQString::tqfromLatin1( "scripting" ),
+ TQString::tqfromLatin1( "kig" ) );
}
void NewScriptWizard::setText( const TQString& text )
diff --git a/kig/scripting/newscriptwizard.h b/kig/scripting/newscriptwizard.h
index d1831b96..403236ee 100644
--- a/kig/scripting/newscriptwizard.h
+++ b/kig/scripting/newscriptwizard.h
@@ -35,9 +35,10 @@ class NewScriptWizard
: public NewScriptWizardBase
{
Q_OBJECT
+ TQ_OBJECT
ScriptModeBase* mmode;
public:
- NewScriptWizard( TQWidget* parent, ScriptModeBase* mode );
+ NewScriptWizard( TQWidget* tqparent, ScriptModeBase* mode );
~NewScriptWizard();
void back();
diff --git a/kig/scripting/newscriptwizardbase.ui b/kig/scripting/newscriptwizardbase.ui
index 30117961..b71565d0 100644
--- a/kig/scripting/newscriptwizardbase.ui
+++ b/kig/scripting/newscriptwizardbase.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>NewScriptWizardBase</class>
-<widget class="QWizard">
+<widget class="TQWizard">
<property name="name">
<cstring>NewScriptWizardBase</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -15,7 +15,7 @@
<property name="caption">
<string>New Script</string>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>mpargs</cstring>
</property>
@@ -26,7 +26,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -34,13 +34,13 @@
<string>Select the argument objects ( if any )
in the Kig window and press "Next".</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignCenter</set>
</property>
</widget>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>mpcode</cstring>
</property>
@@ -51,7 +51,7 @@ in the Kig window and press "Next".</string>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>gridLayout</cstring>
</property>
@@ -59,7 +59,7 @@ in the Kig window and press "Next".</string>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>labelFillCode</cstring>
</property>
@@ -74,7 +74,7 @@ in the Kig window and press "Next".</string>
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>ktextedit.h</includehint>
</includehints>
diff --git a/kig/scripting/python_type.cc b/kig/scripting/python_type.cc
index cc5a00ea..0b73cda4 100644
--- a/kig/scripting/python_type.cc
+++ b/kig/scripting/python_type.cc
@@ -108,12 +108,12 @@ const ObjectImpType* PythonCompileType::resultId() const
return PythonCompiledScriptImp::stype();
}
-ObjectImp* PythonCompileType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* PythonCompileType::calc( const Args& tqparents, const KigDocument& ) const
{
- assert( parents.size() == 1 );
- if ( !parents[0]->inherits( StringImp::stype() ) ) return new InvalidImp;
+ assert( tqparents.size() == 1 );
+ if ( !tqparents[0]->inherits( StringImp::stype() ) ) return new InvalidImp;
- const StringImp* si = static_cast<const StringImp*>( parents[0] );
+ const StringImp* si = static_cast<const StringImp*>( tqparents[0] );
TQString s = si->data();
CompiledPythonScript cs = PythonScripter::instance()->compile( s.latin1() );
@@ -141,20 +141,20 @@ const PythonExecuteType* PythonExecuteType::instance()
return &t;
}
-ObjectImp* PythonExecuteType::calc( const Args& parents, const KigDocument& d ) const
+ObjectImp* PythonExecuteType::calc( const Args& tqparents, const KigDocument& d ) const
{
- assert( parents.size() >= 1 );
- if( !parents[0]->inherits( PythonCompiledScriptImp::stype() ) ) return new InvalidImp;
+ assert( tqparents.size() >= 1 );
+ if( !tqparents[0]->inherits( PythonCompiledScriptImp::stype() ) ) return new InvalidImp;
- CompiledPythonScript& script = static_cast<const PythonCompiledScriptImp*>( parents[0] )->data();
+ CompiledPythonScript& script = static_cast<const PythonCompiledScriptImp*>( tqparents[0] )->data();
- Args args( parents.begin() + 1, parents.end() );
+ Args args( tqparents.begin() + 1, tqparents.end() );
return script.calc( args, d );
}
-const ObjectImpType* PythonExecuteType::impRequirement( const ObjectImp* o, const Args& parents ) const
+const ObjectImpType* PythonExecuteType::impRequirement( const ObjectImp* o, const Args& tqparents ) const
{
- if ( o == parents[0] ) return PythonCompiledScriptImp::stype();
+ if ( o == tqparents[0] ) return PythonCompiledScriptImp::stype();
else return ObjectImp::stype();
}
diff --git a/kig/scripting/python_type.h b/kig/scripting/python_type.h
index db623ab6..871cfc17 100644
--- a/kig/scripting/python_type.h
+++ b/kig/scripting/python_type.h
@@ -28,10 +28,10 @@ class PythonCompileType
public:
static const PythonCompileType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& d ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& d ) const;
- const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
- bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const;
+ bool isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const;
const ObjectImpType* resultId() const;
std::vector<ObjectCalcer*> sortArgs( const std::vector<ObjectCalcer*>& args ) const;
@@ -46,10 +46,10 @@ class PythonExecuteType
public:
static const PythonExecuteType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& d ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& d ) const;
- const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
- bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const;
+ bool isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const;
const ObjectImpType* resultId() const;
std::vector<ObjectCalcer*> sortArgs( const std::vector<ObjectCalcer*>& args ) const;
diff --git a/kig/scripting/script-common.cc b/kig/scripting/script-common.cc
index 2eb2da81..1f5d8c4a 100644
--- a/kig/scripting/script-common.cc
+++ b/kig/scripting/script-common.cc
@@ -44,7 +44,7 @@ TQString ScriptType::templateCode( ScriptType::Type type, std::list<ObjectHolder
{
if ( type == Python )
{
- TQString tempcode = TQString::fromLatin1( "def calc( " );
+ TQString tempcode = TQString::tqfromLatin1( "def calc( " );
bool firstarg = true;
TQString temparg = i18n( "Note to translators: this should be a default "
"name for an argument in a Python function. The "
@@ -58,7 +58,7 @@ TQString ScriptType::templateCode( ScriptType::Type type, std::list<ObjectHolder
if ( !firstarg ) tempcode += ", ";
else firstarg = false;
TQString n = ( *i )->name();
- tempcode += n.isEmpty() ? temparg.arg( id ) : n;
+ tempcode += n.isEmpty() ? temparg.tqarg( id ) : n;
id++;
};
tempcode +=
diff --git a/kig/scripting/script_mode.cc b/kig/scripting/script_mode.cc
index adbcc857..2c6f4d80 100644
--- a/kig/scripting/script_mode.cc
+++ b/kig/scripting/script_mode.cc
@@ -45,7 +45,7 @@ void ScriptModeBase::dragRect( const TQPoint& p, KigWidget& w )
mdoc.runMode( &dm );
std::vector<ObjectHolder*> ret = dm.ret();
- KigPainter pter( w.screenInfo(), &w.stillPix, mdoc.document() );
+ KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.stillPix), mdoc.document() );
if ( dm.needClear() )
{
std::vector<ObjectHolder*> tmp( margs.begin(), margs.begin() );
@@ -67,7 +67,7 @@ void ScriptModeBase::leftClickedObject( ObjectHolder* o, const TQPoint&,
if ( mwawd != SelectingArgs ) return;
- KigPainter pter( w.screenInfo(), &w.stillPix, mdoc.document() );
+ KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.stillPix), mdoc.document() );
if ( (dup_o = std::find( margs.begin(), margs.end(), o )) != margs.end() )
{
@@ -105,7 +105,7 @@ void ScriptModeBase::mouseMoved( const std::vector<ObjectHolder*>& os,
// statusbar text
mdoc.emitStatusBarText( selectstat );
- KigPainter p( w.screenInfo(), &w.curPix, mdoc.document() );
+ KigPainter p( w.screenInfo(), TQT_TQPAINTDEVICE(&w.curPix), mdoc.document() );
// set the text next to the arrow cursor
TQPoint point = pt;
@@ -204,7 +204,7 @@ bool ScriptCreationMode::queryFinish()
KMessageBox::detailedSorry(
mwizard, i18n( "The Python interpreter caught an error during the execution of your "
"script. Please fix the script and click the Finish button again." ),
- i18n( "The Python Interpreter generated the following error output:\n%1").arg( errtrace ) );
+ i18n( "The Python Interpreter generated the following error output:\n%1").tqarg( errtrace.data() ) );
}
else
{
@@ -246,7 +246,7 @@ void ScriptModeBase::setScriptType( ScriptType::Type type )
void ScriptModeBase::addArgs( const std::vector<ObjectHolder*>& obj, KigWidget& w )
{
- KigPainter pter( w.screenInfo(), &w.stillPix, mdoc.document() );
+ KigPainter pter( w.screenInfo(), TQT_TQPAINTDEVICE(&w.stillPix), mdoc.document() );
std::copy( obj.begin(), obj.end(), std::inserter( margs, margs.begin() ) );
pter.drawObjects( obj, true );
@@ -275,10 +275,10 @@ ScriptEditMode::ScriptEditMode( ObjectTypeCalcer* exec_calc, KigPart& doc )
{
mwawd = EnteringCode;
- mexecargs = mexecuted->parents();
+ mexecargs = mexecuted->tqparents();
assert( mexecargs.size() >= 1 );
- mcompiledargs = mexecargs[0]->parents();
+ mcompiledargs = mexecargs[0]->tqparents();
assert( mcompiledargs.size() == 1 );
const ObjectImp* imp = static_cast<ObjectConstCalcer*>( mcompiledargs[0] )->imp();
@@ -322,7 +322,7 @@ bool ScriptEditMode::queryFinish()
KMessageBox::detailedSorry(
mpart.widget(), i18n( "The Python interpreter caught an error during the execution of your "
"script. Please fix the script." ),
- i18n( "The Python Interpreter generated the following error output:\n%1").arg( errtrace ) );
+ i18n( "The Python Interpreter generated the following error output:\n%1").tqarg( errtrace.data() ) );
}
else
{