diff options
Diffstat (limited to 'kexi/plugins/macros/lib/context.cpp')
-rw-r--r-- | kexi/plugins/macros/lib/context.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/kexi/plugins/macros/lib/context.cpp b/kexi/plugins/macros/lib/context.cpp index c0eea250..a09704bd 100644 --- a/kexi/plugins/macros/lib/context.cpp +++ b/kexi/plugins/macros/lib/context.cpp @@ -41,25 +41,25 @@ namespace KoMacro { /** * The @a Macro instance that owns this @a Context . */ - KSharedPtr<Macro> macro; + TDESharedPtr<Macro> macro; /** * List of @a Action instances that are children of the * macro. */ - TQValueList<KSharedPtr<MacroItem > > items; + TQValueList<TDESharedPtr<MacroItem > > items; /** * The currently selected @a MacroItem or NULL if there * is now @a MacroItem selected yet. */ - KSharedPtr<MacroItem> macroitem; + TDESharedPtr<MacroItem> macroitem; /** * Map of all @a Variable instance that are defined within * this context. */ - TQMap<TQString, KSharedPtr<Variable > > variables; + TQMap<TQString, TDESharedPtr<Variable > > variables; /** * The @a Exception instance thrown at the last @a activate() @@ -68,7 +68,7 @@ namespace KoMacro { Exception* exception; /// Constructor. - explicit Private(KSharedPtr<Macro> m) + explicit Private(TDESharedPtr<Macro> m) : macro(m) // remember the macro , items(m->items()) // set d-pointer children to macro children , exception(0) // no exception yet. @@ -84,7 +84,7 @@ namespace KoMacro { } //Constructor with initialization of our Private.object (d-pointer) -Context::Context(KSharedPtr<Macro> macro) +Context::Context(TDESharedPtr<Macro> macro) : TQObject() , d( new Private(macro) ) // create the private d-pointer instance. { @@ -104,7 +104,7 @@ bool Context::hasVariable(const TQString& name) const } //return variable with name or throw an exception if none is found in variables -KSharedPtr<Variable> Context::variable(const TQString& name) const +TDESharedPtr<Variable> Context::variable(const TQString& name) const { //Use TQMap?s contains to check if a variable with name exists in context if (d->variables.contains(name)) { @@ -113,7 +113,7 @@ KSharedPtr<Variable> Context::variable(const TQString& name) const } //if there is a macroitem try to get variable from it if(d->macroitem.data()) { - KSharedPtr<Variable> v = d->macroitem->variable(name, true); + TDESharedPtr<Variable> v = d->macroitem->variable(name, true); if(v.data()) { return v; } @@ -129,7 +129,7 @@ Variable::Map Context::variables() const } //set a variable -void Context::setVariable(const TQString& name, KSharedPtr<Variable> variable) +void Context::setVariable(const TQString& name, TDESharedPtr<Variable> variable) { //debuging infos kdDebug() << TQString("KoMacro::Context::setVariable name='%1' variable='%2'").arg(name).arg(variable->toString()) << endl; @@ -138,13 +138,13 @@ void Context::setVariable(const TQString& name, KSharedPtr<Variable> variable) } //return the associated Macro -KSharedPtr<Macro> Context::macro() const +TDESharedPtr<Macro> Context::macro() const { return d->macro; } //return the currently selected MacroItem -KSharedPtr<MacroItem> Context::macroItem() const +TDESharedPtr<MacroItem> Context::macroItem() const { return d->macroitem; } @@ -162,18 +162,18 @@ Exception* Context::exception() const } //try to activate all action?s in this context -void Context::activate(TQValueList<KSharedPtr<MacroItem > >::ConstIterator it) +void Context::activate(TQValueList<TDESharedPtr<MacroItem > >::ConstIterator it) { //debuging infos kdDebug() << "Context::activate()" << endl; //TQ_ASSIGN(d->macro); //set end to constEnd - TQValueList<KSharedPtr<MacroItem > >::ConstIterator end(d->items.constEnd()); + TQValueList<TDESharedPtr<MacroItem > >::ConstIterator end(d->items.constEnd()); //loop through actions for(;it != end; ++it) { // fetch the MacroItem we are currently pointing to. - d->macroitem = KSharedPtr<MacroItem>(*it); + d->macroitem = TDESharedPtr<MacroItem>(*it); //skip empty macroitems if(! d->macroitem.data()) { kdDebug() << "Context::activate() Skipping empty MacroItem" << endl; @@ -181,7 +181,7 @@ void Context::activate(TQValueList<KSharedPtr<MacroItem > >::ConstIterator it) } // fetch the Action, the MacroItem points to. - KSharedPtr<Action> action = d->macroitem->action(); + TDESharedPtr<Action> action = d->macroitem->action(); //skip macroitems without an action if(! action.data()) { kdDebug() << "Context::activate() Skipping MacroItem with no action" << endl; @@ -204,7 +204,7 @@ void Context::activate(TQValueList<KSharedPtr<MacroItem > >::ConstIterator it) //and all variables wich belong to the action/macro TQStringList variables = action->variableNames(); for(TQStringList::Iterator vit = variables.begin(); vit != variables.end(); ++vit) { - KSharedPtr<Variable> v = d->macroitem->variable(*vit, true); + TDESharedPtr<Variable> v = d->macroitem->variable(*vit, true); d->exception->addTraceMessage( TQString("%1=%2").arg(*vit).arg(v->toString()) ); } return; // abort execution @@ -213,11 +213,11 @@ void Context::activate(TQValueList<KSharedPtr<MacroItem > >::ConstIterator it) // The run is done. So, let's remove the currently selected item to // outline, that we did the job and there stays no dangling item. - d->macroitem = KSharedPtr<MacroItem>(0); + d->macroitem = TDESharedPtr<MacroItem>(0); } //try to activated an context -void Context::activate(KSharedPtr<Context> context) +void Context::activate(TDESharedPtr<Context> context) { //setup context delete d->exception; d->exception = 0; @@ -252,7 +252,7 @@ void Context::activateNext() } //find the macroitem from which to continue - TQValueList<KSharedPtr<MacroItem > >::ConstIterator it = d->items.find(d->macroitem); + TQValueList<TDESharedPtr<MacroItem > >::ConstIterator it = d->items.find(d->macroitem); if (it != d->items.constEnd()) { activate(++it); // try to continue the execution. } |