diff options
Diffstat (limited to 'qtinterface/tqobject.cpp')
-rw-r--r-- | qtinterface/tqobject.cpp | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/qtinterface/tqobject.cpp b/qtinterface/tqobject.cpp index 3029a5f..351e799 100644 --- a/qtinterface/tqobject.cpp +++ b/qtinterface/tqobject.cpp @@ -22,6 +22,40 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <tqobject.h> +#ifdef USE_QT3 +#include <qobjectlist.h> +#include "tqobjectlist.h" + +const TQObjectList TQObject::tqchildren() const +{ +// return *children(); + + QObjectList qlr; + TQObjectList tqt_tqobject_list; + qlr = *(this->children()); + tqt_tqobject_list.clear(); + for (int i = 0; i < qlr.count(); ++i) { + tqt_tqobject_list.append(static_cast<TQObject*>(qlr.at(i))); + } + return tqt_tqobject_list; +} + +const TQObjectList TQObject::tqobjectTrees() +{ +// return *objectTrees(); + + QObjectList qlr; + TQObjectList tqt_tqobject_list; + qlr = *objectTrees(); + tqt_tqobject_list.clear(); + for (int i = 0; i < qlr.count(); ++i) { + tqt_tqobject_list.append(static_cast<TQObject*>(qlr.at(i))); + } + return tqt_tqobject_list; +} + +#endif // USE_QT3 + #ifdef USE_QT4 const QObjectList *QObject::objectTrees() { @@ -51,4 +85,4 @@ bool QObject::qt_invoke(int slot, QUObject* uo) { return method.invoke(this, Qt::DirectConnection); } -#endif
\ No newline at end of file +#endif |