summaryrefslogtreecommitdiffstats
path: root/kig/scripting
diff options
context:
space:
mode:
Diffstat (limited to 'kig/scripting')
-rw-r--r--kig/scripting/newscriptwizard.cc26
-rw-r--r--kig/scripting/newscriptwizard.h6
-rw-r--r--kig/scripting/python_type.cc2
-rw-r--r--kig/scripting/python_type.h2
-rw-r--r--kig/scripting/script-common.cc16
-rw-r--r--kig/scripting/script-common.h6
-rw-r--r--kig/scripting/script_mode.cc26
-rw-r--r--kig/scripting/script_mode.h14
8 files changed, 49 insertions, 49 deletions
diff --git a/kig/scripting/newscriptwizard.cc b/kig/scripting/newscriptwizard.cc
index 165f8e98..de959ce2 100644
--- a/kig/scripting/newscriptwizard.cc
+++ b/kig/scripting/newscriptwizard.cc
@@ -20,8 +20,8 @@
#include "script_mode.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
//#include <kactionclasses.h>
//#include <kactioncollection.h>
@@ -56,7 +56,7 @@ NewScriptWizard::~NewScriptWizard()
}
}
-NewScriptWizard::NewScriptWizard( QWidget* parent, ScriptModeBase* mode )
+NewScriptWizard::NewScriptWizard( TQWidget* parent, ScriptModeBase* mode )
: NewScriptWizardBase( parent, "New Script Wizard" ),
mmode( mode )
{
@@ -97,11 +97,11 @@ NewScriptWizard::NewScriptWizard( QWidget* 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, SLOT( slotUndo() ), ac );
- KAction* redoAction = KStdAction::redo( this, SLOT( slotRedo() ), ac );
- KAction* cutAction = KStdAction::cut( this, SLOT( slotCut() ), ac );
- KAction* copyAction = KStdAction::copy( this, SLOT( slotCopy() ), ac );
- KAction* pasteAction = KStdAction::paste( this, SLOT( slotPaste() ), ac );
+ 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 );
// ... and plugging them into the popup menu (to build it, of course :) )
undoAction->plug( pm );
redoAction->plug( pm );
@@ -114,7 +114,7 @@ NewScriptWizard::NewScriptWizard( QWidget* parent, ScriptModeBase* mode )
dynamic_cast<KTextEditor::PopupMenuInterface*>( editor )->installPopup( pm );
}
- connect( this, SIGNAL( helpClicked() ), this, SLOT( slotHelpClicked() ) );
+ connect( this, TQT_SIGNAL( helpClicked() ), this, TQT_SLOT( slotHelpClicked() ) );
}
void NewScriptWizard::back()
@@ -159,11 +159,11 @@ void NewScriptWizard::accept()
void NewScriptWizard::slotHelpClicked()
{
- kapp->invokeHelp( QString::fromLatin1( "scripting" ),
- QString::fromLatin1( "kig" ) );
+ kapp->invokeHelp( TQString::fromLatin1( "scripting" ),
+ TQString::fromLatin1( "kig" ) );
}
-void NewScriptWizard::setText( const QString& text )
+void NewScriptWizard::setText( const TQString& text )
{
if ( !document )
{
@@ -175,7 +175,7 @@ void NewScriptWizard::setText( const QString& text )
}
}
-QString NewScriptWizard::text()
+TQString NewScriptWizard::text()
{
if ( !document )
{
diff --git a/kig/scripting/newscriptwizard.h b/kig/scripting/newscriptwizard.h
index 67b51d94..d1831b96 100644
--- a/kig/scripting/newscriptwizard.h
+++ b/kig/scripting/newscriptwizard.h
@@ -37,15 +37,15 @@ class NewScriptWizard
Q_OBJECT
ScriptModeBase* mmode;
public:
- NewScriptWizard( QWidget* parent, ScriptModeBase* mode );
+ NewScriptWizard( TQWidget* parent, ScriptModeBase* mode );
~NewScriptWizard();
void back();
void next();
void reject();
- void setText( const QString& text );
- QString text();
+ void setText( const TQString& text );
+ TQString text();
void setType( ScriptType::Type type );
diff --git a/kig/scripting/python_type.cc b/kig/scripting/python_type.cc
index 0180e828..cc5a00ea 100644
--- a/kig/scripting/python_type.cc
+++ b/kig/scripting/python_type.cc
@@ -114,7 +114,7 @@ ObjectImp* PythonCompileType::calc( const Args& parents, const KigDocument& ) co
if ( !parents[0]->inherits( StringImp::stype() ) ) return new InvalidImp;
const StringImp* si = static_cast<const StringImp*>( parents[0] );
- QString s = si->data();
+ TQString s = si->data();
CompiledPythonScript cs = PythonScripter::instance()->compile( s.latin1() );
diff --git a/kig/scripting/python_type.h b/kig/scripting/python_type.h
index 1e76b0b8..db623ab6 100644
--- a/kig/scripting/python_type.h
+++ b/kig/scripting/python_type.h
@@ -55,7 +55,7 @@ public:
std::vector<ObjectCalcer*> sortArgs( const std::vector<ObjectCalcer*>& args ) const;
Args sortArgs( const Args& args ) const;
-// virtual QStringList specialActions() const;
+// virtual TQStringList specialActions() const;
// virtual void executeAction( int i, RealObject* o, KigDocument& d, KigWidget& w,
// NormalMode& m ) const;
};
diff --git a/kig/scripting/script-common.cc b/kig/scripting/script-common.cc
index 4bd2cbd8..2eb2da81 100644
--- a/kig/scripting/script-common.cc
+++ b/kig/scripting/script-common.cc
@@ -17,7 +17,7 @@
#include "script-common.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <klocale.h>
@@ -35,18 +35,18 @@ static const script_prop scripts_properties[] =
{ I18N_NOOP( "Now fill in the Python code:" ), "source_py", "Python-Kig" }
};
-QString ScriptType::fillCodeStatement( ScriptType::Type type )
+TQString ScriptType::fillCodeStatement( ScriptType::Type type )
{
return i18n( scripts_properties[type].fillCodeStatement );
}
-QString ScriptType::templateCode( ScriptType::Type type, std::list<ObjectHolder*> args )
+TQString ScriptType::templateCode( ScriptType::Type type, std::list<ObjectHolder*> args )
{
if ( type == Python )
{
- QString tempcode = QString::fromLatin1( "def calc( " );
+ TQString tempcode = TQString::fromLatin1( "def calc( " );
bool firstarg = true;
- QString temparg = i18n( "Note to translators: this should be a default "
+ TQString temparg = i18n( "Note to translators: this should be a default "
"name for an argument in a Python function. The "
"default is \"arg%1\" which would become arg1, "
"arg2, etc. Give something which seems "
@@ -57,7 +57,7 @@ QString ScriptType::templateCode( ScriptType::Type type, std::list<ObjectHolder*
{
if ( !firstarg ) tempcode += ", ";
else firstarg = false;
- QString n = ( *i )->name();
+ TQString n = ( *i )->name();
tempcode += n.isEmpty() ? temparg.arg( id ) : n;
id++;
};
@@ -81,9 +81,9 @@ const char* ScriptType::icon( ScriptType::Type type )
return scripts_properties[type].icon;
}
-QString ScriptType::highlightStyle( ScriptType::Type type )
+TQString ScriptType::highlightStyle( ScriptType::Type type )
{
- return QString( scripts_properties[type].highlightStyle );
+ return TQString( scripts_properties[type].highlightStyle );
}
ScriptType::Type ScriptType::intToType( int type )
diff --git a/kig/scripting/script-common.h b/kig/scripting/script-common.h
index 1c384453..360df862 100644
--- a/kig/scripting/script-common.h
+++ b/kig/scripting/script-common.h
@@ -38,11 +38,11 @@ public:
* Returns an i18n'ed statement like 'Now fill in the code:' with
* the name of the script language.
*/
- static QString fillCodeStatement( ScriptType::Type type );
+ static TQString fillCodeStatement( ScriptType::Type type );
/**
* Returns a template code for a script language.
*/
- static QString templateCode( ScriptType::Type type, std::list<ObjectHolder*> args );
+ static TQString templateCode( ScriptType::Type type, std::list<ObjectHolder*> args );
/**
* Returns the icon's name for a script language.
*/
@@ -50,7 +50,7 @@ public:
/**
* Returns the Kate highlight stytle name for a script language.
*/
- static QString highlightStyle( ScriptType::Type type );
+ static TQString highlightStyle( ScriptType::Type type );
/**
* Converts an int to a ScriptType::Type. Useful when reading script
* types from files.
diff --git a/kig/scripting/script_mode.cc b/kig/scripting/script_mode.cc
index 000b99f8..adbcc857 100644
--- a/kig/scripting/script_mode.cc
+++ b/kig/scripting/script_mode.cc
@@ -30,14 +30,14 @@
#include "../objects/bogus_imp.h"
#include "../objects/object_imp.h"
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include <kcursor.h>
#include <kiconloader.h>
#include <kmessagebox.h>
-void ScriptModeBase::dragRect( const QPoint& p, KigWidget& w )
+void ScriptModeBase::dragRect( const TQPoint& p, KigWidget& w )
{
if ( mwawd != SelectingArgs ) return;
@@ -60,7 +60,7 @@ void ScriptModeBase::dragRect( const QPoint& p, KigWidget& w )
w.updateWidget();
}
-void ScriptModeBase::leftClickedObject( ObjectHolder* o, const QPoint&,
+void ScriptModeBase::leftClickedObject( ObjectHolder* o, const TQPoint&,
KigWidget& w, bool )
{
std::list<ObjectHolder*>::iterator dup_o;
@@ -84,7 +84,7 @@ void ScriptModeBase::leftClickedObject( ObjectHolder* o, const QPoint&,
}
void ScriptModeBase::mouseMoved( const std::vector<ObjectHolder*>& os,
- const QPoint& pt, KigWidget& w, bool )
+ const TQPoint& pt, KigWidget& w, bool )
{
if ( mwawd != SelectingArgs ) return;
@@ -101,14 +101,14 @@ void ScriptModeBase::mouseMoved( const std::vector<ObjectHolder*>& os,
// and set statusbar text
w.setCursor( KCursor::handCursor() );
- QString selectstat = os.front()->selectStatement();
+ TQString selectstat = os.front()->selectStatement();
// statusbar text
mdoc.emitStatusBarText( selectstat );
KigPainter p( w.screenInfo(), &w.curPix, mdoc.document() );
// set the text next to the arrow cursor
- QPoint point = pt;
+ TQPoint point = pt;
point.setX(point.x()+15);
p.drawTextStd( point, selectstat );
@@ -157,7 +157,7 @@ void ScriptModeBase::codePageEntered()
if ( mwizard->text().isEmpty() )
{
// insert template code..
- QString tempcode = ScriptType::templateCode( mtype, margs );
+ TQString tempcode = ScriptType::templateCode( mtype, margs );
mwizard->setText( tempcode );
};
mwizard->setFinishEnabled( mwizard->mpcode, true );
@@ -178,7 +178,7 @@ bool ScriptCreationMode::queryFinish()
{
std::vector<ObjectCalcer*> args;
- QString script = mwizard->text();
+ TQString script = mwizard->text();
args.push_back( new ObjectConstCalcer( new StringImp( script ) ) );
ObjectTypeCalcer* compiledscript =
@@ -198,7 +198,7 @@ bool ScriptCreationMode::queryFinish()
if ( reto->imp()->inherits( InvalidImp::stype() ) )
{
PythonScripter* inst = PythonScripter::instance();
- QCString errtrace = inst->lastErrorExceptionTraceback().c_str();
+ TQCString errtrace = inst->lastErrorExceptionTraceback().c_str();
if ( inst->errorOccurred() )
{
KMessageBox::detailedSorry(
@@ -224,12 +224,12 @@ bool ScriptCreationMode::queryFinish()
}
}
-void ScriptModeBase::midClicked( const QPoint&, KigWidget& )
+void ScriptModeBase::midClicked( const TQPoint&, KigWidget& )
{
}
void ScriptModeBase::rightClicked( const std::vector<ObjectHolder*>&,
- const QPoint&, KigWidget& )
+ const TQPoint&, KigWidget& )
{
}
@@ -316,7 +316,7 @@ bool ScriptEditMode::queryFinish()
if ( mexecuted->imp()->inherits( InvalidImp::stype() ) )
{
PythonScripter* inst = PythonScripter::instance();
- QCString errtrace = inst->lastErrorExceptionTraceback().c_str();
+ TQCString errtrace = inst->lastErrorExceptionTraceback().c_str();
if ( inst->errorOccurred() )
{
KMessageBox::detailedSorry(
diff --git a/kig/scripting/script_mode.h b/kig/scripting/script_mode.h
index 4cbfd737..7f6ff171 100644
--- a/kig/scripting/script_mode.h
+++ b/kig/scripting/script_mode.h
@@ -52,14 +52,14 @@ private:
public:
virtual ~ScriptModeBase();
- void dragRect( const QPoint& p, KigWidget& w );
-// void dragObject( const Objects& os, const QPoint& pointClickedOn, KigWidget& w, bool ctrlOrShiftDown );
- void leftClickedObject( ObjectHolder* o, const QPoint& p,
+ void dragRect( const TQPoint& p, KigWidget& w );
+// void dragObject( const Objects& os, const TQPoint& pointClickedOn, KigWidget& w, bool ctrlOrShiftDown );
+ void leftClickedObject( ObjectHolder* o, const TQPoint& p,
KigWidget& w, bool actrlOrShiftDown );
- void mouseMoved( const std::vector<ObjectHolder*>& os, const QPoint& p,
+ void mouseMoved( const std::vector<ObjectHolder*>& os, const TQPoint& p,
KigWidget& w, bool shiftpressed );
- void midClicked( const QPoint&, KigWidget& );
- void rightClicked( const std::vector<ObjectHolder*>&, const QPoint&, KigWidget& );
+ void midClicked( const TQPoint&, KigWidget& );
+ void rightClicked( const std::vector<ObjectHolder*>&, const TQPoint&, KigWidget& );
void argsPageEntered();
void codePageEntered();
@@ -106,7 +106,7 @@ private:
std::vector<ObjectCalcer*> mexecargs;
std::vector<ObjectCalcer*> mcompiledargs;
- QString morigscript;
+ TQString morigscript;
public:
ScriptEditMode( ObjectTypeCalcer* exec_calc, KigPart& doc );