diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /ksirc/objFinder.cpp | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksirc/objFinder.cpp')
-rw-r--r-- | ksirc/objFinder.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/ksirc/objFinder.cpp b/ksirc/objFinder.cpp index 4625b6cf..5988903d 100644 --- a/ksirc/objFinder.cpp +++ b/ksirc/objFinder.cpp @@ -1,15 +1,15 @@ #include "objFinder.h" -#include <qapplication.h> -#include <qobjectlist.h> -#include <qwidgetlist.h> +#include <tqapplication.h> +#include <tqobjectlist.h> +#include <tqwidgetlist.h> #include <stdlib.h> #include <time.h> #include <kdebug.h> -QDict<QObject> *objFinder::objList = new QDict<QObject>; +TQDict<TQObject> *objFinder::objList = new TQDict<TQObject>; /* * So we can connect to the slots, etc @@ -17,7 +17,7 @@ QDict<QObject> *objFinder::objList = new QDict<QObject>; objFinder *objFind = new objFinder(); objFinder::objFinder() - : QObject() + : TQObject() { } @@ -25,8 +25,8 @@ objFinder::~objFinder() { } -void objFinder::insert(QObject *obj, const char *key){ - QString name; +void objFinder::insert(TQObject *obj, const char *key){ + TQString name; if(obj == 0x0){ qWarning("objFinder: Passed Null Object"); @@ -43,22 +43,22 @@ void objFinder::insert(QObject *obj, const char *key){ } } objList->insert(name, obj); - connect(obj, SIGNAL(destroyed()), - objFind, SLOT(objDest())); + connect(obj, TQT_SIGNAL(destroyed()), + objFind, TQT_SLOT(objDest())); emit objFind->inserted(obj); } -QObject *objFinder::find(const char *name, const char *inherits){ - QObject *found; - QDictIterator<QObject> it(*objList); +TQObject *objFinder::find(const char *name, const char *inherits){ + TQObject *found; + TQDictIterator<TQObject> it(*objList); uint len = strlen(name); while(it.current()){ if(len == strlen(it.current()->name()) && strcmp(it.current()->name(), name) == 0) return it.current(); - QObjectList *qobl = it.current()->queryList(inherits, name, FALSE); - QObjectListIt itql( *qobl ); + TQObjectList *qobl = it.current()->queryList(inherits, name, FALSE); + TQObjectListIt itql( *qobl ); if(itql.current() != 0x0){ found = itql.current(); delete qobl; @@ -67,8 +67,8 @@ QObject *objFinder::find(const char *name, const char *inherits){ delete qobl; ++it; } - QWidgetList *all = QApplication::allWidgets(); - QWidgetListIt itW(*all); + TQWidgetList *all = TQApplication::allWidgets(); + TQWidgetListIt itW(*all); while(itW.current()){ if(len == strlen(itW.current()->name()) && strcmp(itW.current()->name(), name) == 0){ @@ -88,13 +88,13 @@ QObject *objFinder::find(const char *name, const char *inherits){ } void objFinder::dumpTree(){ - QDictIterator<QObject> it(*objList); + TQDictIterator<TQObject> it(*objList); while(it.current()){ it.current()->dumpObjectTree(); ++it; } - QWidgetList *all = QApplication::allWidgets(); - QWidgetListIt itW(*all); + TQWidgetList *all = TQApplication::allWidgets(); + TQWidgetListIt itW(*all); while(itW.current()){ kdDebug(5008) << itW.current()->className() << "::" << itW.current()->name("unnamed") << endl; ++itW; @@ -102,14 +102,14 @@ void objFinder::dumpTree(){ } -QStringList objFinder::allObjects(){ - QStringList allNames; - QDictIterator<QObject> it(*objList); +TQStringList objFinder::allObjects(){ + TQStringList allNames; + TQDictIterator<TQObject> it(*objList); while(it.current()){ - QObjectList *qobl = it.current()->queryList(); // Matches everything - QObjectListIt itql( *qobl ); + TQObjectList *qobl = it.current()->queryList(); // Matches everything + TQObjectListIt itql( *qobl ); while(itql.current()){ - QString name; + TQString name; name = itql.current()->className(); name += "::"; name += itql.current()->name("unnamed"); @@ -119,10 +119,10 @@ QStringList objFinder::allObjects(){ delete qobl; ++it; } - QWidgetList *all = QApplication::allWidgets(); - QWidgetListIt itW(*all); + TQWidgetList *all = TQApplication::allWidgets(); + TQWidgetListIt itW(*all); while(itW.current()){ - QString name; + TQString name; name = itW.current()->className(); name += "::"; name += itW.current()->name("unnamed"); @@ -133,9 +133,9 @@ QStringList objFinder::allObjects(){ return allNames; } -QString objFinder::randString(){ +TQString objFinder::randString(){ static bool runSrand = 0; - QString str = ""; + TQString str = ""; if(runSrand == 0){ srand(time(NULL)); } @@ -149,7 +149,7 @@ void objFinder::objDest(){ if(sender() == 0x0){ return; } - QDictIterator<QObject> it(*objList); + TQDictIterator<TQObject> it(*objList); while(it.current()){ if(it.current() == sender()){ objList->remove(it.currentKey()); |