summaryrefslogtreecommitdiffstats
path: root/lib/kross/api/event.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kross/api/event.h')
-rw-r--r--lib/kross/api/event.h56
1 files changed, 28 insertions, 28 deletions
diff --git a/lib/kross/api/event.h b/lib/kross/api/event.h
index 2df5a331..e378052b 100644
--- a/lib/kross/api/event.h
+++ b/lib/kross/api/event.h
@@ -29,9 +29,9 @@
#include "proxy.h"
#include "variant.h"
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
namespace Kross { namespace Api {
@@ -39,7 +39,7 @@ namespace Kross { namespace Api {
* Template class for all kinds of callable events. An
* event is the abstract base for callable objects like
* methodfunctions in \a Class instances or \a EventSlot
- * and \a EventSignal to access Qt signals and slots.
+ * and \a EventSignal to access TQt signals and slots.
*/
template<class T>
class Event : public Callable
@@ -55,7 +55,7 @@ namespace Kross { namespace Api {
* List of memberfunctions. Each function is accessible
* by the functionname.
*/
- QMap<QString, Function* > m_functions;
+ TQMap<TQString, Function* > m_functions;
public:
@@ -64,7 +64,7 @@ namespace Kross { namespace Api {
*
* \param name The name this \a Event has.
*/
- Event(const QString& name)
+ Event(const TQString& name)
: Callable(name)
{
}
@@ -74,8 +74,8 @@ namespace Kross { namespace Api {
*/
virtual ~Event()
{
- QMapConstIterator<QString, Function* > endit = m_functions.constEnd();
- for(QMapConstIterator<QString, Function* > it = m_functions.constBegin(); it != endit; ++it)
+ TQMapConstIterator<TQString, Function* > endit = m_functions.constEnd();
+ for(TQMapConstIterator<TQString, Function* > it = m_functions.constBegin(); it != endit; ++it)
delete it.data();
}
@@ -95,9 +95,9 @@ namespace Kross { namespace Api {
*
* \todo Remove this method as soon as there is no code using it
*/
- inline void addFunction(const QString& name, FunctionPtr function)
+ inline void addFunction(const TQString& name, FunctionPtr function)
{
- m_functions.replace(name, new Function0<T>(static_cast<T*>(this), function));
+ m_functions.tqreplace(name, new Function0<T>(static_cast<T*>(this), function));
}
/**
@@ -112,9 +112,9 @@ namespace Kross { namespace Api {
* owner of the \a Function instance and will take
* care of deleting it if this \a Event got deleted.
*/
- inline void addFunction(const QString& name, Function* function)
+ inline void addFunction(const TQString& name, Function* function)
{
- m_functions.replace(name, function);
+ m_functions.tqreplace(name, function);
}
/**
@@ -122,9 +122,9 @@ namespace Kross { namespace Api {
* to this \a Event instance.
*/
template<class RETURNOBJ, class ARG1OBJ, class ARG2OBJ, class ARG3OBJ, class ARG4OBJ, class INSTANCE, typename METHOD>
- inline void addFunction4(const QString& name, INSTANCE* instance, METHOD method, ARG1OBJ* arg1 = 0, ARG2OBJ* arg2 = 0, ARG3OBJ* arg3 = 0, ARG4OBJ* arg4 = 0)
+ inline void addFunction4(const TQString& name, INSTANCE* instance, METHOD method, ARG1OBJ* arg1 = 0, ARG2OBJ* arg2 = 0, ARG3OBJ* arg3 = 0, ARG4OBJ* arg4 = 0)
{
- m_functions.replace(name,
+ m_functions.tqreplace(name,
new Kross::Api::ProxyFunction<INSTANCE, METHOD, RETURNOBJ, ARG1OBJ, ARG2OBJ, ARG3OBJ, ARG4OBJ>
(instance, method, arg1, arg2, arg3, arg4)
);
@@ -132,9 +132,9 @@ namespace Kross { namespace Api {
/// Same as above with three arguments.
template<class RETURNOBJ, class ARG1OBJ, class ARG2OBJ, class ARG3OBJ, class INSTANCE, typename METHOD>
- inline void addFunction3(const QString& name, INSTANCE* instance, METHOD method, ARG1OBJ* arg1 = 0, ARG2OBJ* arg2 = 0, ARG3OBJ* arg3 = 0)
+ inline void addFunction3(const TQString& name, INSTANCE* instance, METHOD method, ARG1OBJ* arg1 = 0, ARG2OBJ* arg2 = 0, ARG3OBJ* arg3 = 0)
{
- m_functions.replace(name,
+ m_functions.tqreplace(name,
new Kross::Api::ProxyFunction<INSTANCE, METHOD, RETURNOBJ, ARG1OBJ, ARG2OBJ, ARG3OBJ>
(instance, method, arg1, arg2, arg3)
);
@@ -142,9 +142,9 @@ namespace Kross { namespace Api {
/// Same as above with two arguments.
template<class RETURNOBJ, class ARG1OBJ, class ARG2OBJ, class INSTANCE, typename METHOD>
- inline void addFunction2(const QString& name, INSTANCE* instance, METHOD method, ARG1OBJ* arg1 = 0, ARG2OBJ* arg2 = 0)
+ inline void addFunction2(const TQString& name, INSTANCE* instance, METHOD method, ARG1OBJ* arg1 = 0, ARG2OBJ* arg2 = 0)
{
- m_functions.replace(name,
+ m_functions.tqreplace(name,
new Kross::Api::ProxyFunction<INSTANCE, METHOD, RETURNOBJ, ARG1OBJ, ARG2OBJ>
(instance, method, arg1, arg2)
);
@@ -152,9 +152,9 @@ namespace Kross { namespace Api {
/// Same as above, but with one argument.
template<class RETURNOBJ, class ARG1OBJ, class INSTANCE, typename METHOD>
- inline void addFunction1(const QString& name, INSTANCE* instance, METHOD method, ARG1OBJ* arg1 = 0)
+ inline void addFunction1(const TQString& name, INSTANCE* instance, METHOD method, ARG1OBJ* arg1 = 0)
{
- m_functions.replace(name,
+ m_functions.tqreplace(name,
new Kross::Api::ProxyFunction<INSTANCE, METHOD, RETURNOBJ, ARG1OBJ>
(instance, method, arg1)
);
@@ -162,9 +162,9 @@ namespace Kross { namespace Api {
/// Same as above with no arguments.
template<class RETURNOBJ, class INSTANCE, typename METHOD>
- inline void addFunction0(const QString& name, INSTANCE* instance, METHOD method)
+ inline void addFunction0(const TQString& name, INSTANCE* instance, METHOD method)
{
- m_functions.replace(name,
+ m_functions.tqreplace(name,
new Kross::Api::ProxyFunction<INSTANCE, METHOD, RETURNOBJ>
(instance, method)
);
@@ -175,9 +175,9 @@ namespace Kross { namespace Api {
* \param name the function name
* \return true if the function is available in this \a Callable
*/
- bool isAFunction(const QString & name) const
+ bool isAFunction(const TQString & name) const
{
- return m_functions.contains(name);
+ return m_functions.tqcontains(name);
}
/**
@@ -190,7 +190,7 @@ namespace Kross { namespace Api {
* \param name The functionname. Each function this
* Object holds should have a different
* name cause they are access by they name.
- * If name is QString::null or empty, a
+ * If name is TQString() or empty, a
* self-reference to this instance is
* returned.
* \param arguments The list of arguments.
@@ -198,16 +198,16 @@ namespace Kross { namespace Api {
* or NULL if there doesn't exists such a
* function with defined name.
*/
- virtual Object::Ptr call(const QString& name, List::Ptr arguments)
+ virtual Object::Ptr call(const TQString& name, List::Ptr arguments)
{
#ifdef KROSS_API_EVENT_CALL_DEBUG
- krossdebug( QString("Event::call() name='%1' getName()='%2'").arg(name).arg(getName()) );
+ krossdebug( TQString("Event::call() name='%1' getName()='%2'").tqarg(name).tqarg(getName()) );
#endif
Function* function = m_functions[name];
if(function) {
#ifdef KROSS_API_EVENT_CALL_DEBUG
- krossdebug( QString("Event::call() name='%1' is a builtin function.").arg(name) );
+ krossdebug( TQString("Event::call() name='%1' is a builtin function.").tqarg(name) );
#endif
return function->call(arguments);
}