diff options
Diffstat (limited to 'kexi/plugins/macros/lib/context.cpp')
-rw-r--r-- | kexi/plugins/macros/lib/context.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/kexi/plugins/macros/lib/context.cpp b/kexi/plugins/macros/lib/context.cpp index 135c10c9..6e2fb2e4 100644 --- a/kexi/plugins/macros/lib/context.cpp +++ b/kexi/plugins/macros/lib/context.cpp @@ -23,7 +23,7 @@ #include "macroitem.h" #include "exception.h" -//#include <qtimer.h> +//#include <tqtimer.h> #include <kdebug.h> using namespace KoMacro; @@ -44,10 +44,10 @@ namespace KoMacro { KSharedPtr<Macro> macro; /** - * List of @a Action instances that are children of the + * List of @a Action instances that are tqchildren of the * macro. */ - QValueList<KSharedPtr<MacroItem > > items; + TQValueList<KSharedPtr<MacroItem > > items; /** * The currently selected @a MacroItem or NULL if there @@ -59,7 +59,7 @@ namespace KoMacro { * Map of all @a Variable instance that are defined within * this context. */ - QMap<QString, KSharedPtr<Variable > > variables; + TQMap<TQString, KSharedPtr<Variable > > variables; /** * The @a Exception instance thrown at the last @a activate() @@ -70,7 +70,7 @@ namespace KoMacro { /// Constructor. explicit Private(KSharedPtr<Macro> m) : macro(m) // remember the macro - , items(m->items()) // set d-pointer children to macro children + , items(m->items()) // set d-pointer tqchildren to macro tqchildren , exception(0) // no exception yet. { } @@ -85,7 +85,7 @@ namespace KoMacro { } //Constructor with initialization of our Private.object (d-pointer) Context::Context(KSharedPtr<Macro> macro) - : QObject() + : TQObject() , d( new Private(macro) ) // create the private d-pointer instance. { } @@ -97,17 +97,17 @@ Context::~Context() } //return if we have (d-pointer) variables -bool Context::hasVariable(const QString& name) const +bool Context::hasVariable(const TQString& name) const { - //Use QMap?s contains to check if a variable with name exists - return d->variables.contains(name); + //Use TQMap?s contains to check if a variable with name exists + return d->variables.tqcontains(name); } //return variable with name or throw an exception if none is found in variables -KSharedPtr<Variable> Context::variable(const QString& name) const +KSharedPtr<Variable> Context::variable(const TQString& name) const { - //Use QMap?s contains to check if a variable with name exists in context - if (d->variables.contains(name)) { + //Use TQMap?s contains to check if a variable with name exists in context + if (d->variables.tqcontains(name)) { //return it return d->variables[name]; } @@ -119,7 +119,7 @@ KSharedPtr<Variable> Context::variable(const QString& name) const } } //none found throw exception - throw Exception(QString("Variable name='%1' does not exist.").arg(name)); + throw Exception(TQString("Variable name='%1' does not exist.").tqarg(name)); } //return a map of our (d-pointer) variables @@ -129,12 +129,12 @@ Variable::Map Context::variables() const } //set a variable -void Context::setVariable(const QString& name, KSharedPtr<Variable> variable) +void Context::setVariable(const TQString& name, KSharedPtr<Variable> variable) { //debuging infos - kdDebug() << QString("KoMacro::Context::setVariable name='%1' variable='%2'").arg(name).arg(variable->toString()) << endl; - //Use QMap?s replace to set/replace the variable named name - d->variables.replace(name, variable); + kdDebug() << TQString("KoMacro::Context::setVariable name='%1' variable='%2'").tqarg(name).tqarg(variable->toString()) << endl; + //Use TQMap?s replace to set/replace the variable named name + d->variables.tqreplace(name, variable); } //return the associated Macro @@ -162,14 +162,14 @@ Exception* Context::exception() const } //try to activate all action?s in this context -void Context::activate(QValueList<KSharedPtr<MacroItem > >::ConstIterator it) +void Context::activate(TQValueList<KSharedPtr<MacroItem > >::ConstIterator it) { //debuging infos kdDebug() << "Context::activate()" << endl; - //Q_ASSIGN(d->macro); + //TQ_ASSIGN(d->macro); //set end to constEnd - QValueList<KSharedPtr<MacroItem > >::ConstIterator end(d->items.constEnd()); + TQValueList<KSharedPtr<MacroItem > >::ConstIterator end(d->items.constEnd()); //loop through actions for(;it != end; ++it) { // fetch the MacroItem we are currently pointing to. @@ -198,14 +198,14 @@ void Context::activate(QValueList<KSharedPtr<MacroItem > >::ConstIterator it) d->exception = new Exception(e); //add new tracemessages //the macro name - d->exception->addTraceMessage( QString("macro=%1").arg(d->macro->name()) ); + d->exception->addTraceMessage( TQString("macro=%1").tqarg(d->macro->name()) ); //the action name - d->exception->addTraceMessage( QString("action=%1").arg(action->name()) ); + d->exception->addTraceMessage( TQString("action=%1").tqarg(action->name()) ); //and all variables wich belong to the action/macro - QStringList variables = action->variableNames(); - for(QStringList::Iterator vit = variables.begin(); vit != variables.end(); ++vit) { + TQStringList variables = action->variableNames(); + for(TQStringList::Iterator vit = variables.begin(); vit != variables.end(); ++vit) { KSharedPtr<Variable> v = d->macroitem->variable(*vit, true); - d->exception->addTraceMessage( QString("%1=%2").arg(*vit).arg(v->toString()) ); + d->exception->addTraceMessage( TQString("%1=%2").tqarg(*vit).tqarg(v->toString()) ); } return; // abort execution } @@ -252,7 +252,7 @@ void Context::activateNext() } //find the macroitem from which to continue - QValueList<KSharedPtr<MacroItem > >::ConstIterator it = d->items.find(d->macroitem); + TQValueList<KSharedPtr<MacroItem > >::ConstIterator it = d->items.tqfind(d->macroitem); if (it != d->items.constEnd()) { activate(++it); // try to continue the execution. } |