diff options
Diffstat (limited to 'kexi/plugins/macros/lib')
-rw-r--r-- | kexi/plugins/macros/lib/action.cpp | 12 | ||||
-rw-r--r-- | kexi/plugins/macros/lib/action.h | 12 | ||||
-rw-r--r-- | kexi/plugins/macros/lib/context.cpp | 38 | ||||
-rw-r--r-- | kexi/plugins/macros/lib/context.h | 16 | ||||
-rw-r--r-- | kexi/plugins/macros/lib/macro.cpp | 16 | ||||
-rw-r--r-- | kexi/plugins/macros/lib/macro.h | 10 | ||||
-rw-r--r-- | kexi/plugins/macros/lib/macroitem.cpp | 24 | ||||
-rw-r--r-- | kexi/plugins/macros/lib/macroitem.h | 14 | ||||
-rw-r--r-- | kexi/plugins/macros/lib/manager.cpp | 16 | ||||
-rw-r--r-- | kexi/plugins/macros/lib/manager.h | 16 | ||||
-rw-r--r-- | kexi/plugins/macros/lib/metamethod.cpp | 20 | ||||
-rw-r--r-- | kexi/plugins/macros/lib/metamethod.h | 16 | ||||
-rw-r--r-- | kexi/plugins/macros/lib/metaobject.cpp | 12 | ||||
-rw-r--r-- | kexi/plugins/macros/lib/metaobject.h | 12 | ||||
-rw-r--r-- | kexi/plugins/macros/lib/metaparameter.cpp | 4 | ||||
-rw-r--r-- | kexi/plugins/macros/lib/metaparameter.h | 6 | ||||
-rw-r--r-- | kexi/plugins/macros/lib/variable.cpp | 2 | ||||
-rw-r--r-- | kexi/plugins/macros/lib/variable.h | 8 | ||||
-rw-r--r-- | kexi/plugins/macros/lib/xmlhandler.cpp | 18 |
19 files changed, 136 insertions, 136 deletions
diff --git a/kexi/plugins/macros/lib/action.cpp b/kexi/plugins/macros/lib/action.cpp index fc729b57..3fc1adf6 100644 --- a/kexi/plugins/macros/lib/action.cpp +++ b/kexi/plugins/macros/lib/action.cpp @@ -68,7 +68,7 @@ namespace KoMacro { Action::Action(const TQString& name, const TQString& text) : TQObject() - , KShared() + , TDEShared() , d( new Private() ) // create the private d-pointer instance. { kdDebug() << "Action::Action() name=" << name << endl; @@ -76,7 +76,7 @@ Action::Action(const TQString& name, const TQString& text) setText(text); // Publish this action. - KoMacro::Manager::self()->publishAction( KSharedPtr<Action>(this) ); + KoMacro::Manager::self()->publishAction( TDESharedPtr<Action>(this) ); } Action::~Action() @@ -127,9 +127,9 @@ bool Action::hasVariable(const TQString& name) const return d->varmap.contains(name); } -KSharedPtr<Variable> Action::variable(const TQString& name) const +TDESharedPtr<Variable> Action::variable(const TQString& name) const { - return d->varmap.contains(name) ? d->varmap[name] : KSharedPtr<Variable>(0); + return d->varmap.contains(name) ? d->varmap[name] : TDESharedPtr<Variable>(0); } Variable::Map Action::variables() const @@ -142,7 +142,7 @@ TQStringList Action::variableNames() const return d->varnames; } -void Action::setVariable(KSharedPtr<Variable> variable) +void Action::setVariable(TDESharedPtr<Variable> variable) { const TQString name = variable->name(); if(! d->varmap.contains(name)) { @@ -156,7 +156,7 @@ void Action::setVariable(const TQString& name, const TQString& text, const TQVar Variable* variable = new Variable(variant); variable->setName(name); variable->setText(text); - setVariable( KSharedPtr<Variable>(variable) ); + setVariable( TDESharedPtr<Variable>(variable) ); } void Action::removeVariable(const TQString& name) diff --git a/kexi/plugins/macros/lib/action.h b/kexi/plugins/macros/lib/action.h index 762e27ae..c779f21a 100644 --- a/kexi/plugins/macros/lib/action.h +++ b/kexi/plugins/macros/lib/action.h @@ -37,7 +37,7 @@ namespace KoMacro { */ class KOMACRO_EXPORT Action : public TQObject // TQt functionality like signals and slots - , public KShared // shared reference-counting + , public TDEShared // shared reference-counting { Q_OBJECT @@ -56,7 +56,7 @@ namespace KoMacro { /** * Shared pointer to implement reference-counting. */ - typedef TQMap<TQString, KSharedPtr<Action> > Map; + typedef TQMap<TQString, TDESharedPtr<Action> > Map; /** * Constructor. @@ -118,7 +118,7 @@ namespace KoMacro { * name @p name . If there exists no @a Variable with * such a name, NULL is returned. */ - KSharedPtr<Variable> variable(const TQString& name) const; + TDESharedPtr<Variable> variable(const TQString& name) const; /** * @return the map of variables this @a Action provides. @@ -134,7 +134,7 @@ namespace KoMacro { * Append the @a Variable @p variable to list of variables * this @a Action provides. */ - void setVariable(KSharedPtr<Variable> variable); + void setVariable(TDESharedPtr<Variable> variable); /** * Set the variable. @@ -162,7 +162,7 @@ namespace KoMacro { * @return true if the update was successfully else false * is returned. */ - virtual bool notifyUpdated(const KSharedPtr<MacroItem> ¯oitem, const TQString& name) { + virtual bool notifyUpdated(const TDESharedPtr<MacroItem> ¯oitem, const TQString& name) { Q_UNUSED(macroitem); Q_UNUSED(name); return true; // The default implementation does nothing. @@ -174,7 +174,7 @@ namespace KoMacro { * Called if the @a Action should be executed within the * defined @p context . */ - virtual void activate(KSharedPtr<Context> context) = 0; + virtual void activate(TDESharedPtr<Context> context) = 0; private: /// @internal d-pointer class. 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. } diff --git a/kexi/plugins/macros/lib/context.h b/kexi/plugins/macros/lib/context.h index 4f9621cc..9bb0f5eb 100644 --- a/kexi/plugins/macros/lib/context.h +++ b/kexi/plugins/macros/lib/context.h @@ -40,7 +40,7 @@ namespace KoMacro { */ class KOMACRO_EXPORT Context : public TQObject - , public KShared + , public TDEShared { Q_OBJECT @@ -51,7 +51,7 @@ namespace KoMacro { * * @param macro The @a Macro this @a Context belongs to. */ - explicit Context(KSharedPtr<Macro> macro); + explicit Context(TDESharedPtr<Macro> macro); /** * Destructor. @@ -68,7 +68,7 @@ namespace KoMacro { * @return the @a Variable defined with name @p name or * NULL if there exists no such variable. */ - KSharedPtr<Variable> variable(const TQString& name) const; + TDESharedPtr<Variable> variable(const TQString& name) const; /** * @return a map of all @a Variable instance that are defined @@ -80,18 +80,18 @@ namespace KoMacro { * Set the variable @p variable defined with name @p name . If * there exists already a variable with that name replace it. */ - void setVariable(const TQString& name, KSharedPtr<Variable> variable); + void setVariable(const TQString& name, TDESharedPtr<Variable> variable); /** * @return the associated macro */ - KSharedPtr<Macro> macro() const; + TDESharedPtr<Macro> macro() const; /** * @return the currently selected @a MacroItem instance * or NULL if there is no @a MacroItem selected yet. */ - KSharedPtr<MacroItem> macroItem() const; + TDESharedPtr<MacroItem> macroItem() const; /** * @return true if the last @a activate() stopped with an @@ -114,7 +114,7 @@ namespace KoMacro { * remembers what @a Action should be executed next and * calling this slot just activates those @a Action . */ - virtual void activate(TQValueList<KSharedPtr <MacroItem> >::ConstIterator it); + virtual void activate(TQValueList<TDESharedPtr <MacroItem> >::ConstIterator it); public slots: @@ -123,7 +123,7 @@ namespace KoMacro { * @a Context @p context which will be used as * parent context for this context. */ - virtual void activate(KSharedPtr<Context> context); + virtual void activate(TDESharedPtr<Context> context); /** * This slot continues execution. diff --git a/kexi/plugins/macros/lib/macro.cpp b/kexi/plugins/macros/lib/macro.cpp index 808c4043..af29da57 100644 --- a/kexi/plugins/macros/lib/macro.cpp +++ b/kexi/plugins/macros/lib/macro.cpp @@ -41,7 +41,7 @@ namespace KoMacro { /** * A list of @a MacroItem instances. */ - TQValueList<KSharedPtr<MacroItem > > itemlist; + TQValueList<TDESharedPtr<MacroItem > > itemlist; /** * The name the @a Macro has. @@ -55,7 +55,7 @@ namespace KoMacro { //constructor, initalize internal (d-pointer) name Macro::Macro(const TQString& name) : TQObject() - , KShared() + , TDEShared() , XMLHandler(this) , d( new Private() ) // create the private d-pointer instance. { @@ -88,13 +88,13 @@ const TQString Macro::toString() const } //get (d-pointer) itemlist -TQValueList<KSharedPtr<MacroItem > >& Macro::items() const +TQValueList<TDESharedPtr<MacroItem > >& Macro::items() const { return d->itemlist; } //add a macroitem to internal (d-pointer) itemlist -void Macro::addItem(KSharedPtr<MacroItem> item) +void Macro::addItem(TDESharedPtr<MacroItem> item) { d->itemlist.append(item); } @@ -105,15 +105,15 @@ void Macro::clearItems() } //run our macro -KSharedPtr<Context> Macro::execute(TQObject* sender) +TDESharedPtr<Context> Macro::execute(TQObject* sender) { - kdDebug() << "Macro::execute(KSharedPtr<Context>)" << endl; + kdDebug() << "Macro::execute(TDESharedPtr<Context>)" << endl; //create context in which macro can/should run - KSharedPtr<Context> c = KSharedPtr<Context>( new Context(this) ); + TDESharedPtr<Context> c = TDESharedPtr<Context>( new Context(this) ); if(sender) { // set the sender-variable if we got a sender TQObject. - c->setVariable("[sender]", KSharedPtr<Variable>( new Variable(sender) )); + c->setVariable("[sender]", TDESharedPtr<Variable>( new Variable(sender) )); } //connect(context, TQT_SIGNAL(activated()), this, TQT_SIGNAL(activated())); diff --git a/kexi/plugins/macros/lib/macro.h b/kexi/plugins/macros/lib/macro.h index 80d50deb..cc1fd77e 100644 --- a/kexi/plugins/macros/lib/macro.h +++ b/kexi/plugins/macros/lib/macro.h @@ -40,7 +40,7 @@ namespace KoMacro { */ class KOMACRO_EXPORT Macro : public TQObject // TQt functionality like signals and slots - , public KShared // shared reference-counting + , public TDEShared // shared reference-counting , public XMLHandler // to (un-)serialize from/to XML { Q_OBJECT @@ -53,7 +53,7 @@ namespace KoMacro { * class should use this typemap rather then the TQMap direct. That * way we are more flexible on future changes. */ - typedef TQMap<TQString, KSharedPtr<Macro > > Map; + typedef TQMap<TQString, TDESharedPtr<Macro > > Map; /** * Constructor. @@ -87,13 +87,13 @@ namespace KoMacro { * @return a list of @a MacroItem instances which * are children of this @a Macro . */ - TQValueList< KSharedPtr<MacroItem> >& items() const; + TQValueList< TDESharedPtr<MacroItem> >& items() const; /** * Add the @a MacroItem @p item to the list of items * this @a Macro has. */ - void addItem(KSharedPtr<MacroItem> item); + void addItem(TDESharedPtr<MacroItem> item); /** * Removes all @a MacroItem instances this @a Macro has. @@ -117,7 +117,7 @@ namespace KoMacro { * @param context The @a Context this @a Macro should * be executed in. */ - virtual KSharedPtr<Context> execute(TQObject* sender); + virtual TDESharedPtr<Context> execute(TQObject* sender); private: /// @internal d-pointer class. diff --git a/kexi/plugins/macros/lib/macroitem.cpp b/kexi/plugins/macros/lib/macroitem.cpp index cf317fab..33e69c31 100644 --- a/kexi/plugins/macros/lib/macroitem.cpp +++ b/kexi/plugins/macros/lib/macroitem.cpp @@ -35,7 +35,7 @@ namespace KoMacro { /** * The @a Action this @a MacroItem has. */ - KSharedPtr<Action> action; + TDESharedPtr<Action> action; /** * The comment this @a MacroItem has. @@ -109,7 +109,7 @@ namespace KoMacro { } MacroItem::MacroItem() - : KShared() + : TDEShared() , d( new Private() ) { } @@ -129,29 +129,29 @@ void MacroItem::setComment(const TQString& comment) d->comment = comment; } -KSharedPtr<Action> MacroItem::action() const +TDESharedPtr<Action> MacroItem::action() const { return d->action; } -void MacroItem::setAction(KSharedPtr<Action> action) +void MacroItem::setAction(TDESharedPtr<Action> action) { d->action = action; } TQVariant MacroItem::variant(const TQString& name, bool checkaction) const { - KSharedPtr<Variable> v = variable(name, checkaction); + TDESharedPtr<Variable> v = variable(name, checkaction); return v.data() ? v->variant() : TQVariant(); } -KSharedPtr<Variable> MacroItem::variable(const TQString& name, bool checkaction) const +TDESharedPtr<Variable> MacroItem::variable(const TQString& name, bool checkaction) const { if(d->variables.contains(name)) return d->variables[name]; if(checkaction && d->action.data()) return d->action->variable(name); - return KSharedPtr<Variable>(0); + return TDESharedPtr<Variable>(0); } Variable::Map MacroItem::variables() const @@ -163,7 +163,7 @@ bool MacroItem::setVariant(const TQString& name, const TQVariant& variant) { // Let's look if there is an action defined for the variable. If that's // the case, we try to use that action to preserve the type of the variant. - KSharedPtr<Variable> actionvariable = d->action ? d->action->variable(name) : KSharedPtr<Variable>(0); + TDESharedPtr<Variable> actionvariable = d->action ? d->action->variable(name) : TDESharedPtr<Variable>(0); // If we know the expected type, we try to cast the variant to the expected // type else the variant stays untouched (so, it will stay a string). @@ -172,12 +172,12 @@ bool MacroItem::setVariant(const TQString& name, const TQVariant& variant) : variant; // don't cast anything, just leave the string-type... // Now let's try to determinate the variable which should be changed. - KSharedPtr<Variable> variable = d->variables[name]; + TDESharedPtr<Variable> variable = d->variables[name]; if(! variable.data()) { // if there exists no such variable yet, create one. kdDebug() << "MacroItem::setVariable() Creating new variable name=" << name << endl; - variable = KSharedPtr<Variable>( new Variable() ); + variable = TDESharedPtr<Variable>( new Variable() ); variable->setName(name); d->variables.replace(name, variable); } @@ -201,11 +201,11 @@ bool MacroItem::setVariant(const TQString& name, const TQVariant& variant) return true; } -KSharedPtr<Variable> MacroItem::addVariable(const TQString& name, const TQVariant& variant) +TDESharedPtr<Variable> MacroItem::addVariable(const TQString& name, const TQVariant& variant) { Q_ASSERT(! d->variables.contains(name) ); // Create a new Variable. - KSharedPtr<Variable> variable = KSharedPtr<Variable>( new Variable() ); + TDESharedPtr<Variable> variable = TDESharedPtr<Variable>( new Variable() ); variable->setName(name); // Put it into the Variable-map. diff --git a/kexi/plugins/macros/lib/macroitem.h b/kexi/plugins/macros/lib/macroitem.h index 6b996e70..210a9585 100644 --- a/kexi/plugins/macros/lib/macroitem.h +++ b/kexi/plugins/macros/lib/macroitem.h @@ -43,7 +43,7 @@ namespace KoMacro { * MacroItem choosen @a Action implementation) and holds the by the * user defined modifications like e.g. the comment on the other hand. */ - class KOMACRO_EXPORT MacroItem : public KShared + class KOMACRO_EXPORT MacroItem : public TDEShared { public: @@ -51,7 +51,7 @@ namespace KoMacro { /** * A list of \a MacroItem instances. */ - typedef TQValueList<KSharedPtr<MacroItem > > List; + typedef TQValueList<TDESharedPtr<MacroItem > > List; /** * Constructor. @@ -81,12 +81,12 @@ namespace KoMacro { * no @a Action defined yet else the returned * @a Action will be used to implement the execution. */ - KSharedPtr<Action> action() const; + TDESharedPtr<Action> action() const; /** * Set the @a Action @param action this @a MacroItem points to. */ - void setAction(KSharedPtr<Action> action); + void setAction(TDESharedPtr<Action> action); /** * @return @a Variant from the @a Variable identified with @@ -110,12 +110,12 @@ namespace KoMacro { * such a @param name in the case this @a MacroItem * doesn't have such a name. */ - KSharedPtr<Variable> variable(const TQString& name, bool checkaction = false) const; + TDESharedPtr<Variable> variable(const TQString& name, bool checkaction = false) const; /** * @return a map of @a Variable instances. */ - TQMap<TQString, KSharedPtr<Variable> > variables() const; + TQMap<TQString, TDESharedPtr<Variable> > variables() const; /** * Set the @a TQVariant @param variant as variable with the variablename @@ -128,7 +128,7 @@ namespace KoMacro { * Add a new variable with the vaiablename @param name and the given * @a TQVariant @param variant to our @a MacroItem instance. */ - KSharedPtr<Variable> addVariable(const TQString& name, const TQVariant& variant); + TDESharedPtr<Variable> addVariable(const TQString& name, const TQVariant& variant); private: /// @internal d-pointer class. diff --git a/kexi/plugins/macros/lib/manager.cpp b/kexi/plugins/macros/lib/manager.cpp index f73ddaa8..5ab431d5 100644 --- a/kexi/plugins/macros/lib/manager.cpp +++ b/kexi/plugins/macros/lib/manager.cpp @@ -41,10 +41,10 @@ namespace KoMacro { { public: KXMLGUIClient* const xmlguiclient; - TQMap<TQString, KSharedPtr<Macro > > macros; + TQMap<TQString, TDESharedPtr<Macro > > macros; TQStringList actionnames; - TQMap<TQString, KSharedPtr<Action> > actions; + TQMap<TQString, TDESharedPtr<Action> > actions; TQMap<TQString, TQGuardedPtr<TQObject> > objects; @@ -108,12 +108,12 @@ bool Manager::hasMacro(const TQString& macroname) return d->macros.contains(macroname); } -KSharedPtr<Macro> Manager::getMacro(const TQString& macroname) +TDESharedPtr<Macro> Manager::getMacro(const TQString& macroname) { return d->macros[macroname]; } -void Manager::addMacro(const TQString& macroname, KSharedPtr<Macro> macro) +void Manager::addMacro(const TQString& macroname, TDESharedPtr<Macro> macro) { d->macros.replace(macroname, macro); } @@ -123,13 +123,13 @@ void Manager::removeMacro(const TQString& macroname) d->macros.remove(macroname); } -KSharedPtr<Macro> Manager::createMacro(const TQString& macroname) +TDESharedPtr<Macro> Manager::createMacro(const TQString& macroname) { - KSharedPtr<Macro> macro = KSharedPtr<Macro>( new Macro(macroname) ); + TDESharedPtr<Macro> macro = TDESharedPtr<Macro>( new Macro(macroname) ); return macro; } -KSharedPtr<Action> Manager::action(const TQString& name) const +TDESharedPtr<Action> Manager::action(const TQString& name) const { return d->actions[name]; } @@ -144,7 +144,7 @@ TQStringList Manager::actionNames() const return d->actionnames; } -void Manager::publishAction(KSharedPtr<Action> action) +void Manager::publishAction(TDESharedPtr<Action> action) { const TQString name = action->name(); if(! d->actions.contains(name)) { diff --git a/kexi/plugins/macros/lib/manager.h b/kexi/plugins/macros/lib/manager.h index 733ffb75..5e3ce084 100644 --- a/kexi/plugins/macros/lib/manager.h +++ b/kexi/plugins/macros/lib/manager.h @@ -122,7 +122,7 @@ namespace KoMacro { * \return the \a Macro defined with \p macroname * or NULL if we don't have such a \a Macro. */ - KSharedPtr<Macro> getMacro(const TQString& macroname); + TDESharedPtr<Macro> getMacro(const TQString& macroname); /** * Add a new \a Macro to the list of known macros. If @@ -134,7 +134,7 @@ namespace KoMacro { * accessible as. * \param macro The \a Macro instance. */ - void addMacro(const TQString& macroname, KSharedPtr<Macro> macro); + void addMacro(const TQString& macroname, TDESharedPtr<Macro> macro); /** * Remove the \a Macro defined with \p macroname . If @@ -150,7 +150,7 @@ namespace KoMacro { * like to attach the returned new \a Macro to this * \a Manager instance. */ - KSharedPtr<Macro> createMacro(const TQString& macroname); + TDESharedPtr<Macro> createMacro(const TQString& macroname); #if 0 /** @@ -164,20 +164,20 @@ namespace KoMacro { * * @deprecated Moved to common XMLReader/XMLWriter classes. Use Macro::xmlHandler() ! */ - KSharedPtr<Action> createAction(const TQDomElement& element); + TDESharedPtr<Action> createAction(const TQDomElement& element); #endif /** * @return the @a Action which was published under the - * name @p name or returns an empty @a KSharedPtr<Action> object + * name @p name or returns an empty @a TDESharedPtr<Action> object * if there was no such @a Action published. */ - KSharedPtr<Action> action(const TQString& name) const; + TDESharedPtr<Action> action(const TQString& name) const; /** * @return a map of all published actions. */ - TQMap<TQString, KSharedPtr<Action> > actions() const; + TQMap<TQString, TDESharedPtr<Action> > actions() const; /** * @return a list of all published actions. @@ -188,7 +188,7 @@ namespace KoMacro { * Publish the @a Action @p action . The published @a Action * will be accessible via it's unique name. */ - void publishAction(KSharedPtr<Action> action); + void publishAction(TDESharedPtr<Action> action); /** * Publish the passed TQObject @p object. Those object will diff --git a/kexi/plugins/macros/lib/metamethod.cpp b/kexi/plugins/macros/lib/metamethod.cpp index 18839780..6642c706 100644 --- a/kexi/plugins/macros/lib/metamethod.cpp +++ b/kexi/plugins/macros/lib/metamethod.cpp @@ -70,7 +70,7 @@ namespace KoMacro { * if this @a MetaMethod doesn't belong to any @a MetaObject * yet. */ - KSharedPtr<MetaObject> object; + TDESharedPtr<MetaObject> object; /** * The @a MetaMethod::Type this method provides access @@ -81,8 +81,8 @@ namespace KoMacro { } -MetaMethod::MetaMethod(const TQString& signature, Type type, KSharedPtr<MetaObject> object) - : KShared() +MetaMethod::MetaMethod(const TQString& signature, Type type, TDESharedPtr<MetaObject> object) + : TDEShared() , d( new Private() ) // create the private d-pointer instance. { d->signature = signature; @@ -135,7 +135,7 @@ MetaMethod::~MetaMethod() delete d; } -KSharedPtr<MetaObject> const MetaMethod::object() const +TDESharedPtr<MetaObject> const MetaMethod::object() const { return d->object; } @@ -180,8 +180,8 @@ TQUObject* MetaMethod::toTQUObject(Variable::List arguments) uo[0] = TQUObject(); // empty placeholder for the returnvalue. for(uint i = 0; i < argsize; i++) { - KSharedPtr<MetaParameter> metaargument = d->arguments[i]; - KSharedPtr<Variable> variable = arguments[i + 1]; + TDESharedPtr<MetaParameter> metaargument = d->arguments[i]; + TDESharedPtr<Variable> variable = arguments[i + 1]; if ( !variable ) { throw Exception(TQString("Variable is undefined !")); @@ -254,7 +254,7 @@ TQUObject* MetaMethod::toTQUObject(Variable::List arguments) return uo; } -KSharedPtr<Variable> MetaMethod::toVariable(TQUObject* uo) +TDESharedPtr<Variable> MetaMethod::toVariable(TQUObject* uo) { const TQString desc( uo->type->desc() ); @@ -303,16 +303,16 @@ Variable::List MetaMethod::toVariableList(TQUObject* uo) return list; } -KSharedPtr<Variable> MetaMethod::invoke(Variable::List arguments) +TDESharedPtr<Variable> MetaMethod::invoke(Variable::List arguments) { - kdDebug() << "KSharedPtr<Variable> MetaMethod::invoke(Variable::List arguments)" << endl; + kdDebug() << "TDESharedPtr<Variable> MetaMethod::invoke(Variable::List arguments)" << endl; if(! d->object) { throw Exception("MetaObject is undefined."); } TQObject* obj = d->object->object(); - KSharedPtr<Variable> returnvalue; + TDESharedPtr<Variable> returnvalue; TQUObject* qu = 0; try { diff --git a/kexi/plugins/macros/lib/metamethod.h b/kexi/plugins/macros/lib/metamethod.h index daf7dfcb..8be7b556 100644 --- a/kexi/plugins/macros/lib/metamethod.h +++ b/kexi/plugins/macros/lib/metamethod.h @@ -43,7 +43,7 @@ namespace KoMacro { * The design tried to limit future porting to TQt4 by providing a * somewhat similar API to the TQt4 TQMeta* stuff. */ - class KOMACRO_EXPORT MetaMethod : public KShared + class KOMACRO_EXPORT MetaMethod : public TDEShared { public: @@ -69,7 +69,7 @@ namespace KoMacro { * belongs to. Each @a MethodMethod is associated with * exactly one @a MetaObject . */ - explicit MetaMethod(const TQString& signature, Type type = Unknown, KSharedPtr<MetaObject> object = 0); + explicit MetaMethod(const TQString& signature, Type type = Unknown, TDESharedPtr<MetaObject> object = 0); /** * Destructor. @@ -80,7 +80,7 @@ namespace KoMacro { * @return the @a MetaObject instance this @a MethodMethod * belongs to. */ - KSharedPtr<MetaObject> const object() const; + TDESharedPtr<MetaObject> const object() const; /** * @return the signature this @a MetaMethod has. It could @@ -112,31 +112,31 @@ namespace KoMacro { * @return the signature arguments as parsed list of * @a MetaParameter instances. */ - TQValueList< KSharedPtr<MetaParameter> > arguments() const; + TQValueList< TDESharedPtr<MetaParameter> > arguments() const; /** * Translate the passed @p arguments list of @a Variable instances * into a TQt3 TQUObject* array. */ - TQUObject* toTQUObject(TQValueList< KSharedPtr<Variable> > arguments); + TQUObject* toTQUObject(TQValueList< TDESharedPtr<Variable> > arguments); /** * Translate the passed @p uo TQUObject reference into an internal used * @a Variable instances. */ - KSharedPtr<Variable> toVariable(TQUObject* uo); + TDESharedPtr<Variable> toVariable(TQUObject* uo); /** * Translate the passed @p uo TQUObject array into an internal used * list of @a Variable instances. */ - TQValueList< KSharedPtr<Variable> > toVariableList(TQUObject* uo); + TQValueList< TDESharedPtr<Variable> > toVariableList(TQUObject* uo); /** * Invoke the @a MetaMethod with the optional arguments * @p arguments and return a variable. */ - KSharedPtr<Variable> invoke(TQValueList< KSharedPtr<Variable> > arguments); + TDESharedPtr<Variable> invoke(TQValueList< TDESharedPtr<Variable> > arguments); private: /// @internal d-pointer class. diff --git a/kexi/plugins/macros/lib/metaobject.cpp b/kexi/plugins/macros/lib/metaobject.cpp index ee865c82..deaf4974 100644 --- a/kexi/plugins/macros/lib/metaobject.cpp +++ b/kexi/plugins/macros/lib/metaobject.cpp @@ -56,7 +56,7 @@ namespace KoMacro { } MetaObject::MetaObject(TQObject* const object) - : KShared() + : TDEShared() , d( new Private(object) ) // create the private d-pointer instance. { } @@ -106,7 +106,7 @@ int MetaObject::indexOfSlot(const char* slot) const return slotid; } -KSharedPtr<MetaMethod> MetaObject::method(int index) +TDESharedPtr<MetaMethod> MetaObject::method(int index) { TQObject* obj = object(); MetaMethod::Type type = MetaMethod::Slot; @@ -131,20 +131,20 @@ KSharedPtr<MetaMethod> MetaObject::method(int index) return new MetaMethod(metadata->name, type, this); } -KSharedPtr<MetaMethod> MetaObject::signal(const char* signal) +TDESharedPtr<MetaMethod> MetaObject::signal(const char* signal) { return method( indexOfSignal(signal) ); } -KSharedPtr<MetaMethod> MetaObject::slot(const char* slot) +TDESharedPtr<MetaMethod> MetaObject::slot(const char* slot) { return method( indexOfSlot(slot) ); } -KSharedPtr<Variable> MetaObject::invokeMethod(int index, Variable::List arguments) +TDESharedPtr<Variable> MetaObject::invokeMethod(int index, Variable::List arguments) { // kdDebug() << "MetaObject::invokeMethod(int index, Variable::List arguments)" << endl; - KSharedPtr<MetaMethod> m = method(index); + TDESharedPtr<MetaMethod> m = method(index); // kdDebug() << "MetaObject::invokeMethod(int index, Variable::List arguments) return" << endl; return m->invoke(arguments); } diff --git a/kexi/plugins/macros/lib/metaobject.h b/kexi/plugins/macros/lib/metaobject.h index a1a52562..e3ae98a1 100644 --- a/kexi/plugins/macros/lib/metaobject.h +++ b/kexi/plugins/macros/lib/metaobject.h @@ -38,7 +38,7 @@ namespace KoMacro { * The design tried to limit future porting to TQt4 by providing a * somewhat similar API to the TQt4 TQMeta* stuff. */ - class KOMACRO_EXPORT MetaObject : public KShared + class KOMACRO_EXPORT MetaObject : public TDEShared { public: @@ -78,19 +78,19 @@ namespace KoMacro { * @return the @a MetaMethod that matches to the * index @p index . */ - KSharedPtr<MetaMethod> method(int index); + TDESharedPtr<MetaMethod> method(int index); /** * @return a @a MetaMethod for the signal @p signal . */ - KSharedPtr<MetaMethod> signal(const char* signal); + TDESharedPtr<MetaMethod> signal(const char* signal); /** * @return a @a MetaMethod for the slot @p slot . */ - KSharedPtr<MetaMethod> slot(const char* slot); + TDESharedPtr<MetaMethod> slot(const char* slot); -//KSharedPtr<MetaMethod> addSlot(const char* slot); +//TDESharedPtr<MetaMethod> addSlot(const char* slot); //void connectSignal(TQObject* obj, const char* signal); /** @@ -104,7 +104,7 @@ namespace KoMacro { * @return The returnvalue the method provides and that got * returned if the execution is done. */ - KSharedPtr<Variable> invokeMethod(int index, TQValueList< KSharedPtr<Variable> > arguments); + TDESharedPtr<Variable> invokeMethod(int index, TQValueList< TDESharedPtr<Variable> > arguments); private: /// @internal d-pointer class. diff --git a/kexi/plugins/macros/lib/metaparameter.cpp b/kexi/plugins/macros/lib/metaparameter.cpp index ed921cfe..68a48fc1 100644 --- a/kexi/plugins/macros/lib/metaparameter.cpp +++ b/kexi/plugins/macros/lib/metaparameter.cpp @@ -58,7 +58,7 @@ namespace KoMacro { } MetaParameter::MetaParameter(const TQString& signatureargument) - : KShared() + : TDEShared() , d( new Private() ) // create the private d-pointer instance. { d->type = TypeNone; @@ -137,7 +137,7 @@ void MetaParameter::setSignatureArgument(const TQString& signatureargument) } } -bool MetaParameter::validVariable(KSharedPtr<Variable> variable) const +bool MetaParameter::validVariable(TDESharedPtr<Variable> variable) const { if( type() != variable->type() ) { return false; diff --git a/kexi/plugins/macros/lib/metaparameter.h b/kexi/plugins/macros/lib/metaparameter.h index fa9df552..ec927c53 100644 --- a/kexi/plugins/macros/lib/metaparameter.h +++ b/kexi/plugins/macros/lib/metaparameter.h @@ -39,7 +39,7 @@ namespace KoMacro { * The design tried to limit future porting to TQt4 by providing a * somewhat similar API to the TQt4 TQMeta* stuff. */ - class KOMACRO_EXPORT MetaParameter : public KShared + class KOMACRO_EXPORT MetaParameter : public TDEShared { /** @@ -57,7 +57,7 @@ namespace KoMacro { /** * List of @a MetaParameter instances. */ - typedef TQValueList<KSharedPtr <MetaParameter > > List; + typedef TQValueList<TDESharedPtr <MetaParameter > > List; /** * Constructor. @@ -114,7 +114,7 @@ namespace KoMacro { * valid for this @a MetaParameter . Valid means, that * the variable has a castable type. */ - bool validVariable(KSharedPtr<Variable> variable) const; + bool validVariable(TDESharedPtr<Variable> variable) const; protected: diff --git a/kexi/plugins/macros/lib/variable.cpp b/kexi/plugins/macros/lib/variable.cpp index 3661ef9a..61e349df 100644 --- a/kexi/plugins/macros/lib/variable.cpp +++ b/kexi/plugins/macros/lib/variable.cpp @@ -218,7 +218,7 @@ Variable::List Variable::children() const return d->children; } -void Variable::appendChild(KSharedPtr<Variable> variable) +void Variable::appendChild(TDESharedPtr<Variable> variable) { d->children.append(variable); } diff --git a/kexi/plugins/macros/lib/variable.h b/kexi/plugins/macros/lib/variable.h index 14adf09c..cb7334aa 100644 --- a/kexi/plugins/macros/lib/variable.h +++ b/kexi/plugins/macros/lib/variable.h @@ -32,7 +32,7 @@ namespace KoMacro { /** * A variable value used to provide abstract access to variables. The * class handles TQVariant and TQObject and provides access to them. - * Variable inherits KShared and implements reference couting. So, it's + * Variable inherits TDEShared and implements reference couting. So, it's * not needed to take care of memory-managment. */ class KOMACRO_EXPORT Variable : public MetaParameter @@ -58,12 +58,12 @@ namespace KoMacro { /** * A list of variables. */ - typedef TQValueList<KSharedPtr<Variable > > List; + typedef TQValueList<TDESharedPtr<Variable > > List; /** * A map of variables. */ - typedef TQMap<TQString, KSharedPtr<Variable > > Map; + typedef TQMap<TQString, TDESharedPtr<Variable > > Map; /** * Default constructor. @@ -185,7 +185,7 @@ namespace KoMacro { * Append a @a Variable to the list of children this * @a Variable has. */ - void appendChild(KSharedPtr<Variable> variable); + void appendChild(TDESharedPtr<Variable> variable); /** * Clear the list of children this @a Variable has. diff --git a/kexi/plugins/macros/lib/xmlhandler.cpp b/kexi/plugins/macros/lib/xmlhandler.cpp index 5b53d51b..65f1a4cf 100644 --- a/kexi/plugins/macros/lib/xmlhandler.cpp +++ b/kexi/plugins/macros/lib/xmlhandler.cpp @@ -99,7 +99,7 @@ bool XMLHandler::parseXML(const TQDomElement& element) const TQDomElement itemelem = itemnode.toElement(); // Create a new MacroItem - KSharedPtr<MacroItem> item = new MacroItem(); + TDESharedPtr<MacroItem> item = new MacroItem(); // Add the new item to our Macro. d->macro->addItem( item ); @@ -107,7 +107,7 @@ bool XMLHandler::parseXML(const TQDomElement& element) // Each MacroItem may point to an Action instance. We // try to determinate this action now and if it's defined // and available, we set it. - KSharedPtr<Action> action = Manager::self()->action( itemelem.attribute("action") ); + TDESharedPtr<Action> action = Manager::self()->action( itemelem.attribute("action") ); if(action.data()) { item->setAction(action); } @@ -157,14 +157,14 @@ TQDomElement XMLHandler::toXML() //macroelem.setAttribute("name",d->macro->name()); // The list of MacroItem-children a Macro provides. - TQValueList<KSharedPtr<MacroItem > > items = d->macro->items(); + TQValueList<TDESharedPtr<MacroItem > > items = d->macro->items(); // Create an iterator... - TQValueList<KSharedPtr<MacroItem > >::ConstIterator it(items.constBegin()), end(items.constEnd()); + TQValueList<TDESharedPtr<MacroItem > >::ConstIterator it(items.constBegin()), end(items.constEnd()); // ...and iterate over the list of children the Macro provides. for(;it != end; ++it) { // We are iterating over MacroItem instances. - KSharedPtr<MacroItem> item = *it; + TDESharedPtr<MacroItem> item = *it; // Flag to determinate if we really need to remember this item what // is only the case if comment or action is defined. @@ -174,7 +174,7 @@ TQDomElement XMLHandler::toXML() TQDomElement itemelem = document.createElement("item"); // Each MacroItem could point to an Action provided by the Manager. - const KSharedPtr<Action> action = item->action(); + const TDESharedPtr<Action> action = item->action(); if( action ) { append = true; @@ -184,10 +184,10 @@ TQDomElement XMLHandler::toXML() // Each MacroItem could have a list of variables. We // iterate through that list and build a element // for each single variable. - TQMap<TQString, KSharedPtr<Variable > > varmap = item->variables(); + TQMap<TQString, TDESharedPtr<Variable > > varmap = item->variables(); - for(TQMap<TQString, KSharedPtr<Variable > >::ConstIterator vit = varmap.constBegin(); vit != varmap.constEnd(); ++vit) { - const KSharedPtr<Variable> v = vit.data(); + for(TQMap<TQString, TDESharedPtr<Variable > >::ConstIterator vit = varmap.constBegin(); vit != varmap.constEnd(); ++vit) { + const TDESharedPtr<Variable> v = vit.data(); if(! v.data()) { // skip if the variable is NULL. continue; |