diff options
-rw-r--r-- | qtinterface/Makefile.am | 6 | ||||
-rw-r--r-- | qtinterface/tqobject.h | 21 | ||||
-rw-r--r-- | qtinterface/tqt.h | 14 |
3 files changed, 32 insertions, 9 deletions
diff --git a/qtinterface/Makefile.am b/qtinterface/Makefile.am index 14bc973..ec90129 100644 --- a/qtinterface/Makefile.am +++ b/qtinterface/Makefile.am @@ -142,11 +142,11 @@ include ../admin/Doxyfile.am if USE_QT3 QT_VER_REPLACE = s/QT_VER=X/QT_VER=3/g -QT_HVER_REPLACE = s/USE_QTX/USE_QT3/g +QT_HVER_REPLACE = 25s/USE_QTX/USE_QT3/g endif if USE_QT4 QT_VER_REPLACE = s/QT_VER=X/QT_VER=4/g -QT_HVER_REPLACE = s/USE_QTX/USE_QT4/g +QT_HVER_REPLACE = 25s/USE_QTX/USE_QT4/g endif install-exec-local: @@ -164,4 +164,4 @@ install-exec-local: sed -i '$(QT_VER_REPLACE)' "$(DESTDIR)$(bindir)/tqt-replace" sed -i '$(QT_VER_REPLACE)' "$(DESTDIR)$(bindir)/tqt-replace-stream" sed -i '$(QT_HVER_REPLACE)' "$(srcdir)/tqt.h" - cp -Rp "$(srcdir)/tqt4/" "$(DESTDIR)$(includedir)/"
\ No newline at end of file + cp -Rp "$(srcdir)/tqt4/" "$(DESTDIR)$(includedir)/" diff --git a/qtinterface/tqobject.h b/qtinterface/tqobject.h index f19e493..72e3ec8 100644 --- a/qtinterface/tqobject.h +++ b/qtinterface/tqobject.h @@ -30,6 +30,25 @@ Boston, MA 02110-1301, USA. // For Qt3, no changes are needed #include <qobject.h> +#include <qobjectlist.h> + +class TQObject : public QObject +{ + Q_OBJECT + +public: + inline TQObject( QObject *tqparent=0, const char *name=0 ) : QObject ( tqparent, name ) {} + + inline const TQObjectList tqchildren() const { return *children(); } + + // Interoperability + static const TQObject& convertFromQObject( QObject& ql ); +}; + +// Interoperability +inline static const TQObject& convertFromQObject( const QObject& qo ) { + return (*static_cast<const TQObject*>(&qo)); +} #endif // USE_QT3 @@ -42,4 +61,4 @@ Boston, MA 02110-1301, USA. #endif // USE_QT4 -#endif /* TQOBJECT_H */
\ No newline at end of file +#endif /* TQOBJECT_H */ diff --git a/qtinterface/tqt.h b/qtinterface/tqt.h index 4c14184..fdd3e94 100644 --- a/qtinterface/tqt.h +++ b/qtinterface/tqt.h @@ -22,7 +22,11 @@ Boston, MA 02110-1301, USA. #ifndef TQT_H #define TQT_H -#define USE_QTX +#define USE_QTX // WARNING: KEEP THIS ON LINE 25 AT ALL TIMES OTHERWISE BUILD FAILURE WILL OCCUR + +#ifdef USE_QTX +#define USE_QT3 // Default to Qt3 +#endif #ifdef USE_QT4 #define QT3_SUPPORT @@ -382,9 +386,9 @@ Boston, MA 02110-1301, USA. #define TQNetworkOperation QNetworkOperation #define TQObjectCleanupHandler QObjectCleanupHandler #define TQObjectDictionary QObjectDictionary -#define TQObject QObject +//#define TQObject QObject #define TQObjectUserData QObjectUserData -#define TQObject QObject +//#define TQObject QObject #define TQObjectList QObjectList #define TQObjectListIterator QObjectListIterator #define TQObjectListIt QObjectListIt @@ -614,7 +618,7 @@ Boston, MA 02110-1301, USA. #define tqStatus Status #define tqmetaObject metaObject #define tqfind find -#define tqchildren children +//#define tqchildren children #define tqsetObjectName setObjectName #define tqtopLevelWidget topLevelWidget #define tqparent parent @@ -683,7 +687,7 @@ Boston, MA 02110-1301, USA. #define TQT_TQMETAOBJECT(x) (static_cast<TQMetaObject*>(static_cast<QMetaObject*>(x))) #define TQT_TQSTYLEOPTION(x) (static_cast<TQStyleOption*>(static_cast<TQStyleOption*>(x))) -#define TQT_TQOBJECT_OBJECT(x) x +#define TQT_TQOBJECT_OBJECT(x) (convertFromQObject(x)) #define TQT_TQSIZEPOLICY_OBJECT(x) x #define TQT_TQLAYOUT_OBJECT(x) x #define TQT_TQCOLOR_OBJECT(x) x |