diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-08-28 10:59:35 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-09-03 19:32:16 +0900 |
commit | 2505a01dd2ae2c9696210783d677d7d45caa665f (patch) | |
tree | 21cccb348d5a6062d9f612f1ec54cb5c59fb4d7f | |
parent | 8745f781ced6d3f7dcb75daada02eafb2b583139 (diff) | |
download | tqtinterface-2505a01dd2ae2c9696210783d677d7d45caa665f.tar.gz tqtinterface-2505a01dd2ae2c9696210783d677d7d45caa665f.zip |
Drop USE_QT3/4 code
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 701d92857caed18c0099b264c45a0b0edce782f2)
321 files changed, 1 insertions, 9881 deletions
diff --git a/qtinterface/interface_tqt3/private/tqcom_p.h b/qtinterface/interface_tqt3/private/tqcom_p.h index 8611847..f8b7222 100644 --- a/qtinterface/interface_tqt3/private/tqcom_p.h +++ b/qtinterface/interface_tqt3/private/tqcom_p.h @@ -23,13 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQCOM_P_H #include <tqt.h> - -#ifdef USE_QT3 - -// For Qt3, no changes are needed - #include <private/qcom_p.h> -#endif // USE_QT3 - #endif /* TQT_TQCOM_P_H */ diff --git a/qtinterface/interface_tqt3/private/tqeffects_p.h b/qtinterface/interface_tqt3/private/tqeffects_p.h index 7e15c03..e6daf52 100644 --- a/qtinterface/interface_tqt3/private/tqeffects_p.h +++ b/qtinterface/interface_tqt3/private/tqeffects_p.h @@ -23,18 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQEFFECTS_P_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QUComExtra_P class -// For Qt3, no changes are needed - #include <private/qeffects_p.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -#endif // USE_QT4 - #endif /* TQT_TQEFFECTS_P_H */ diff --git a/qtinterface/interface_tqt3/private/tqinternal_p.h b/qtinterface/interface_tqt3/private/tqinternal_p.h index 069d11e..2843b6d 100644 --- a/qtinterface/interface_tqt3/private/tqinternal_p.h +++ b/qtinterface/interface_tqt3/private/tqinternal_p.h @@ -23,18 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQINTERNAL_P_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSharedDoubleBuffer class -// For Qt3, no changes are needed - #include <private/qinternal_p.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -#endif // USE_QT4 - #endif /* TQT_TQINTERNAL_P_H */ diff --git a/qtinterface/interface_tqt3/private/tqlayoutengine_p.h b/qtinterface/interface_tqt3/private/tqlayoutengine_p.h index 1bb9581..1af42f5 100644 --- a/qtinterface/interface_tqt3/private/tqlayoutengine_p.h +++ b/qtinterface/interface_tqt3/private/tqlayoutengine_p.h @@ -23,14 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQLAYOUTENGINE_P_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QUComExtra_P class -// For Qt3, no changes are needed - #include <private/qlayoutengine_p.h> -#endif // USE_QT3 - #endif /* TQT_TQLAYOUTENGINE_P_H */ diff --git a/qtinterface/interface_tqt3/private/tqpluginmanager_p.h b/qtinterface/interface_tqt3/private/tqpluginmanager_p.h index d476598..5bd72ac 100644 --- a/qtinterface/interface_tqt3/private/tqpluginmanager_p.h +++ b/qtinterface/interface_tqt3/private/tqpluginmanager_p.h @@ -23,13 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPLUGINMANAGER_P_H #include <tqt.h> - -#ifdef USE_QT3 - -// For Qt3, no changes are needed - #include <private/qpluginmanager_p.h> -#endif // USE_QT3 - #endif /* TQT_TQPLUGINMANAGER_P_H */ diff --git a/qtinterface/interface_tqt3/private/tqrichtext_p.h b/qtinterface/interface_tqt3/private/tqrichtext_p.h index 47dfed1..96ecb90 100644 --- a/qtinterface/interface_tqt3/private/tqrichtext_p.h +++ b/qtinterface/interface_tqt3/private/tqrichtext_p.h @@ -23,18 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQRICHTEXT_P_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSharedDoubleBuffer class -// For Qt3, no changes are needed - #include <private/qrichtext_p.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -#endif // USE_QT4 - #endif /* TQT_TQRICHTEXT_P_H */ diff --git a/qtinterface/interface_tqt3/private/tqtextengine_p.h b/qtinterface/interface_tqt3/private/tqtextengine_p.h index 1a6c6cc..ccd6146 100644 --- a/qtinterface/interface_tqt3/private/tqtextengine_p.h +++ b/qtinterface/interface_tqt3/private/tqtextengine_p.h @@ -23,18 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTEXTENGINE_P_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSharedDoubleBuffer class -// For Qt3, no changes are needed - #include <private/qtextengine_p.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -#endif // USE_QT4 - #endif /* TQT_TQTEXTENGINE_P_H */ diff --git a/qtinterface/interface_tqt3/private/tqucom_p.h b/qtinterface/interface_tqt3/private/tqucom_p.h index be46f52..e516100 100644 --- a/qtinterface/interface_tqt3/private/tqucom_p.h +++ b/qtinterface/interface_tqt3/private/tqucom_p.h @@ -23,13 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQUCOM_P_H #include <tqt.h> - -#ifdef USE_QT3 - -// For Qt3, no changes are needed - #include <private/qucom_p.h> -#endif // USE_QT3 - #endif /* TQT_TQUCOM_P_H */ diff --git a/qtinterface/interface_tqt3/private/tqucomextra_p.cpp b/qtinterface/interface_tqt3/private/tqucomextra_p.cpp index 9c920b9..27f67c4 100644 --- a/qtinterface/interface_tqt3/private/tqucomextra_p.cpp +++ b/qtinterface/interface_tqt3/private/tqucomextra_p.cpp @@ -21,7 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <private/qucomextra_p.h> - -#ifdef USE_QT4 - -#endif diff --git a/qtinterface/interface_tqt3/private/tqucomextra_p.h b/qtinterface/interface_tqt3/private/tqucomextra_p.h index 4817321..325f234 100644 --- a/qtinterface/interface_tqt3/private/tqucomextra_p.h +++ b/qtinterface/interface_tqt3/private/tqucomextra_p.h @@ -23,26 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQUCOMEXTRA_P_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QUComExtra_P class -// For Qt3, no changes are needed - #include <private/qucomextra_p.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QUComExtra_P class -// For Qt4, some changes are needed - -class QUObject: public QObject { -public: -// bool qt_invoke(); -}; - -#endif // USE_QT4 - #endif /* TQT_TQUCOMEXTRA_P_H */ diff --git a/qtinterface/interface_tqt3/private/tqwidgetinterface_p.h b/qtinterface/interface_tqt3/private/tqwidgetinterface_p.h index 5c72d32..61e9a51 100644 --- a/qtinterface/interface_tqt3/private/tqwidgetinterface_p.h +++ b/qtinterface/interface_tqt3/private/tqwidgetinterface_p.h @@ -23,13 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQWIDGETINTERFACE_P_H #include <tqt.h> - -#ifdef USE_QT3 - -// For Qt3, no changes are needed - #include <private/qwidgetinterface_p.h> -#endif // USE_QT3 - #endif /* TQT_TQWIDGETINTERFACE_P_H */ diff --git a/qtinterface/interface_tqt3/tqabstractlayout.h b/qtinterface/interface_tqt3/tqabstractlayout.h index 1048142..af7e036 100644 --- a/qtinterface/interface_tqt3/tqabstractlayout.h +++ b/qtinterface/interface_tqt3/tqabstractlayout.h @@ -23,17 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQABSTRACTLAYOUT_H #include <tqt.h> - -#ifdef USE_QT3 - #include <ntqabstractlayout.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -//#include <Qt/ntqabstractlayout.h> - -#endif // USE_QT4 - #endif /* TQT_TQABSTRACTLAYOUT_H */ diff --git a/qtinterface/interface_tqt3/tqaccel.h b/qtinterface/interface_tqt3/tqaccel.h index 3f69f6b..386e1b5 100644 --- a/qtinterface/interface_tqt3/tqaccel.h +++ b/qtinterface/interface_tqt3/tqaccel.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQACCEL_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QAccel class -// For Qt3, no changes are needed - #include <ntqaccel.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QAccel class -// For Qt4, some changes are needed - -#include <Qt/q3accel.h> - -#endif // USE_QT4 - #endif /* TQT_TQACCEL_H */ diff --git a/qtinterface/interface_tqt3/tqaccessible.h b/qtinterface/interface_tqt3/tqaccessible.h index 7f8dcac..af204a9 100644 --- a/qtinterface/interface_tqt3/tqaccessible.h +++ b/qtinterface/interface_tqt3/tqaccessible.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQACCESSIBLE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QAccessible class -// For Qt3, no changes are needed - #include <ntqaccessible.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QAccessible class -// For Qt4, some changes are needed - -#include <Qt/ntqaccessible.h> - -#endif // USE_QT4 - #endif /* TQT_TQACCESSIBLE_H */ diff --git a/qtinterface/interface_tqt3/tqaction.h b/qtinterface/interface_tqt3/tqaction.h index 8caea31..338659d 100644 --- a/qtinterface/interface_tqt3/tqaction.h +++ b/qtinterface/interface_tqt3/tqaction.h @@ -24,23 +24,6 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqobject.h> - -#ifdef USE_QT3 - -// Reimplement the QAction class -// For Qt3, no changes are needed - #include <ntqaction.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QAction class -// For Qt4, some changes are needed - -#include <Qt/ntqaction.h> - -#endif // USE_QT4 - #endif /* TQT_TQACTION_H */ diff --git a/qtinterface/interface_tqt3/tqapplication.cpp b/qtinterface/interface_tqt3/tqapplication.cpp index dbeef36..c313897 100644 --- a/qtinterface/interface_tqt3/tqapplication.cpp +++ b/qtinterface/interface_tqt3/tqapplication.cpp @@ -21,10 +21,8 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqapplication.h> - #include <X11/X.h> -#ifdef USE_QT3 extern Time tqt_x_time; extern Time tqt_x_user_time; @@ -43,28 +41,3 @@ void set_tqt_x_user_time(unsigned long x) { unsigned long get_tqt_x_user_time(void) { return tqt_x_user_time; } -#endif - -#ifdef USE_QT4 - -// void QApplication::processOneEvent() -// { -// #warning "!!! WARNING: QApplication::processOneEvent() UNIMPLEMENTED !!!" -// } - -TQEventLoop *QApplication::eventLoop() -{ - return TQEventLoop::eventLoop(); -} - -void QApplication::installTranslator( QTranslator * mf ) -{ - #warning "!!! WARNING: QApplication::installTranslator() UNIMPLEMENTED !!!" -} - -void QApplication::removeTranslator( QTranslator * mf ) -{ - #warning "!!! WARNING: QApplication::removeTranslator() UNIMPLEMENTED !!!" -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqapplication.h b/qtinterface/interface_tqt3/tqapplication.h index d3abe33..8eba262 100644 --- a/qtinterface/interface_tqt3/tqapplication.h +++ b/qtinterface/interface_tqt3/tqapplication.h @@ -24,12 +24,6 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqasciidict.h> - -#ifdef USE_QT3 - -// Reimplement the QApplication class -// For Qt3, no changes are needed - #include <ntqapplication.h> // X11/X.h defines Time as unsigned long @@ -38,15 +32,4 @@ unsigned long get_tqt_x_time(void); void set_tqt_x_user_time(unsigned long x); unsigned long get_tqt_x_user_time(void); -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QApplication class -// For Qt4, some changes are needed - -#include <tqt4/Qt/ntqapplication.h> - -#endif // USE_QT4 - #endif /* TQT_TQAPPLICATION_H */ diff --git a/qtinterface/interface_tqt3/tqasciicache.h b/qtinterface/interface_tqt3/tqasciicache.h index e22cfdb..9f2e07d 100644 --- a/qtinterface/interface_tqt3/tqasciicache.h +++ b/qtinterface/interface_tqt3/tqasciicache.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQASCIICACHE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QAsciiCache class -// For Qt3, no changes are needed - #include <ntqasciicache.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QAsciiCache class -// For Qt4, some changes are needed - -#include <Qt/q3asciicache.h> - -#endif // USE_QT4 - #endif /* TQT_TQASCIICACHE_H */ diff --git a/qtinterface/interface_tqt3/tqasciidict.h b/qtinterface/interface_tqt3/tqasciidict.h index 4971d6c..bd70667 100644 --- a/qtinterface/interface_tqt3/tqasciidict.h +++ b/qtinterface/interface_tqt3/tqasciidict.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQASCIIDICT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QAsciiDict class -// For Qt3, no changes are needed - #include <ntqasciidict.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QAsciiDict class -// For Qt4, some changes are needed - -#include <Qt/q3asciidict.h> - -#endif // USE_QT4 - #endif /* TQT_TQASCIIDICT_H */ diff --git a/qtinterface/interface_tqt3/tqassistantclient.h b/qtinterface/interface_tqt3/tqassistantclient.h index cc81193..fd17fd4 100644 --- a/qtinterface/interface_tqt3/tqassistantclient.h +++ b/qtinterface/interface_tqt3/tqassistantclient.h @@ -23,11 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQASSISTANTCLIENT_H #include <tqt.h> - -#ifdef USE_QT3 - #include <ntqassistantclient.h> -#endif // USE_QT3 - #endif /* TQT_TQASSISTANTCLIENT_H */ diff --git a/qtinterface/interface_tqt3/tqasyncimageio.h b/qtinterface/interface_tqt3/tqasyncimageio.h index 7ad5673..a1c156c 100644 --- a/qtinterface/interface_tqt3/tqasyncimageio.h +++ b/qtinterface/interface_tqt3/tqasyncimageio.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQASYNCIMAGEIO_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QAsyncImageIO class -// For Qt3, no changes are needed - #include <ntqasyncimageio.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QAsyncImageIO class -// For Qt4, this class no longer exists! - -#endif // USE_QT4 - #endif /* TQT_TQASYNCIMAGEIO_H */ diff --git a/qtinterface/interface_tqt3/tqasyncio.h b/qtinterface/interface_tqt3/tqasyncio.h index 5e64209..8a3de5f 100644 --- a/qtinterface/interface_tqt3/tqasyncio.h +++ b/qtinterface/interface_tqt3/tqasyncio.h @@ -24,21 +24,6 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqtimer.h> - -#ifdef USE_QT3 - -// Reimplement the QAsyncIO class -// For Qt3, no changes are needed - #include <ntqasyncio.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QAsyncIO class -// For Qt4, this class no longer exists! - -#endif // USE_QT4 - #endif /* TQT_TQASYNCIO_H */ diff --git a/qtinterface/interface_tqt3/tqbig5codec.h b/qtinterface/interface_tqt3/tqbig5codec.h index f61a9ec..fd56a8d 100644 --- a/qtinterface/interface_tqt3/tqbig5codec.h +++ b/qtinterface/interface_tqt3/tqbig5codec.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQQBIG5CODEC_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QBig5Codec class -// For Qt3, no changes are needed - #include <ntqbig5codec.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QBig5Codec class -// For Qt4, this class no longer exists! - -#endif // USE_QT4 - #endif /* TQT_TQQBIG5CODEC_H */ diff --git a/qtinterface/interface_tqt3/tqbitarray.h b/qtinterface/interface_tqt3/tqbitarray.h index fda6ae5..93517a9 100644 --- a/qtinterface/interface_tqt3/tqbitarray.h +++ b/qtinterface/interface_tqt3/tqbitarray.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQBITARRAY_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QBitArray class -// For Qt3, no changes are needed - #include <ntqbitarray.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QBitArray class -// For Qt4, some changes are needed - -#include <Qt/ntqbitarray.h> - -#endif // USE_QT4 - #endif /* TQT_TQBITARRAY_H */ diff --git a/qtinterface/interface_tqt3/tqbitmap.h b/qtinterface/interface_tqt3/tqbitmap.h index b8d3ee2..eea26d2 100644 --- a/qtinterface/interface_tqt3/tqbitmap.h +++ b/qtinterface/interface_tqt3/tqbitmap.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQBITMAP_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QBitmap class -// For Qt3, no changes are needed - #include <ntqbitmap.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QBitmap class -// For Qt4, some changes are needed - -#include <Qt/ntqbitmap.h> - -#endif // USE_QT4 - #endif /* TQT_TQBITMAP_H */ diff --git a/qtinterface/interface_tqt3/tqbrush.h b/qtinterface/interface_tqt3/tqbrush.h index a4218e8..0eeb08a 100644 --- a/qtinterface/interface_tqt3/tqbrush.h +++ b/qtinterface/interface_tqt3/tqbrush.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQBRUSH_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QBrush class -// For Qt3, no changes are needed - #include <ntqbrush.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QBrush class -// For Qt4, some changes are needed - -#include <Qt/ntqbrush.h> - -#endif // USE_QT4 - #endif /* TQT_TQBRUSH_H */ diff --git a/qtinterface/interface_tqt3/tqbuffer.h b/qtinterface/interface_tqt3/tqbuffer.h index e5b6a56..bfbd872 100644 --- a/qtinterface/interface_tqt3/tqbuffer.h +++ b/qtinterface/interface_tqt3/tqbuffer.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQBUFFER_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QBuffer class -// For Qt3, no changes are needed - #include <ntqbuffer.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QBuffer class -// For Qt4, some changes are needed - -#include <Qt/ntqbuffer.h> - -#endif // USE_QT4 - #endif /* TQT_TQBUFFER_H */ diff --git a/qtinterface/interface_tqt3/tqbutton.h b/qtinterface/interface_tqt3/tqbutton.h index 325e4b0..09c1d01 100644 --- a/qtinterface/interface_tqt3/tqbutton.h +++ b/qtinterface/interface_tqt3/tqbutton.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQBUTTON_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QButton class -// For Qt3, no changes are needed - #include <ntqbutton.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QButton class -// For Qt4, some changes are needed - -#include <Qt/q3button.h> - -#endif // USE_QT4 - #endif /* TQT_TQBUTTON_H */ diff --git a/qtinterface/interface_tqt3/tqbuttongroup.h b/qtinterface/interface_tqt3/tqbuttongroup.h index da48ad3..8f63012 100644 --- a/qtinterface/interface_tqt3/tqbuttongroup.h +++ b/qtinterface/interface_tqt3/tqbuttongroup.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQBUTTONGROUP_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QButtonGroup class -// For Qt3, no changes are needed - #include <ntqbuttongroup.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QButtonGroup class -// For Qt4, some changes are needed - -#include <Qt/q3buttongroup.h> - -#endif // USE_QT4 - #endif /* TQT_TQBUTTONGROUP_H */ diff --git a/qtinterface/interface_tqt3/tqcache.h b/qtinterface/interface_tqt3/tqcache.h index f2d455c..ef82f6e 100644 --- a/qtinterface/interface_tqt3/tqcache.h +++ b/qtinterface/interface_tqt3/tqcache.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQCACHE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QCache class -// For Qt3, no changes are needed - #include <ntqcache.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QCache class -// For Qt4, some changes are needed - -#include <Qt/q3cache.h> - -#endif // USE_QT4 - #endif /* TQT_TQCACHE_H */ diff --git a/qtinterface/interface_tqt3/tqcanvas.h b/qtinterface/interface_tqt3/tqcanvas.h index c85e280..265be8a 100644 --- a/qtinterface/interface_tqt3/tqcanvas.h +++ b/qtinterface/interface_tqt3/tqcanvas.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQCANVAS_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QCanvas class -// For Qt3, no changes are needed - #include <ntqcanvas.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QCanvas class -// For Qt4, some changes are needed - -#include <Qt/q3canvas.h> - -#endif // USE_QT4 - #endif /* TQT_TQCANVAS_H */ diff --git a/qtinterface/interface_tqt3/tqcdestyle.h b/qtinterface/interface_tqt3/tqcdestyle.h index b24e21f..63e9242 100644 --- a/qtinterface/interface_tqt3/tqcdestyle.h +++ b/qtinterface/interface_tqt3/tqcdestyle.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQCDESTYLE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QCDEStyle class -// For Qt3, no changes are needed - #include <ntqcdestyle.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QCDEStyle class -// For Qt4, some changes are needed - -#include <Qt/ntqcdestyle.h> - -#endif // USE_QT4 - #endif /* TQT_TQCDESTYLE_H */ diff --git a/qtinterface/interface_tqt3/tqcheckbox.h b/qtinterface/interface_tqt3/tqcheckbox.h index d00cebc..b6720c5 100644 --- a/qtinterface/interface_tqt3/tqcheckbox.h +++ b/qtinterface/interface_tqt3/tqcheckbox.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQCHECKBOX_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the TQCheckBox class -// For Qt3, no changes are needed - #include <ntqcheckbox.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the TQCheckBox class -// For Qt4, some changes are needed - -#include <Qt/ntqcheckbox.h> - -#endif // USE_QT4 - #endif /* TQT_TQCHECKBOX_H */ diff --git a/qtinterface/interface_tqt3/tqcleanuphandler.h b/qtinterface/interface_tqt3/tqcleanuphandler.h index 623b006..eee4b16 100644 --- a/qtinterface/interface_tqt3/tqcleanuphandler.h +++ b/qtinterface/interface_tqt3/tqcleanuphandler.h @@ -23,109 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQCLEANUPHANDLER_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QCleanupHandler class -// For Qt3, no changes are needed - #include <ntqcleanuphandler.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QCleanupHandler class -// For Qt4, some changes are needed - -//#include <Qt/ntqcleanuphandler.h> - -#include "tntqptrlist.h" - -template<class Type> -class TQCleanupHandler -{ -public: - TQCleanupHandler() : cleanupObjects( 0 ) {} - ~TQCleanupHandler() { clear(); } - - Type* add( Type **object ) { - if ( !cleanupObjects ) - cleanupObjects = new Q3PtrList<Type*>; - cleanupObjects->insert( 0, object ); - return *object; - } - - void remove( Type **object ) { - if ( !cleanupObjects ) - return; - if ( cleanupObjects->findRef( object ) >= 0 ) - (void) cleanupObjects->take(); - } - - bool isEmpty() const { - return cleanupObjects ? cleanupObjects->isEmpty() : TRUE; - } - - void clear() { - if ( !cleanupObjects ) - return; - Q3PtrListIterator<Type*> it( *cleanupObjects ); - Type **object; - while ( ( object = it.current() ) ) { - delete *object; - *object = 0; - cleanupObjects->remove( object ); - } - delete cleanupObjects; - cleanupObjects = 0; - } - -private: - Q3PtrList<Type*> *cleanupObjects; -}; - -template<class Type> -class TQSingleCleanupHandler -{ -public: - TQSingleCleanupHandler() : object( 0 ) {} - ~TQSingleCleanupHandler() { - if ( object ) { - delete *object; - *object = 0; - } - } - Type* set( Type **o ) { - object = o; - return *object; - } - void reset() { object = 0; } -private: - Type **object; -}; - -template<class Type> -class TQSharedCleanupHandler -{ -public: - TQSharedCleanupHandler() : object( 0 ) {} - ~TQSharedCleanupHandler() { - if ( object ) { - if ( (*object)->deref() ) - delete *object; - *object = 0; - } - } - Type* set( Type **o ) { - object = o; - return *object; - } - void reset() { object = 0; } -private: - Type **object; -}; - -#endif // USE_QT4 - #endif /* TQT_TQCLEANUPHANDLER_H */ diff --git a/qtinterface/interface_tqt3/tqclipboard.h b/qtinterface/interface_tqt3/tqclipboard.h index a535474..aa77e3a 100644 --- a/qtinterface/interface_tqt3/tqclipboard.h +++ b/qtinterface/interface_tqt3/tqclipboard.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQCLIPBOARD_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QClipboard class -// For Qt3, no changes are needed - #include <ntqclipboard.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QClipboard class -// For Qt4, some changes are needed - -#include <Qt/ntqclipboard.h> - -#endif // USE_QT4 - #endif /* TQT_TQCLIPBOARD_H */ diff --git a/qtinterface/interface_tqt3/tqcolor.h b/qtinterface/interface_tqt3/tqcolor.h index 69e3a02..c54966e 100644 --- a/qtinterface/interface_tqt3/tqcolor.h +++ b/qtinterface/interface_tqt3/tqcolor.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQCOLOR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QColor class -// For Qt3, no changes are needed - #include <ntqcolor.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QColor class -// For Qt4, no changes are needed - -#include <Qt/ntqcolor.h> - -#endif // USE_QT4 - #endif /* TQT_TQCOLOR_H */ diff --git a/qtinterface/interface_tqt3/tqcolordialog.h b/qtinterface/interface_tqt3/tqcolordialog.h index cec2c51..d18be27 100644 --- a/qtinterface/interface_tqt3/tqcolordialog.h +++ b/qtinterface/interface_tqt3/tqcolordialog.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQCOLORDIALOG_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QColorDialog class -// For Qt3, no changes are needed - #include <ntqcolordialog.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QColorDialog class -// For Qt4, some changes are needed - -#include <Qt/ntqcolordialog.h> - -#endif // USE_QT4 - #endif /* TQT_TQCOLORDIALOG_H */ diff --git a/qtinterface/interface_tqt3/tqcombobox.h b/qtinterface/interface_tqt3/tqcombobox.h index 9106dfd..a06e660 100644 --- a/qtinterface/interface_tqt3/tqcombobox.h +++ b/qtinterface/interface_tqt3/tqcombobox.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQCOMBOBOX_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QComboBox class -// For Qt3, no changes are needed - #include <ntqcombobox.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QComboBox class -// For Qt4, some changes are needed - -#include <Qt/ntqcombobox.h> - -#endif // USE_QT4 - #endif /* TQT_TQCOMBOBOX_H */ diff --git a/qtinterface/interface_tqt3/tqcommonstyle.cpp b/qtinterface/interface_tqt3/tqcommonstyle.cpp index 1d7a9f2..7ffc25b 100644 --- a/qtinterface/interface_tqt3/tqcommonstyle.cpp +++ b/qtinterface/interface_tqt3/tqcommonstyle.cpp @@ -21,75 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqcommonstyle.h> - -#ifdef USE_QT4 - -// void QCommonStyle::drawPrimitive(ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *w) const { -// drawControl(element, opt, p, w); -// } - -void QCommonStyle::drawPrimitive( PrimitiveElement pe, - Q3Painter *p, - const QRect &r, - const QColorGroup &cg, - SFlags flags, - const QStyleOption& opt) const { - drawPrimitive(pe, &opt, (QPainter*)p); -} - -void QCommonStyle::drawControl( ControlElement element, - Q3Painter *p, - const QWidget *widget, - const QRect &r, - const QColorGroup &cg, - SFlags how, - const QStyleOption& opt) const { - - drawControl(element, &opt, (QPainter*)p, widget); -} - -void QCommonStyle::drawComplexControl( ComplexControl control, - Q3Painter *p, - const QWidget *widget, - const QRect &r, - const QColorGroup &cg, - SFlags how, - SCFlags sub, - SCFlags subActive, - const QStyleOption& opt ) const { - drawComplexControl(control, (QStyleOptionComplex*)&opt, (QPainter*)p, widget); -} - -int QCommonStyle::styleHint(StyleHint sh, const QWidget * widget, const QStyleOption &opt, QStyleHintReturn *shret) const { - return styleHint(sh, &opt, widget, shret); -} - -QPixmap QCommonStyle::stylePixmap( StandardPixmap stylepixmap, const QWidget *widget, const QStyleOption& opt) const { - return standardPixmap(stylepixmap, &opt, widget); -} - -QRect QCommonStyle::querySubControlMetrics( ComplexControl control, - const QWidget *widget, - SubControl sc, - const QStyleOption& opt) const { - return subControlRect(control, (QStyleOptionComplex*)&opt, sc, widget); -} - -QRect QCommonStyle::subRect( SubElement r, const QWidget *widget ) const { - QStyleOption opt = QStyleOption::SO_Default; - return subElementRect(r, &opt, widget); -} - -int QCommonStyle::pixelMetric( PixelMetric m, const QWidget *widget ) const { - QStyleOption opt = QStyleOption::SO_Default; - return pixelMetric(m, &opt, widget); -} - -QCommonStyle::SubControl QCommonStyle::querySubControl( ComplexControl control, - const QWidget *widget, - const QPoint &pos, - const QStyleOption& opt ) const { - return hitTestComplexControl(control, (QStyleOptionComplex*)&opt, pos, widget); -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqcommonstyle.h b/qtinterface/interface_tqt3/tqcommonstyle.h index a0b4af4..a2f9aa1 100644 --- a/qtinterface/interface_tqt3/tqcommonstyle.h +++ b/qtinterface/interface_tqt3/tqcommonstyle.h @@ -23,25 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQCOMMONSTYLE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QCommonStyle class -// For Qt3, no changes are needed - #include <ntqcommonstyle.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QCommonStyle class -// For Qt4, some changes are needed - -#include <ntqstyle.h> -#include <tqt4/Qt/ntqcommonstyle.h> -#include <Qt/ntqpainter.h> - -#endif // USE_QT4 - #endif /* TQT_TQCOMMONSTYLE_H */ diff --git a/qtinterface/interface_tqt3/tqcompactstyle.h b/qtinterface/interface_tqt3/tqcompactstyle.h index c727041..23c8f8d 100644 --- a/qtinterface/interface_tqt3/tqcompactstyle.h +++ b/qtinterface/interface_tqt3/tqcompactstyle.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQCOMPACTSTYLE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QCompactStyle class -// For Qt3, no changes are needed - #include <ntqcompactstyle.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QCompactStyle class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQCOMPACTSTYLE_H */ diff --git a/qtinterface/interface_tqt3/tqconfig.h b/qtinterface/interface_tqt3/tqconfig.h index 7f7d4e5..6f2e51b 100644 --- a/qtinterface/interface_tqt3/tqconfig.h +++ b/qtinterface/interface_tqt3/tqconfig.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQCONFIG_H #include <tqt.h> - -#ifdef USE_QT3 - -// Pull in all Qt3 configuration defines - #include <ntqconfig.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Pull in all Qt4 configuration defines - -#include <ntqconfig.h> - -#endif // USE_QT4 - #endif /* TQT_TQCONFIG_H */ diff --git a/qtinterface/interface_tqt3/tqconnection.h b/qtinterface/interface_tqt3/tqconnection.h index 1fc9137..8ab5826 100644 --- a/qtinterface/interface_tqt3/tqconnection.h +++ b/qtinterface/interface_tqt3/tqconnection.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQCONNECTION_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QConnection class -// For Qt3, no changes are needed - #include <ntqconnection.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QConnection class -// For Qt4, this internal class no longer exists! - -#endif // USE_QT4 - #endif /* TQT_TQCONNECTION_H */ diff --git a/qtinterface/interface_tqt3/tqcstring.cpp b/qtinterface/interface_tqt3/tqcstring.cpp index 25e0536..52b7296 100644 --- a/qtinterface/interface_tqt3/tqcstring.cpp +++ b/qtinterface/interface_tqt3/tqcstring.cpp @@ -21,35 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqcstring.h> - -#ifdef USE_QT4 - -QByteArray::operator QByteArray *() const -{ return (QByteArray*)(d->data); } - -#ifndef TQT_NO_REGEXP - -int Q3CString::contains( const QRegExp &rx ) const -{ - QString d = QString::fromAscii( data() ); - return d.count( rx ); -} - -Q3CString &Q3CString::replace( const QRegExp &rx, const char *str ) -{ - QString d = QString::fromAscii( data() ); - QString r = QString::fromAscii( str ); - d.replace( rx, r ); - setStr( d.ascii() ); - return *this; -} - -#endif //TQT_NO_REGEXP - -QByteArray QByteArray::copy() const { - QByteArray copy(*this); - copy.detach(); - return copy; -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqcstring.h b/qtinterface/interface_tqt3/tqcstring.h index d91526d..ef889e4 100644 --- a/qtinterface/interface_tqt3/tqcstring.h +++ b/qtinterface/interface_tqt3/tqcstring.h @@ -25,29 +25,6 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqmemarray.h> #include <ntqdatastream.h> - -#ifdef USE_QT3 - -// Reimplement the QCString class -// For Qt3, no changes are needed - #include <ntqcstring.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QByteArray class -// For Qt4, some changes are needed - -//#include <Qt/qbytearray.h> -#include <tqt4/Qt/qbytearray.h> - -// Reimplement the QCString class -// For Qt4, some changes are needed - -#include <tqt4/Qt/q3cstring.h> - -#endif // USE_QT4 - #endif /* TQT_TQCSTRING_H */ diff --git a/qtinterface/interface_tqt3/tqcursor.h b/qtinterface/interface_tqt3/tqcursor.h index cb800ea..50fe71b 100644 --- a/qtinterface/interface_tqt3/tqcursor.h +++ b/qtinterface/interface_tqt3/tqcursor.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQCURSOR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QCursor class -// For Qt3, no changes are needed - #include <ntqcursor.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QCursor class -// For Qt4, some changes are needed - -#include <Qt/ntqcursor.h> - -#endif // USE_QT4 - #endif /* TQT_TQCURSOR_H */ diff --git a/qtinterface/interface_tqt3/tqdatabrowser.h b/qtinterface/interface_tqt3/tqdatabrowser.h index f5cc0e3..50afb38 100644 --- a/qtinterface/interface_tqt3/tqdatabrowser.h +++ b/qtinterface/interface_tqt3/tqdatabrowser.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQDATABROSWER_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QDataBrowser class -// For Qt3, no changes are needed - #include <ntqdatabrowser.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QDataBrowser class -// For Qt4, some changes are needed - -#include <Qt/q3databrowser.h> - -#endif // USE_QT4 - #endif /* TQT_TQDATABROWSER_H */ diff --git a/qtinterface/interface_tqt3/tqdatastream.cpp b/qtinterface/interface_tqt3/tqdatastream.cpp index 3e8cd7c..4837b1e 100644 --- a/qtinterface/interface_tqt3/tqdatastream.cpp +++ b/qtinterface/interface_tqt3/tqdatastream.cpp @@ -21,23 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqdatastream.h> - -#ifdef USE_QT4 - -QDataStream &QDataStream::operator<<(long unsigned int i) { - return *this<<((quint64) i); -} - -QDataStream &QDataStream::operator>>(long unsigned int &i) { - return *this>>((quint64&) i); -} - -QDataStream &QDataStream::operator<<(long i) { - return *this<<((qint64) i); -} - -QDataStream &QDataStream::operator>>(long &i) { - return *this>>((qint64&) i); -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqdatastream.h b/qtinterface/interface_tqt3/tqdatastream.h index fbcb326..1ee3aac 100644 --- a/qtinterface/interface_tqt3/tqdatastream.h +++ b/qtinterface/interface_tqt3/tqdatastream.h @@ -24,23 +24,6 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqiodevice.h> - -#ifdef USE_QT3 - -// Reimplement the QDataStream class -// For Qt3, no changes are needed - #include <ntqdatastream.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QDataStream class -// For Qt4, some changes are needed - -#include <tqt4/Qt/ntqdatastream.h> - -#endif // USE_QT4 - #endif /* TQT_TQDATASTREAM_H */ diff --git a/qtinterface/interface_tqt3/tqdatatable.h b/qtinterface/interface_tqt3/tqdatatable.h index bde06bc..08c9703 100644 --- a/qtinterface/interface_tqt3/tqdatatable.h +++ b/qtinterface/interface_tqt3/tqdatatable.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQDATATABLE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QDataTable class -// For Qt3, no changes are needed - #include <ntqdatatable.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QDataTable class -// For Qt4, some changes are needed - -#include <Qt/q3datatable.h> - -#endif // USE_QT4 - #endif /* TQT_TQDATATABLE_H */ diff --git a/qtinterface/interface_tqt3/tqdataview.h b/qtinterface/interface_tqt3/tqdataview.h index 02953b5..f0d8b52 100644 --- a/qtinterface/interface_tqt3/tqdataview.h +++ b/qtinterface/interface_tqt3/tqdataview.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQDATAVIEW_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QDataView class -// For Qt3, no changes are needed - #include <ntqdataview.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QDataView class -// For Qt4, some changes are needed - -#include <Qt/q3dataview.h> - -#endif // USE_QT4 - #endif /* TQT_TQDATAVIEW_H */ diff --git a/qtinterface/interface_tqt3/tqdatetime.h b/qtinterface/interface_tqt3/tqdatetime.h index 3a3bcae..5bc2554 100644 --- a/qtinterface/interface_tqt3/tqdatetime.h +++ b/qtinterface/interface_tqt3/tqdatetime.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQDATETIME_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QDateTime class -// For Qt3, no changes are needed - #include <ntqdatetime.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QDateTime class -// For Qt4, some changes are needed - -#include <Qt/ntqdatetime.h> - -#endif // USE_QT4 - #endif /* TQT_TQDATETIME_H */ diff --git a/qtinterface/interface_tqt3/tqdatetimeedit.h b/qtinterface/interface_tqt3/tqdatetimeedit.h index 52f0c57..88014d6 100644 --- a/qtinterface/interface_tqt3/tqdatetimeedit.h +++ b/qtinterface/interface_tqt3/tqdatetimeedit.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQDATETIMEEDIT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QDateTimeEditBase class -// For Qt3, no changes are needed - #include <ntqdatetimeedit.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QDateTimeEditBase class -// For Qt4, some changes are needed - -#include <Qt/q3datetimeedit.h> - -#endif // USE_QT4 - #endif /* TQT_TQDATETIMEEDIT_H */ diff --git a/qtinterface/interface_tqt3/tqdeepcopy.h b/qtinterface/interface_tqt3/tqdeepcopy.h index bffddc3..c69a05e 100644 --- a/qtinterface/interface_tqt3/tqdeepcopy.h +++ b/qtinterface/interface_tqt3/tqdeepcopy.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQDEEPCOPY_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QDeepCopy class -// For Qt3, no changes are needed - #include <ntqdeepcopy.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QDeepCopy class -// For Qt4, some changes are needed - -#include <Qt/q3deepcopy.h> - -#endif // USE_QT4 - #endif /* TQT_TQDEEPCOPY_H */ diff --git a/qtinterface/interface_tqt3/tqdesktopwidget.h b/qtinterface/interface_tqt3/tqdesktopwidget.h index 97c4178..8953fd1 100644 --- a/qtinterface/interface_tqt3/tqdesktopwidget.h +++ b/qtinterface/interface_tqt3/tqdesktopwidget.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQDESKTOPWIDGET_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QDesktopWidget class -// For Qt3, no changes are needed - #include <ntqdesktopwidget.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QDesktopWidget class -// For Qt4, some changes are needed - -#include <Qt/ntqdesktopwidget.h> - -#endif // USE_QT4 - #endif /* TQT_TQDESKTOPWIDGET_H */ diff --git a/qtinterface/interface_tqt3/tqdial.h b/qtinterface/interface_tqt3/tqdial.h index 6b4a28c..923f427 100644 --- a/qtinterface/interface_tqt3/tqdial.h +++ b/qtinterface/interface_tqt3/tqdial.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQDIAL_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QDial class -// For Qt3, no changes are needed - #include <ntqdial.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QDial class -// For Qt4, some changes are needed - -#include <Qt/ntqdial.h> - -#endif // USE_QT4 - #endif /* TQT_TQDIAL_H */ diff --git a/qtinterface/interface_tqt3/tqdialog.h b/qtinterface/interface_tqt3/tqdialog.h index ed5710c..1ba88e6 100644 --- a/qtinterface/interface_tqt3/tqdialog.h +++ b/qtinterface/interface_tqt3/tqdialog.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQDIALOG_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QDialog class -// For Qt3, no changes are needed - #include <ntqdialog.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QDialog class -// For Qt4, some changes are needed - -#include <Qt/ntqdialog.h> - -#endif // USE_QT4 - #endif /* TQT_TQDIALOG_H */ diff --git a/qtinterface/interface_tqt3/tqdict.h b/qtinterface/interface_tqt3/tqdict.h index 9bb5e6e..348fa13 100644 --- a/qtinterface/interface_tqt3/tqdict.h +++ b/qtinterface/interface_tqt3/tqdict.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQDICT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QDict class -// For Qt3, no changes are needed - #include <ntqdict.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QDict class -// For Qt4, some changes are needed - -#include <Qt/q3dict.h> - -#endif // USE_QT4 - #endif /* TQT_TQDICT_H */ diff --git a/qtinterface/interface_tqt3/tqdir.cpp b/qtinterface/interface_tqt3/tqdir.cpp index 77b2957..5fd6346 100644 --- a/qtinterface/interface_tqt3/tqdir.cpp +++ b/qtinterface/interface_tqt3/tqdir.cpp @@ -21,20 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqdir.h> - -#ifdef USE_QT4 - -bool QDir::exists( const QString &name, bool acceptAbsPath ) -{ - if ( name.isEmpty() ) { -#if defined(QT_CHECK_NULL) - qWarning( "QDir::exists: Empty or null file name" ); -#endif - return FALSE; - } -// QString tmp = filePath( name, acceptAbsPath ); - QString tmp = filePath( name ); - return QFile::exists( tmp ); -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqdir.h b/qtinterface/interface_tqt3/tqdir.h index daa766a..c2b6f54 100644 --- a/qtinterface/interface_tqt3/tqdir.h +++ b/qtinterface/interface_tqt3/tqdir.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQDIR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QDir class -// For Qt3, no changes are needed - #include <ntqdir.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QDir class -// For Qt4, some changes are needed - -#include <tqt4/Qt/ntqdir.h> - -#endif // USE_QT4 - #endif /* TQT_TQDIR_H */ diff --git a/qtinterface/interface_tqt3/tqdns.h b/qtinterface/interface_tqt3/tqdns.h index d0e2bee..bfef0e9 100644 --- a/qtinterface/interface_tqt3/tqdns.h +++ b/qtinterface/interface_tqt3/tqdns.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQDNS_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QDns class -// For Qt3, no changes are needed - #include <ntqdns.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QDns class -// For Qt4, some changes are needed - -#include <Qt/q3dns.h> - -#endif // USE_QT4 - #endif /* TQT_TQDNS_H */ diff --git a/qtinterface/interface_tqt3/tqdockarea.h b/qtinterface/interface_tqt3/tqdockarea.h index aa6b967..8bee8d0 100644 --- a/qtinterface/interface_tqt3/tqdockarea.h +++ b/qtinterface/interface_tqt3/tqdockarea.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQDOCKAREA_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QDockArea class -// For Qt3, no changes are needed - #include <ntqdockarea.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QDockArea class -// For Qt4, some changes are needed - -#include <Qt/q3dockarea.h> - -#endif // USE_QT4 - #endif /* TQT_TQDOCKAREA_H */ diff --git a/qtinterface/interface_tqt3/tqdockwindow.h b/qtinterface/interface_tqt3/tqdockwindow.h index 03827cf..189e63d 100644 --- a/qtinterface/interface_tqt3/tqdockwindow.h +++ b/qtinterface/interface_tqt3/tqdockwindow.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQDOCKWINDOW_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QDockWindow class -// For Qt3, no changes are needed - #include <ntqdockwindow.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QDockWindow class -// For Qt4, some changes are needed - -#include <Qt/q3dockwindow.h> - -#endif // USE_QT4 - #endif /* TQT_TQDOCKWINDOW_H */ diff --git a/qtinterface/interface_tqt3/tqdom.h b/qtinterface/interface_tqt3/tqdom.h index c9efee9..7e5d0c0 100644 --- a/qtinterface/interface_tqt3/tqdom.h +++ b/qtinterface/interface_tqt3/tqdom.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQDOM_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QDom class -// For Qt3, no changes are needed - #include <ntqdom.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QDom class -// For Qt4, some changes are needed - -#include <Qt/ntqdom.h> - -#endif // USE_QT4 - #endif /* TQT_TQACCEL_H */ diff --git a/qtinterface/interface_tqt3/tqdragobject.h b/qtinterface/interface_tqt3/tqdragobject.h index 058d1a2..5c1feb5 100644 --- a/qtinterface/interface_tqt3/tqdragobject.h +++ b/qtinterface/interface_tqt3/tqdragobject.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQDRAGOBJECT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QDragObject class -// For Qt3, no changes are needed - #include <ntqdragobject.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QDragObject class -// For Qt4, some changes are needed - -#include <Qt/q3dragobject.h> - -#endif // USE_QT4 - #endif /* TQT_TQDRAGOBJECT_H */ diff --git a/qtinterface/interface_tqt3/tqdrawutil.h b/qtinterface/interface_tqt3/tqdrawutil.h index 640c490..d45433a 100644 --- a/qtinterface/interface_tqt3/tqdrawutil.h +++ b/qtinterface/interface_tqt3/tqdrawutil.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQDRAWUTIL_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QDrawUtil class -// For Qt3, no changes are needed - #include <ntqdrawutil.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QDrawUtil class -// For Qt4, some changes are needed - -#include <Qt/ntqdrawutil.h> - -#endif // USE_QT4 - #endif /* TQT_TQDRAWUTIL_H */ diff --git a/qtinterface/interface_tqt3/tqdropsite.h b/qtinterface/interface_tqt3/tqdropsite.h index abfdce5..3754bc0 100644 --- a/qtinterface/interface_tqt3/tqdropsite.h +++ b/qtinterface/interface_tqt3/tqdropsite.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQDROPSITE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QDropSite class -// For Qt3, no changes are needed - #include <ntqdropsite.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QDropSite class -// For Qt4, some changes are needed - -#include <Qt/q3dropsite.h> - -#endif // USE_QT4 - #endif /* TQT_TQDROPSITE_H */ diff --git a/qtinterface/interface_tqt3/tqeditorfactory.h b/qtinterface/interface_tqt3/tqeditorfactory.h index 49d56cf..c459071 100644 --- a/qtinterface/interface_tqt3/tqeditorfactory.h +++ b/qtinterface/interface_tqt3/tqeditorfactory.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQEDITORFACTORY_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QEditorFactory class -// For Qt3, no changes are needed - #include <ntqeditorfactory.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QEditorFactory class -// For Qt4, some changes are needed - -#include <Qt/q3editorfactory.h> - -#endif // USE_QT4 - #endif /* TQT_TQEDITORFACTORY_H */ diff --git a/qtinterface/interface_tqt3/tqerrormessage.h b/qtinterface/interface_tqt3/tqerrormessage.h index 2d02dd2..f332609 100644 --- a/qtinterface/interface_tqt3/tqerrormessage.h +++ b/qtinterface/interface_tqt3/tqerrormessage.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQERRORMESSAGE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QErrorMessage class -// For Qt3, no changes are needed - #include <ntqerrormessage.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QErrorMessage class -// For Qt4, some changes are needed - -#include <Qt/ntqerrormessage.h> - -#endif // USE_QT4 - #endif /* TQT_TQERRORMESSAGE_H */ diff --git a/qtinterface/interface_tqt3/tqeucjpcodec.h b/qtinterface/interface_tqt3/tqeucjpcodec.h index 13f4b13..6974cc2 100644 --- a/qtinterface/interface_tqt3/tqeucjpcodec.h +++ b/qtinterface/interface_tqt3/tqeucjpcodec.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQEUCJPCODEC_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QEucJpCodec class -// For Qt3, no changes are needed - #include <ntqeucjpcodec.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QEucJpCodec class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQEUCJPCODEC_H */ diff --git a/qtinterface/interface_tqt3/tqeuckrcodec.h b/qtinterface/interface_tqt3/tqeuckrcodec.h index 786c7ff..6faa665 100644 --- a/qtinterface/interface_tqt3/tqeuckrcodec.h +++ b/qtinterface/interface_tqt3/tqeuckrcodec.h @@ -23,20 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQEUCKRCODEC_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QEucKrCodec class -// For Qt3, no changes are needed - #include <ntqeuckrcodec.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQEUCKRCODEC_H */ diff --git a/qtinterface/interface_tqt3/tqevent.h b/qtinterface/interface_tqt3/tqevent.h index 8e656ac..2a4ec71 100644 --- a/qtinterface/interface_tqt3/tqevent.h +++ b/qtinterface/interface_tqt3/tqevent.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQEVENT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QEvent class -// For Qt3, no changes are needed - #include <ntqevent.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QEvent class -// For Qt4, some changes are needed - -#include <Qt/ntqevent.h> - -#endif // USE_QT4 - #endif /* TQT_TQEVENT_H */ diff --git a/qtinterface/interface_tqt3/tqeventloop.cpp b/qtinterface/interface_tqt3/tqeventloop.cpp index 0de85bb..cc31397 100644 --- a/qtinterface/interface_tqt3/tqeventloop.cpp +++ b/qtinterface/interface_tqt3/tqeventloop.cpp @@ -21,16 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqeventloop.h> - -#ifdef USE_QT4 - -TQEventLoop *TQEventLoop::eventLoop () -{ - return static_cast<TQEventLoop *>(QAbstractEventDispatcher::instance()); -} - -bool TQEventLoop::processEvents( ProcessEventsFlags flags ) { - return QEventLoop::processEvents((ProcessEventsFlag)flags); -} - -#endif diff --git a/qtinterface/interface_tqt3/tqeventloop.h b/qtinterface/interface_tqt3/tqeventloop.h index d887757..f23cbdc 100644 --- a/qtinterface/interface_tqt3/tqeventloop.h +++ b/qtinterface/interface_tqt3/tqeventloop.h @@ -23,41 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQEVENTLOOP_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QEventLoop class -// For Qt3, no changes are needed - #include <ntqeventloop.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QEventLoop class -// For Qt4, some changes are needed - -#include <Qt/ntqeventloop.h> -#include <Qt/qabstracteventdispatcher.h> - -class TQEventLoop : public QAbstractEventDispatcher, QEventLoop { -public: - static TQEventLoop *eventLoop (); - - enum ProcessEvents { - AllEvents = QEventLoop::AllEvents, - ExcludeUserInput = QEventLoop::ExcludeUserInputEvents, - ExcludeSocketNotifiers = QEventLoop::ExcludeSocketNotifiers, - WaitForMore = QEventLoop::WaitForMoreEvents - }; - - typedef uint ProcessEventsFlags; - - bool processEvents( ProcessEventsFlags flags ); - -}; - -#endif // USE_QT4 - #endif /* TQT_TQEVENTLOOP_H */ diff --git a/qtinterface/interface_tqt3/tqfeatures.h b/qtinterface/interface_tqt3/tqfeatures.h index 3e18d30..59e2d4d 100644 --- a/qtinterface/interface_tqt3/tqfeatures.h +++ b/qtinterface/interface_tqt3/tqfeatures.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQFEATURES_H #include <tqt.h> - -#ifdef USE_QT3 - -// Pull in all Qt3 feature defines - #include <ntqfeatures.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Pull in all Qt4 feature defines - -#include <ntqfeatures.h> - -#endif // USE_QT4 - #endif /* TQT_TQFEATURES_H */ diff --git a/qtinterface/interface_tqt3/tqfile.h b/qtinterface/interface_tqt3/tqfile.h index 3bdbc63..438fb22 100644 --- a/qtinterface/interface_tqt3/tqfile.h +++ b/qtinterface/interface_tqt3/tqfile.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQFILE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QFile class -// For Qt3, no changes are needed - #include <ntqfile.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QFile class -// For Qt4, some changes are needed - -#include <Qt/ntqfile.h> - -#endif // USE_QT4 - #endif /* TQT_TQFILE_H */ diff --git a/qtinterface/interface_tqt3/tqfiledialog.h b/qtinterface/interface_tqt3/tqfiledialog.h index ac9d7b9..86287f0 100644 --- a/qtinterface/interface_tqt3/tqfiledialog.h +++ b/qtinterface/interface_tqt3/tqfiledialog.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQFILEDIALOG_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QFileDialog class -// For Qt3, no changes are needed - #include <ntqfiledialog.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QFileDialog class -// For Qt4, some changes are needed - -#include <Qt/q3filedialog.h> - -#endif // USE_QT4 - #endif /* TQT_TQFILEDIALOG_H */ diff --git a/qtinterface/interface_tqt3/tqfileinfo.cpp b/qtinterface/interface_tqt3/tqfileinfo.cpp index 969b77b..546d9ea 100644 --- a/qtinterface/interface_tqt3/tqfileinfo.cpp +++ b/qtinterface/interface_tqt3/tqfileinfo.cpp @@ -21,11 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqfileinfo.h> - -#ifdef USE_QT4 - -QFileInfo::operator QFileInfo *() const { - return const_cast<QFileInfo *>(this); -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqfileinfo.h b/qtinterface/interface_tqt3/tqfileinfo.h index f2689cd..02bcbf2 100644 --- a/qtinterface/interface_tqt3/tqfileinfo.h +++ b/qtinterface/interface_tqt3/tqfileinfo.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQFILEINFO_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QFileInfo class -// For Qt3, no changes are needed - #include <ntqfileinfo.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QFileInfo class -// For Qt4, some changes are needed - -#include <tqt4/Qt/ntqfileinfo.h> - -#endif // USE_QT4 - #endif /* TQT_TQFILEINFO_H */ diff --git a/qtinterface/interface_tqt3/tqfocusdata.h b/qtinterface/interface_tqt3/tqfocusdata.h index 98591ae..673da16 100644 --- a/qtinterface/interface_tqt3/tqfocusdata.h +++ b/qtinterface/interface_tqt3/tqfocusdata.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQFOCUSDATA_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QFocusData class -// For Qt3, no changes are needed - #include <ntqfocusdata.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QFocusData class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQFOCUSDATA_H */ diff --git a/qtinterface/interface_tqt3/tqfont.h b/qtinterface/interface_tqt3/tqfont.h index 9d478e7..83d37b1 100644 --- a/qtinterface/interface_tqt3/tqfont.h +++ b/qtinterface/interface_tqt3/tqfont.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQFONT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QFont class -// For Qt3, no changes are needed - #include <ntqfont.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QFont class -// For Qt4, some changes are needed - -#include <Qt/ntqfont.h> - -#endif // USE_QT4 - #endif /* TQT_TQFONT_H */ diff --git a/qtinterface/interface_tqt3/tqfontdatabase.h b/qtinterface/interface_tqt3/tqfontdatabase.h index f71a238..8512942 100644 --- a/qtinterface/interface_tqt3/tqfontdatabase.h +++ b/qtinterface/interface_tqt3/tqfontdatabase.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQFONTDATABASE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QFontDatabase class -// For Qt3, no changes are needed - #include <ntqfontdatabase.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QFontDatabase class -// For Qt4, some changes are needed - -#include <Qt/ntqfontdatabase.h> - -#endif // USE_QT4 - #endif /* TQT_TQFONTDATABASE_H */ diff --git a/qtinterface/interface_tqt3/tqfontdialog.h b/qtinterface/interface_tqt3/tqfontdialog.h index d57b7ec..8491969 100644 --- a/qtinterface/interface_tqt3/tqfontdialog.h +++ b/qtinterface/interface_tqt3/tqfontdialog.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQFONTDIALOG_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QFontDialog class -// For Qt3, no changes are needed - #include <ntqfontdialog.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QFontDialog class -// For Qt4, some changes are needed - -#include <Qt/ntqfontdialog.h> - -#endif // USE_QT4 - #endif /* TQT_TQFONTDIALOG_H */ diff --git a/qtinterface/interface_tqt3/tqfontinfo.h b/qtinterface/interface_tqt3/tqfontinfo.h index a18c9fb..6728dbc 100644 --- a/qtinterface/interface_tqt3/tqfontinfo.h +++ b/qtinterface/interface_tqt3/tqfontinfo.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQFONTINFO_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QFontInfo class -// For Qt3, no changes are needed - #include <ntqfontinfo.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QFontInfo class -// For Qt4, some changes are needed - -#include <Qt/ntqfontinfo.h> - -#endif // USE_QT4 - #endif /* TQT_TQFONTINFO_H */ diff --git a/qtinterface/interface_tqt3/tqfontmetrics.h b/qtinterface/interface_tqt3/tqfontmetrics.h index aa81b54..663cd19 100644 --- a/qtinterface/interface_tqt3/tqfontmetrics.h +++ b/qtinterface/interface_tqt3/tqfontmetrics.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQFONTMETRICS_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QFontMetrics class -// For Qt3, no changes are needed - #include <ntqfontmetrics.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QFontMetrics class -// For Qt4, some changes are needed - -#include <Qt/ntqfontmetrics.h> - -#endif // USE_QT4 - #endif /* TQT_TQFONTMETRICS_H */ diff --git a/qtinterface/interface_tqt3/tqframe.h b/qtinterface/interface_tqt3/tqframe.h index a0ac1d7..75c5d0c 100644 --- a/qtinterface/interface_tqt3/tqframe.h +++ b/qtinterface/interface_tqt3/tqframe.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQFRAME_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QFrame class -// For Qt3, no changes are needed - #include <ntqframe.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QFrame class -// For Qt4, some changes are needed - -#include <Qt/ntqframe.h> - -#endif // USE_QT4 - #endif /* TQT_TQFRAME_H */ diff --git a/qtinterface/interface_tqt3/tqftp.h b/qtinterface/interface_tqt3/tqftp.h index de0e9cd..1e130a0 100644 --- a/qtinterface/interface_tqt3/tqftp.h +++ b/qtinterface/interface_tqt3/tqftp.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQFTP_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QFtp class -// For Qt3, no changes are needed - #include <ntqftp.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QFtp class -// For Qt4, some changes are needed - -#include <Qt/ntqftp.h> - -#endif // USE_QT4 - #endif /* TQT_TQFTP_H */ diff --git a/qtinterface/interface_tqt3/tqgarray.h b/qtinterface/interface_tqt3/tqgarray.h index d819328..a26e0fd 100644 --- a/qtinterface/interface_tqt3/tqgarray.h +++ b/qtinterface/interface_tqt3/tqgarray.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQGARRAY_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QGArray class -// For Qt3, no changes are needed - #include <ntqgarray.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QGArray class -// For Qt4, some changes are needed - -#include <Qt/q3garray.h> - -#endif // USE_QT4 - #endif /* TQT_TQGARRAY_H */ diff --git a/qtinterface/interface_tqt3/tqgb18030codec.h b/qtinterface/interface_tqt3/tqgb18030codec.h index 899e336..d3491b9 100644 --- a/qtinterface/interface_tqt3/tqgb18030codec.h +++ b/qtinterface/interface_tqt3/tqgb18030codec.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQGB18030CODEC_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QGb18030Codec class -// For Qt3, no changes are needed - #include <ntqgb18030codec.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QGb18030Codec class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQGB18030CODEC_H */ diff --git a/qtinterface/interface_tqt3/tqgbkcodec.h b/qtinterface/interface_tqt3/tqgbkcodec.h index c7521ad..a25a1a4 100644 --- a/qtinterface/interface_tqt3/tqgbkcodec.h +++ b/qtinterface/interface_tqt3/tqgbkcodec.h @@ -23,9 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQGBKCODEC_H #include <tqt.h> - -// Pull in all qgb18030codec defines - #include <ntqgb18030codec.h> #endif /* TQT_TQGBKCODEC_H */ diff --git a/qtinterface/interface_tqt3/tqgcache.h b/qtinterface/interface_tqt3/tqgcache.h index 15366ef..37133ce 100644 --- a/qtinterface/interface_tqt3/tqgcache.h +++ b/qtinterface/interface_tqt3/tqgcache.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQGCACHE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QGCache class -// For Qt3, no changes are needed - #include <ntqgcache.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QGCache class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQGCACHE_H */ diff --git a/qtinterface/interface_tqt3/tqgdict.h b/qtinterface/interface_tqt3/tqgdict.h index 05042b2..eebf8b0 100644 --- a/qtinterface/interface_tqt3/tqgdict.h +++ b/qtinterface/interface_tqt3/tqgdict.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQGDICT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QGDict class -// For Qt3, no changes are needed - #include <ntqgdict.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QGDict class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQGDICT_H */ diff --git a/qtinterface/interface_tqt3/tqgeneric.h b/qtinterface/interface_tqt3/tqgeneric.h index 504c3a2..1d961af 100644 --- a/qtinterface/interface_tqt3/tqgeneric.h +++ b/qtinterface/interface_tqt3/tqgeneric.h @@ -23,15 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQGENERIC_H #include <tqt.h> - -#ifdef USE_QT3 - #include <ntqgeneric.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -#endif // USE_QT4 - #endif /* TQT_TQGENERIC_H */ diff --git a/qtinterface/interface_tqt3/tqgif.h b/qtinterface/interface_tqt3/tqgif.h index b39913e..c12b609 100644 --- a/qtinterface/interface_tqt3/tqgif.h +++ b/qtinterface/interface_tqt3/tqgif.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQGIF_H #include <tqt.h> - -#ifdef USE_QT3 - -// Include the Qt3 gif defines - #include <ntqgif.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Include the Qt4 gif defines - -#include <ntqgif.h> - -#endif // USE_QT4 - #endif /* TQT_TQGIF_H */ diff --git a/qtinterface/interface_tqt3/tqgl.h b/qtinterface/interface_tqt3/tqgl.h index b5b5481..a0ae67f 100644 --- a/qtinterface/interface_tqt3/tqgl.h +++ b/qtinterface/interface_tqt3/tqgl.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQGL_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QGL class -// For Qt3, no changes are needed - #include <ntqgl.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QGL class -// For Qt4, some changes are needed - -#include <Qt/ntqgl.h> - -#endif // USE_QT4 - #endif /* TQT_TQGL_H */ diff --git a/qtinterface/interface_tqt3/tqglcolormap.h b/qtinterface/interface_tqt3/tqglcolormap.h index a3f5056..16f55f5 100644 --- a/qtinterface/interface_tqt3/tqglcolormap.h +++ b/qtinterface/interface_tqt3/tqglcolormap.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQGLCOLORMAP_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QGLColormap class -// For Qt3, no changes are needed - #include <ntqglcolormap.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QGLColormap class -// For Qt4, some changes are needed - -#include <Qt/ntqglcolormap.h> - -#endif // USE_QT4 - #endif /* TQT_TQGLCOLORMAP_H */ diff --git a/qtinterface/interface_tqt3/tqglist.h b/qtinterface/interface_tqt3/tqglist.h index 14e17a6..0aef4b2 100644 --- a/qtinterface/interface_tqt3/tqglist.h +++ b/qtinterface/interface_tqt3/tqglist.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQGLIST_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QGList class -// For Qt3, no changes are needed - #include <ntqglist.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QGList class -// For Qt4, some changes are needed - -#include <Qt/q3glist.h> - -#endif // USE_QT4 - #endif /* TQT_TQGLIST_H */ diff --git a/qtinterface/interface_tqt3/tqglobal.h b/qtinterface/interface_tqt3/tqglobal.h index c1deb40..98ff034 100644 --- a/qtinterface/interface_tqt3/tqglobal.h +++ b/qtinterface/interface_tqt3/tqglobal.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQGLOBAL_H #include <tqt.h> - -#ifdef USE_QT3 - -// Pull in all Qt3 global defines - #include <ntqglobal.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Pull in all Qt4 global defines - -#include <Qt/ntqglobal.h> - -#endif // USE_QT4 - #endif /* TQT_TQGLOBAL_H */ diff --git a/qtinterface/interface_tqt3/tqgplugin.h b/qtinterface/interface_tqt3/tqgplugin.h index aea62d3..be98da2 100644 --- a/qtinterface/interface_tqt3/tqgplugin.h +++ b/qtinterface/interface_tqt3/tqgplugin.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQGPLUGIN_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QGPlugin class -// For Qt3, no changes are needed - #include <ntqgplugin.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QGPlugin class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQGPLUGIN_H */ diff --git a/qtinterface/interface_tqt3/tqgrid.h b/qtinterface/interface_tqt3/tqgrid.h index 00ac0fe..7408a2f 100644 --- a/qtinterface/interface_tqt3/tqgrid.h +++ b/qtinterface/interface_tqt3/tqgrid.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQGRID_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QGrid class -// For Qt3, some changes are needed - #include <ntqgrid.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QGrid class -// For Qt4, some changes are needed - -#include <Qt/q3grid.h> - -#endif // USE_QT4 - #endif /* TQT_TQGRID_H */ diff --git a/qtinterface/interface_tqt3/tqgridview.h b/qtinterface/interface_tqt3/tqgridview.h index c24a64a..f03c98b 100644 --- a/qtinterface/interface_tqt3/tqgridview.h +++ b/qtinterface/interface_tqt3/tqgridview.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQGRIDVIEW_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QGridView class -// For Qt3, some changes are needed - #include <ntqgridview.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QGridView class -// For Qt4, no changes are needed - -#include <Qt/q3gridview.h> - -#endif // USE_QT4 - #endif /* TQT_TQGRIDVIEW_H */ diff --git a/qtinterface/interface_tqt3/tqgroupbox.h b/qtinterface/interface_tqt3/tqgroupbox.h index 0043060..84889fd 100644 --- a/qtinterface/interface_tqt3/tqgroupbox.h +++ b/qtinterface/interface_tqt3/tqgroupbox.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQGROUPBOX_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QGroupBox class -// For Qt3, no changes are needed - #include <ntqgroupbox.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QGroupBox class -// For Qt4, some changes are needed - -#include <Qt/ntqgroupbox.h> - -#endif // USE_QT4 - #endif /* TQT_TQGROUPBOX_H */ diff --git a/qtinterface/interface_tqt3/tqguardedptr.h b/qtinterface/interface_tqt3/tqguardedptr.h index d79ffe5..7af8b6e 100644 --- a/qtinterface/interface_tqt3/tqguardedptr.h +++ b/qtinterface/interface_tqt3/tqguardedptr.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQGUARDEDPTR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QGuardedPtr class -// For Qt3, no changes are needed - #include <ntqguardedptr.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QGuardedPtr class -// For Qt4, some changes are needed - -#include <Qt/qpointer.h> - -#endif // USE_QT4 - #endif /* TQT_TQGUARDEDPTR_H */ diff --git a/qtinterface/interface_tqt3/tqgvector.h b/qtinterface/interface_tqt3/tqgvector.h index ec27d59..44f830b 100644 --- a/qtinterface/interface_tqt3/tqgvector.h +++ b/qtinterface/interface_tqt3/tqgvector.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQGVECTOR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QGVector class -// For Qt3, no changes are needed - #include <ntqgvector.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QGVector class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQGVECTOR_H */ diff --git a/qtinterface/interface_tqt3/tqhbox.h b/qtinterface/interface_tqt3/tqhbox.h index 444c707..38fb9fe 100644 --- a/qtinterface/interface_tqt3/tqhbox.h +++ b/qtinterface/interface_tqt3/tqhbox.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQHBOX_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QHBox class -// For Qt3, no changes are needed - #include <ntqhbox.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QHBox class -// For Qt4, some changes are needed - -#include <Qt/q3hbox.h> - -#endif // USE_QT4 - #endif /* TQT_TQHBOX_H */ diff --git a/qtinterface/interface_tqt3/tqhbuttongroup.h b/qtinterface/interface_tqt3/tqhbuttongroup.h index a17a381..539c4d4 100644 --- a/qtinterface/interface_tqt3/tqhbuttongroup.h +++ b/qtinterface/interface_tqt3/tqhbuttongroup.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQHBUTTONGROUP_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QHButtonGroup class -// For Qt3, no changes are needed - #include <ntqhbuttongroup.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QHButtonGroup class -// For Qt4, some changes are needed - -#include <Qt/q3buttongroup.h> - -#endif // USE_QT4 - #endif /* TQT_TQHBUTTONGROUP_H */ diff --git a/qtinterface/interface_tqt3/tqheader.h b/qtinterface/interface_tqt3/tqheader.h index 089c1ad..702f670 100644 --- a/qtinterface/interface_tqt3/tqheader.h +++ b/qtinterface/interface_tqt3/tqheader.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQHEADER_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QHeader class -// For Qt3, no changes are needed - #include <ntqheader.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QHeader class -// For Qt4, some changes are needed - -#include <Qt/q3header.h> - -#endif // USE_QT4 - #endif /* TQT_TQHEADER_H */ diff --git a/qtinterface/interface_tqt3/tqhgroupbox.h b/qtinterface/interface_tqt3/tqhgroupbox.h index 88c8518..0b1ef3a 100644 --- a/qtinterface/interface_tqt3/tqhgroupbox.h +++ b/qtinterface/interface_tqt3/tqhgroupbox.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQHGROUPBOX_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QHGroupBox class -// For Qt3, no changes are needed - #include <ntqhgroupbox.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QHGroupBox class -// For Qt4, some changes are needed - -#include <Qt/q3hgroupbox.h> - -#endif // USE_QT4 - #endif /* TQT_TQHGROUPBOX_H */ diff --git a/qtinterface/interface_tqt3/tqhostaddress.h b/qtinterface/interface_tqt3/tqhostaddress.h index 51044c3..03d8dd8 100644 --- a/qtinterface/interface_tqt3/tqhostaddress.h +++ b/qtinterface/interface_tqt3/tqhostaddress.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQHOSTADDRESS_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QHostAddress class -// For Qt3, no changes are needed - #include <ntqhostaddress.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QHostAddress class -// For Qt4, some changes are needed - -#include <Qt/ntqhostaddress.h> - -#endif // USE_QT4 - #endif /* TQT_TQHOSTADDRESS_H */ diff --git a/qtinterface/interface_tqt3/tqhttp.h b/qtinterface/interface_tqt3/tqhttp.h index a48a2e2..cad8faa 100644 --- a/qtinterface/interface_tqt3/tqhttp.h +++ b/qtinterface/interface_tqt3/tqhttp.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQHTTP_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QHttp class -// For Qt3, no changes are needed - #include <ntqhttp.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QHttp class -// For Qt4, some changes are needed - -#include <Qt/q3http.h> - -#endif // USE_QT4 - #endif /* TQT_TQHTTP_H */ diff --git a/qtinterface/interface_tqt3/tqiconset.cpp b/qtinterface/interface_tqt3/tqiconset.cpp index dda650c..59d33ce 100644 --- a/qtinterface/interface_tqt3/tqiconset.cpp +++ b/qtinterface/interface_tqt3/tqiconset.cpp @@ -21,116 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqiconset.h> - -#ifdef USE_QT4 - -#include "Qt/q3cleanuphandler.h" - -static TQIconFactory *defaultFac = 0; -static Q3SingleCleanupHandler<TQIconFactory> q_cleanup_icon_factory; - -/*! \class TQIconFactory - \ingroup advanced - \brief The TQIconFactory class is used to create pixmaps for a QIconSet. - - By reimplementing createPixmap(), you can override QIconSet's - default algorithm for computing pixmaps not supplied by the user. - - Call setAutoDelete(TRUE) if you want the factory to automatically - delete itself when it is no longer needed by QIconSet. - - \sa QIconSet -*/ - -/*! - Constructs an icon factory. -*/ -TQIconFactory::TQIconFactory() - : autoDel( 0 ) -{ - count = 0; -} - -/*! - Destroys the object and frees any allocated resources. -*/ -TQIconFactory::~TQIconFactory() -{ -} - -/*! - Ceates a pixmap for \a iconSet with a certain \a size, \a mode, and - \a state. Returns 0 if the default QIconSet algorithm should be - used to create a pixmap that wasn't supplied by the user. - - It is the caller's responsibility to delete the returned pixmap. - - The default implementation always returns 0. -*/ -QPixmap *TQIconFactory::createPixmap( const QIconSet& /* iconSet */, - QIconSet::Size /* size */, - QIconSet::Mode /* mode */, - QIconSet::State /* state */ ) -{ - return 0; -} - -/*! - \fn void TQIconFactory::setAutoDelete( bool autoDelete ) - - If \a autoDelete is TRUE, sets the icon factory to automatically - delete itself when it is no longer referenced by any QIconSet and - isn't the default factory. If \a autoDelete is FALSE (the default) - auto-deletion is disabled. - - \sa autoDelete(), defaultFactory() -*/ - -/*! - \fn bool TQIconFactory::autoDelete() const - - Returns TRUE if auto-deletion is enabled; otherwise returns FALSE. - - \sa setAutoDelete() -*/ - -/*! - Returns the default icon factory. - - \sa installDefaultFactory() -*/ -TQIconFactory *TQIconFactory::defaultFactory() -{ - if ( !defaultFac ) { - defaultFac = new TQIconFactory; - defaultFac->setAutoDelete( TRUE ); - defaultFac->ref(); - q_cleanup_icon_factory.set( &defaultFac ); - } - return defaultFac; -} - -/*! - Replaces the default icon factory with \a factory. -*/ -void TQIconFactory::installDefaultFactory( TQIconFactory *factory ) -{ - if ( !factory ) - return; - - factory->ref(); - if ( defaultFac && defaultFac->deref() && defaultFac->autoDelete() ) - delete defaultFac; - defaultFac = factory; - q_cleanup_icon_factory.set( &defaultFac ); -} - -/** - A little do-nothing function to allow Qt3 code compatibility. -*/ -void QIconSet::installIconFactory( TQIconFactory *factory ) -{ - #warning "QIconSet::installIconFactory( QIconFactory *factory ) unimplemented!" -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqiconset.h b/qtinterface/interface_tqt3/tqiconset.h index 7f280db..6ec046b 100644 --- a/qtinterface/interface_tqt3/tqiconset.h +++ b/qtinterface/interface_tqt3/tqiconset.h @@ -23,48 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQICONSET_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QAccel class -// For Qt3, no changes are needed - #include <ntqiconset.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QAccel class -// For Qt4, some changes are needed - -#include <tqt4/Qt/qicon.h> -#include <Qt/q3shared.h> - -class TQIconFactory : private Q3Shared -{ -public: - TQIconFactory(); - virtual ~TQIconFactory(); - - virtual QPixmap *createPixmap( const QIconSet& iconSet, QIconSet::Size size, - QIconSet::Mode mode, QIconSet::State state ); - void setAutoDelete( bool autoDelete ) { autoDel = autoDelete; } - bool autoDelete() const { return autoDel; } - - static TQIconFactory *defaultFactory(); - static void installDefaultFactory( TQIconFactory *factory ); - -private: -#if defined(Q_DISABLE_COPY) - TQIconFactory( const TQIconFactory & ); - TQIconFactory &operator=( const TQIconFactory & ); -#endif - - uint autoDel : 1; - uint unused : 31; -}; - -#endif // USE_QT4 - #endif /* TQT_TQICONSET_H */ diff --git a/qtinterface/interface_tqt3/tqiconview.h b/qtinterface/interface_tqt3/tqiconview.h index 388d274..eac65f7 100644 --- a/qtinterface/interface_tqt3/tqiconview.h +++ b/qtinterface/interface_tqt3/tqiconview.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQICONVIEW_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QIconView class -// For Qt3, no changes are needed - #include <ntqiconview.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QIconView class -// For Qt4, some changes are needed - -#include <Qt/q3iconview.h> - -#endif // USE_QT4 - #endif /* TQT_TQICONVIEW_H */ diff --git a/qtinterface/interface_tqt3/tqimage.cpp b/qtinterface/interface_tqt3/tqimage.cpp index 64dd84b..4eb8b9b 100644 --- a/qtinterface/interface_tqt3/tqimage.cpp +++ b/qtinterface/interface_tqt3/tqimage.cpp @@ -21,49 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqimage.h> - -#ifdef USE_QT4 - -QRgb *QImage::ptrColorTable() const { - return colorTable().data(); -} - -TQImageIO::TQImageIO() { - m_imageReader = new QImageReader(); - m_imageWriter = new QImageWriter(); -} - -TQImageIO::TQImageIO( QIODevice *ioDevice, const char *format ) { - m_imageReader = new QImageReader(ioDevice, format); - m_imageWriter = new QImageWriter(ioDevice, format); -} - -TQImageIO::TQImageIO( const QString &fileName, const char* format ) { - m_imageReader = new QImageReader(fileName, format); - m_imageWriter = new QImageWriter(fileName, format); -} -TQImageIO::~TQImageIO() { - delete m_imageReader; - delete m_imageWriter; -} - -bool TQImageIO::read() { - m_currentImage = m_imageReader->read(); - if (m_currentImage.isNull() == true) - return false; - return true; -} - -bool TQImageIO::write() { - return m_imageWriter->write(m_currentImage); -} - -const QImage &TQImageIO::image() const { - return m_currentImage; -} - -void TQImageIO::setImage( const QImage & image ) { - m_currentImage = image; -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqimage.h b/qtinterface/interface_tqt3/tqimage.h index ba0ada7..216367a 100644 --- a/qtinterface/interface_tqt3/tqimage.h +++ b/qtinterface/interface_tqt3/tqimage.h @@ -23,45 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQIMAGE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QImage class -// For Qt3, no changes are needed - #include <ntqimage.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QImage class -// For Qt4, some changes are needed - -#include <tqt4/Qt/ntqimage.h> -#include <Qt/qimagereader.h> -#include <Qt/qimagewriter.h> - -class TQImageIO { -public: - TQImageIO(); - TQImageIO( QIODevice *ioDevice, const char *format ); - TQImageIO( const QString &fileName, const char* format ); - ~TQImageIO(); - - bool read(); - bool write(); - - const QImage &image() const; - void setImage( const QImage & ); - -protected: - QImageReader *m_imageReader; - QImageWriter *m_imageWriter; - - QImage m_currentImage; -}; - -#endif // USE_QT4 - #endif /* TQT_TQIMAGE_H */ diff --git a/qtinterface/interface_tqt3/tqimageformatplugin.h b/qtinterface/interface_tqt3/tqimageformatplugin.h index d536697..8776cb3 100644 --- a/qtinterface/interface_tqt3/tqimageformatplugin.h +++ b/qtinterface/interface_tqt3/tqimageformatplugin.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQIMAGEFORMATPLUGIN_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QImageFormatPlugin class -// For Qt3, no changes are needed - #include <ntqimageformatplugin.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QImageFormatPlugin class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQIMAGEFORMATPLUGIN_H */ diff --git a/qtinterface/interface_tqt3/tqinputcontext.h b/qtinterface/interface_tqt3/tqinputcontext.h index 97c773b..7cb3e91 100644 --- a/qtinterface/interface_tqt3/tqinputcontext.h +++ b/qtinterface/interface_tqt3/tqinputcontext.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQINPUTCONTEXT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QInputContext class -// For Qt3, no changes are needed - #include <ntqinputcontext.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QInputContext class -// For Qt4, some changes are needed - -#include <Qt/ntqinputcontext.h> - -#endif // USE_QT4 - #endif /* TQT_TQINPUTCONTEXT_H */ diff --git a/qtinterface/interface_tqt3/tqinputcontextfactory.h b/qtinterface/interface_tqt3/tqinputcontextfactory.h index 0b986d3..e744c9b 100644 --- a/qtinterface/interface_tqt3/tqinputcontextfactory.h +++ b/qtinterface/interface_tqt3/tqinputcontextfactory.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQINPUTCONTEXTFACTORY_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QInputContextFactory class -// For Qt3, no changes are needed - #include <ntqinputcontextfactory.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QInputContextFactory class -// For Qt4, some changes are needed - -#include <Qt/ntqinputcontextfactory.h> - -#endif // USE_QT4 - #endif /* TQT_TQINPUTCONTEXTFACTORY_H */ diff --git a/qtinterface/interface_tqt3/tqinputdialog.h b/qtinterface/interface_tqt3/tqinputdialog.h index 8a3b18b..f98cf3e 100644 --- a/qtinterface/interface_tqt3/tqinputdialog.h +++ b/qtinterface/interface_tqt3/tqinputdialog.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQINPUTDIALOG_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QInputDialog class -// For Qt3, no changes are needed - #include <ntqinputdialog.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QInputDialog class -// For Qt4, some changes are needed - -#include <Qt/ntqinputdialog.h> - -#endif // USE_QT4 - #endif /* TQT_TQINPUTDIALOG_H */ diff --git a/qtinterface/interface_tqt3/tqintcache.h b/qtinterface/interface_tqt3/tqintcache.h index 96a6609..eb8adff 100644 --- a/qtinterface/interface_tqt3/tqintcache.h +++ b/qtinterface/interface_tqt3/tqintcache.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQINTCACHE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QIntCache class -// For Qt3, no changes are needed - #include <ntqintcache.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QIntCache class -// For Qt4, some changes are needed - -#include <Qt/q3intcache.h> - -#endif // USE_QT4 - #endif /* TQT_TQINTCACHE_H */ diff --git a/qtinterface/interface_tqt3/tqintdict.h b/qtinterface/interface_tqt3/tqintdict.h index 8df3e4a..1383631 100644 --- a/qtinterface/interface_tqt3/tqintdict.h +++ b/qtinterface/interface_tqt3/tqintdict.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQINTDICT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QIntDict class -// For Qt3, no changes are needed - #include <ntqintdict.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QIntDict class -// For Qt4, some changes are needed - -#include <Qt/q3intdict.h> - -#endif // USE_QT4 - #endif /* TQT_TQINTDICT_H */ diff --git a/qtinterface/interface_tqt3/tqinterlacestyle.h b/qtinterface/interface_tqt3/tqinterlacestyle.h index e5e8465..49073bf 100644 --- a/qtinterface/interface_tqt3/tqinterlacestyle.h +++ b/qtinterface/interface_tqt3/tqinterlacestyle.h @@ -23,27 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQINTERLACESTYLE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QInterlaceStyle class -// For Qt3, no changes are needed - #include <ntqinterlacestyle.h> -#error "Not ported to new API as of Qt3!" - -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QInterlaceStyle class -// For Qt4, no changes are needed - -#include <Qt/ntqinterlacestyle.h> - -#error "Not ported to new API as of Qt4!" - -#endif // USE_QT4 - #endif /* TQT_TQINTERLACESTYLE_H */ diff --git a/qtinterface/interface_tqt3/tqiodevice.cpp b/qtinterface/interface_tqt3/tqiodevice.cpp index 2532eef..7fef98b 100644 --- a/qtinterface/interface_tqt3/tqiodevice.cpp +++ b/qtinterface/interface_tqt3/tqiodevice.cpp @@ -21,50 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqiodevice.h> - -#ifdef USE_QT4 - -void QIODevice::setState( int s ) { - if (s == IO_Open) { - if (isOpen() == false) { - open(openMode()); - } - } -} - -void QIODevice::setFlags( int f ) { - setOpenMode((OpenMode)f); -} - -void QIODevice::setStatus( int s ) { - #warning "QIODevice::setStatus is unimplemented!" -} - -// TQIODevice::TQIODevice() : QIODevice() {} -// -// qint64 TQIODevice::readData(char *data, qint64 maxlen) { -// return read(data, maxlen); -// } -// -// qint64 TQIODevice::writeData(const char *data, qint64 len) { -// return write(data, len); -// } - -// qint64 QIODevice::readData(char *data, qint64 maxlen) { -// return read(data, maxlen); -// } -// -// qint64 QIODevice::writeData(const char *data, qint64 len) { -// return write(data, len); -// } - -qint64 QIODevice::readLine(QString & s, qint64 maxlen) { - qint64 ret; - QByteArray q; - - readLine(q.data(), maxlen); - s.setAscii(q); - return ret; -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqiodevice.h b/qtinterface/interface_tqt3/tqiodevice.h index d662f71..d95c195 100644 --- a/qtinterface/interface_tqt3/tqiodevice.h +++ b/qtinterface/interface_tqt3/tqiodevice.h @@ -24,37 +24,6 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqobject.h> - -#ifdef USE_QT3 - -// Reimplement the QIODevice class -// For Qt3, no changes are needed - #include <ntqiodevice.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QIODevice class -// For Qt4, no changes are needed - -#define TQT_NO_QOBJECT -#include <tqt4/Qt/ntqiodevice.h> -#undef TQT_NO_QOBJECT - -// class TQIODevice : public QIODevice { -// public: -// TQIODevice(); -// #ifndef TQT_NO_QOBJECT -// explicit TQIODevice(QObject *parent); -// #endif -// -// public: -// qint64 readData(char *data, qint64 maxlen); -// qint64 writeData(const char *data, qint64 len); -// }; - -#endif // USE_QT4 - #endif /* TQT_TQIODEVICE_H */ diff --git a/qtinterface/interface_tqt3/tqjiscodec.h b/qtinterface/interface_tqt3/tqjiscodec.h index 9f2719d..8927920 100644 --- a/qtinterface/interface_tqt3/tqjiscodec.h +++ b/qtinterface/interface_tqt3/tqjiscodec.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQJISCODEC_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QJisCodec class -// For Qt3, no changes are needed - #include <ntqjiscodec.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QJisCodec class -// For Qt4, some changes are needed - -#include <Qt/ntqjiscodec.h> - -#endif // USE_QT4 - #endif /* TQT_TQJISCODEC_H */ diff --git a/qtinterface/interface_tqt3/tqjpegio.h b/qtinterface/interface_tqt3/tqjpegio.h index cee191a..3d91cf6 100644 --- a/qtinterface/interface_tqt3/tqjpegio.h +++ b/qtinterface/interface_tqt3/tqjpegio.h @@ -21,22 +21,8 @@ Boston, MA 02110-1301, USA. #ifndef TQT_TQJPEGIO_H #define TQT_TQJPEGIO_H -#include <tqt.h> - -#ifdef USE_QT3 - -// Pull in Qt3 ntqjpegio.h defines - -#include <ntqjpegio.h> - -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Pull in Qt4 ntqjpegio.h defines +#include <tqt.h> #include <ntqjpegio.h> -#endif // USE_QT4 - #endif /* TQT_TQJPEGIO_H */ diff --git a/qtinterface/interface_tqt3/tqjpunicode.h b/qtinterface/interface_tqt3/tqjpunicode.h index fff93e0..fdf0a63 100644 --- a/qtinterface/interface_tqt3/tqjpunicode.h +++ b/qtinterface/interface_tqt3/tqjpunicode.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQJPUNICODE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QJpUnicodeConv class -// For Qt3, no changes are needed - #include <ntqjpunicode.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QJpUnicodeConv class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQJPUNICODE_H */ diff --git a/qtinterface/interface_tqt3/tqkeycode.h b/qtinterface/interface_tqt3/tqkeycode.h index 5d55d99..3786f6d 100644 --- a/qtinterface/interface_tqt3/tqkeycode.h +++ b/qtinterface/interface_tqt3/tqkeycode.h @@ -23,9 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQKEYCODE_H #include <tqt.h> - -// Pull in tqkeycode defines - #include <ntqkeycode.h> #endif /* TQT_TQKEYCODE_H */ diff --git a/qtinterface/interface_tqt3/tqkeysequence.h b/qtinterface/interface_tqt3/tqkeysequence.h index 45cda9f..e4799cb 100644 --- a/qtinterface/interface_tqt3/tqkeysequence.h +++ b/qtinterface/interface_tqt3/tqkeysequence.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQKEYSEQUENCE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QKeySequence class -// For Qt3, no changes are needed - #include <ntqkeysequence.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QKeySequence class -// For Qt4, some changes are needed - -#include <Qt/ntqkeysequence.h> - -#endif // USE_QT4 - #endif /* TQT_TQKEYSEQUENCE_H */ diff --git a/qtinterface/interface_tqt3/tqlabel.h b/qtinterface/interface_tqt3/tqlabel.h index 989ac8b..55f8dbf 100644 --- a/qtinterface/interface_tqt3/tqlabel.h +++ b/qtinterface/interface_tqt3/tqlabel.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQLABEL_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QLabel class -// For Qt3, no changes are needed - #include <ntqlabel.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QLabel class -// For Qt4, some changes are needed - -#include <Qt/ntqlabel.h> - -#endif // USE_QT4 - #endif /* TQT_TQLABEL_H */ diff --git a/qtinterface/interface_tqt3/tqlayout.h b/qtinterface/interface_tqt3/tqlayout.h index dee0792..eeaf19a 100644 --- a/qtinterface/interface_tqt3/tqlayout.h +++ b/qtinterface/interface_tqt3/tqlayout.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQLAYOUT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QLayout class -// For Qt3, no changes are needed - #include <ntqlayout.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QLayout class -// For Qt4, some changes are needed - -#include <Qt/ntqlayout.h> - -#endif // USE_QT4 - #endif /* TQT_TQLAYOUT_H */ diff --git a/qtinterface/interface_tqt3/tqlcdnumber.h b/qtinterface/interface_tqt3/tqlcdnumber.h index a7f654c..a770f08 100644 --- a/qtinterface/interface_tqt3/tqlcdnumber.h +++ b/qtinterface/interface_tqt3/tqlcdnumber.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQLCDNUMBER_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QLCDNumber class -// For Qt3, no changes are needed - #include <ntqlcdnumber.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QLCDNumber class -// For Qt4, some changes are needed - -#include <Qt/ntqlcdnumber.h> - -#endif // USE_QT4 - #endif /* TQT_TQLCDNUMBER_H */ diff --git a/qtinterface/interface_tqt3/tqlibrary.h b/qtinterface/interface_tqt3/tqlibrary.h index 2183551..c28bed0 100644 --- a/qtinterface/interface_tqt3/tqlibrary.h +++ b/qtinterface/interface_tqt3/tqlibrary.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQLIBRARY_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QLibrary class -// For Qt3, no changes are needed - #include <ntqlibrary.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QLibrary class -// For Qt4, some changes are needed - -#include <Qt/ntqlibrary.h> - -#endif // USE_QT4 - #endif /* TQT_TQLIBRARY_H */ diff --git a/qtinterface/interface_tqt3/tqlineedit.h b/qtinterface/interface_tqt3/tqlineedit.h index 0e5b853..b8026243 100644 --- a/qtinterface/interface_tqt3/tqlineedit.h +++ b/qtinterface/interface_tqt3/tqlineedit.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQLINEEDIT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QLineEdit class -// For Qt3, no changes are needed - #include <ntqlineedit.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QLineEdit class -// For Qt4, some changes are needed - -#include <Qt/ntqlineedit.h> - -#endif // USE_QT4 - #endif /* TQT_TQLINEEDIT_H */ diff --git a/qtinterface/interface_tqt3/tqlistbox.h b/qtinterface/interface_tqt3/tqlistbox.h index 635a144..475799c 100644 --- a/qtinterface/interface_tqt3/tqlistbox.h +++ b/qtinterface/interface_tqt3/tqlistbox.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQLISTBOX_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QListBox class -// For Qt3, no changes are needed - #include <ntqlistbox.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QListBox class -// For Qt4, some changes are needed - -#include <Qt/q3listbox.h> - -#endif // USE_QT4 - #endif /* TQT_TQLISTBOX_H */ diff --git a/qtinterface/interface_tqt3/tqlistview.h b/qtinterface/interface_tqt3/tqlistview.h index 262a0a4..8f6e0d0 100644 --- a/qtinterface/interface_tqt3/tqlistview.h +++ b/qtinterface/interface_tqt3/tqlistview.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQLISTVIEW_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QListView class -// For Qt3, no changes are needed - #include <ntqlistview.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QListView class -// For Qt4, some changes are needed - -#include <Qt/q3listview.h> - -#endif // USE_QT4 - #endif /* TQT_TQLISTVIEW_H */ diff --git a/qtinterface/interface_tqt3/tqlocale.h b/qtinterface/interface_tqt3/tqlocale.h index 430373f..5f8f7e4 100644 --- a/qtinterface/interface_tqt3/tqlocale.h +++ b/qtinterface/interface_tqt3/tqlocale.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQLOCALE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QLocale class -// For Qt3, no changes are needed - #include <ntqlocale.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QLocale class -// For Qt4, some changes are needed - -#include <Qt/ntqlocale.h> - -#endif // USE_QT4 - #endif /* TQT_TQLOCALE_H */ diff --git a/qtinterface/interface_tqt3/tqlocalfs.h b/qtinterface/interface_tqt3/tqlocalfs.h index 55f224c..34da423 100644 --- a/qtinterface/interface_tqt3/tqlocalfs.h +++ b/qtinterface/interface_tqt3/tqlocalfs.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQLOCALFS_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QLocalFs class -// For Qt3, no changes are needed - #include <ntqlocalfs.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QLocalFs class -// For Qt4, some changes are needed - -#include <Qt/q3localfs.h> - -#endif // USE_QT4 - #endif /* TQT_TQLOCALFS_H */ diff --git a/qtinterface/interface_tqt3/tqmainwindow.h b/qtinterface/interface_tqt3/tqmainwindow.h index 5e99f0e..fc3e1db 100644 --- a/qtinterface/interface_tqt3/tqmainwindow.h +++ b/qtinterface/interface_tqt3/tqmainwindow.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQMAINWINDOW_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QMainWindow class -// For Qt3, no changes are needed - #include <ntqmainwindow.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QMainWindow class -// For Qt4, some changes are needed - -#include <Qt/q3mainwindow.h> - -#endif // USE_QT4 - #endif /* TQT_TQMAINWINDOW_H */ diff --git a/qtinterface/interface_tqt3/tqmap.cpp b/qtinterface/interface_tqt3/tqmap.cpp index 2e4fc24..67bb40b 100644 --- a/qtinterface/interface_tqt3/tqmap.cpp +++ b/qtinterface/interface_tqt3/tqmap.cpp @@ -21,223 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqmap.h> - -#ifdef USE_QT4 - -typedef TQMapNodeBase* NodePtr; -typedef TQMapNodeBase Node; - - -void TQMapPrivateBase::rotateLeft( NodePtr x, NodePtr& root) -{ - NodePtr y = x->right; - x->right = y->left; - if (y->left !=0) - y->left->parent = x; - y->parent = x->parent; - if (x == root) - root = y; - else if (x == x->parent->left) - x->parent->left = y; - else - x->parent->right = y; - y->left = x; - x->parent = y; -} - - -void TQMapPrivateBase::rotateRight( NodePtr x, NodePtr& root ) -{ - NodePtr y = x->left; - x->left = y->right; - if (y->right != 0) - y->right->parent = x; - y->parent = x->parent; - if (x == root) - root = y; - else if (x == x->parent->right) - x->parent->right = y; - else - x->parent->left = y; - y->right = x; - x->parent = y; -} - - -void TQMapPrivateBase::rebalance( NodePtr x, NodePtr& root) -{ - x->color = Node::Red; - while ( x != root && x->parent->color == Node::Red ) { - if ( x->parent == x->parent->parent->left ) { - NodePtr y = x->parent->parent->right; - if (y && y->color == Node::Red) { - x->parent->color = Node::Black; - y->color = Node::Black; - x->parent->parent->color = Node::Red; - x = x->parent->parent; - } else { - if (x == x->parent->right) { - x = x->parent; - rotateLeft( x, root ); - } - x->parent->color = Node::Black; - x->parent->parent->color = Node::Red; - rotateRight (x->parent->parent, root ); - } - } else { - NodePtr y = x->parent->parent->left; - if ( y && y->color == Node::Red ) { - x->parent->color = Node::Black; - y->color = Node::Black; - x->parent->parent->color = Node::Red; - x = x->parent->parent; - } else { - if (x == x->parent->left) { - x = x->parent; - rotateRight( x, root ); - } - x->parent->color = Node::Black; - x->parent->parent->color = Node::Red; - rotateLeft( x->parent->parent, root ); - } - } - } - root->color = Node::Black; -} - - -NodePtr TQMapPrivateBase::removeAndRebalance( NodePtr z, NodePtr& root, - NodePtr& leftmost, - NodePtr& rightmost ) -{ - NodePtr y = z; - NodePtr x; - NodePtr x_parent; - if (y->left == 0) { - x = y->right; - } else { - if (y->right == 0) - x = y->left; - else - { - y = y->right; - while (y->left != 0) - y = y->left; - x = y->right; - } - } - if (y != z) { - z->left->parent = y; - y->left = z->left; - if (y != z->right) { - x_parent = y->parent; - if (x) - x->parent = y->parent; - y->parent->left = x; - y->right = z->right; - z->right->parent = y; - } else { - x_parent = y; - } - if (root == z) - root = y; - else if (z->parent->left == z) - z->parent->left = y; - else - z->parent->right = y; - y->parent = z->parent; - // Swap the colors - Node::Color c = y->color; - y->color = z->color; - z->color = c; - y = z; - } else { - x_parent = y->parent; - if (x) - x->parent = y->parent; - if (root == z) - root = x; - else if (z->parent->left == z) - z->parent->left = x; - else - z->parent->right = x; - if ( leftmost == z ) { - if (z->right == 0) - leftmost = z->parent; - else - leftmost = x->minimum(); - } - if (rightmost == z) { - if (z->left == 0) - rightmost = z->parent; - else - rightmost = x->maximum(); - } - } - if (y->color != Node::Red) { - while (x != root && (x == 0 || x->color == Node::Black)) { - if (x == x_parent->left) { - NodePtr w = x_parent->right; - if (w->color == Node::Red) { - w->color = Node::Black; - x_parent->color = Node::Red; - rotateLeft(x_parent, root); - w = x_parent->right; - } - if ((w->left == 0 || w->left->color == Node::Black) && - (w->right == 0 || w->right->color == Node::Black)) { - w->color = Node::Red; - x = x_parent; - x_parent = x_parent->parent; - } else { - if (w->right == 0 || w->right->color == Node::Black) { - if (w->left) - w->left->color = Node::Black; - w->color = Node::Red; - rotateRight(w, root); - w = x_parent->right; - } - w->color = x_parent->color; - x_parent->color = Node::Black; - if (w->right) - w->right->color = Node::Black; - rotateLeft(x_parent, root); - break; - } - } else { - NodePtr w = x_parent->left; - if (w->color == Node::Red) { - w->color = Node::Black; - x_parent->color = Node::Red; - rotateRight(x_parent, root); - w = x_parent->left; - } - if ((w->right == 0 || w->right->color == Node::Black) && - (w->left == 0 || w->left->color == Node::Black)) { - w->color = Node::Red; - x = x_parent; - x_parent = x_parent->parent; - } else { - if (w->left == 0 || w->left->color == Node::Black) { - if (w->right) - w->right->color = Node::Black; - w->color = Node::Red; - rotateLeft(w, root); - w = x_parent->left; - } - w->color = x_parent->color; - x_parent->color = Node::Black; - if (w->left) - w->left->color = Node::Black; - rotateRight(x_parent, root); - break; - } - } - } - if (x) - x->color = Node::Black; - } - return y; -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqmap.h b/qtinterface/interface_tqt3/tqmap.h index 412abbe..5f1ea9a 100644 --- a/qtinterface/interface_tqt3/tqmap.h +++ b/qtinterface/interface_tqt3/tqmap.h @@ -23,913 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQMAP_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QMap class -// For Qt3, no changes are needed - #include <ntqmap.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QMap class -// For Qt4, some changes are needed - -#include <Qt/ntqmap.h> -#include <Qt/q3shared.h> -#include <Qt/q3valuelist.h> - -/**************************************************************************** -** -** Definition of TQMap class -** -** Created : 990406 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the tools module of the Qt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free Qt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.QPL -** included in the packaging of this file. Licensees holding valid Qt -** Commercial licenses may use this file in accordance with the Qt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -//#define QT_CHECK_MAP_RANGE - -struct TQMapNodeBase -{ - enum Color { Red, Black }; - - TQMapNodeBase* left; - TQMapNodeBase* right; - TQMapNodeBase* parent; - - Color color; - - TQMapNodeBase* minimum() { - TQMapNodeBase* x = this; - while ( x->left ) - x = x->left; - return x; - } - - TQMapNodeBase* maximum() { - TQMapNodeBase* x = this; - while ( x->right ) - x = x->right; - return x; - } -}; - - -template <class K, class T> -struct TQMapNode : public TQMapNodeBase -{ - TQMapNode( const K& _key, const T& _data ) { data = _data; key = _key; } - TQMapNode( const K& _key ) { key = _key; } - TQMapNode( const TQMapNode<K,T>& _n ) { key = _n.key; data = _n.data; } - TQMapNode() { } - T data; - K key; -}; - - -template<class K, class T> -class TQMapIterator -{ - public: - /** - * Typedefs - */ - typedef TQMapNode< K, T >* NodePtr; -#ifndef TQT_NO_STL - typedef std::bidirectional_iterator_tag iterator_category; -#endif - typedef T value_type; -#ifndef TQT_NO_STL - typedef ptrdiff_t difference_type; -#else - typedef int difference_type; -#endif - typedef T* pointer; - typedef T& reference; - - /** - * Variables - */ - TQMapNode<K,T>* node; - - /** - * Functions - */ - TQMapIterator() : node( 0 ) {} - TQMapIterator( TQMapNode<K,T>* p ) : node( p ) {} - TQMapIterator( const TQMapIterator<K,T>& it ) : node( it.node ) {} - - bool operator==( const TQMapIterator<K,T>& it ) const { return node == it.node; } - bool operator!=( const TQMapIterator<K,T>& it ) const { return node != it.node; } - T& operator*() { return node->data; } - const T& operator*() const { return node->data; } - // UDT for T = x* - // T* operator->() const { return &node->data; } - - const K& key() const { return node->key; } - T& data() { return node->data; } - const T& data() const { return node->data; } - -private: - int inc(); - int dec(); - -public: - TQMapIterator<K,T>& operator++() { - inc(); - return *this; - } - - TQMapIterator<K,T> operator++(int) { - TQMapIterator<K,T> tmp = *this; - inc(); - return tmp; - } - - TQMapIterator<K,T>& operator--() { - dec(); - return *this; - } - - TQMapIterator<K,T> operator--(int) { - TQMapIterator<K,T> tmp = *this; - dec(); - return tmp; - } -}; - -template <class K, class T> -int TQMapIterator<K,T>::inc() -{ - TQMapNodeBase* tmp = node; - if ( tmp->right ) { - tmp = tmp->right; - while ( tmp->left ) - tmp = tmp->left; - } else { - TQMapNodeBase* y = tmp->parent; - while (tmp == y->right) { - tmp = y; - y = y->parent; - } - if (tmp->right != y) - tmp = y; - } - node = (NodePtr)tmp; - return 0; -} - -template <class K, class T> -int TQMapIterator<K,T>::dec() -{ - TQMapNodeBase* tmp = node; - if (tmp->color == TQMapNodeBase::Red && - tmp->parent->parent == tmp ) { - tmp = tmp->right; - } else if (tmp->left != 0) { - TQMapNodeBase* y = tmp->left; - while ( y->right ) - y = y->right; - tmp = y; - } else { - TQMapNodeBase* y = tmp->parent; - while (tmp == y->left) { - tmp = y; - y = y->parent; - } - tmp = y; - } - node = (NodePtr)tmp; - return 0; -} - -template<class K, class T> -class TQMapConstIterator -{ - public: - /** - * Typedefs - */ - typedef TQMapNode< K, T >* NodePtr; -#ifndef TQT_NO_STL - typedef std::bidirectional_iterator_tag iterator_category; -#endif - typedef T value_type; -#ifndef TQT_NO_STL - typedef ptrdiff_t difference_type; -#else - typedef int difference_type; -#endif - typedef const T* pointer; - typedef const T& reference; - - - /** - * Variables - */ - TQMapNode<K,T>* node; - - /** - * Functions - */ - TQMapConstIterator() : node( 0 ) {} - TQMapConstIterator( TQMapNode<K,T>* p ) : node( p ) {} - TQMapConstIterator( const TQMapConstIterator<K,T>& it ) : node( it.node ) {} - TQMapConstIterator( const TQMapIterator<K,T>& it ) : node( it.node ) {} - - bool operator==( const TQMapConstIterator<K,T>& it ) const { return node == it.node; } - bool operator!=( const TQMapConstIterator<K,T>& it ) const { return node != it.node; } - const T& operator*() const { return node->data; } - // UDT for T = x* - // const T* operator->() const { return &node->data; } - - const K& key() const { return node->key; } - const T& data() const { return node->data; } - -private: - int inc(); - int dec(); - -public: - TQMapConstIterator<K,T>& operator++() { - inc(); - return *this; - } - - TQMapConstIterator<K,T> operator++(int) { - TQMapConstIterator<K,T> tmp = *this; - inc(); - return tmp; - } - - TQMapConstIterator<K,T>& operator--() { - dec(); - return *this; - } - - TQMapConstIterator<K,T> operator--(int) { - TQMapConstIterator<K,T> tmp = *this; - dec(); - return tmp; - } -}; - -template <class K, class T> -int TQMapConstIterator<K,T>::inc() -{ - TQMapNodeBase* tmp = node; - if ( tmp->right ) { - tmp = tmp->right; - while ( tmp->left ) - tmp = tmp->left; - } else { - TQMapNodeBase* y = tmp->parent; - while (tmp == y->right) { - tmp = y; - y = y->parent; - } - if (tmp->right != y) - tmp = y; - } - node = (NodePtr)tmp; - return 0; -} - -template <class K, class T> -int TQMapConstIterator<K,T>::dec() -{ - TQMapNodeBase* tmp = node; - if (tmp->color == TQMapNodeBase::Red && - tmp->parent->parent == tmp ) { - tmp = tmp->right; - } else if (tmp->left != 0) { - TQMapNodeBase* y = tmp->left; - while ( y->right ) - y = y->right; - tmp = y; - } else { - TQMapNodeBase* y = tmp->parent; - while (tmp == y->left) { - tmp = y; - y = y->parent; - } - tmp = y; - } - node = (NodePtr)tmp; - return 0; -} - -// ### 4.0: rename to something without Private in it. Not really internal. -class TQMapPrivateBase : public Q3Shared -{ -public: - TQMapPrivateBase() { - node_count = 0; - } - TQMapPrivateBase( const TQMapPrivateBase* _map) { - node_count = _map->node_count; - } - - /** - * Implementations of basic tree algorithms - */ - void rotateLeft( TQMapNodeBase* x, TQMapNodeBase*& root); - void rotateRight( TQMapNodeBase* x, TQMapNodeBase*& root ); - void rebalance( TQMapNodeBase* x, TQMapNodeBase*& root ); - TQMapNodeBase* removeAndRebalance( TQMapNodeBase* z, TQMapNodeBase*& root, - TQMapNodeBase*& leftmost, - TQMapNodeBase*& rightmost ); - - /** - * Variables - */ - int node_count; -}; - - -template <class Key, class T> -class TQMapPrivate : public TQMapPrivateBase -{ -public: - /** - * Typedefs - */ - typedef TQMapIterator< Key, T > Iterator; - typedef TQMapConstIterator< Key, T > ConstIterator; - typedef TQMapNode< Key, T > Node; - typedef TQMapNode< Key, T >* NodePtr; - - /** - * Functions - */ - TQMapPrivate(); - TQMapPrivate( const TQMapPrivate< Key, T >* _map ); - ~TQMapPrivate() { clear(); delete header; } - - NodePtr copy( NodePtr p ); - void clear(); - void clear( NodePtr p ); - - Iterator begin() { return Iterator( (NodePtr)(header->left ) ); } - Iterator end() { return Iterator( header ); } - ConstIterator begin() const { return ConstIterator( (NodePtr)(header->left ) ); } - ConstIterator end() const { return ConstIterator( header ); } - - ConstIterator find(const Key& k) const; - - void remove( Iterator it ) { - NodePtr del = (NodePtr) removeAndRebalance( it.node, header->parent, header->left, header->right ); - delete del; - --node_count; - } - -#ifdef QT_QMAP_DEBUG - void inorder( TQMapNodeBase* x = 0, int level = 0 ){ - if ( !x ) - x = header->parent; - if ( x->left ) - inorder( x->left, level + 1 ); - //cout << level << " Key=" << key(x) << " Value=" << ((NodePtr)x)->data << endl; - if ( x->right ) - inorder( x->right, level + 1 ); - } -#endif - -#if 0 - Iterator insertMulti(const Key& v){ - TQMapNodeBase* y = header; - TQMapNodeBase* x = header->parent; - while (x != 0){ - y = x; - x = ( v < key(x) ) ? x->left : x->right; - } - return insert(x, y, v); - } -#endif - - Iterator insertSingle( const Key& k ); - Iterator insert( TQMapNodeBase* x, TQMapNodeBase* y, const Key& k ); - -protected: - /** - * Helpers - */ - const Key& key( TQMapNodeBase* b ) const { return ((NodePtr)b)->key; } - - /** - * Variables - */ - NodePtr header; -}; - - -template <class Key, class T> -TQMapPrivate<Key,T>::TQMapPrivate() { - header = new Node; - header->color = TQMapNodeBase::Red; // Mark the header - header->parent = 0; - header->left = header->right = header; -} -template <class Key, class T> -TQMapPrivate<Key,T>::TQMapPrivate( const TQMapPrivate< Key, T >* _map ) : TQMapPrivateBase( _map ) { - header = new Node; - header->color = TQMapNodeBase::Red; // Mark the header - if ( _map->header->parent == 0 ) { - header->parent = 0; - header->left = header->right = header; - } else { - header->parent = copy( (NodePtr)(_map->header->parent) ); - header->parent->parent = header; - header->left = header->parent->minimum(); - header->right = header->parent->maximum(); - } -} - -template <class Key, class T> -Q_TYPENAME TQMapPrivate<Key,T>::NodePtr TQMapPrivate<Key,T>::copy( Q_TYPENAME TQMapPrivate<Key,T>::NodePtr p ) -{ - if ( !p ) - return 0; - NodePtr n = new Node( *p ); - n->color = p->color; - if ( p->left ) { - n->left = copy( (NodePtr)(p->left) ); - n->left->parent = n; - } else { - n->left = 0; - } - if ( p->right ) { - n->right = copy( (NodePtr)(p->right) ); - n->right->parent = n; - } else { - n->right = 0; - } - return n; -} - -template <class Key, class T> -void TQMapPrivate<Key,T>::clear() -{ - clear( (NodePtr)(header->parent) ); - header->color = TQMapNodeBase::Red; - header->parent = 0; - header->left = header->right = header; - node_count = 0; -} - -template <class Key, class T> -void TQMapPrivate<Key,T>::clear( Q_TYPENAME TQMapPrivate<Key,T>::NodePtr p ) -{ - while ( p != 0 ) { - clear( (NodePtr)p->right ); - NodePtr y = (NodePtr)p->left; - delete p; - p = y; - } -} - -template <class Key, class T> -Q_TYPENAME TQMapPrivate<Key,T>::ConstIterator TQMapPrivate<Key,T>::find(const Key& k) const -{ - TQMapNodeBase* y = header; // Last node - TQMapNodeBase* x = header->parent; // Root node. - - while ( x != 0 ) { - // If as k <= key(x) go left - if ( !( key(x) < k ) ) { - y = x; - x = x->left; - } else { - x = x->right; - } - } - - // Was k bigger/smaller then the biggest/smallest - // element of the tree ? Return end() - if ( y == header || k < key(y) ) - return ConstIterator( header ); - return ConstIterator( (NodePtr)y ); -} - -template <class Key, class T> -Q_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T>::insertSingle( const Key& k ) -{ - // Search correct position in the tree - TQMapNodeBase* y = header; - TQMapNodeBase* x = header->parent; - bool result = TRUE; - while ( x != 0 ) { - result = ( k < key(x) ); - y = x; - x = result ? x->left : x->right; - } - // Get iterator on the last not empty one - Iterator j( (NodePtr)y ); - if ( result ) { - // Smaller then the leftmost one ? - if ( j == begin() ) { - return insert(x, y, k ); - } else { - // Perhaps daddy is the right one ? - --j; - } - } - // Really bigger ? - if ( (j.node->key) < k ) - return insert(x, y, k ); - // We are going to replace a node - return j; -} - - -template <class Key, class T> -Q_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T>::insert( TQMapNodeBase* x, TQMapNodeBase* y, const Key& k ) -{ - NodePtr z = new Node( k ); - if (y == header || x != 0 || k < key(y) ) { - y->left = z; // also makes leftmost = z when y == header - if ( y == header ) { - header->parent = z; - header->right = z; - } else if ( y == header->left ) - header->left = z; // maintain leftmost pointing to min node - } else { - y->right = z; - if ( y == header->right ) - header->right = z; // maintain rightmost pointing to max node - } - z->parent = y; - z->left = 0; - z->right = 0; - rebalance( z, header->parent ); - ++node_count; - return Iterator(z); -} - - -#ifdef QT_CHECK_RANGE -# if !defined( TQT_NO_DEBUG ) && defined( QT_CHECK_MAP_RANGE ) -# define QT_CHECK_INVALID_MAP_ELEMENT if ( empty() ) qWarning( "TQMap: Warning invalid element" ) -# define QT_CHECK_INVALID_MAP_ELEMENT_FATAL Q_ASSERT( !empty() ); -# else -# define QT_CHECK_INVALID_MAP_ELEMENT -# define QT_CHECK_INVALID_MAP_ELEMENT_FATAL -# endif -#else -# define QT_CHECK_INVALID_MAP_ELEMENT -# define QT_CHECK_INVALID_MAP_ELEMENT_FATAL -#endif - -template <class T> class QDeepCopy; - -template<class Key, class T> -class TQMap -{ -public: - /** - * Typedefs - */ - typedef Key key_type; - typedef T mapped_type; - typedef QPair<const key_type, mapped_type> value_type; - typedef value_type* pointer; - typedef const value_type* const_pointer; - typedef value_type& reference; - typedef const value_type& const_reference; -#ifndef TQT_NO_STL - typedef ptrdiff_t difference_type; -#else - typedef int difference_type; -#endif - typedef size_t size_type; - typedef TQMapIterator<Key,T> iterator; - typedef TQMapConstIterator<Key,T> const_iterator; - typedef QPair<iterator,bool> insert_pair; - - typedef TQMapIterator< Key, T > Iterator; - typedef TQMapConstIterator< Key, T > ConstIterator; - typedef T ValueType; - typedef TQMapPrivate< Key, T > Priv; - - /** - * API - */ - TQMap() - { - sh = new TQMapPrivate< Key, T >; - } - TQMap( const TQMap<Key,T>& m ) - { - sh = m.sh; sh->ref(); - } - -#ifndef TQT_NO_STL - TQMap( const std::map<Key,T>& m ) - { - sh = new TQMapPrivate<Key,T>; - Q_TYPENAME std::map<Key,T>::const_iterator it = m.begin(); - for ( ; it != m.end(); ++it ) { - value_type p( (*it).first, (*it).second ); - insert( p ); - } - } -#endif - ~TQMap() - { - if ( sh->deref() ) - delete sh; - } - TQMap<Key,T>& operator= ( const TQMap<Key,T>& m ); -#ifndef TQT_NO_STL - TQMap<Key,T>& operator= ( const std::map<Key,T>& m ) - { - clear(); - Q_TYPENAME std::map<Key,T>::const_iterator it = m.begin(); - for ( ; it != m.end(); ++it ) { - value_type p( (*it).first, (*it).second ); - insert( p ); - } - return *this; - } -#endif - - // Interoperability - TQMap(const QMap<Key,T>& m) - { - QMapIterator<Key,T> i(m); - while (i.hasNext()) { - i.next(); - insert(i.key(), i.value()); - } - } - TQMap<Key,T>& operator= (const QMap<Key,T>& m) - { - this->clear(); - QMapIterator<Key,T> i(m); - while (i.hasNext()) { - i.next(); - insert(i.key(), i.value()); - } - return *this; - } - - operator QMap<Key,T>() const { - QMap<Key,T> map; - iterator it; - for ( it = this->begin(); it != this->end(); ++it) { - map.insert(it.key(), it.data()); - } - return map; - } - - iterator begin() { detach(); return sh->begin(); } - iterator end() { detach(); return sh->end(); } - const_iterator begin() const { return ((const Priv*)sh)->begin(); } - const_iterator end() const { return ((const Priv*)sh)->end(); } - const_iterator constBegin() const { return begin(); } - const_iterator constEnd() const { return end(); } - - iterator replace( const Key& k, const T& v ) - { - remove( k ); - return insert( k, v ); - } - - size_type size() const - { - return sh->node_count; - } - bool empty() const - { - return sh->node_count == 0; - } - QPair<iterator,bool> insert( const value_type& x ); - - void erase( iterator it ) - { - detach(); - sh->remove( it ); - } - void erase( const key_type& k ); - size_type count( const key_type& k ) const; - T& operator[] ( const Key& k ); - void clear(); - - iterator find ( const Key& k ) - { - detach(); - return iterator( sh->find( k ).node ); - } - const_iterator find ( const Key& k ) const { return sh->find( k ); } - - const T& operator[] ( const Key& k ) const - { QT_CHECK_INVALID_MAP_ELEMENT; return sh->find( k ).data(); } - bool contains ( const Key& k ) const - { return find( k ) != end(); } - //{ return sh->find( k ) != ((const Priv*)sh)->end(); } - - size_type count() const { return sh->node_count; } - - Q3ValueList<Key> keys() const { - Q3ValueList<Key> r; - for (const_iterator i=begin(); i!=end(); ++i) - r.append(i.key()); - return r; - } - - Q3ValueList<T> values() const { - Q3ValueList<T> r; - for (const_iterator i=begin(); i!=end(); ++i) - r.append(*i); - return r; - } - - bool isEmpty() const { return sh->node_count == 0; } - - iterator insert( const Key& key, const T& value, bool overwrite = TRUE ); - void remove( iterator it ) { detach(); sh->remove( it ); } - void remove( const Key& k ); - -#if defined(TQ_FULL_TEMPLATE_INSTANTIATION) - bool operator==( const TQMap<Key,T>& ) const { return FALSE; } -#ifndef TQT_NO_STL - bool operator==( const std::map<Key,T>& ) const { return FALSE; } -#endif -#endif - -protected: - /** - * Helpers - */ - void detach() { if ( sh->count > 1 ) detachInternal(); } - - Priv* sh; -private: - void detachInternal(); - - friend class QDeepCopy< TQMap<Key,T> >; -}; - -template<class Key, class T> -TQMap<Key,T>& TQMap<Key,T>::operator= ( const TQMap<Key,T>& m ) -{ - m.sh->ref(); - if ( sh->deref() ) - delete sh; - sh = m.sh; - return *this; -} - -template<class Key, class T> -Q_TYPENAME TQMap<Key,T>::insert_pair TQMap<Key,T>::insert( const Q_TYPENAME TQMap<Key,T>::value_type& x ) -{ - detach(); - size_type n = size(); - iterator it = sh->insertSingle( x.first ); - bool inserted = FALSE; - if ( n < size() ) { - inserted = TRUE; - it.data() = x.second; - } - return QPair<iterator,bool>( it, inserted ); -} - -template<class Key, class T> -void TQMap<Key,T>::erase( const Key& k ) -{ - detach(); - iterator it( sh->find( k ).node ); - if ( it != end() ) - sh->remove( it ); -} - -template<class Key, class T> -Q_TYPENAME TQMap<Key,T>::size_type TQMap<Key,T>::count( const Key& k ) const -{ - const_iterator it( sh->find( k ).node ); - if ( it != end() ) { - size_type c = 0; - while ( it != end() ) { - ++it; - ++c; - } - return c; - } - return 0; -} - -template<class Key, class T> -T& TQMap<Key,T>::operator[] ( const Key& k ) -{ - detach(); - TQMapNode<Key,T>* p = sh->find( k ).node; - if ( p != sh->end().node ) - return p->data; - return insert( k, T() ).data(); -} - -template<class Key, class T> -void TQMap<Key,T>::clear() -{ - if ( sh->count == 1 ) - sh->clear(); - else { - sh->deref(); - sh = new TQMapPrivate<Key,T>; - } -} - -template<class Key, class T> -Q_TYPENAME TQMap<Key,T>::iterator TQMap<Key,T>::insert( const Key& key, const T& value, bool overwrite ) -{ - detach(); - size_type n = size(); - iterator it = sh->insertSingle( key ); - if ( overwrite || n < size() ) - it.data() = value; - return it; -} - -template<class Key, class T> -void TQMap<Key,T>::remove( const Key& k ) -{ - detach(); - iterator it( sh->find( k ).node ); - if ( it != end() ) - sh->remove( it ); -} - -template<class Key, class T> -void TQMap<Key,T>::detachInternal() -{ - sh->deref(); sh = new TQMapPrivate<Key,T>( sh ); -} - - -#ifndef TQT_NO_DATASTREAM -template<class Key, class T> -QDataStream& operator>>( QDataStream& s, TQMap<Key,T>& m ) { - m.clear(); - Q_UINT32 c; - s >> c; - for( Q_UINT32 i = 0; i < c; ++i ) { - Key k; T t; - s >> k >> t; - m.insert( k, t ); - if ( s.atEnd() ) - break; - } - return s; -} - - -template<class Key, class T> -QDataStream& operator<<( QDataStream& s, const TQMap<Key,T>& m ) { - s << (Q_UINT32)m.size(); - TQMapConstIterator<Key,T> it = m.begin(); - for( ; it != m.end(); ++it ) - s << it.key() << it.data(); - return s; -} -#endif - -/**********************************************************************/ - -#endif // USE_QT4 - #endif /* TQT_TQMAP_H */ diff --git a/qtinterface/interface_tqt3/tqmemarray.h b/qtinterface/interface_tqt3/tqmemarray.h index 050803c..9bf930e 100644 --- a/qtinterface/interface_tqt3/tqmemarray.h +++ b/qtinterface/interface_tqt3/tqmemarray.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQMEMARRAY_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QMemArray class -// For Qt3, no changes are needed - #include <ntqmemarray.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QMemArray class -// For Qt4, some changes are needed - -#include <Qt/q3memarray.h> - -#endif // USE_QT4 - #endif /* TQT_TQMEMARRAY_H */ diff --git a/qtinterface/interface_tqt3/tqmenubar.h b/qtinterface/interface_tqt3/tqmenubar.h index c1fc786..df826a4 100644 --- a/qtinterface/interface_tqt3/tqmenubar.h +++ b/qtinterface/interface_tqt3/tqmenubar.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQMENUBAR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QMenuBar class -// For Qt3, no changes are needed - #include <ntqmenubar.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QMenuBar class -// For Qt4, some changes are needed - -#include <Qt/ntqmenubar.h> - -#endif // USE_QT4 - #endif /* TQT_TQMENUBAR_H */ diff --git a/qtinterface/interface_tqt3/tqmenudata.cpp b/qtinterface/interface_tqt3/tqmenudata.cpp index bcb055a..1ccc3db 100644 --- a/qtinterface/interface_tqt3/tqmenudata.cpp +++ b/qtinterface/interface_tqt3/tqmenudata.cpp @@ -21,62 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqmenudata.h> - -#ifdef USE_QT4 - -Q3PopupMenu *QMenuItem::popup() const { - #warning "Badly broken/nonfunctional QMenuItem::popup() implementation!" - return &Q3PopupMenu(menu()); -} - -/*! - \overload - - Inserts a menu item that consists of the widget \a widget with - optional id \a id, and optional \a index position. - - Ownership of \a widget is transferred to the popup menu or to the - menu bar. - - Theoretically, any widget can be inserted into a popup menu. In - practice, this only makes sense with certain widgets. - - If a widget is not focus-enabled (see - \l{QWidget::isFocusEnabled()}), the menu treats it as a separator; - this means that the item is not selectable and will never get - focus. In this way you can, for example, simply insert a QLabel if - you need a popup menu with a title. - - If the widget is focus-enabled it will get focus when the user - traverses the popup menu with the arrow keys. If the widget does - not accept \c ArrowUp and \c ArrowDown in its key event handler, - the focus will move back to the menu when the respective arrow key - is hit one more time. This works with a QLineEdit, for example. If - the widget accepts the arrow key itself, it must also provide the - possibility to put the focus back on the menu again by calling - QWidget::focusNextPrevChild(). Futhermore, if the embedded widget - closes the menu when the user made a selection, this can be done - safely by calling: - \code - if ( isVisible() && - parentWidget() && - parentWidget()->inherits("QPopupMenu") ) - parentWidget()->close(); - \endcode - - Returns the allocated menu identifier number (\a id if \a id >= 0). - - \sa removeItem() -*/ -int QMenu::insertItem( QWidget* widget, int id, int index ) -{ - #warning "QMenuData::insertItem(QWidget* widget, int id, int index) unimplemented!" - - // New method is const QIcon*, const QString*, const QObject*, const char*, const QKeySequence*, const QMenu*, int, int - // Qt4 does not seem to support arbitrary widgets being added to menus (!!!) - // This will need to be reimplemented somehow as it is a very useful feature (e.g. Start menu text filter box) - //return insertAny( 0, 0, 0, 0, id, index, widget ); - return insertAny( 0, &QString("UNIMPLEMENTED"), widget, 0, 0, 0, id, index ); -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqmenudata.h b/qtinterface/interface_tqt3/tqmenudata.h index e43487b..b79f194 100644 --- a/qtinterface/interface_tqt3/tqmenudata.h +++ b/qtinterface/interface_tqt3/tqmenudata.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQMENUDATA_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QMenuData class -// For Qt3, no changes are needed - #include <ntqmenudata.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QMenuData class -// For Qt4, some changes are needed - -#include <tqt4/Qt/ntqmenudata.h> - -#endif // USE_QT4 - #endif /* TQT_TQMENUDATA_H */ diff --git a/qtinterface/interface_tqt3/tqmessagebox.h b/qtinterface/interface_tqt3/tqmessagebox.h index 0aac1f6..fcab718 100644 --- a/qtinterface/interface_tqt3/tqmessagebox.h +++ b/qtinterface/interface_tqt3/tqmessagebox.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQMESSAGEBOX_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QMessageBox class -// For Qt3, no changes are needed - #include <ntqmessagebox.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QMessageBox class -// For Qt4, some changes are needed - -#include <Qt/ntqmessagebox.h> - -#endif // USE_QT4 - #endif /* TQT_TQMESSAGEBOX_H */ diff --git a/qtinterface/interface_tqt3/tqmetaobject.cpp b/qtinterface/interface_tqt3/tqmetaobject.cpp index 021d6e9..4c2dced 100644 --- a/qtinterface/interface_tqt3/tqmetaobject.cpp +++ b/qtinterface/interface_tqt3/tqmetaobject.cpp @@ -21,283 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqmetaobject.h> - -#ifdef USE_QT4 - -/*! - Returns the number of slots for this class. - - If \a super is TRUE, inherited slots are included. - - \sa slotNames() -*/ -int QMetaObject::numSlots( bool super ) const // number of slots -{ - int i; - int n=0; - for (i=0;i<methodCount();i++) { - if (method(i).methodType() == QMetaMethod::Slot) { - n++; - } - } - - if ( !super || !superClass() ) - return n; - return n + superClass()->numSlots( super ); -} - -/*! - Returns the number of signals for this class. - - If \a super is TRUE, inherited signals are included. - - \sa signalNames() -*/ -int QMetaObject::numSignals( bool super ) const // number of signals -{ - int i; - int n=0; - for (i=0;i<methodCount();i++) { - if (method(i).methodType() == QMetaMethod::Signal) { - n++; - } - } - - if ( !super || !superClass() ) - return n; - return n + superClass()->numSignals( super ); -} - -/*! \internal - - Returns the meta data of the slot with the name \a n or 0 if no - such slot exists. - - If \a super is TRUE, inherited slots are included. - - FIXME: Superclass handling is badly broken - */ -const QMetaMethod* QMetaObject::slot( int index, bool super ) const -{ - QMetaMethod mm; - const QMetaMethod *mr; - int idx = index - ( super ? methodOffset() : 0 ); -// if ( slotDict && idx >= 0 && idx < (int) slotDict->count() ) { - if ( idx >= 0 && idx < numSlots(true) ) { -// return slotData + idx; - mm = method(idx); - mr = &mm; - return mr; - } - if ( !super || !superClass() ) - return 0; - return superClass()->slot( index, super ); -} - -/*! \internal - - Returns the meta data of the signal with the name \a n or 0 if no - such signal exists. - - If \a super is TRUE, inherited signals are included. - - FIXME: Superclass handling is badly broken - */ -const QMetaMethod* QMetaObject::signal( int index, bool super ) const -{ - QMetaMethod mm; - const QMetaMethod *mr; - int idx = index - ( super ? methodOffset() : 0 ); -// if ( signalDict && idx >= 0 && idx < (int) signalDict->count() ) { - if ( idx >= 0 && idx < numSignals(true) ) { -// return signalData + idx; - mm = method(idx); - mr = &mm; - return mr; - } - if ( !super || !superClass() ) - return 0; - return superClass()->signal( index, super ); -} - -/*! - Returns a list with the names of all this class's signals. - - If \a super is TRUE, inherited signals are included. -*/ -TQT_QT_STRING_LIST_TYPE QMetaObject::signalNames( bool super ) const -{ - TQT_QT_STRING_LIST_TYPE l( FALSE ); - int n = methodCount(); - for( int i = 0; i < n; ++i ) { - if (method(i).methodType() == QMetaMethod::Signal) { - l.append( normalizedSignature(signal(i, super)->signature()) ); - } - } - return l; -} - -/*! - Returns a list with the names of all this class's slots. - - If \a super is TRUE, inherited slots are included. - - \sa numSlots() -*/ -TQT_QT_STRING_LIST_TYPE QMetaObject::slotNames( bool super ) const -{ - TQT_QT_STRING_LIST_TYPE l( FALSE ); - int n = methodCount(); - for( int i = 0; i < n; ++i ) - if (method(i).methodType() == QMetaMethod::Slot) { - l.append( normalizedSignature(slot( i, super)->signature()) ); - } - return l; -} - -/*! \internal - Returns the index of the slot with name \n or -1 if no such slot exists. - - If \a super is TRUE, inherited slots are included. - - FIXME: Superclass handling is badly broken - */ -int QMetaObject::findSlot( const char* n, bool super ) const -{ - TQT_QT_STRING_LIST_TYPE l( FALSE ); - int m = methodCount(); - for( int i = 0; i < m; ++i ) { - if ( normalizedSignature(slot( i, super)->signature()) == QByteArray(n) ) { - if (method(i).methodType() == QMetaMethod::Slot) { - return i; - } - } - } - return -1; -} - -/*! \internal - Returns the index of the signal with name \n or -1 if no such signal exists. - - If \a super is TRUE, inherited signals are included. - - FIXME: Superclass handling is badly broken -*/ -int QMetaObject::findSignal( const char* n, bool super ) const -{ - TQT_QT_STRING_LIST_TYPE l( FALSE ); - int m = methodCount(); - for( int i = 0; i < m; ++i ) { - if ( normalizedSignature(signal( i, super)->signature()) == QByteArray(n) ) { - if (method(i).methodType() == QMetaMethod::Signal) { - return i; - } - } - } - return -1; -} - -#ifndef TQT_NO_PROPERTIES - -/*! - Returns the number of properties for this class. - - If \a super is TRUE, inherited properties are included. - - \sa propertyNames() - */ -int QMetaObject::numProperties( bool super ) const // number of signals -{ - int i; - int n=0; - for (i=0;i<propertyCount();i++) { -// if (property(i).propertyType() == QMetaProperty::Property) { - n++; -// } - } - - if ( !super || !superClass() ) - return n; - return n + superClass()->numProperties( super ); -} - -/*! - Returns the property meta data for the property at index \a index - or 0 if no such property exists. - - If \a super is TRUE, inherited properties are included. - - \sa propertyNames() - - FIXME: Superclass handling is badly broken - */ -const QMetaProperty* QMetaObject::property( int index, bool super ) const -{ - QMetaProperty mp; - const QMetaProperty *pr; - int idx = index - ( super ? propertyOffset() : 0 ); -// if ( d->propData && idx >= 0 && idx < (int)d->numPropData ) - if ( idx >= 0 && idx < numProperties(true) ) - mp = property(idx); - pr = ∓ - return pr; - if ( !super || !superClass() ) - return 0; - return superClass()->property( index, super ); -} - -/*! - Returns a list with the names of all this class's properties. - - If \a super is TRUE, inherited properties are included. - - \sa property() -*/ -TQT_QT_STRING_LIST_TYPE QMetaObject::propertyNames( bool super ) const -{ -// TQT_QT_STRING_LIST_TYPE l( FALSE ); -// -// if ( superclass && super ) { -// QStrList sl = superclass->propertyNames( super ); -// for ( QStrListIterator slit( sl ); slit.current(); ++slit ) -// l.append( slit.current() ); -// } -// -// for( int i = 0; i < d->numPropData; ++i ) { -// if ( d->propData[i].isValid() ) -// l.append( d->propData[i].name() ); -// } -// -// return l; - - TQT_QT_STRING_LIST_TYPE l( FALSE ); - int n = numProperties( super ); - for( int i = 0; i < n; ++i ) - l.append( property( i, super)->name() ); - return l; -} - -/*! - Returns the index for the property with name \a name or -1 if no - such property exists. - - If \a super is TRUE, inherited properties are included. - - \sa property(), propertyNames() - - FIXME: Superclass handling is badly broken -*/ - -int QMetaObject::findProperty( const char *name, bool super ) const -{ - return indexOfProperty( name ); -} - -#endif // TQT_NO_PROPERTIES - -bool QMetaProperty::writable() const -{ - return isWritable(); -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqmetaobject.h b/qtinterface/interface_tqt3/tqmetaobject.h index 9461469..304b42e 100644 --- a/qtinterface/interface_tqt3/tqmetaobject.h +++ b/qtinterface/interface_tqt3/tqmetaobject.h @@ -25,24 +25,6 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqconnection.h> #include <ntqstrlist.h> - -#ifdef USE_QT3 - -// Reimplement the QMetaObject class -// For Qt3, no changes are needed - #include <ntqmetaobject.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QMetaObject class -// For Qt4, some changes are needed - -#include <tqt4/Qt/ntqobjectdefs.h> -#include <tqt4/Qt/ntqmetaobject.h> - -#endif // USE_QT4 - #endif /* TQT_TQMETAOBJECT_H */ diff --git a/qtinterface/interface_tqt3/tqmime.h b/qtinterface/interface_tqt3/tqmime.h index 6c81ca5..7655ff9 100644 --- a/qtinterface/interface_tqt3/tqmime.h +++ b/qtinterface/interface_tqt3/tqmime.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQMIME_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QMime class -// For Qt3, no changes are needed - #include <ntqmime.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QMime class -// For Qt4, some changes are needed - -#include <Qt/ntqmime.h> - -#endif // USE_QT4 - #endif /* TQT_TQMIME_H */ diff --git a/qtinterface/interface_tqt3/tqmngio.h b/qtinterface/interface_tqt3/tqmngio.h index d2a02a4..53e924c 100644 --- a/qtinterface/interface_tqt3/tqmngio.h +++ b/qtinterface/interface_tqt3/tqmngio.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQMNGIO_H #include <tqt.h> - -#ifdef USE_QT3 - -// Pull in Qt3 qmngio defines - #include <ntqmngio.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Pull in Qt4 qmngio defines - -#include <ntqmngio.h> - -#endif // USE_QT4 - #endif /* TQT_TQMNGIO_H */ diff --git a/qtinterface/interface_tqt3/tqmodules.h b/qtinterface/interface_tqt3/tqmodules.h index a97c85a..01706d7 100644 --- a/qtinterface/interface_tqt3/tqmodules.h +++ b/qtinterface/interface_tqt3/tqmodules.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQMODULES_H #include <tqt.h> - -#ifdef USE_QT3 - -// Pull in Qt3 modules defines - #include <ntqmodules.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Pull in Qt4 modules defines - -#include <ntqmodules.h> - -#endif // USE_QT4 - #endif /* TQT_TQMODULES_H */ diff --git a/qtinterface/interface_tqt3/tqmotifplusstyle.h b/qtinterface/interface_tqt3/tqmotifplusstyle.h index 1a325cc..efe1ebb 100644 --- a/qtinterface/interface_tqt3/tqmotifplusstyle.h +++ b/qtinterface/interface_tqt3/tqmotifplusstyle.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQMOTIFPLUSSTYLE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QMotifPlusStyle class -// For Qt3, no changes are needed - #include <ntqmotifplusstyle.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QMotifPlusStyle class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQMOTIFPLUSSTYLE_H */ diff --git a/qtinterface/interface_tqt3/tqmotifstyle.h b/qtinterface/interface_tqt3/tqmotifstyle.h index edca12f..9dbe680 100644 --- a/qtinterface/interface_tqt3/tqmotifstyle.h +++ b/qtinterface/interface_tqt3/tqmotifstyle.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQMOTIFSTYLE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QMotifStyle class -// For Qt3, no changes are needed - #include <ntqmotifstyle.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QMotifStyle class -// For Qt4, some changes are needed - -#include <Qt/ntqmotifstyle.h> - -#endif // USE_QT4 - #endif /* TQT_TQACCEL_H */ diff --git a/qtinterface/interface_tqt3/tqmovie.cpp b/qtinterface/interface_tqt3/tqmovie.cpp index 3cf3142..d502b2a 100644 --- a/qtinterface/interface_tqt3/tqmovie.cpp +++ b/qtinterface/interface_tqt3/tqmovie.cpp @@ -21,37 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqmovie.h> - -#ifdef USE_QT4 - -// TQMovie::TQMovie(QObject *parent) : QMovie(parent) {} -// TQMovie::TQMovie(QIODevice *device, const QByteArray &format, QObject *parent) : QMovie(device, format, parent) {} -// TQMovie::TQMovie(const QString &fileName, const QByteArray &format, QObject *parent) : QMovie(fileName, format, parent) {} - -TQMovie::TQMovie(QObject *parent) { - d = new QMovie(parent); -} - -TQMovie::TQMovie(QIODevice *device, const QByteArray &format, QObject *parent) { - d = new QMovie(device, format, parent); -} - -TQMovie::TQMovie(const QString &fileName, const QByteArray &format, QObject *parent) { - d = new QMovie(fileName, format, parent); -} - -TQMovie::operator QMovie *() const { - return d; -} - -/*! - Makes this movie use the same data as movie \a movie. QMovies use - explicit sharing. -*/ -TQMovie& TQMovie::operator=(const TQMovie& movie) -{ - d = movie.d; - return *this; -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqmovie.h b/qtinterface/interface_tqt3/tqmovie.h index c3fc933..b3b8c8e 100644 --- a/qtinterface/interface_tqt3/tqmovie.h +++ b/qtinterface/interface_tqt3/tqmovie.h @@ -23,38 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQMOVIE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QMovie class -// For Qt3, no changes are needed - #include <ntqmovie.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QMovie class -// For Qt4, some changes are needed - -#include <tqt4/Qt/ntqmovie.h> - -class TQMovie { -public: - TQMovie(QObject *parent = 0); - explicit TQMovie(QIODevice *device, const QByteArray &format = QByteArray(), QObject *parent = 0); - explicit TQMovie(const QString &fileName, const QByteArray &format = QByteArray(), QObject *parent = 0); - ~TQMovie(); - - operator QMovie *() const; - - TQMovie& operator=(const TQMovie&); - -private: - QMovie *d; -}; - -#endif // USE_QT4 - #endif /* TQT_TQMOVIE_H */ diff --git a/qtinterface/interface_tqt3/tqmultilineedit.h b/qtinterface/interface_tqt3/tqmultilineedit.h index 6c024b5..e0e42a7 100644 --- a/qtinterface/interface_tqt3/tqmultilineedit.h +++ b/qtinterface/interface_tqt3/tqmultilineedit.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQMULTILINEEDIT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QMultiLineEdit class -// For Qt3, no changes are needed - #include <ntqmultilineedit.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QMultiLineEdit class -// For Qt4, some changes are needed - -#include <Qt/q3multilineedit.h> - -#endif // USE_QT4 - #endif /* TQT_TQMULTILINEEDIT_H */ diff --git a/qtinterface/interface_tqt3/tqmutex.h b/qtinterface/interface_tqt3/tqmutex.h index 5c095af..07e5e54 100644 --- a/qtinterface/interface_tqt3/tqmutex.h +++ b/qtinterface/interface_tqt3/tqmutex.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQMUTEX_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QMutex class -// For Qt3, no changes are needed - #include <ntqmutex.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QMutex class -// For Qt4, some changes are needed - -#include <Qt/ntqmutex.h> - -#endif // USE_QT4 - #endif /* TQT_TQMUTEX_H */ diff --git a/qtinterface/interface_tqt3/tqnamespace.h b/qtinterface/interface_tqt3/tqnamespace.h index 83133ef..c201dec 100644 --- a/qtinterface/interface_tqt3/tqnamespace.h +++ b/qtinterface/interface_tqt3/tqnamespace.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQNAMESPACE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QNamespace class -// For Qt3, no changes are needed - #include <ntqnamespace.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QNamespace class -// For Qt4, some changes are needed - -#include <Qt/ntqnamespace.h> - -#endif // USE_QT4 - #endif /* TQT_TQNAMESPACE_H */ diff --git a/qtinterface/interface_tqt3/tqnetwork.h b/qtinterface/interface_tqt3/tqnetwork.h index fea8edb..018272f 100644 --- a/qtinterface/interface_tqt3/tqnetwork.h +++ b/qtinterface/interface_tqt3/tqnetwork.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQNETWORK_H #include <tqt.h> - -#ifdef USE_QT3 - -// Pull in Qt3 qnetwork defines - #include <ntqnetwork.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Pull in Qt4 qnetwork defines - -#include <ntqnetwork.h> - -#endif // USE_QT4 - #endif /* TQT_TQNETWORK_H */ diff --git a/qtinterface/interface_tqt3/tqnetworkprotocol.h b/qtinterface/interface_tqt3/tqnetworkprotocol.h index 62c2ad0..2ae192b 100644 --- a/qtinterface/interface_tqt3/tqnetworkprotocol.h +++ b/qtinterface/interface_tqt3/tqnetworkprotocol.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQNETWORKPROTOCOL_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QNetworkProtocol class -// For Qt3, no changes are needed - #include <ntqnetworkprotocol.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QNetworkProtocol class -// For Qt4, some changes are needed - -#include <Qt/q3networkprotocol.h> - -#endif // USE_QT4 - #endif /* TQT_TQNETWORKPROTOCOL_H */ diff --git a/qtinterface/interface_tqt3/tqnp.h b/qtinterface/interface_tqt3/tqnp.h index 2954f53..2f14819 100644 --- a/qtinterface/interface_tqt3/tqnp.h +++ b/qtinterface/interface_tqt3/tqnp.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQNP_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QNPWidget class -// For Qt3, no changes are needed - #include <ntqnp.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QNPWidget class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQNP_H */ diff --git a/qtinterface/interface_tqt3/tqobject.cpp b/qtinterface/interface_tqt3/tqobject.cpp index 42d58a1..85215c4 100644 --- a/qtinterface/interface_tqt3/tqobject.cpp +++ b/qtinterface/interface_tqt3/tqobject.cpp @@ -21,34 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqobject.h> - -#ifdef USE_QT4 - -const QObjectList *QObject::objectTrees() { - QWidgetList widgetlist; - QObjectList *objectlist = new QObjectList; - widgetlist = QApplication::allWidgets(); - //widgetlist = QApplication::topLevelWidgets(); - - objectlist->clear(); - foreach (QWidget *curwidget, widgetlist) { - objectlist->append((QObject*)curwidget); - } - - return objectlist; -} - -const QObjectList *QObject::ptrchildren() const { - QObjectList ql; - QObjectList *qlr; - ql = this->children(); - qlr = &ql; - return qlr; -} - -bool QObject::qt_invoke(int slot, QUObject* uo) { - QMetaMethod method = uo->metaObject()->method(slot); - return method.invoke(this, Qt::DirectConnection); -} - -#endif diff --git a/qtinterface/interface_tqt3/tqobject.h b/qtinterface/interface_tqt3/tqobject.h index 0629732..1802bb3 100644 --- a/qtinterface/interface_tqt3/tqobject.h +++ b/qtinterface/interface_tqt3/tqobject.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQOBJECT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QObject class -// For Qt3, no changes are needed - #include <ntqobject.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QObject class -// For Qt4, some changes are needed - -#include <tqt4/Qt/ntqobject.h> - -#endif // USE_QT4 - #endif /* TQT_TQOBJECT_H */ diff --git a/qtinterface/interface_tqt3/tqobjectcleanuphandler.h b/qtinterface/interface_tqt3/tqobjectcleanuphandler.h index 00c24eb..fa5a936 100644 --- a/qtinterface/interface_tqt3/tqobjectcleanuphandler.h +++ b/qtinterface/interface_tqt3/tqobjectcleanuphandler.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQOBJECTCLEANUPHANDLER_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QObjectCleanupHandler class -// For Qt3, no changes are needed - #include <ntqobjectcleanuphandler.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QObjectCleanupHandler class -// For Qt4, some changes are needed - -#include <Qt/ntqobjectcleanuphandler.h> - -#endif // USE_QT4 - #endif /* TQT_TQOBJECTCLEANUPHANDLER_H */ diff --git a/qtinterface/interface_tqt3/tqobjectdefs.h b/qtinterface/interface_tqt3/tqobjectdefs.h index db4960f..237eaf4 100644 --- a/qtinterface/interface_tqt3/tqobjectdefs.h +++ b/qtinterface/interface_tqt3/tqobjectdefs.h @@ -23,9 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQOBJECTDEFS_H #include <tqt.h> - -// Pull in object definition defines - #include <ntqobjectdefs.h> #endif /* TQT_TQOBJECTDEFS_H */ diff --git a/qtinterface/interface_tqt3/tqobjectdict.h b/qtinterface/interface_tqt3/tqobjectdict.h index c5c9f46..266de05 100644 --- a/qtinterface/interface_tqt3/tqobjectdict.h +++ b/qtinterface/interface_tqt3/tqobjectdict.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQOBJECTDICT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QObjectDictionary class -// For Qt3, no changes are needed - #include <ntqobjectdict.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QObjectDictionary class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQOBJECTDICT_H */ diff --git a/qtinterface/interface_tqt3/tqobjectlist.h b/qtinterface/interface_tqt3/tqobjectlist.h index 521c520..5d70e7e 100644 --- a/qtinterface/interface_tqt3/tqobjectlist.h +++ b/qtinterface/interface_tqt3/tqobjectlist.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQOBJECTLIST_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QObjectList class -// For Qt3, no changes are needed - #include <ntqobjectlist.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QObjectList class -// For Qt4, some changes are needed - -#include <Qt/ntqobject.h> - -#endif // USE_QT4 - #endif /* TQT_TQOBJECTLIST_H */ diff --git a/qtinterface/interface_tqt3/tqpaintdevice.cpp b/qtinterface/interface_tqt3/tqpaintdevice.cpp index 457d37d..eed94dd 100644 --- a/qtinterface/interface_tqt3/tqpaintdevice.cpp +++ b/qtinterface/interface_tqt3/tqpaintdevice.cpp @@ -21,103 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqpaintdevice.h> - -#ifdef USE_QT4 - -// the following is necessary to work around breakage in many versions -// of XFree86's Xlib.h still in use -// ### which versions? -#if defined(_XLIB_H_) // crude hack, but... -#error "cannot include <X11/Xlib.h> before this file" -#endif -#define XRegisterIMInstantiateCallback qt_XRegisterIMInstantiateCallback -#define XUnregisterIMInstantiateCallback qt_XUnregisterIMInstantiateCallback -#define XSetIMValues qt_XSetIMValues -#include <X11/Xlib.h> -#undef XRegisterIMInstantiateCallback -#undef XUnregisterIMInstantiateCallback -#undef XSetIMValues - -#include <X11/Xutil.h> -#include <X11/Xos.h> -#include <X11/Xatom.h> - -#include <Qt/qcolormap.h> - -/*! - Returns the window system handle of the paint device for XRender - support. Use of this function is not portable. This function will - return 0 if XRender support is not compiled into Qt, if the - XRender extension is not supported on the X11 display, or if the - handle could not be created. -*/ -Qt::HANDLE QPaintDevice::x11RenderHandle() const -{ -// #ifndef TQT_NO_XFTFREETYPE -// return rendhd ? XftDrawPicture( (XftDraw *) rendhd ) : 0; -// #else - return 0; -// #endif // TQT_NO_XFTFREETYPE -} - -static GC* app_gc_tmp = 0; // temporary GC -static GC* app_gc_tmp_m = 0; // temporary GC (monochrome) - -static GC create_gc( int scrn, bool monochrome ) -{ - GC gc; - Display *appDpy = QX11Info::display(); - if ( monochrome ) { - Pixmap pm = XCreatePixmap( appDpy, RootWindow( appDpy, scrn ), 8, 8, 1 ); - gc = XCreateGC( appDpy, pm, 0, 0 ); - XFreePixmap( appDpy, pm ); - } else { - if ( QPaintDevice::x11AppDefaultVisual( scrn ) ) { - gc = XCreateGC( appDpy, RootWindow( appDpy, scrn ), 0, 0 ); - } else { - Window w; - XSetWindowAttributes a; - QColormap cmap_background = QColormap::instance( scrn ); - QColormap cmap_border = QColormap::instance( scrn ); - a.background_pixel = cmap_background.pixel( Qt::black ); - a.border_pixel = cmap_border.pixel( Qt::black ); - - a.colormap = QPaintDevice::x11AppColormap( scrn ); - w = XCreateWindow( appDpy, RootWindow( appDpy, scrn ), 0, 0, 100, 100, - 0, QPaintDevice::x11AppDepth( scrn ), InputOutput, - (Visual*)QPaintDevice::x11AppVisual( scrn ), - CWBackPixel|CWBorderPixel|CWColormap, &a ); - gc = XCreateGC( appDpy, w, 0, 0 ); - XDestroyWindow( appDpy, w ); - } - } - XSetGraphicsExposures( appDpy, gc, False ); - return gc; -} - -GC qt_xget_temp_gc( int scrn, bool monochrome ) // get temporary GC -{ - int appScreenCount = QApplication::desktop()->numScreens(); - if ( scrn < 0 || scrn >= appScreenCount ) { - qDebug("invalid screen (tmp) %d %d", scrn, appScreenCount ); - QWidget* bla = 0; - bla->setName("hello"); - } - GC gc; - if ( monochrome ) { - if ( !app_gc_tmp_m ) // create GC for bitmap - memset( (app_gc_tmp_m = new GC[appScreenCount]), 0, appScreenCount * sizeof( GC ) ); - if ( !app_gc_tmp_m[scrn] ) - app_gc_tmp_m[scrn] = create_gc( scrn, TRUE ); - gc = app_gc_tmp_m[scrn]; - } else { // create standard GC - if ( !app_gc_tmp ) - memset( (app_gc_tmp = new GC[appScreenCount]), 0, appScreenCount * sizeof( GC ) ); - if ( !app_gc_tmp[scrn] ) - app_gc_tmp[scrn] = create_gc( scrn, FALSE ); - gc = app_gc_tmp[scrn]; - } - return gc; -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqpaintdevice.h b/qtinterface/interface_tqt3/tqpaintdevice.h index 4f3eed1..47eeaa5 100644 --- a/qtinterface/interface_tqt3/tqpaintdevice.h +++ b/qtinterface/interface_tqt3/tqpaintdevice.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPAINTDEVICE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPaintDevice class -// For Qt3, no changes are needed - #include <ntqpaintdevice.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPaintDevice class -// For Qt4, some changes are needed - -#include <tqt4/Qt/ntqpaintdevice.h> - -#endif // USE_QT4 - #endif /* TQT_TQPAINTDEVICE_H */ diff --git a/qtinterface/interface_tqt3/tqpaintdevicemetrics.h b/qtinterface/interface_tqt3/tqpaintdevicemetrics.h index e903008..6637bfc 100644 --- a/qtinterface/interface_tqt3/tqpaintdevicemetrics.h +++ b/qtinterface/interface_tqt3/tqpaintdevicemetrics.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPAINTDEVICEMETRICS_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPaintDeviceMetrics class -// For Qt3, no changes are needed - #include <ntqpaintdevicemetrics.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPaintDeviceMetrics class -// For Qt4, some changes are needed - -#include <Qt/q3paintdevicemetrics.h> - -#endif // USE_QT4 - #endif /* TQT_TQPAINTDEVICEMETRICS_H */ diff --git a/qtinterface/interface_tqt3/tqpainter.cpp b/qtinterface/interface_tqt3/tqpainter.cpp index ae835c4..62161f6 100644 --- a/qtinterface/interface_tqt3/tqpainter.cpp +++ b/qtinterface/interface_tqt3/tqpainter.cpp @@ -21,24 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqpainter.h> - -#ifdef USE_QT4 - -void Q3Painter::setRasterOp( Qt::RasterOp ) { - // Do nothing! - #warning "Q3Painter::setRasterOp is unimplemented!" -} - -Q3Painter::Q3Painter( const QPaintDevice * pdev, bool unclipped ) : QPainter(const_cast<QPaintDevice *>(pdev)) { - setClipping(!unclipped); -} - -// void Q3Painter::flush( const QRegion ®ion, CoordinateMode cm = CoordDevice ) { -// #warning "Q3Painter::flush is unimplemented!" -// } - -void Q3Painter::flush() { - #warning "Q3Painter::flush is unimplemented!" -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqpainter.h b/qtinterface/interface_tqt3/tqpainter.h index 97879a8..64521e3 100644 --- a/qtinterface/interface_tqt3/tqpainter.h +++ b/qtinterface/interface_tqt3/tqpainter.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPAINTER_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPainter class -// For Qt3, no changes are needed - #include <ntqpainter.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPainter class -// For Qt4, some changes are needed - -#include <tqt4/Qt/q3painter.h> - -#endif // USE_QT4 - #endif /* TQT_TQPAINTER_H */ diff --git a/qtinterface/interface_tqt3/tqpair.h b/qtinterface/interface_tqt3/tqpair.h index dd511ec..39fcc52 100644 --- a/qtinterface/interface_tqt3/tqpair.h +++ b/qtinterface/interface_tqt3/tqpair.h @@ -23,121 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPAIR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPair class -// For Qt3, no changes are needed - #include <ntqpair.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPair class -// For Qt4, some changes are needed - -#include <Qt/ntqpair.h> - -/**************************************************************************** -** -** Definition of TQPair class -** -** -** Copyright (C) 1992-2005 Trolltech AS. All rights reserved. -** -** This file is part of the tools module of the Qt GUI Toolkit. -** -** This file may be distributed under the terms of the Q Public License -** as defined by Trolltech AS of Norway and appearing in the file -** LICENSE.QPL included in the packaging of this file. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** See http://www.trolltech.com/qpl/ for QPL licensing information. -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -template <class T1, class T2> -struct TQPair -{ - typedef T1 first_type; - typedef T2 second_type; - - TQPair() - : first( T1() ), second( T2() ) - {} - TQPair( const T1& t1, const T2& t2 ) - : first( t1 ), second( t2 ) - {} - - TQPair<T1, T2>& operator=(const TQPair<T1, T2>& other) - { - if (this != &other) { - first = other.first; - second = other.second; - } - return *this; - } - - T1 first; - T2 second; -}; - -template <class T1, class T2> -bool operator==( const TQPair<T1, T2>& x, const TQPair<T1, T2>& y ) -{ - return x.first == y.first && x.second == y.second; -} - -template <class T1, class T2> -bool operator<( const TQPair<T1, T2>& x, const TQPair<T1, T2>& y ) -{ - return x.first < y.first || - ( !( y.first < x.first ) && x.second < y.second ); -} - -template <class T1, class T2> -TQPair<T1, T2> qMakePair( const T1& x, const T2& y ) -{ - return TQPair<T1, T2>( x, y ); -} - -#ifndef TQT_NO_DATASTREAM -template <class T1, class T2> -inline QDataStream& operator>>( QDataStream& s, TQPair<T1, T2>& p ) -{ - s >> p.first >> p.second; - return s; -} - -template <class T1, class T2> -inline QDataStream& operator<<( QDataStream& s, const TQPair<T1, T2>& p ) -{ - s << p.first << p.second; - return s; -} -#endif - -/**********************************************************************/ - -#endif // USE_QT4 - #endif /* TQT_TQPAIR_H */ diff --git a/qtinterface/interface_tqt3/tqpalette.h b/qtinterface/interface_tqt3/tqpalette.h index a59b736..2c6646b 100644 --- a/qtinterface/interface_tqt3/tqpalette.h +++ b/qtinterface/interface_tqt3/tqpalette.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPALETTE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPalette class -// For Qt3, no changes are needed - #include <ntqpalette.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPalette class -// For Qt4, some changes are needed - -#include <Qt/ntqpalette.h> - -#endif // USE_QT4 - #endif /* TQT_TQPALETTE_H */ diff --git a/qtinterface/interface_tqt3/tqpen.h b/qtinterface/interface_tqt3/tqpen.h index bc8075d..fc9a06e 100644 --- a/qtinterface/interface_tqt3/tqpen.h +++ b/qtinterface/interface_tqt3/tqpen.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPEN_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPen class -// For Qt3, no changes are needed - #include <ntqpen.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPen class -// For Qt4, some changes are needed - -#include <Qt/ntqpen.h> - -#endif // USE_QT4 - #endif /* TQT_TQPEN_H */ diff --git a/qtinterface/interface_tqt3/tqpicture.h b/qtinterface/interface_tqt3/tqpicture.h index d7785a0..a442bbe 100644 --- a/qtinterface/interface_tqt3/tqpicture.h +++ b/qtinterface/interface_tqt3/tqpicture.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPICTURE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPicture class -// For Qt3, no changes are needed - #include <ntqpicture.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPicture class -// For Qt4, some changes are needed - -#include <Qt/q3picture.h> - -#endif // USE_QT4 - #endif /* TQT_TQPICTURE_H */ diff --git a/qtinterface/interface_tqt3/tqpixmap.cpp b/qtinterface/interface_tqt3/tqpixmap.cpp index 7b5c9dd..579171b 100644 --- a/qtinterface/interface_tqt3/tqpixmap.cpp +++ b/qtinterface/interface_tqt3/tqpixmap.cpp @@ -21,46 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqpixmap.h> - -#ifdef USE_QT4 - -#include <Qt/ntqbitmap.h> -#include <qt4/QtGui/private/qpixmapdata_p.h> - -bool QPixmap::convertFromImage(const QImage &img, int flags) { - return convertFromImage(img, (Qt::ImageConversionFlags)flags); -} - -QPixmap::Optimization QPixmap::optimization() const { - #warning "QPixmap::optimization() unimplemented!" - return QPixmap::NormalOptim; -} - -void QPixmap::setOptimization( QPixmap::Optimization ) { - #warning "QPixmap::setOptimization unimplemented!" -} - -QPixmap::Optimization defaultOptimization() { - #warning "QPixmap::Optimization unimplemented!" - return QPixmap::NormalOptim; -} - -void QPixmap::setDefaultOptimization( QPixmap::Optimization ) { - #warning "QPixmap::setDefaultOptimization unimplemented!" -} - -QPixmap::QPixmap( int w, int h, int depth, Optimization optim ) { - QPixmap(w, h); -} - -QPixmap::operator QPixmap *() const { - return const_cast<QPixmap *>(this); -} - -const QBitmap *QPixmap::ptrmask() const { - QBitmap pm = mask(); - QBitmap *pr = ± - return pr; -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqpixmap.h b/qtinterface/interface_tqt3/tqpixmap.h index e057922..df65242 100644 --- a/qtinterface/interface_tqt3/tqpixmap.h +++ b/qtinterface/interface_tqt3/tqpixmap.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPIXMAP_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPixmap class -// For Qt3, no changes are needed - #include <ntqpixmap.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPixmap class -// For Qt4, some changes are needed - -#include <tqt4/Qt/ntqpixmap.h> - -#endif // USE_QT4 - #endif /* TQT_TQPIXMAP_H */ diff --git a/qtinterface/interface_tqt3/tqpixmapcache.h b/qtinterface/interface_tqt3/tqpixmapcache.h index cfd1c88..9ef1755 100644 --- a/qtinterface/interface_tqt3/tqpixmapcache.h +++ b/qtinterface/interface_tqt3/tqpixmapcache.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPIXMAPCACHE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPixmapCache class -// For Qt3, no changes are needed - #include <ntqpixmapcache.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPixmapCache class -// For Qt4, some changes are needed - -#include <Qt/ntqpixmapcache.h> - -#endif // USE_QT4 - #endif /* TQT_TQPIXMAPCACHE_H */ diff --git a/qtinterface/interface_tqt3/tqplatinumstyle.h b/qtinterface/interface_tqt3/tqplatinumstyle.h index 93119a9..581178f 100644 --- a/qtinterface/interface_tqt3/tqplatinumstyle.h +++ b/qtinterface/interface_tqt3/tqplatinumstyle.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPLATINUMSTYLE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPlatinumStyle class -// For Qt3, no changes are needed - #include <ntqplatinumstyle.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPlatinumStyle class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQPLATINUMSTYLE_H */ diff --git a/qtinterface/interface_tqt3/tqpngio.h b/qtinterface/interface_tqt3/tqpngio.h index bbe3850..618689a 100644 --- a/qtinterface/interface_tqt3/tqpngio.h +++ b/qtinterface/interface_tqt3/tqpngio.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPNGIO_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPNGImage class -// For Qt3, no changes are needed - #include <ntqpngio.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPNGImage class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQPNGIO_H */ diff --git a/qtinterface/interface_tqt3/tqpoint.h b/qtinterface/interface_tqt3/tqpoint.h index 67316b9..ea24a52 100644 --- a/qtinterface/interface_tqt3/tqpoint.h +++ b/qtinterface/interface_tqt3/tqpoint.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPOINT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPoint class -// For Qt3, no changes are needed - #include <ntqpoint.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPoint class -// For Qt4, some changes are needed - -#include <Qt/ntqpoint.h> - -#endif // USE_QT4 - #endif /* TQT_TQPOINT_H */ diff --git a/qtinterface/interface_tqt3/tqpointarray.cpp b/qtinterface/interface_tqt3/tqpointarray.cpp index c8d4165..83da1f3 100644 --- a/qtinterface/interface_tqt3/tqpointarray.cpp +++ b/qtinterface/interface_tqt3/tqpointarray.cpp @@ -21,20 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqpointarray.h> - -#ifdef USE_QT4 - -/*! - \internal - Constructs a point array with \a nPoints points, taken from the - \a points array. - - Equivalent to setPoints(nPoints, points). -*/ - -Q3PointArray::Q3PointArray( int nPoints, const QCOORD *points ) -{ - setPoints( nPoints, points ); -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqpointarray.h b/qtinterface/interface_tqt3/tqpointarray.h index 3a9ff76..d85d0df 100644 --- a/qtinterface/interface_tqt3/tqpointarray.h +++ b/qtinterface/interface_tqt3/tqpointarray.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPOINTARRAY_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QAccel class -// For Qt3, no changes are needed - #include <ntqpointarray.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QAccel class -// For Qt4, some changes are needed - -#include <tqt4/Qt/q3pointarray.h> - -#endif // USE_QT4 - #endif /* TQT_TQPOINTARRAY_H */ diff --git a/qtinterface/interface_tqt3/tqpolygonscanner.h b/qtinterface/interface_tqt3/tqpolygonscanner.h index 7f0fbf7..74f2b6b 100644 --- a/qtinterface/interface_tqt3/tqpolygonscanner.h +++ b/qtinterface/interface_tqt3/tqpolygonscanner.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPOLYGONSCANNER_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPolygonScanner class -// For Qt3, no changes are needed - #include <ntqpolygonscanner.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPolygonScanner class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQPOLYGONSCANNER_H */ diff --git a/qtinterface/interface_tqt3/tqpopupmenu.cpp b/qtinterface/interface_tqt3/tqpopupmenu.cpp index 46c3186..b9c4bcd 100644 --- a/qtinterface/interface_tqt3/tqpopupmenu.cpp +++ b/qtinterface/interface_tqt3/tqpopupmenu.cpp @@ -21,23 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqpopupmenu.h> - -#ifdef USE_QT4 - -void Q3PopupMenu::changeItem( int id, const QString &text ) { - changeItem( text, id ); -} - -void Q3PopupMenu::changeItem( const QString &text, int id ) { - changeItem( text, id ); -} - -void Q3PopupMenu::changeItem( const QPixmap &pixmap, int id ) { - changeItem( pixmap, id ); -} - -void Q3PopupMenu::changeItem( const QIconSet &icon, const QString &text, int id ) { - changeItem( icon, text, id ); -} - -#endif diff --git a/qtinterface/interface_tqt3/tqpopupmenu.h b/qtinterface/interface_tqt3/tqpopupmenu.h index 7157837..6f7244e 100644 --- a/qtinterface/interface_tqt3/tqpopupmenu.h +++ b/qtinterface/interface_tqt3/tqpopupmenu.h @@ -23,24 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPOPUPMENU_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPopupMenu class -// For Qt3, no changes are needed - #include <ntqpopupmenu.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPopupMenu class -// For Qt4, some changes are needed - -#include <tqt4/Qt/q3popupmenu.h> -#include <tqt4/Qt/ntqmenudata.h> - -#endif // USE_QT4 - #endif /* TQT_TQPOPUPMENU_H */ diff --git a/qtinterface/interface_tqt3/tqprintdialog.h b/qtinterface/interface_tqt3/tqprintdialog.h index edc2c77..d7f2b27 100644 --- a/qtinterface/interface_tqt3/tqprintdialog.h +++ b/qtinterface/interface_tqt3/tqprintdialog.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPRINTDIALOG_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPrintDialog class -// For Qt3, no changes are needed - #include <ntqprintdialog.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPrintDialog class -// For Qt4, some changes are needed - -#include <Qt/ntqprintdialog.h> - -#endif // USE_QT4 - #endif /* TQT_TQPRINTDIALOG_H */ diff --git a/qtinterface/interface_tqt3/tqprinter.h b/qtinterface/interface_tqt3/tqprinter.h index 5e1baba..18893de 100644 --- a/qtinterface/interface_tqt3/tqprinter.h +++ b/qtinterface/interface_tqt3/tqprinter.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPRINTER_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPrinter class -// For Qt3, no changes are needed - #include <ntqprinter.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPrinter class -// For Qt4, some changes are needed - -#include <Qt/ntqprinter.h> - -#endif // USE_QT4 - #endif /* TQT_TQPRINTER_H */ diff --git a/qtinterface/interface_tqt3/tqprocess.h b/qtinterface/interface_tqt3/tqprocess.h index ae96308..ad56ce8 100644 --- a/qtinterface/interface_tqt3/tqprocess.h +++ b/qtinterface/interface_tqt3/tqprocess.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPROCESS_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QProcess class -// For Qt3, no changes are needed - #include <ntqprocess.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QProcess class -// For Qt4, some changes are needed - -#include <Qt/ntqprocess.h> - -#endif // USE_QT4 - #endif /* TQT_TQPROCESS_H */ diff --git a/qtinterface/interface_tqt3/tqprogressbar.h b/qtinterface/interface_tqt3/tqprogressbar.h index d8f6106..807e514 100644 --- a/qtinterface/interface_tqt3/tqprogressbar.h +++ b/qtinterface/interface_tqt3/tqprogressbar.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPROGRESSBAR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QProgressBar class -// For Qt3, no changes are needed - #include <ntqprogressbar.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QProgressBar class -// For Qt4, some changes are needed - -#include <Qt/ntqprogressbar.h> - -#endif // USE_QT4 - #endif /* TQT_TQPROGRESSBAR_H */ diff --git a/qtinterface/interface_tqt3/tqprogressdialog.h b/qtinterface/interface_tqt3/tqprogressdialog.h index 116867f..9a908e7 100644 --- a/qtinterface/interface_tqt3/tqprogressdialog.h +++ b/qtinterface/interface_tqt3/tqprogressdialog.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPROGRESSDIALOG_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QProgressDialog class -// For Qt3, no changes are needed - #include <ntqprogressdialog.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QProgressDialog class -// For Qt4, some changes are needed - -#include <Qt/q3progressdialog.h> - -#endif // USE_QT4 - #endif /* TQT_TQPROGRESSDIALOG_H */ diff --git a/qtinterface/interface_tqt3/tqptrcollection.h b/qtinterface/interface_tqt3/tqptrcollection.h index 2901086..663324b 100644 --- a/qtinterface/interface_tqt3/tqptrcollection.h +++ b/qtinterface/interface_tqt3/tqptrcollection.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPTRCOLLECTION_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPtrCollection class -// For Qt3, no changes are needed - #include <ntqptrcollection.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPtrCollection class -// For Qt4, some changes are needed - -#include <Qt/q3ptrcollection.h> - -#endif // USE_QT4 - #endif /* TQT_TQPTRCOLLECTION_H */ diff --git a/qtinterface/interface_tqt3/tqptrdict.h b/qtinterface/interface_tqt3/tqptrdict.h index 782e662..c178a8b 100644 --- a/qtinterface/interface_tqt3/tqptrdict.h +++ b/qtinterface/interface_tqt3/tqptrdict.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPTRDICT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPtrDict class -// For Qt3, no changes are needed - #include <ntqptrdict.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPtrDict class -// For Qt4, some changes are needed - -#include <Qt/q3ptrdict.h> - -#endif // USE_QT4 - #endif /* TQT_TQPTRDICT_H */ diff --git a/qtinterface/interface_tqt3/tqptrlist.h b/qtinterface/interface_tqt3/tqptrlist.h index 9b571a5..24fd6f0 100644 --- a/qtinterface/interface_tqt3/tqptrlist.h +++ b/qtinterface/interface_tqt3/tqptrlist.h @@ -23,230 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPTRLIST_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the TQPtrList class -// For Qt3, no changes are needed - #include <ntqptrlist.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the TQPtrList class -// For Qt4, some changes are needed - -#include <Qt/q3ptrlist.h> -#include <Qt/q3glist.h> -#include <Qt/q3gvector.h> -#include <Qt/q3ptrcollection.h> -#include <Qt/ntqlist.h> - -/**************************************************************************** -** -** Definition of TQPtrList template/macro class -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the tools module of the Qt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free Qt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.QPL -** included in the packaging of this file. Licensees holding valid Qt -** Commercial licenses may use this file in accordance with the Qt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -template<class type> -class TQPtrListStdIterator : public Q3GListStdIterator -{ -public: - inline TQPtrListStdIterator( Q3LNode* n ): Q3GListStdIterator(n) {} - type *operator*() { return node ? (type *)node->getData() : 0; } - inline TQPtrListStdIterator<type> operator++() - { node = next(); return *this; } - inline TQPtrListStdIterator<type> operator++(int) - { Q3LNode* n = node; node = next(); return TQPtrListStdIterator<type>( n ); } - inline bool operator==( const TQPtrListStdIterator<type>& it ) const { return node == it.node; } - inline bool operator!=( const TQPtrListStdIterator<type>& it ) const { return node != it.node; } -}; - - -template<class type> -class TQPtrList -#ifdef Q_QDOC - : public Q3PtrCollection -#else - : public Q3GList -#endif -{ -public: - - TQPtrList() {} - TQPtrList( const TQPtrList<type> &l ) : Q3GList(l) {} - ~TQPtrList() { clear(); } - TQPtrList<type> &operator=(const TQPtrList<type> &l) - { return (TQPtrList<type>&)Q3GList::operator=(l); } - bool operator==( const TQPtrList<type> &list ) const - { return Q3GList::operator==( list ); } - bool operator!=( const TQPtrList<type> &list ) const - { return !Q3GList::operator==( list ); } - - // Interoperability - TQPtrList(const QList<type*>& l) - { - for (int i = 0; i < l.size(); ++i) append(l.at(i)); - } - - TQPtrList<type>& operator= (const QList<type*>& l) - { - this->clear(); - for (int i = 0; i < l.size(); ++i) append(l.at(i)); - return *this; - } - - operator QList<type*>() const { - QList<type*> list; - for (typename TQPtrList<type>::const_iterator it = TQPtrList<type>::constBegin(); - it != TQPtrList<type>::constEnd(); ++it) - list.append(*it); - return list; - } - - uint count() const { return Q3GList::count(); } - bool isEmpty() const { return Q3GList::count() == 0; } - bool insert( uint i, const type *d){ return Q3GList::insertAt(i,(Q3PtrCollection::Item)d); } - void inSort( const type *d ) { Q3GList::inSort((Q3PtrCollection::Item)d); } - void prepend( const type *d ) { Q3GList::insertAt(0,(Q3PtrCollection::Item)d); } - void append( const type *d ) { Q3GList::append((Q3PtrCollection::Item)d); } - bool remove( uint i ) { return Q3GList::removeAt(i); } - bool remove() { return Q3GList::remove((Q3PtrCollection::Item)0); } - bool remove( const type *d ) { return Q3GList::remove((Q3PtrCollection::Item)d); } - bool removeRef( const type *d ) { return Q3GList::removeRef((Q3PtrCollection::Item)d); } - void removeNode( Q3LNode *n ) { Q3GList::removeNode(n); } - bool removeFirst() { return Q3GList::removeFirst(); } - bool removeLast() { return Q3GList::removeLast(); } - type *take( uint i ) { return (type *)Q3GList::takeAt(i); } - type *take() { return (type *)Q3GList::take(); } - type *takeNode( Q3LNode *n ) { return (type *)Q3GList::takeNode(n); } - void clear() { Q3GList::clear(); } - void sort() { Q3GList::sort(); } - int find( const type *d ) { return Q3GList::find((Q3PtrCollection::Item)d); } - int findNext( const type *d ) { return Q3GList::find((Q3PtrCollection::Item)d,FALSE); } - int findRef( const type *d ) { return Q3GList::findRef((Q3PtrCollection::Item)d); } - int findNextRef( const type *d ){ return Q3GList::findRef((Q3PtrCollection::Item)d,FALSE);} - uint contains( const type *d ) const { return Q3GList::contains((Q3PtrCollection::Item)d); } - uint containsRef( const type *d ) const - { return Q3GList::containsRef((Q3PtrCollection::Item)d); } - bool replace( uint i, const type *d ) { return Q3GList::replaceAt( i, (Q3PtrCollection::Item)d ); } - type *at( uint i ) { return (type *)Q3GList::at(i); } - int at() const { return Q3GList::at(); } - type *current() const { return (type *)Q3GList::get(); } - Q3LNode *currentNode() const { return Q3GList::currentNode(); } - type *getFirst() const { return (type *)Q3GList::cfirst(); } - type *getLast() const { return (type *)Q3GList::clast(); } - type *first() { return (type *)Q3GList::first(); } - type *last() { return (type *)Q3GList::last(); } - type *next() { return (type *)Q3GList::next(); } - type *prev() { return (type *)Q3GList::prev(); } - void toVector( Q3GVector *vec )const{ Q3GList::toVector(vec); } - - - // standard iterators - typedef TQPtrListStdIterator<type> Iterator; - typedef TQPtrListStdIterator<type> ConstIterator; - inline Iterator begin() { return Q3GList::begin(); } - inline ConstIterator begin() const { return Q3GList::begin(); } - inline ConstIterator constBegin() const { return Q3GList::begin(); } - inline Iterator end() { return Q3GList::end(); } - inline ConstIterator end() const { return Q3GList::end(); } - inline ConstIterator constEnd() const { return Q3GList::end(); } - inline Iterator erase( Iterator it ) { return Q3GList::erase( it ); } - // stl syntax compatibility - typedef Iterator iterator; - typedef ConstIterator const_iterator; - - -#ifdef Q_QDOC -protected: - virtual int compareItems( Q3PtrCollection::Item, Q3PtrCollection::Item ); - virtual QDataStream& read( QDataStream&, Q3PtrCollection::Item& ); - virtual QDataStream& write( QDataStream&, Q3PtrCollection::Item ) const; -#endif - -private: - void deleteItem( Item d ); -}; - -#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION) -template<> inline void TQPtrList<void>::deleteItem( Q3PtrCollection::Item ) -{ -} -#endif - -template<class type> inline void TQPtrList<type>::deleteItem( Q3PtrCollection::Item d ) -{ - if ( del_item ) delete (type *)d; -} - -template<class type> -class TQPtrListIterator : public Q3GListIterator -{ -public: - TQPtrListIterator(const TQPtrList<type> &l) :Q3GListIterator((Q3GList &)l) {} - ~TQPtrListIterator() {} - uint count() const { return list->count(); } - bool isEmpty() const { return list->count() == 0; } - bool atFirst() const { return Q3GListIterator::atFirst(); } - bool atLast() const { return Q3GListIterator::atLast(); } - type *toFirst() { return (type *)Q3GListIterator::toFirst(); } - type *toLast() { return (type *)Q3GListIterator::toLast(); } - operator type *() const { return (type *)Q3GListIterator::get(); } - type *operator*() { return (type *)Q3GListIterator::get(); } - - // No good, since TQPtrList<char> (ie. QStrList fails... - // - // MSVC++ gives warning - // Sunpro C++ 4.1 gives error - // type *operator->() { return (type *)Q3GListIterator::get(); } - - type *current() const { return (type *)Q3GListIterator::get(); } - type *operator()() { return (type *)Q3GListIterator::operator()();} - type *operator++() { return (type *)Q3GListIterator::operator++(); } - type *operator+=(uint j) { return (type *)Q3GListIterator::operator+=(j);} - type *operator--() { return (type *)Q3GListIterator::operator--(); } - type *operator-=(uint j) { return (type *)Q3GListIterator::operator-=(j);} - TQPtrListIterator<type>& operator=(const TQPtrListIterator<type>&it) - { Q3GListIterator::operator=(it); return *this; } -}; - -/**********************************************************************/ - -#endif // USE_QT4 - #endif /* TQT_TQPTRLIST_H */ diff --git a/qtinterface/interface_tqt3/tqptrqueue.h b/qtinterface/interface_tqt3/tqptrqueue.h index 254765a..45b2f50 100644 --- a/qtinterface/interface_tqt3/tqptrqueue.h +++ b/qtinterface/interface_tqt3/tqptrqueue.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPTRQUEUE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPtrQueue class -// For Qt3, no changes are needed - #include <ntqptrqueue.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPtrQueue class -// For Qt4, some changes are needed - -#include <Qt/q3ptrqueue.h> - -#endif // USE_QT4 - #endif /* TQT_TQPTRQUEUE_H */ diff --git a/qtinterface/interface_tqt3/tqptrstack.h b/qtinterface/interface_tqt3/tqptrstack.h index 38317bf..4253813 100644 --- a/qtinterface/interface_tqt3/tqptrstack.h +++ b/qtinterface/interface_tqt3/tqptrstack.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPTRSTACK_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPtrStack class -// For Qt3, no changes are needed - #include <ntqptrstack.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPtrStack class -// For Qt4, some changes are needed - -#include <Qt/q3ptrstack.h> - -#endif // USE_QT4 - #endif /* TQT_TQPTRSTACK_H */ diff --git a/qtinterface/interface_tqt3/tqptrvector.h b/qtinterface/interface_tqt3/tqptrvector.h index 282adbb..99befdd 100644 --- a/qtinterface/interface_tqt3/tqptrvector.h +++ b/qtinterface/interface_tqt3/tqptrvector.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPTRVECTOR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPtrVector class -// For Qt3, no changes are needed - #include <ntqptrvector.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPtrVector class -// For Qt4, some changes are needed - -#include <Qt/q3ptrvector.h> - -#endif // USE_QT4 - #endif /* TQT_TQPTRVECTOR_H */ diff --git a/qtinterface/interface_tqt3/tqpushbutton.h b/qtinterface/interface_tqt3/tqpushbutton.h index e434209..6ca6867 100644 --- a/qtinterface/interface_tqt3/tqpushbutton.h +++ b/qtinterface/interface_tqt3/tqpushbutton.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQPUSHBUTTON_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QPushButton class -// For Qt3, no changes are needed - #include <ntqpushbutton.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QPushButton class -// For Qt4, some changes are needed - -#include <Qt/ntqpushbutton.h> - -#endif // USE_QT4 - #endif /* TQT_TQPUSHBUTTON_H */ diff --git a/qtinterface/interface_tqt3/tqradiobutton.h b/qtinterface/interface_tqt3/tqradiobutton.h index e61c6c2..20a880f 100644 --- a/qtinterface/interface_tqt3/tqradiobutton.h +++ b/qtinterface/interface_tqt3/tqradiobutton.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQRADIOBUTTON_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QRadioButton class -// For Qt3, no changes are needed - #include <ntqradiobutton.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QRadioButton class -// For Qt4, some changes are needed - -#include <Qt/ntqradiobutton.h> - -#endif // USE_QT4 - #endif /* TQT_TQRADIOBUTTON_H */ diff --git a/qtinterface/interface_tqt3/tqrangecontrol.h b/qtinterface/interface_tqt3/tqrangecontrol.h index efcdcdb..d91d3ff 100644 --- a/qtinterface/interface_tqt3/tqrangecontrol.h +++ b/qtinterface/interface_tqt3/tqrangecontrol.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQRANGECONTROL_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QRangeControl class -// For Qt3, no changes are needed - #include <ntqrangecontrol.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QRangeControl class -// For Qt4, some changes are needed - -#include <Qt/q3rangecontrol.h> - -#endif // USE_QT4 - #endif /* TQT_TQRANGECONTROL_H */ diff --git a/qtinterface/interface_tqt3/tqrect.h b/qtinterface/interface_tqt3/tqrect.h index 9d5234e..a331851 100644 --- a/qtinterface/interface_tqt3/tqrect.h +++ b/qtinterface/interface_tqt3/tqrect.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQRECT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QRect class -// For Qt3, no changes are needed - #include <ntqrect.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QRect class -// For Qt4, some changes are needed - -#include <Qt/ntqrect.h> - -#endif // USE_QT4 - #endif /* TQT_TQRECT_H */ diff --git a/qtinterface/interface_tqt3/tqregexp.h b/qtinterface/interface_tqt3/tqregexp.h index 90f268f..f0da300 100644 --- a/qtinterface/interface_tqt3/tqregexp.h +++ b/qtinterface/interface_tqt3/tqregexp.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQREGEXP_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QRegExp class -// For Qt3, no changes are needed - #include <ntqregexp.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QRegExp class -// For Qt4, some changes are needed - -#include <Qt/ntqregexp.h> - -#endif // USE_QT4 - #endif /* TQT_TQREGEXP_H */ diff --git a/qtinterface/interface_tqt3/tqregion.h b/qtinterface/interface_tqt3/tqregion.h index 577082c..eb3be82 100644 --- a/qtinterface/interface_tqt3/tqregion.h +++ b/qtinterface/interface_tqt3/tqregion.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQREGION_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QRegion class -// For Qt3, no changes are needed - #include <ntqregion.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QRegion class -// For Qt4, some changes are needed - -#include <Qt/ntqregion.h> - -#endif // USE_QT4 - #endif /* TQT_TQREGION_H */ diff --git a/qtinterface/interface_tqt3/tqrtlcodec.h b/qtinterface/interface_tqt3/tqrtlcodec.h index aef8889..3786ccc 100644 --- a/qtinterface/interface_tqt3/tqrtlcodec.h +++ b/qtinterface/interface_tqt3/tqrtlcodec.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQRTLCODEC_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QHebrewCodec class -// For Qt3, no changes are needed - #include <ntqrtlcodec.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QHebrewCodec class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQRTLCODEC_H */ diff --git a/qtinterface/interface_tqt3/tqscrollbar.cpp b/qtinterface/interface_tqt3/tqscrollbar.cpp index c775dc3..1351902 100644 --- a/qtinterface/interface_tqt3/tqscrollbar.cpp +++ b/qtinterface/interface_tqt3/tqscrollbar.cpp @@ -21,11 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqscrollbar.h> - -#ifdef USE_QT4 - -int QScrollBar::sliderStart() const { - return sliderPosition(); -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqscrollbar.h b/qtinterface/interface_tqt3/tqscrollbar.h index 00c2eae..588c308 100644 --- a/qtinterface/interface_tqt3/tqscrollbar.h +++ b/qtinterface/interface_tqt3/tqscrollbar.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSCROLLBAR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QScrollBar class -// For Qt3, no changes are needed - #include <ntqscrollbar.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QScrollBar class -// For Qt4, some changes are needed - -#include <tqt4/Qt/ntqscrollbar.h> - -#endif // USE_QT4 - #endif /* TQT_TQSCROLLBAR_H */ diff --git a/qtinterface/interface_tqt3/tqscrollview.h b/qtinterface/interface_tqt3/tqscrollview.h index d6eb623..cea399b 100644 --- a/qtinterface/interface_tqt3/tqscrollview.h +++ b/qtinterface/interface_tqt3/tqscrollview.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSCROLLVIEW_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QScrollView class -// For Qt3, no changes are needed - #include <ntqscrollview.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QScrollView class -// For Qt4, some changes are needed - -#include <Qt/q3scrollview.h> - -#endif // USE_QT4 - #endif /* TQT_TQSCROLLVIEW_H */ diff --git a/qtinterface/interface_tqt3/tqsemaphore.h b/qtinterface/interface_tqt3/tqsemaphore.h index 9543fce..37bacd4 100644 --- a/qtinterface/interface_tqt3/tqsemaphore.h +++ b/qtinterface/interface_tqt3/tqsemaphore.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSEMAPHORE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSemaphore class -// For Qt3, no changes are needed - #include <ntqsemaphore.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSemaphore class -// For Qt4, some changes are needed - -#include <Qt/q3semaphore.h> - -#endif // USE_QT4 - #endif /* TQT_TQSEMAPHORE_H */ diff --git a/qtinterface/interface_tqt3/tqserversocket.h b/qtinterface/interface_tqt3/tqserversocket.h index 6cf591d..192f6ff 100644 --- a/qtinterface/interface_tqt3/tqserversocket.h +++ b/qtinterface/interface_tqt3/tqserversocket.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSERVERSOCKET_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QServerSocket class -// For Qt3, no changes are needed - #include <ntqserversocket.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QServerSocket class -// For Qt4, some changes are needed - -#include <Qt/q3serversocket.h> - -#endif // USE_QT4 - #endif /* TQT_TQSERVERSOCKET_H */ diff --git a/qtinterface/interface_tqt3/tqsession.h b/qtinterface/interface_tqt3/tqsession.h index b5b8cd5..48bf41d 100644 --- a/qtinterface/interface_tqt3/tqsession.h +++ b/qtinterface/interface_tqt3/tqsession.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSESSION_H #include <tqt.h> - -#ifdef USE_QT3 - -// Pull in Qt3 qsession defines - #include <ntqsession.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Pull in Qt4 qsession defines - -#include <ntqsession.h> - -#endif // USE_QT4 - #endif /* TQT_TQSESSION_H */ diff --git a/qtinterface/interface_tqt3/tqsessionmanager.h b/qtinterface/interface_tqt3/tqsessionmanager.h index 890998c..f0a7d5a 100644 --- a/qtinterface/interface_tqt3/tqsessionmanager.h +++ b/qtinterface/interface_tqt3/tqsessionmanager.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSESSIONMANAGER_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSessionManager class -// For Qt3, no changes are needed - #include <ntqsessionmanager.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSessionManager class -// For Qt4, some changes are needed - -#include <Qt/ntqsessionmanager.h> - -#endif // USE_QT4 - #endif /* TQT_TQSESSIONMANAGER_H */ diff --git a/qtinterface/interface_tqt3/tqsettings.h b/qtinterface/interface_tqt3/tqsettings.h index c38094f..ab20792 100644 --- a/qtinterface/interface_tqt3/tqsettings.h +++ b/qtinterface/interface_tqt3/tqsettings.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSETTINGS_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSettings class -// For Qt3, no changes are needed - #include <ntqsettings.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSettings class -// For Qt4, some changes are needed - -#include <Qt/ntqsettings.h> - -#endif // USE_QT4 - #endif /* TQT_TQSETTINGS_H */ diff --git a/qtinterface/interface_tqt3/tqsgistyle.h b/qtinterface/interface_tqt3/tqsgistyle.h index 679e808..19c54aa 100644 --- a/qtinterface/interface_tqt3/tqsgistyle.h +++ b/qtinterface/interface_tqt3/tqsgistyle.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSGISTYLE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSGIStyle class -// For Qt3, no changes are needed - #include <ntqsgistyle.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSGIStyle class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQSGISTYLE_H */ diff --git a/qtinterface/interface_tqt3/tqshared.h b/qtinterface/interface_tqt3/tqshared.h index a7e8be2..a0126c2 100644 --- a/qtinterface/interface_tqt3/tqshared.h +++ b/qtinterface/interface_tqt3/tqshared.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSHARED_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QShared class -// For Qt3, no changes are needed - #include <ntqsettings.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QShared class -// For Qt4, some changes are needed - -#include <Qt/q3shared.h> - -#endif // USE_QT4 - #endif /* TQT_TQSHARED_H */ diff --git a/qtinterface/interface_tqt3/tqsignal.h b/qtinterface/interface_tqt3/tqsignal.h index 52618c3..225ba1f 100644 --- a/qtinterface/interface_tqt3/tqsignal.h +++ b/qtinterface/interface_tqt3/tqsignal.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSIGNAL_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSignal class -// For Qt3, no changes are needed - #include <ntqsignal.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSignal class -// For Qt4, some changes are needed - -#include <Qt/q3signal.h> - -#endif // USE_QT4 - #endif /* TQT_TQSIGNAL_H */ diff --git a/qtinterface/interface_tqt3/tqsignalmapper.h b/qtinterface/interface_tqt3/tqsignalmapper.h index cce5648..0b152c4 100644 --- a/qtinterface/interface_tqt3/tqsignalmapper.h +++ b/qtinterface/interface_tqt3/tqsignalmapper.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSIGNALMAPPER_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSignalMapper class -// For Qt3, no changes are needed - #include <ntqsignalmapper.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSignalMapper class -// For Qt4, some changes are needed - -#include <Qt/ntqsignalmapper.h> - -#endif // USE_QT4 - #endif /* TQT_TQSIGNALMAPPER_H */ diff --git a/qtinterface/interface_tqt3/tqsignalslotimp.h b/qtinterface/interface_tqt3/tqsignalslotimp.h index 1fd1be9..a481990 100644 --- a/qtinterface/interface_tqt3/tqsignalslotimp.h +++ b/qtinterface/interface_tqt3/tqsignalslotimp.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSIGNALSLOTIMP_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSignalSlotImp class -// For Qt3, no changes are needed - #include <ntqsignalslotimp.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSignalSlotImp class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQSIGNALSLOTIMP_H */ diff --git a/qtinterface/interface_tqt3/tqsimplerichtext.h b/qtinterface/interface_tqt3/tqsimplerichtext.h index 7866db2..89c6f77 100644 --- a/qtinterface/interface_tqt3/tqsimplerichtext.h +++ b/qtinterface/interface_tqt3/tqsimplerichtext.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSIMPLERICHTEXT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSimpleRichText class -// For Qt3, no changes are needed - #include <ntqsimplerichtext.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSimpleRichText class -// For Qt4, some changes are needed - -#include <Qt/q3simplerichtext.h> - -#endif // USE_QT4 - #endif /* TQT_TQSIMPLERICHTEXT_H */ diff --git a/qtinterface/interface_tqt3/tqsize.h b/qtinterface/interface_tqt3/tqsize.h index 75176b4..c3e3b95 100644 --- a/qtinterface/interface_tqt3/tqsize.h +++ b/qtinterface/interface_tqt3/tqsize.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSIZE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSize class -// For Qt3, no changes are needed - #include <ntqsize.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSize class -// For Qt4, some changes are needed - -#include <Qt/ntqsize.h> - -#endif // USE_QT4 - #endif /* TQT_TQSIZE_H */ diff --git a/qtinterface/interface_tqt3/tqsizegrip.h b/qtinterface/interface_tqt3/tqsizegrip.h index 355f8b6..4df3eae 100644 --- a/qtinterface/interface_tqt3/tqsizegrip.h +++ b/qtinterface/interface_tqt3/tqsizegrip.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSIZEGRIP_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSizeGrip class -// For Qt3, no changes are needed - #include <ntqsizegrip.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSizeGrip class -// For Qt4, some changes are needed - -#include <Qt/ntqsizegrip.h> - -#endif // USE_QT4 - #endif /* TQT_TQSIZEGRIP_H */ diff --git a/qtinterface/interface_tqt3/tqsizepolicy.h b/qtinterface/interface_tqt3/tqsizepolicy.h index e784ff1..4547b5d 100644 --- a/qtinterface/interface_tqt3/tqsizepolicy.h +++ b/qtinterface/interface_tqt3/tqsizepolicy.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSIZEPOLICY_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSizePolicy class -// For Qt3, no changes are needed - #include <ntqsizepolicy.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSizePolicy class -// For Qt4, some changes are needed - -#include <Qt/ntqsizepolicy.h> - -#endif // USE_QT4 - #endif /* TQT_TQSIZEPOLICY_H */ diff --git a/qtinterface/interface_tqt3/tqsjiscodec.h b/qtinterface/interface_tqt3/tqsjiscodec.h index 146a8d4..3a7a074 100644 --- a/qtinterface/interface_tqt3/tqsjiscodec.h +++ b/qtinterface/interface_tqt3/tqsjiscodec.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSJISCODEC_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSjisCodec class -// For Qt3, no changes are needed - #include <ntqsjiscodec.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSjisCodec class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQSJISCODEC_H */ diff --git a/qtinterface/interface_tqt3/tqslider.cpp b/qtinterface/interface_tqt3/tqslider.cpp index 8b5e1d3..f7e3222 100644 --- a/qtinterface/interface_tqt3/tqslider.cpp +++ b/qtinterface/interface_tqt3/tqslider.cpp @@ -21,9 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqslider.h> - -#ifdef USE_QT4 - - - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqslider.h b/qtinterface/interface_tqt3/tqslider.h index 5184a03..6298e20 100644 --- a/qtinterface/interface_tqt3/tqslider.h +++ b/qtinterface/interface_tqt3/tqslider.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSLIDER_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSlider class -// For Qt3, no changes are needed - #include <ntqslider.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSlider class -// For Qt4, some changes are needed - -#include <tqt4/Qt/ntqslider.h> - -#endif // USE_QT4 - #endif /* TQT_TQSLIDER_H */ diff --git a/qtinterface/interface_tqt3/tqsocket.h b/qtinterface/interface_tqt3/tqsocket.h index d8e6750..606da22 100644 --- a/qtinterface/interface_tqt3/tqsocket.h +++ b/qtinterface/interface_tqt3/tqsocket.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSOCKET_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSocket class -// For Qt3, no changes are needed - #include <ntqsocket.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSocket class -// For Qt4, some changes are needed - -#include <Qt/q3socket.h> - -#endif // USE_QT4 - #endif /* TQT_TQSOCKET_H */ diff --git a/qtinterface/interface_tqt3/tqsocketdevice.h b/qtinterface/interface_tqt3/tqsocketdevice.h index 3121b50..f1cb9b9 100644 --- a/qtinterface/interface_tqt3/tqsocketdevice.h +++ b/qtinterface/interface_tqt3/tqsocketdevice.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSOCKETDEVICE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSocketDevice class -// For Qt3, no changes are needed - #include <ntqsocketdevice.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSocketDevice class -// For Qt4, some changes are needed - -#include <Qt/q3socketdevice.h> - -#endif // USE_QT4 - #endif /* TQT_TQSOCKETDEVICE_H */ diff --git a/qtinterface/interface_tqt3/tqsocketnotifier.h b/qtinterface/interface_tqt3/tqsocketnotifier.h index f90071a..9d6b2db 100644 --- a/qtinterface/interface_tqt3/tqsocketnotifier.h +++ b/qtinterface/interface_tqt3/tqsocketnotifier.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSOCKETNOTIFIER_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSocketNotifier class -// For Qt3, no changes are needed - #include <ntqsocketnotifier.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSocketNotifier class -// For Qt4, some changes are needed - -#include <Qt/ntqsocketnotifier.h> - -#endif // USE_QT4 - #endif /* TQT_TQSOCKETNOTIFIER_H */ diff --git a/qtinterface/interface_tqt3/tqsound.h b/qtinterface/interface_tqt3/tqsound.h index f0d71a8..73b1e22 100644 --- a/qtinterface/interface_tqt3/tqsound.h +++ b/qtinterface/interface_tqt3/tqsound.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSOUND_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSound class -// For Qt3, no changes are needed - #include <ntqsound.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSound class -// For Qt4, some changes are needed - -#include <Qt/ntqsound.h> - -#endif // USE_QT4 - #endif /* TQT_TQSOUND_H */ diff --git a/qtinterface/interface_tqt3/tqspinbox.h b/qtinterface/interface_tqt3/tqspinbox.h index 4ff2384..9a8f8fb 100644 --- a/qtinterface/interface_tqt3/tqspinbox.h +++ b/qtinterface/interface_tqt3/tqspinbox.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSPINBOX_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSpinBox class -// For Qt3, no changes are needed - #include <ntqspinbox.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSpinBox class -// For Qt4, some changes are needed - -#include <Qt/ntqspinbox.h> - -#endif // USE_QT4 - #endif /* TQT_TQSPINBOX_H */ diff --git a/qtinterface/interface_tqt3/tqsplashscreen.h b/qtinterface/interface_tqt3/tqsplashscreen.h index aefc1f0..ab5a377 100644 --- a/qtinterface/interface_tqt3/tqsplashscreen.h +++ b/qtinterface/interface_tqt3/tqsplashscreen.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSPLASHSCREEN_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSplashScreen class -// For Qt3, no changes are needed - #include <ntqsplashscreen.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSplashScreen class -// For Qt4, some changes are needed - -#include <Qt/ntqsplashscreen.h> - -#endif // USE_QT4 - #endif /* TQT_TQSPLASHSCREEN_H */ diff --git a/qtinterface/interface_tqt3/tqsplitter.h b/qtinterface/interface_tqt3/tqsplitter.h index 76991ef..3f14851 100644 --- a/qtinterface/interface_tqt3/tqsplitter.h +++ b/qtinterface/interface_tqt3/tqsplitter.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSPLITTER_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSplitter class -// For Qt3, no changes are needed - #include <ntqsplitter.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSplitter class -// For Qt4, some changes are needed - -#include <Qt/ntqsplitter.h> - -#endif // USE_QT4 - #endif /* TQT_TQSPLITTER_H */ diff --git a/qtinterface/interface_tqt3/tqsql.h b/qtinterface/interface_tqt3/tqsql.h index 71bcc13..ffd8981 100644 --- a/qtinterface/interface_tqt3/tqsql.h +++ b/qtinterface/interface_tqt3/tqsql.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSQL_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSql class -// For Qt3, no changes are needed - #include <ntqsql.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSql class -// For Qt4, some changes are needed - -#include <Qt/ntqsql.h> - -#endif // USE_QT4 - #endif /* TQT_TQSQL_H */ diff --git a/qtinterface/interface_tqt3/tqsqlcursor.h b/qtinterface/interface_tqt3/tqsqlcursor.h index 5473f4c..fdd62a1 100644 --- a/qtinterface/interface_tqt3/tqsqlcursor.h +++ b/qtinterface/interface_tqt3/tqsqlcursor.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSQLCURSOR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSqlCursor class -// For Qt3, no changes are needed - #include <ntqsqlcursor.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSqlCursor class -// For Qt4, some changes are needed - -#include <Qt/q3sqlcursor.h> - -#endif // USE_QT4 - #endif /* TQT_TQSQLCURSOR_H */ diff --git a/qtinterface/interface_tqt3/tqsqldatabase.h b/qtinterface/interface_tqt3/tqsqldatabase.h index 5b5fe98..ffface1 100644 --- a/qtinterface/interface_tqt3/tqsqldatabase.h +++ b/qtinterface/interface_tqt3/tqsqldatabase.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSQLDATABASE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSqlDatabase class -// For Qt3, no changes are needed - #include <ntqsqldatabase.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSqlDatabase class -// For Qt4, some changes are needed - -#include <Qt/ntqsqldatabase.h> - -#endif // USE_QT4 - #endif /* TQT_TQSQLDATABASE_H */ diff --git a/qtinterface/interface_tqt3/tqsqldriver.h b/qtinterface/interface_tqt3/tqsqldriver.h index 96dd062..56c931b 100644 --- a/qtinterface/interface_tqt3/tqsqldriver.h +++ b/qtinterface/interface_tqt3/tqsqldriver.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSQLDRIVER_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSqlDriver class -// For Qt3, no changes are needed - #include <ntqsqldriver.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSqlDriver class -// For Qt4, some changes are needed - -#include <Qt/ntqsqldriver.h> - -#endif // USE_QT4 - #endif /* TQT_TQSQLDRIVER_H */ diff --git a/qtinterface/interface_tqt3/tqsqldriverplugin.h b/qtinterface/interface_tqt3/tqsqldriverplugin.h index 6cb6c27..6dc28ab 100644 --- a/qtinterface/interface_tqt3/tqsqldriverplugin.h +++ b/qtinterface/interface_tqt3/tqsqldriverplugin.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSQLDRIVERPLUGIN_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSqlDriverPlugin class -// For Qt3, no changes are needed - #include <ntqsqldriverplugin.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSqlDriverPlugin class -// For Qt4, some changes are needed - -#include <Qt/ntqsqldriverplugin.h> - -#endif // USE_QT4 - #endif /* TQT_TQSQLDRIVERPLUGIN_H */ diff --git a/qtinterface/interface_tqt3/tqsqleditorfactory.h b/qtinterface/interface_tqt3/tqsqleditorfactory.h index 3e8d108..c6de1f4 100644 --- a/qtinterface/interface_tqt3/tqsqleditorfactory.h +++ b/qtinterface/interface_tqt3/tqsqleditorfactory.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSQLEDITORFACTORY_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSqlEditorFactory class -// For Qt3, no changes are needed - #include <ntqsqleditorfactory.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSqlEditorFactory class -// For Qt4, some changes are needed - -#include <Qt/q3sqleditorfactory.h> - -#endif // USE_QT4 - #endif /* TQT_TQSQLEDITORFACTORY_H */ diff --git a/qtinterface/interface_tqt3/tqsqlerror.h b/qtinterface/interface_tqt3/tqsqlerror.h index 2494a91..f7f6eba 100644 --- a/qtinterface/interface_tqt3/tqsqlerror.h +++ b/qtinterface/interface_tqt3/tqsqlerror.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSQLERROR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSqlError class -// For Qt3, no changes are needed - #include <ntqsqlerror.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSqlError class -// For Qt4, some changes are needed - -#include <Qt/ntqsqlerror.h> - -#endif // USE_QT4 - #endif /* TQT_TQSQLERROR_H */ diff --git a/qtinterface/interface_tqt3/tqsqlfield.h b/qtinterface/interface_tqt3/tqsqlfield.h index 89a2824..7e833f3 100644 --- a/qtinterface/interface_tqt3/tqsqlfield.h +++ b/qtinterface/interface_tqt3/tqsqlfield.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSQLFIELD_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSqlField class -// For Qt3, no changes are needed - #include <ntqsqlfield.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSqlField class -// For Qt4, some changes are needed - -#include <Qt/q3sqlfieldinfo.h> - -#endif // USE_QT4 - #endif /* TQT_TQSQLFIELD_H */ diff --git a/qtinterface/interface_tqt3/tqsqlform.h b/qtinterface/interface_tqt3/tqsqlform.h index 5febddb..43d8177 100644 --- a/qtinterface/interface_tqt3/tqsqlform.h +++ b/qtinterface/interface_tqt3/tqsqlform.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSQLFORM_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSqlForm class -// For Qt3, no changes are needed - #include <ntqsqlform.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSqlForm class -// For Qt4, some changes are needed - -#include <Qt/q3sqlform.h> - -#endif // USE_QT4 - #endif /* TQT_TQSQLFORM_H */ diff --git a/qtinterface/interface_tqt3/tqsqlindex.h b/qtinterface/interface_tqt3/tqsqlindex.h index c39b5fd..69b4532 100644 --- a/qtinterface/interface_tqt3/tqsqlindex.h +++ b/qtinterface/interface_tqt3/tqsqlindex.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSQLINDEX_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSqlIndex class -// For Qt3, no changes are needed - #include <ntqsqlindex.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSqlIndex class -// For Qt4, some changes are needed - -#include <Qt/ntqsqlindex.h> - -#endif // USE_QT4 - #endif /* TQT_TQSQLINDEX_H */ diff --git a/qtinterface/interface_tqt3/tqsqlpropertymap.h b/qtinterface/interface_tqt3/tqsqlpropertymap.h index 4d35d33..267a06c 100644 --- a/qtinterface/interface_tqt3/tqsqlpropertymap.h +++ b/qtinterface/interface_tqt3/tqsqlpropertymap.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSQLPROPERTYMAP_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSqlPropertyMap class -// For Qt3, no changes are needed - #include <ntqsqlpropertymap.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSqlPropertyMap class -// For Qt4, some changes are needed - -#include <Qt/q3sqlpropertymap.h> - -#endif // USE_QT4 - #endif /* TQT_TQSQLPROPERTYMAP_H */ diff --git a/qtinterface/interface_tqt3/tqsqlquery.h b/qtinterface/interface_tqt3/tqsqlquery.h index 4c1a766..ff2f6cd 100644 --- a/qtinterface/interface_tqt3/tqsqlquery.h +++ b/qtinterface/interface_tqt3/tqsqlquery.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSQLQUERY_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSqlQuery class -// For Qt3, no changes are needed - #include <ntqsqlquery.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSqlQuery class -// For Qt4, some changes are needed - -#include <Qt/ntqsqlquery.h> - -#endif // USE_QT4 - #endif /* TQT_TQSQLQUERY_H */ diff --git a/qtinterface/interface_tqt3/tqsqlrecord.h b/qtinterface/interface_tqt3/tqsqlrecord.h index ad2d84f..899a21a 100644 --- a/qtinterface/interface_tqt3/tqsqlrecord.h +++ b/qtinterface/interface_tqt3/tqsqlrecord.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSQLRECORD_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSqlRecord class -// For Qt3, no changes are needed - #include <ntqsqlrecord.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSqlRecord class -// For Qt4, some changes are needed - -#include <Qt/ntqsqlrecord.h> - -#endif // USE_QT4 - #endif /* TQT_TQSQLRECORD_H */ diff --git a/qtinterface/interface_tqt3/tqsqlresult.h b/qtinterface/interface_tqt3/tqsqlresult.h index 6aa0ca4..771cdcc 100644 --- a/qtinterface/interface_tqt3/tqsqlresult.h +++ b/qtinterface/interface_tqt3/tqsqlresult.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSQLRESULT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSqlResult class -// For Qt3, no changes are needed - #include <ntqsqlresult.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSqlResult class -// For Qt4, some changes are needed - -#include <Qt/ntqsqlresult.h> - -#endif // USE_QT4 - #endif /* TQT_TQSQLRESULT_H */ diff --git a/qtinterface/interface_tqt3/tqsqlselectcursor.h b/qtinterface/interface_tqt3/tqsqlselectcursor.h index 2be3e23..ed0a14e 100644 --- a/qtinterface/interface_tqt3/tqsqlselectcursor.h +++ b/qtinterface/interface_tqt3/tqsqlselectcursor.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSQLSELECTCURSOR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSqlSelectCursor class -// For Qt3, no changes are needed - #include <ntqsqlselectcursor.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSqlSelectCursor class -// For Qt4, some changes are needed - -#include <Qt/q3sqlselectcursor.h> - -#endif // USE_QT4 - #endif /* TQT_TQSQLSELECTCURSOR_H */ diff --git a/qtinterface/interface_tqt3/tqstatusbar.h b/qtinterface/interface_tqt3/tqstatusbar.h index 3c59743..76d0091 100644 --- a/qtinterface/interface_tqt3/tqstatusbar.h +++ b/qtinterface/interface_tqt3/tqstatusbar.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSTATUSBAR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QStatusBar class -// For Qt3, no changes are needed - #include <ntqstatusbar.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QStatusBar class -// For Qt4, some changes are needed - -#include <Qt/ntqstatusbar.h> - -#endif // USE_QT4 - #endif /* TQT_TQSTATUSBAR_H */ diff --git a/qtinterface/interface_tqt3/tqstring.cpp b/qtinterface/interface_tqt3/tqstring.cpp index 1e27c1b..b6a3ca8 100644 --- a/qtinterface/interface_tqt3/tqstring.cpp +++ b/qtinterface/interface_tqt3/tqstring.cpp @@ -23,21 +23,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqstring.h> - -#ifdef USE_QT4 - -int Q3CString::contains( const char *a ) const -{ - QString d = QString::fromAscii( data() ); - return d.count( a ); -} - -QString::operator bool () const -{ - if (this == QString::null) - return false; - else - return true; -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqstring.h b/qtinterface/interface_tqt3/tqstring.h index 2e22c2e..da2695b 100644 --- a/qtinterface/interface_tqt3/tqstring.h +++ b/qtinterface/interface_tqt3/tqstring.h @@ -25,24 +25,6 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqcstring.h> #include <ntqdatastream.h> - -#ifdef USE_QT3 - -// Reimplement the QString class -// For Qt3, no changes are needed - #include <ntqstring.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QString class -// For Qt4, some changes are needed - -#include <tqt4/Qt/ntqstring.h> -#include <QtCore/QRegExp> - -#endif // USE_QT4 - #endif /* TQT_TQSTRING_H */ diff --git a/qtinterface/interface_tqt3/tqstringlist.cpp b/qtinterface/interface_tqt3/tqstringlist.cpp index 9fa4d7b..29f6f21 100644 --- a/qtinterface/interface_tqt3/tqstringlist.cpp +++ b/qtinterface/interface_tqt3/tqstringlist.cpp @@ -21,158 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqstringlist.h> - -#ifdef USE_QT4 - -void TQStringList::sort() -{ - qHeapSort( *this ); -} - -TQStringList TQStringList::split( const QChar &sep, const QString &str, - bool allowEmptyEntries ) -{ - return split( QString(sep), str, allowEmptyEntries ); -} - -TQStringList TQStringList::split( const QString &sep, const QString &str, - bool allowEmptyEntries ) -{ - TQStringList lst; - - int j = 0; - int i = str.find( sep, j ); - - while ( i != -1 ) { - if ( i > j && i <= (int)str.length() ) - lst << str.mid( j, i - j ); - else if ( allowEmptyEntries ) - lst << QString::null; - j = i + sep.length(); - i = str.find( sep, sep.length() > 0 ? j : j+1 ); - } - - int l = str.length() - 1; - if ( str.mid( j, l - j + 1 ).length() > 0 ) - lst << str.mid( j, l - j + 1 ); - else if ( allowEmptyEntries ) - lst << QString::null; - - return lst; -} - -#ifndef TQT_NO_REGEXP -TQStringList TQStringList::split( const QRegExp &sep, const QString &str, - bool allowEmptyEntries ) -{ - TQStringList lst; - - QRegExp tep = sep; - - int j = 0; - int i = tep.search( str, j ); - - while ( i != -1 ) { - if ( str.mid( j, i - j ).length() > 0 ) - lst << str.mid( j, i - j ); - else if ( allowEmptyEntries ) - lst << QString::null; - if ( tep.matchedLength() == 0 ) - j = i + 1; - else - j = i + tep.matchedLength(); - i = tep.search( str, j ); - } - - int l = str.length() - 1; - if ( str.mid( j, l - j + 1 ).length() > 0 ) - lst << str.mid( j, l - j + 1 ); - else if ( allowEmptyEntries ) - lst << QString::null; - - return lst; -} -#endif - -TQStringList TQStringList::grep( const QString &str, bool cs ) const -{ - TQStringList res; - for ( TQStringList::ConstIterator it = begin(); it != end(); ++it ) - if ( (*it).contains(str, cs) ) - res << *it; - - return res; -} - - -#ifndef TQT_NO_REGEXP -TQStringList TQStringList::grep( const QRegExp &rx ) const -{ - TQStringList res; - for ( TQStringList::ConstIterator it = begin(); it != end(); ++it ) - if ( (*it).find(rx) != -1 ) - res << *it; - - return res; -} -#endif - -TQStringList& TQStringList::gres( const QString &before, const QString &after, - bool cs ) -{ - TQStringList::Iterator it = begin(); - while ( it != end() ) { - (*it).replace( before, after, cs ); - ++it; - } - return *this; -} - -#ifndef TQT_NO_REGEXP_CAPTURE -TQStringList& TQStringList::gres( const QRegExp &rx, const QString &after ) -{ - TQStringList::Iterator it = begin(); - while ( it != end() ) { - (*it).replace( rx, after ); - ++it; - } - return *this; -} -#endif - -QString TQStringList::join( const QString &sep ) const -{ - QString res; - bool alredy = FALSE; - for ( TQStringList::ConstIterator it = begin(); it != end(); ++it ) { - if ( alredy ) - res += sep; - alredy = TRUE; - res += *it; - } - - return res; -} - -#ifndef TQT_NO_DATASTREAM -QDataStream &operator>>( QDataStream & s, TQStringList& l ) -{ - return s >> (TQValueList<QString>&)l; -} - -QDataStream &operator<<( QDataStream & s, const TQStringList& l ) -{ - return s << (const TQValueList<QString>&)l; -} -#endif - -TQStringList TQStringList::fromStrList(const TQStrList& ascii) -{ - TQStringList res; - const char * s; - for ( TQStrListIterator it(ascii); (s=it.current()); ++it ) - res << s; - return res; -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqstringlist.h b/qtinterface/interface_tqt3/tqstringlist.h index a9f0cde..a8821ad 100644 --- a/qtinterface/interface_tqt3/tqstringlist.h +++ b/qtinterface/interface_tqt3/tqstringlist.h @@ -23,146 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSTRINGLIST_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the TQStringList class -// For Qt3, no changes are needed - #include <ntqstringlist.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the TQStringList class -// For Qt4, some changes are needed - -#include <ntqvaluelist.h> -#include <ntqstrlist.h> -#include <ntqtl.h> -#include <Qt/ntqstringlist.h> - -/**************************************************************************** -** -** Definition of TQStringList class -** -** Created : 990406 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the tools module of the Qt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free Qt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.QPL -** included in the packaging of this file. Licensees holding valid Qt -** Commercial licenses may use this file in accordance with the Qt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQT_NO_STRINGLIST - -class QRegExp; -template <class T> class QDeepCopy; - -#if defined(Q_TEMPLATEDLL) -// MOC_SKIP_BEGIN -//Q_TEMPLATE_EXTERN template class Q_EXPORT TQValueList<QString>; -// MOC_SKIP_END -#endif - -class TQStringList : public TQValueList<QString> -{ -public: - TQStringList() { } - TQStringList( const TQStringList& l ) : TQValueList<QString>(l) { } - TQStringList( const TQValueList<QString>& l ) : TQValueList<QString>(l) { } - TQStringList( const QString& i ) { append(i); } -#ifndef TQT_NO_CAST_ASCII - TQStringList( const char* i ) { append(i); } -#endif - - // Interoperability - TQStringList(const QStringList& l) - { - for (int i = 0; i < l.size(); ++i) append(l.at(i)); - } - - TQStringList& operator= (const QStringList& l) - { - this->clear(); - for (int i = 0; i < l.size(); ++i) append(l.at(i)); - return *this; - } - - operator QStringList() const { - QStringList list; - for (TQStringList::const_iterator it = TQStringList::constBegin(); - it != TQStringList::constEnd(); ++it) - list.append(*it); - return list; - } - - static TQStringList fromStrList(const TQStrList&); - - void sort(); - - static TQStringList split( const QString &sep, const QString &str, bool allowEmptyEntries = FALSE ); - static TQStringList split( const QChar &sep, const QString &str, bool allowEmptyEntries = FALSE ); -#ifndef TQT_NO_REGEXP - static TQStringList split( const QRegExp &sep, const QString &str, bool allowEmptyEntries = FALSE ); -#endif - QString join( const QString &sep ) const; - - TQStringList grep( const QString &str, bool cs = TRUE ) const; -#ifndef TQT_NO_REGEXP - TQStringList grep( const QRegExp &expr ) const; -#endif - - TQStringList& gres( const QString &before, const QString &after, - bool cs = TRUE ); -#ifndef TQT_NO_REGEXP_CAPTURE - TQStringList& gres( const QRegExp &expr, const QString &after ); -#endif - -protected: - void detach() { TQValueList<QString>::detach(); } - friend class QDeepCopy< TQStringList >; -}; - -#ifndef TQT_NO_DATASTREAM -class QDataStream; -extern QDataStream &operator>>( QDataStream &, TQStringList& ); -extern QDataStream &operator<<( QDataStream &, const TQStringList& ); -#endif - -#endif - -/**********************************************************************/ - -#endif // USE_QT4 - #endif /* TQT_TQSTRINGLIST_H */ diff --git a/qtinterface/interface_tqt3/tqstrlist.h b/qtinterface/interface_tqt3/tqstrlist.h index 269a3e3..3512d1c 100644 --- a/qtinterface/interface_tqt3/tqstrlist.h +++ b/qtinterface/interface_tqt3/tqstrlist.h @@ -23,176 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSTRLIST_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the TQStrList class -// For Qt3, no changes are needed - #include <ntqstrlist.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the TQStrList class -// For Qt4, some changes are needed - -#include <ntqptrlist.h> -#include <Qt/q3strlist.h> -#include <Qt/q3ptrcollection.h> - -/**************************************************************************** -** -** Definition of TQStrList, TQStrIList and TQStrListIterator classes -** -** Created : 920730 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the tools module of the Qt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free Qt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.QPL -** included in the packaging of this file. Licensees holding valid Qt -** Commercial licenses may use this file in accordance with the Qt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#if defined(Q_QDOC) -class TQStrListIterator : public TQPtrListIterator<char> -{ -}; -#else -typedef TQPtrListIterator<char> TQStrListIterator; -#endif - -class TQStrList : public TQPtrList<char> -{ -public: - TQStrList( bool deepCopies=TRUE ) { dc = deepCopies; del_item = deepCopies; } - TQStrList( const TQStrList & ); - ~TQStrList() { clear(); } - TQStrList& operator=( const TQStrList & ); - - // Interoperability - TQStrList(Q3StrList& l) - { - for (unsigned int i = 0; i < l.count(); ++i) append(l.at(i)); - } - - TQStrList& operator= (Q3StrList& l) - { - this->clear(); - for (unsigned int i = 0; i < l.count(); ++i) append(l.at(i)); - return *this; - } - - operator Q3StrList() { - Q3StrList list; - for (TQStrList::const_iterator it = TQStrList::constBegin(); - it != TQStrList::constEnd(); ++it) - list.append(*it); - return list; - } - - operator Q3StrList() const { - Q3StrList list; - for (TQStrList::const_iterator it = TQStrList::constBegin(); - it != TQStrList::constEnd(); ++it) - list.append(*it); - return list; - } - - // More interoperability - // Should convert to and from a QList<QByteArray> - TQStrList(const QList<QByteArray> &list) { - for (int i = 0; i < list.size(); ++i) - append(list.at(i).constData()); - } - - TQStrList &operator =(const QList<QByteArray> &list) { - clear(); - for (int i = 0; i < list.size(); ++i) - append(list.at(i).constData()); - return *this; - } - - operator QList<QByteArray>() const { - QList<QByteArray> list; - for (TQPtrListStdIterator<char> it = begin(); it != end(); ++it) - list.append(QByteArray(*it)); - return list; - } - -private: - Q3PtrCollection::Item newItem( Q3PtrCollection::Item d ) { return dc ? qstrdup( (const char*)d ) : d; } - void deleteItem( Q3PtrCollection::Item d ) { if ( del_item ) delete[] (char*)d; } - int compareItems( Q3PtrCollection::Item s1, Q3PtrCollection::Item s2 ) { return qstrcmp((const char*)s1, - (const char*)s2); } -#ifndef TQT_NO_DATASTREAM - QDataStream &read( QDataStream &s, Q3PtrCollection::Item &d ) - { s >> (char *&)d; return s; } - QDataStream &write( QDataStream &s, Q3PtrCollection::Item d ) const - { return s << (const char *)d; } -#endif - bool dc; -}; - - -class TQStrIList : public TQStrList // case insensitive string list -{ -public: - TQStrIList( bool deepCopies=TRUE ) : TQStrList( deepCopies ) {} - ~TQStrIList() { clear(); } -private: - int compareItems( Q3PtrCollection::Item s1, Q3PtrCollection::Item s2 ) - { return qstricmp((const char*)s1, - (const char*)s2); } -}; - - -inline TQStrList & TQStrList::operator=( const TQStrList &strList ) -{ - clear(); - dc = strList.dc; - del_item = dc; - TQPtrList<char>::operator=( strList ); - return *this; -} - -inline TQStrList::TQStrList( const TQStrList &strList ) - : TQPtrList<char>( strList ) -{ - dc = FALSE; - operator=( strList ); -} - -/**********************************************************************/ - -#endif // USE_QT4 - #endif /* TQT_TQSTRLIST_H */ diff --git a/qtinterface/interface_tqt3/tqstrvec.h b/qtinterface/interface_tqt3/tqstrvec.h index 9aac69b..8fe85b7 100644 --- a/qtinterface/interface_tqt3/tqstrvec.h +++ b/qtinterface/interface_tqt3/tqstrvec.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSTRVEC_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QStrVec class -// For Qt3, no changes are needed - #include <ntqstrvec.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QStrVec class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQSTRVEC_H */ diff --git a/qtinterface/interface_tqt3/tqstyle.cpp b/qtinterface/interface_tqt3/tqstyle.cpp index 6763365..6615053 100644 --- a/qtinterface/interface_tqt3/tqstyle.cpp +++ b/qtinterface/interface_tqt3/tqstyle.cpp @@ -21,27 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqstyle.h> - -#ifdef USE_QT4 - -// TQStyle::TQStyle() : QStyle(), def(TRUE) {} - -// bool TQStyle::isDefault() const { -// return def; -// } - -bool QStyle::isDefault() const { - return def; -} - -bool QStyleOption::isDefault() const { - return def; -} - -Q3ListViewItem* QStyleOption::listViewItem() const { - const QStyleOptionQ3ListView *lv = qstyleoption_cast<const QStyleOptionQ3ListView *>(this); - QStyleOptionQ3ListViewItem item = lv->items.at(0); - return (Q3ListViewItem*)&item; -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqstyle.h b/qtinterface/interface_tqt3/tqstyle.h index 65b1d45..61a9a2f 100644 --- a/qtinterface/interface_tqt3/tqstyle.h +++ b/qtinterface/interface_tqt3/tqstyle.h @@ -23,37 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSTYLE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QStyle class -// For Qt3, no changes are needed - #include <ntqstyle.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QStyle class -// For Qt4, some changes are needed - -#include <tqt4/Qt/ntqstyle.h> -#include <Qt/q3listview.h> -#include <tqt4/Qt/qstyleoption.h> - -// class TQStyle : public QStyle { -// public: -// typedef QStyle::StateFlag StyleFlags; -// TQStyle(); -// virtual ~TQStyle() {}; -// -// bool isDefault() const; -// -// private: -// bool def; -// }; - -#endif // USE_QT4 - #endif /* TQT_TQSTYLE_H */ diff --git a/qtinterface/interface_tqt3/tqstylefactory.h b/qtinterface/interface_tqt3/tqstylefactory.h index e0d490c..e4a5da7 100644 --- a/qtinterface/interface_tqt3/tqstylefactory.h +++ b/qtinterface/interface_tqt3/tqstylefactory.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSTYLEFACTORY_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QStyleFactory class -// For Qt3, no changes are needed - #include <ntqstylefactory.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QStyleFactory class -// For Qt4, some changes are needed - -#include <Qt/ntqstylefactory.h> - -#endif // USE_QT4 - #endif /* TQT_TQSTYLEFACTORY_H */ diff --git a/qtinterface/interface_tqt3/tqstyleplugin.h b/qtinterface/interface_tqt3/tqstyleplugin.h index 915367f..df9e78d 100644 --- a/qtinterface/interface_tqt3/tqstyleplugin.h +++ b/qtinterface/interface_tqt3/tqstyleplugin.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSTYLEPLUGIN_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QStylePlugin class -// For Qt3, no changes are needed - #include <ntqstyleplugin.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QStylePlugin class -// For Qt4, some changes are needed - -#include <Qt/ntqstyleplugin.h> - -#endif // USE_QT4 - #endif /* TQT_TQSTYLEPLUGIN_H */ diff --git a/qtinterface/interface_tqt3/tqstylesheet.h b/qtinterface/interface_tqt3/tqstylesheet.h index 4b6be3b..599e551 100644 --- a/qtinterface/interface_tqt3/tqstylesheet.h +++ b/qtinterface/interface_tqt3/tqstylesheet.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSTYLESHEET_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QStyleSheet class -// For Qt3, no changes are needed - #include <ntqstylesheet.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QStyleSheet class -// For Qt4, some changes are needed - -#include <Qt/q3stylesheet.h> - -#endif // USE_QT4 - #endif /* TQT_TQSTYLESHEET_H */ diff --git a/qtinterface/interface_tqt3/tqsyntaxhighlighter.h b/qtinterface/interface_tqt3/tqsyntaxhighlighter.h index b49c621..9a9120f 100644 --- a/qtinterface/interface_tqt3/tqsyntaxhighlighter.h +++ b/qtinterface/interface_tqt3/tqsyntaxhighlighter.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQSYNTAXHIGHLIGHTER_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QSyntaxHighlighter class -// For Qt3, no changes are needed - #include <ntqsyntaxhighlighter.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QSyntaxHighlighter class -// For Qt4, some changes are needed - -#include <Qt/q3syntaxhighlighter.h> - -#endif // USE_QT4 - #endif /* TQT_TQSYNTAXHIGHLIGHTER_H */ diff --git a/qtinterface/interface_tqt3/tqt.cpp b/qtinterface/interface_tqt3/tqt.cpp index 009b877..c57a5e1 100644 --- a/qtinterface/interface_tqt3/tqt.cpp +++ b/qtinterface/interface_tqt3/tqt.cpp @@ -20,24 +20,3 @@ Boston, MA 02110-1301, USA. */ #include <tqt.h> - -// Various methods that don't have a proper home (yet) - -#ifdef USE_QT4 - -static QColor tqblackptr_core = QColor(Qt::black); - -template <typename T> -QList<T>::operator bool() const { - return !this.isEmpty(); -} - -QBool::operator uint () const { - return b ? static_cast<uint>(1) : static_cast<uint>(0); -} - -QChar::operator int () const { - return static_cast<int>(*this); -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqtabbar.cpp b/qtinterface/interface_tqt3/tqtabbar.cpp index 8efb040..73b37c8 100644 --- a/qtinterface/interface_tqt3/tqtabbar.cpp +++ b/qtinterface/interface_tqt3/tqtabbar.cpp @@ -21,14 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqtabbar.h> - -#ifdef USE_QT4 - -int QTabBar::tabAt(const int &pos) const { - #warning "tabAt(const int &pos) unimplemented!!!" - // FIXME - // What is the correct function to call here??? - //return tabAt(QPoint(pos)); -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqtabbar.h b/qtinterface/interface_tqt3/tqtabbar.h index fcd2fdd..ce6a5c9 100644 --- a/qtinterface/interface_tqt3/tqtabbar.h +++ b/qtinterface/interface_tqt3/tqtabbar.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTABBAR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QTabBar class -// For Qt3, no changes are needed - #include <ntqtabbar.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QTabBar class -// For Qt4, some changes are needed - -#include <Qt/ntqtabbar.h> - -#endif // USE_QT4 - #endif /* TQT_TQTABBAR_H */ diff --git a/qtinterface/interface_tqt3/tqtabdialog.h b/qtinterface/interface_tqt3/tqtabdialog.h index 4d064a7..c79b2cf 100644 --- a/qtinterface/interface_tqt3/tqtabdialog.h +++ b/qtinterface/interface_tqt3/tqtabdialog.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTABDIALOG_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QTabDialog class -// For Qt3, no changes are needed - #include <ntqtabdialog.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QTabDialog class -// For Qt4, some changes are needed - -#include <Qt/q3tabdialog.h> - -#endif // USE_QT4 - #endif /* TQT_TQTABDIALOG_H */ diff --git a/qtinterface/interface_tqt3/tqtable.h b/qtinterface/interface_tqt3/tqtable.h index ae5e948..e8cf89c 100644 --- a/qtinterface/interface_tqt3/tqtable.h +++ b/qtinterface/interface_tqt3/tqtable.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTABLE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QTable class -// For Qt3, no changes are needed - #include <ntqtable.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QTable class -// For Qt4, some changes are needed - -#include <Qt/q3table.h> - -#endif // USE_QT4 - #endif /* TQT_TQTABLE_H */ diff --git a/qtinterface/interface_tqt3/tqtabwidget.h b/qtinterface/interface_tqt3/tqtabwidget.h index 0511a24..07f72d9 100644 --- a/qtinterface/interface_tqt3/tqtabwidget.h +++ b/qtinterface/interface_tqt3/tqtabwidget.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTABWIDGET_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QTabWidget class -// For Qt3, no changes are needed - #include <ntqtabwidget.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QTabWidget class -// For Qt4, some changes are needed - -#include <Qt/ntqtabwidget.h> - -#endif // USE_QT4 - #endif /* TQT_TQTABWIDGET_H */ diff --git a/qtinterface/interface_tqt3/tqtextbrowser.h b/qtinterface/interface_tqt3/tqtextbrowser.h index 5578afb..e2178c7 100644 --- a/qtinterface/interface_tqt3/tqtextbrowser.h +++ b/qtinterface/interface_tqt3/tqtextbrowser.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTEXTBROWSER_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QTextBrowser class -// For Qt3, no changes are needed - #include <ntqtextbrowser.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QTextBrowser class -// For Qt4, some changes are needed - -#include <Qt/ntqtextbrowser.h> - -#endif // USE_QT4 - #endif /* TQT_TQTEXTBROWSER_H */ diff --git a/qtinterface/interface_tqt3/tqtextcodec.cpp b/qtinterface/interface_tqt3/tqtextcodec.cpp index ddc9518..1e54636 100644 --- a/qtinterface/interface_tqt3/tqtextcodec.cpp +++ b/qtinterface/interface_tqt3/tqtextcodec.cpp @@ -21,495 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqtextcodec.h> - -#ifdef USE_QT4 - -// returns a string containing the letters and numbers from input, -// with a space separating run of a character class. e.g. "iso8859-1" -// becomes "iso 8859 1" -static QString lettersAndNumbers( const char * input ) -{ - QString result; - QChar c; - - while( input && *input ) { - c = *input; - if ( c.isLetter() || c.isNumber() ) - result += c.lower(); - if ( input[1] ) { - // add space at character class transition, except - // transition from upper-case to lower-case letter - QChar n( input[1] ); - if ( c.isLetter() && n.isLetter() ) { - if ( c == c.lower() && n == n.upper() ) - result += ' '; - } else if ( c.category() != n.category() ) { - result += ' '; - } - } - input++; - } - return result.simplifyWhiteSpace(); -} - -#define CHAINED 0xffff - -struct QMultiByteUnicodeTable { - // If multiByte, ignore unicode and index into multiByte - // with the next character. - QMultiByteUnicodeTable() : unicode(0xfffd), multiByte(0) { } - - ~QMultiByteUnicodeTable() - { - if ( multiByte ) - delete [] multiByte; - } - - ushort unicode; - QMultiByteUnicodeTable* multiByte; -}; - -static int getByte(char* &cursor) -{ - int byte = 0; - if ( *cursor ) { - if ( cursor[1] == 'x' ) - byte = strtol(cursor+2,&cursor,16); - else if ( cursor[1] == 'd' ) - byte = strtol(cursor+2,&cursor,10); - else - byte = strtol(cursor+2,&cursor,8); - } - return byte&0xff; -} - -class QTextCodecFromIOD; - -class QTextCodecFromIODDecoder : public QTextDecoder { - const QTextCodecFromIOD* codec; - QMultiByteUnicodeTable* mb; -public: - QTextCodecFromIODDecoder(const QTextCodecFromIOD* c); - //QString toUnicode(const char* chars, int len); - QString convertToUnicode(const char* chars, int len, int *state); -}; - -class QTextCodecFromIOD : public QTextCodec { - friend class QTextCodecFromIODDecoder; - - TQCString n; - - // If from_unicode_page[row()][cell()] is 0 and from_unicode_page_multiByte, - // use from_unicode_page_multiByte[row()][cell()] as string. - char** from_unicode_page; - char*** from_unicode_page_multiByte; - char unkn; - - // Only one of these is used - ushort* to_unicode; - QMultiByteUnicodeTable* to_unicode_multiByte; - int max_bytes_per_char; - TQStrList aliases; - - bool stateless() const { return !to_unicode_multiByte; } - -public: - QTextCodecFromIOD(QIODevice* iod) - { - from_unicode_page = 0; - to_unicode_multiByte = 0; - to_unicode = 0; - from_unicode_page_multiByte = 0; - max_bytes_per_char = 1; - - const int maxlen=100; - char line[maxlen]; - char esc='\\'; - char comm='%'; - bool incmap = FALSE; - while (iod->readLine(line,maxlen) > 0) { - if (0==qstrnicmp(line,"<code_set_name>",15)) - n = line+15; - else if (0==qstrnicmp(line,"<escape_char> ",14)) - esc = line[14]; - else if (0==qstrnicmp(line,"<comment_char> ",15)) - comm = line[15]; - else if (line[0]==comm && 0==qstrnicmp(line+1," alias ",7)) { - aliases.append(line+8); - } else if (0==qstrnicmp(line,"CHARMAP",7)) { - if (!from_unicode_page) { - from_unicode_page = new char*[256]; - for (int i=0; i<256; i++) - from_unicode_page[i]=0; - } - if (!to_unicode) { - to_unicode = new ushort[256]; - } - incmap = TRUE; - } else if (0==qstrnicmp(line,"END CHARMAP",11)) - break; - else if (incmap) { - char* cursor = line; - int byte=-1,unicode=-1; - ushort* mb_unicode=0; - const int maxmb=8; // more -> we'll need to improve datastructures - char mb[maxmb+1]; - int nmb=0; - - while (*cursor) { - if (cursor[0]=='<' && cursor[1]=='U' && - cursor[2]>='0' && cursor[2]<='9' && - cursor[3]>='0' && cursor[3]<='9') { - - unicode = strtol(cursor+2,&cursor,16); - - } else if (*cursor==esc) { - - byte = getByte(cursor); - - if ( *cursor == esc ) { - if ( !to_unicode_multiByte ) { - to_unicode_multiByte = - new QMultiByteUnicodeTable[256]; - for (int i=0; i<256; i++) { - to_unicode_multiByte[i].unicode = - to_unicode[i]; - to_unicode_multiByte[i].multiByte = 0; - } - delete [] to_unicode; - to_unicode = 0; - } - QMultiByteUnicodeTable* mbut = - to_unicode_multiByte+byte; - mb[nmb++] = byte; - while ( nmb < maxmb && *cursor == esc ) { - // Always at least once - - mbut->unicode = CHAINED; - byte = getByte(cursor); - mb[nmb++] = byte; - if (!mbut->multiByte) { - mbut->multiByte = - new QMultiByteUnicodeTable[256]; - } - mbut = mbut->multiByte+byte; - mb_unicode = & mbut->unicode; - } - - if ( nmb > max_bytes_per_char ) - max_bytes_per_char = nmb; - } - } else { - cursor++; - } - } - - if (unicode >= 0 && unicode <= 0xffff) - { - QChar ch((ushort)unicode); - if (!from_unicode_page[ch.row()]) { - from_unicode_page[ch.row()] = new char[256]; - for (int i=0; i<256; i++) - from_unicode_page[ch.row()][i]=0; - } - if ( mb_unicode ) { - from_unicode_page[ch.row()][ch.cell()] = 0; - if (!from_unicode_page_multiByte) { - from_unicode_page_multiByte = new char**[256]; - for (int i=0; i<256; i++) - from_unicode_page_multiByte[i]=0; - } - if (!from_unicode_page_multiByte[ch.row()]) { - from_unicode_page_multiByte[ch.row()] = new char*[256]; - for (int i=0; i<256; i++) - from_unicode_page_multiByte[ch.row()][i] = 0; - } - mb[nmb++] = 0; - from_unicode_page_multiByte[ch.row()][ch.cell()] - = qstrdup(mb); - *mb_unicode = unicode; - } else { - from_unicode_page[ch.row()][ch.cell()] = (char)byte; - if ( to_unicode ) - to_unicode[byte] = unicode; - else - to_unicode_multiByte[byte].unicode = unicode; - } - } else { - } - } - } - n = n.stripWhiteSpace(); - - unkn = '?'; // ##### Might be a bad choice. - } - - ~QTextCodecFromIOD() - { - if ( from_unicode_page ) { - for (int i=0; i<256; i++) - if (from_unicode_page[i]) - delete [] from_unicode_page[i]; - } - if ( from_unicode_page_multiByte ) { - for (int i=0; i<256; i++) - if (from_unicode_page_multiByte[i]) - for (int j=0; j<256; j++) - if (from_unicode_page_multiByte[i][j]) - delete [] from_unicode_page_multiByte[i][j]; - } - if ( to_unicode ) - delete [] to_unicode; - if ( to_unicode_multiByte ) - delete [] to_unicode_multiByte; - } - - bool ok() const - { - return !!from_unicode_page; - } - - QTextDecoder* makeDecoder() const - { - if ( stateless() ) - return QTextCodec::makeDecoder(); - else - return new QTextCodecFromIODDecoder(this); - } - - const char* qtio_name() const - { - return n; - } - - int mibEnum() const - { - return 0; // #### Unknown. - } - - int heuristicContentMatch(const char*, int) const - { - return 0; - } - - int heuristicNameMatch(const char* hint) const - { - int bestr = QTextCodec::heuristicNameMatch(hint); - TQStrListIterator it(aliases); - char* a; - while ((a=it.current())) { - ++it; - int r = simpleHeuristicNameMatch(a,hint); - if (r > bestr) - bestr = r; - } - return bestr; - } - - QString toUnicode(const char* chars, int len) const - { - const uchar* uchars = (const uchar*)chars; - QString result; - QMultiByteUnicodeTable* multiByte=to_unicode_multiByte; - if ( multiByte ) { - while (len--) { - QMultiByteUnicodeTable& mb = multiByte[*uchars]; - if ( mb.multiByte ) { - // Chained multi-byte - multiByte = mb.multiByte; - } else { - result += QChar(mb.unicode); - multiByte=to_unicode_multiByte; - } - uchars++; - } - } else { - while (len--) - result += QChar(to_unicode[*uchars++]); - } - return result; - } - - QString convertToUnicode(const char* chars, int len, ConverterState *state) const - { - return toUnicode(chars, len); - } - -#if !defined(Q_NO_USING_KEYWORD) - using QTextCodec::fromUnicode; -#endif - TQCString fromUnicode(const QString& uc, int& lenInOut) const - { - if (lenInOut > (int)uc.length()) - lenInOut = uc.length(); - int rlen = lenInOut*max_bytes_per_char; - TQCString rstr(rlen+1); - char* cursor = rstr.data(); - char* s=0; - int l = lenInOut; - int lout = 0; - for (int i=0; i<l; i++) { - QChar ch = uc[i]; - if ( ch == QChar() ) { - // special - *cursor++ = 0; - } else if ( from_unicode_page[ch.row()] && - from_unicode_page[ch.row()][ch.cell()] ) - { - *cursor++ = from_unicode_page[ch.row()][ch.cell()]; - lout++; - } else if ( from_unicode_page_multiByte && - from_unicode_page_multiByte[ch.row()] && - (s=from_unicode_page_multiByte[ch.row()][ch.cell()]) ) - { - while (*s) { - *cursor++ = *s++; - lout++; - } - } else { - *cursor++ = unkn; - lout++; - } - } - *cursor = 0; - lenInOut = lout; - return rstr; - } - - QByteArray convertFromUnicode(const QChar *charin, int len, ConverterState *state) const - { - return fromUnicode(charin, len); - } - - QByteArray name() const - { - return qtio_name(); - } -}; - -// QTextCodecFromIODDecoder::QTextCodecFromIODDecoder(const QTextCodecFromIOD* c) : -// codec(c) -// { -// mb = codec->to_unicode_multiByte; -// } - -QString QTextCodecFromIODDecoder::convertToUnicode(const char* chars, int len, int *state) -{ - const uchar* uchars = (const uchar*)chars; - QString result; - while (len--) { - QMultiByteUnicodeTable& t = mb[*uchars]; - if ( t.multiByte ) { - // Chained multi-byte - mb = t.multiByte; - } else { - if ( t.unicode ) - result += QChar(t.unicode); - mb=codec->to_unicode_multiByte; - } - uchars++; - } - return result; -} - -#ifndef TQT_NO_CODECS -// Cannot use <pre> or \code -/*! - Reads a POSIX2 charmap definition from \a iod. - The parser recognizes the following lines: - -<font name="sans"> - <code_set_name> <i>name</i></br> - <escape_char> <i>character</i></br> - % alias <i>alias</i></br> - CHARMAP</br> - <<i>token</i>> /x<i>hexbyte</i> <U<i>unicode</i>> ...</br> - <<i>token</i>> /d<i>decbyte</i> <U<i>unicode</i>> ...</br> - <<i>token</i>> /<i>octbyte</i> <U<i>unicode</i>> ...</br> - <<i>token</i>> /<i>any</i>/<i>any</i>... <U<i>unicode</i>> ...</br> - END CHARMAP</br> -</font> - - The resulting QTextCodec is returned (and also added to the global - list of codecs). The name() of the result is taken from the - code_set_name. - - Note that a codec constructed in this way uses much more memory - and is slower than a hand-written QTextCodec subclass, since - tables in code are kept in memory shared by all Qt applications. - - \sa loadCharmapFile() -*/ -QTextCodec* QTextCodec::loadCharmap(QIODevice* iod) -{ - QTextCodecFromIOD* r = new QTextCodecFromIOD(iod); - if ( !r->ok() ) { - delete r; - r = 0; - } - return r; -} - -/*! - A convenience function for loadCharmap() that loads the charmap - definition from the file \a filename. -*/ -QTextCodec* QTextCodec::loadCharmapFile(QString filename) -{ - QFile f(filename); - if (f.open(IO_ReadOnly)) { - QTextCodecFromIOD* r = new QTextCodecFromIOD(&f); - if ( !r->ok() ) - delete r; - else - return r; - } - return 0; -} - -/*! - Returns a value indicating how likely it is that this decoder is - appropriate for decoding some format that has the given name. The - name is compared with the \a hint. - - A good match returns a positive number around the length of the - string. A bad match is negative. - - The default implementation calls simpleHeuristicNameMatch() with - the name of the codec. -*/ -int QTextCodec::heuristicNameMatch(const char* hint) const -{ - return simpleHeuristicNameMatch(name(),hint); -} - -/*! - A simple utility function for heuristicNameMatch(): it does some - very minor character-skipping so that almost-exact matches score - high. \a name is the text we're matching and \a hint is used for - the comparison. -*/ -int QTextCodec::simpleHeuristicNameMatch(const char* name, const char* hint) -{ - // if they're the same, return a perfect score. - if ( name && hint && *name && *hint && qstricmp( name, hint ) == 0 ) - return qstrlen( hint ); - - // if the letters and numbers are the same, we have an "almost" - // perfect match. - QString h( lettersAndNumbers( hint ) ); - QString n( lettersAndNumbers( name ) ); - if ( h == n ) - return qstrlen( hint )-1; - - if ( h.stripWhiteSpace() == n.stripWhiteSpace() ) - return qstrlen( hint )-2; - - // could do some more here, but I don't think it's worth it - - return 0; -} - -#endif //TQT_NO_CODECS - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqtextcodec.h b/qtinterface/interface_tqt3/tqtextcodec.h index d76b8b8..a343a2b 100644 --- a/qtinterface/interface_tqt3/tqtextcodec.h +++ b/qtinterface/interface_tqt3/tqtextcodec.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTEXTCODEC_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QTextCodec class -// For Qt3, no changes are needed - #include <ntqtextcodec.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QTextCodec class -// For Qt4, some changes are needed - -#include <tqt4/Qt/ntqtextcodec.h> - -#endif // USE_QT4 - #endif /* TQT_TQTEXTCODEC_H */ diff --git a/qtinterface/interface_tqt3/tqtextcodecfactory.h b/qtinterface/interface_tqt3/tqtextcodecfactory.h index 0a864be..ef70415 100644 --- a/qtinterface/interface_tqt3/tqtextcodecfactory.h +++ b/qtinterface/interface_tqt3/tqtextcodecfactory.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTEXTCODECFACTORY_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QTextCodecFactory class -// For Qt3, no changes are needed - #include <ntqtextcodecfactory.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QTextCodecFactory class -// For Qt4, this class has been removed! - -#endif // USE_QT4 - #endif /* TQT_TQTEXTCODECFACTORY_H */ diff --git a/qtinterface/interface_tqt3/tqtextcodecplugin.h b/qtinterface/interface_tqt3/tqtextcodecplugin.h index 77321dc..466f95c 100644 --- a/qtinterface/interface_tqt3/tqtextcodecplugin.h +++ b/qtinterface/interface_tqt3/tqtextcodecplugin.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTEXTCODECPLUGIN_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QTextCodecPlugin class -// For Qt3, no changes are needed - #include <ntqtextcodecplugin.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QTextCodecPlugin class -// For Qt4, some changes are needed - -#include <Qt/ntqtextcodecplugin.h> - -#endif // USE_QT4 - #endif /* TQT_TQTEXTCODECPLUGIN_H */ diff --git a/qtinterface/interface_tqt3/tqtextedit.h b/qtinterface/interface_tqt3/tqtextedit.h index d548be8..6b2103a 100644 --- a/qtinterface/interface_tqt3/tqtextedit.h +++ b/qtinterface/interface_tqt3/tqtextedit.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTEXTEDIT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QTextEdit class -// For Qt3, no changes are needed - #include <ntqtextedit.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QTextEdit class -// For Qt4, some changes are needed - -#include <Qt/q3textedit.h> - -#endif // USE_QT4 - #endif /* TQT_TQTEXTEDIT_H */ diff --git a/qtinterface/interface_tqt3/tqtextstream.h b/qtinterface/interface_tqt3/tqtextstream.h index 8b98a20..bd0bd6d 100644 --- a/qtinterface/interface_tqt3/tqtextstream.h +++ b/qtinterface/interface_tqt3/tqtextstream.h @@ -25,23 +25,6 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqstring.h> #include <ntqiodevice.h> - -#ifdef USE_QT3 - -// Reimplement the QTextStream class -// For Qt3, no changes are needed - #include <ntqtextstream.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QTextStream class -// For Qt4, some changes are needed - -#include <Qt/ntqtextstream.h> - -#endif // USE_QT4 - #endif /* TQT_TQTEXTSTREAM_H */ diff --git a/qtinterface/interface_tqt3/tqtextview.h b/qtinterface/interface_tqt3/tqtextview.h index 2d6338c..599d633 100644 --- a/qtinterface/interface_tqt3/tqtextview.h +++ b/qtinterface/interface_tqt3/tqtextview.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTEXTVIEW_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QTextView class -// For Qt3, no changes are needed - #include <ntqtextview.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QTextView class -// For Qt4, some changes are needed - -#include <Qt/q3textview.h> - -#endif // USE_QT4 - #endif /* TQT_TQTEXTVIEW_H */ diff --git a/qtinterface/interface_tqt3/tqthread.h b/qtinterface/interface_tqt3/tqthread.h index 48e6bec..75808cb 100644 --- a/qtinterface/interface_tqt3/tqthread.h +++ b/qtinterface/interface_tqt3/tqthread.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTHREAD_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QThread class -// For Qt3, no changes are needed - #include <ntqthread.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QThread class -// For Qt4, some changes are needed - -#include <Qt/ntqthread.h> - -#endif // USE_QT4 - #endif /* TQT_TQTHREAD_H */ diff --git a/qtinterface/interface_tqt3/tqthreadstorage.h b/qtinterface/interface_tqt3/tqthreadstorage.h index a24e7f4..26d3250 100644 --- a/qtinterface/interface_tqt3/tqthreadstorage.h +++ b/qtinterface/interface_tqt3/tqthreadstorage.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTHREADSTORAGE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QThreadStorage class -// For Qt3, no changes are needed - #include <ntqthreadstorage.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QThreadStorage class -// For Qt4, some changes are needed - -#include <Qt/ntqthreadstorage.h> - -#endif // USE_QT4 - #endif /* TQT_TQTHREADSTORAGE_H */ diff --git a/qtinterface/interface_tqt3/tqtimer.cpp b/qtinterface/interface_tqt3/tqtimer.cpp index 0b57d6b..6b2d358 100644 --- a/qtinterface/interface_tqt3/tqtimer.cpp +++ b/qtinterface/interface_tqt3/tqtimer.cpp @@ -21,12 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqtimer.h> - -#ifdef USE_QT4 - -// int QTimer::myNewFunction(int parameter_one) -// { -// return parameter_one; -// } - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqtimer.h b/qtinterface/interface_tqt3/tqtimer.h index 57da6ab..7374696 100644 --- a/qtinterface/interface_tqt3/tqtimer.h +++ b/qtinterface/interface_tqt3/tqtimer.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTIMER_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QTimer class -// For Qt3, no changes are needed - #include <ntqtimer.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QTimer class -// For Qt4, some changes are needed - -#include <QtCore/ntqtimer.h> - -#endif // USE_QT4 - #endif /* TQT_TQTIMER_H */ diff --git a/qtinterface/interface_tqt3/tqtl.h b/qtinterface/interface_tqt3/tqtl.h index c05e563..266bf92 100644 --- a/qtinterface/interface_tqt3/tqtl.h +++ b/qtinterface/interface_tqt3/tqtl.h @@ -23,340 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTL_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the Qtl class -// For Qt3, no changes are needed - #include <ntqtl.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -#include <Qt/ntqtextstream.h> - -// Reimplement the Qtl class -// For Qt4, this class was removed! - -/**************************************************************************** -** -** Definition of Qt template library classes -** -** Created : 990128 -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of the tools module of the Qt GUI Toolkit. -** -** This file may be used under the terms of the GNU General -** Public License versions 2.0 or 3.0 as published by the Free -** Software Foundation and appearing in the files LICENSE.GPL2 -** and LICENSE.GPL3 included in the packaging of this file. -** Alternatively you may (at your option) use any later version -** of the GNU General Public License if such license has been -** publicly approved by Trolltech ASA (or its successors, if any) -** and the KDE Free Qt Foundation. -** -** Please review the following information to ensure GNU General -** Public Licensing requirements will be met: -** http://trolltech.com/products/qt/licenses/licensing/opensource/. -** If you are unsure which license is appropriate for your use, please -** review the following information: -** http://trolltech.com/products/qt/licenses/licensing/licensingoverview -** or contact the sales department at sales@trolltech.com. -** -** This file may be used under the terms of the Q Public License as -** defined by Trolltech ASA and appearing in the file LICENSE.QPL -** included in the packaging of this file. Licensees holding valid Qt -** Commercial licenses may use this file in accordance with the Qt -** Commercial License Agreement provided with the Software. -** -** This file is provided "AS IS" with NO WARRANTY OF ANY KIND, -** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted -** herein. -** -**********************************************************************/ - -#ifndef TQT_NO_TEXTSTREAM -template <class T> -class TQTextOStreamIterator -{ -protected: - QTextOStream& stream; - QString separator; - -public: - TQTextOStreamIterator( QTextOStream& s) : stream( s ) {} - TQTextOStreamIterator( QTextOStream& s, const QString& sep ) - : stream( s ), separator( sep ) {} - TQTextOStreamIterator<T>& operator= ( const T& x ) { - stream << x; - if ( !separator.isEmpty() ) - stream << separator; - return *this; - } - TQTextOStreamIterator<T>& operator*() { return *this; } - TQTextOStreamIterator<T>& operator++() { return *this; } - TQTextOStreamIterator<T>& operator++(int) { return *this; } -}; -#endif //TQT_NO_TEXTSTREAM - -template <class InputIterator, class OutputIterator> -inline OutputIterator tqCopy( InputIterator _begin, InputIterator _end, - OutputIterator _dest ) -{ - while( _begin != _end ) - *_dest++ = *_begin++; - return _dest; -} - -template <class BiIterator, class BiOutputIterator> -inline BiOutputIterator tqCopyBackward( BiIterator _begin, BiIterator _end, - BiOutputIterator _dest ) -{ - while ( _begin != _end ) - *--_dest = *--_end; - return _dest; -} - -template <class InputIterator1, class InputIterator2> -inline bool tqEqual( InputIterator1 first1, InputIterator1 last1, InputIterator2 first2 ) -{ - // ### compare using !(*first1 == *first2) in Qt 4.0 - for ( ; first1 != last1; ++first1, ++first2 ) - if ( *first1 != *first2 ) - return FALSE; - return TRUE; -} - -template <class ForwardIterator, class T> -inline void tqFill( ForwardIterator first, ForwardIterator last, const T& val ) -{ - for ( ; first != last; ++first ) - *first = val; -} - -#if 0 -template <class BiIterator, class OutputIterator> -inline OutputIterator qReverseCopy( BiIterator _begin, BiIterator _end, - OutputIterator _dest ) -{ - while ( _begin != _end ) { - --_end; - *_dest = *_end; - ++_dest; - } - return _dest; -} -#endif - - -template <class InputIterator, class T> -inline InputIterator tqFind( InputIterator first, InputIterator last, - const T& val ) -{ - while ( first != last && *first != val ) - ++first; - return first; -} - -template <class InputIterator, class T, class Size> -inline void tqCount( InputIterator first, InputIterator last, const T& value, - Size& n ) -{ - for ( ; first != last; ++first ) - if ( *first == value ) - ++n; -} - -template <class T> -inline void tqSwap( T& _value1, T& _value2 ) -{ - T tmp = _value1; - _value1 = _value2; - _value2 = tmp; -} - - -template <class InputIterator> -void tqBubbleSort( InputIterator b, InputIterator e ) -{ - // Goto last element; - InputIterator last = e; - --last; - // only one element or no elements ? - if ( last == b ) - return; - - // So we have at least two elements in here - while( b != last ) { - bool swapped = FALSE; - InputIterator swap_pos = b; - InputIterator x = e; - InputIterator y = x; - y--; - do { - --x; - --y; - if ( *x < *y ) { - swapped = TRUE; - tqSwap( *x, *y ); - swap_pos = y; - } - } while( y != b ); - if ( !swapped ) - return; - b = swap_pos; - b++; - } -} - - -template <class Container> -inline void tqBubbleSort( Container &c ) -{ - tqBubbleSort( c.begin(), c.end() ); -} - - -template <class Value> -void tqHeapSortPushDown( Value* heap, int first, int last ) -{ - int r = first; - while ( r <= last / 2 ) { - if ( last == 2 * r ) { - // node r has only one child - if ( heap[2 * r] < heap[r] ) - tqSwap( heap[r], heap[2 * r] ); - r = last; - } else { - // node r has two children - if ( heap[2 * r] < heap[r] && !(heap[2 * r + 1] < heap[2 * r]) ) { - // swap with left child - tqSwap( heap[r], heap[2 * r] ); - r *= 2; - } else if ( heap[2 * r + 1] < heap[r] - && heap[2 * r + 1] < heap[2 * r] ) { - // swap with right child - tqSwap( heap[r], heap[2 * r + 1] ); - r = 2 * r + 1; - } else { - r = last; - } - } - } -} - - -template <class InputIterator, class Value> -void tqHeapSortHelper( InputIterator b, InputIterator e, Value, uint n ) -{ - // Create the heap - InputIterator insert = b; - Value* realheap = new Value[n]; - // Wow, what a fake. But I want the heap to be indexed as 1...n - Value* heap = realheap - 1; - int size = 0; - for( ; insert != e; ++insert ) { - heap[++size] = *insert; - int i = size; - while( i > 1 && heap[i] < heap[i / 2] ) { - tqSwap( heap[i], heap[i / 2] ); - i /= 2; - } - } - - // Now do the sorting - for( uint i = n; i > 0; i-- ) { - *b++ = heap[1]; - if ( i > 1 ) { - heap[1] = heap[i]; - tqHeapSortPushDown( heap, 1, (int)i - 1 ); - } - } - - delete[] realheap; -} - - -template <class InputIterator> -void tqHeapSort( InputIterator b, InputIterator e ) -{ - // Empty ? - if ( b == e ) - return; - - // How many entries have to be sorted ? - InputIterator it = b; - uint n = 0; - while ( it != e ) { - ++n; - ++it; - } - - // The second last parameter is a hack to retrieve the value type - // Do the real sorting here - tqHeapSortHelper( b, e, *b, n ); -} - - -template <class Container> -void tqHeapSort( Container &c ) -{ - if ( c.begin() == c.end() ) - return; - - // The second last parameter is a hack to retrieve the value type - // Do the real sorting here - tqHeapSortHelper( c.begin(), c.end(), *(c.begin()), (uint)c.count() ); -} - -template <class Container> -class TQBackInsertIterator -{ -public: - TQBackInsertIterator( Container &c ) - : container( &c ) - { - } - - TQBackInsertIterator<Container>& - operator=( const Q_TYPENAME Container::value_type &value ) - { - container->push_back( value ); - return *this; - } - - TQBackInsertIterator<Container>& operator*() - { - return *this; - } - - TQBackInsertIterator<Container>& operator++() - { - return *this; - } - - TQBackInsertIterator<Container>& operator++(int) - { - return *this; - } - -protected: - Container *container; -}; - -template <class Container> -inline TQBackInsertIterator<Container> qBackInserter( Container &c ) -{ - return TQBackInsertIterator<Container>( c ); -} - -/**********************************************************************/ - -#endif // USE_QT4 - #endif /* TQT_TQTL_H */ diff --git a/qtinterface/interface_tqt3/tqtoolbar.h b/qtinterface/interface_tqt3/tqtoolbar.h index f029cc7..1398459 100644 --- a/qtinterface/interface_tqt3/tqtoolbar.h +++ b/qtinterface/interface_tqt3/tqtoolbar.h @@ -23,24 +23,7 @@ Boston, MA 02110-1301, USA. #define TQT_TQTOOLBAR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QToolBar class -// For Qt3, no changes are needed - #include <ntqtoolbar.h> -#endif // USE_QT3 - - -#ifdef USE_QT4 - -// Reimplement the QToolBar class -// For Qt4, some changes are needed - -#include <Qt/q3toolbar.h> - -#endif // USE_QT4 #endif /* TQT_TQTOOLBAR_H */ diff --git a/qtinterface/interface_tqt3/tqtoolbox.h b/qtinterface/interface_tqt3/tqtoolbox.h index ae695fc..3db062a 100644 --- a/qtinterface/interface_tqt3/tqtoolbox.h +++ b/qtinterface/interface_tqt3/tqtoolbox.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTOOLBOX_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QToolBox class -// For Qt3, no changes are needed - #include <ntqtoolbox.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QToolBox class -// For Qt4, some changes are needed - -#include <Qt/ntqtoolbox.h> - -#endif // USE_QT4 - #endif /* TQT_TQTOOLBOX_H */ diff --git a/qtinterface/interface_tqt3/tqtoolbutton.h b/qtinterface/interface_tqt3/tqtoolbutton.h index 52cc862..e153cf2 100644 --- a/qtinterface/interface_tqt3/tqtoolbutton.h +++ b/qtinterface/interface_tqt3/tqtoolbutton.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTOOLBUTTON_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QToolButton class -// For Qt3, no changes are needed - #include <ntqtoolbutton.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QToolButton class -// For Qt4, some changes are needed - -#include <Qt/ntqtoolbutton.h> - -#endif // USE_QT4 - #endif /* TQT_TQTOOLBUTTON_H */ diff --git a/qtinterface/interface_tqt3/tqtooltip.cpp b/qtinterface/interface_tqt3/tqtooltip.cpp index 452210b..b7b16bb 100644 --- a/qtinterface/interface_tqt3/tqtooltip.cpp +++ b/qtinterface/interface_tqt3/tqtooltip.cpp @@ -21,19 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqtooltip.h> - -#ifdef USE_QT4 - -static bool globally_enabled = TRUE; - -void QToolTip::setGloballyEnabled( bool enable ) -{ - //globally_enabled = enable; -} - -bool QToolTip::isGloballyEnabled() -{ - return globally_enabled; -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqtooltip.h b/qtinterface/interface_tqt3/tqtooltip.h index b1aaa04..0afce9a 100644 --- a/qtinterface/interface_tqt3/tqtooltip.h +++ b/qtinterface/interface_tqt3/tqtooltip.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTOOLTIP_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QToolTip class -// For Qt3, no changes are needed - #include <ntqtooltip.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QToolTip class -// For Qt4, some changes are needed - -#include <tqt4/Qt/ntqtooltip.h> - -#endif // USE_QT4 - #endif /* TQT_TQTOOLTIP_H */ diff --git a/qtinterface/interface_tqt3/tqtranslator.cpp b/qtinterface/interface_tqt3/tqtranslator.cpp index a4deb70..1784dfa 100644 --- a/qtinterface/interface_tqt3/tqtranslator.cpp +++ b/qtinterface/interface_tqt3/tqtranslator.cpp @@ -21,384 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqtranslator.h> - -#ifdef USE_QT4 - -static uint elfHash( const char * name ) -{ - const uchar *k; - uint h = 0; - uint g; - - if ( name ) { - k = (const uchar *) name; - while ( *k ) { - h = ( h << 4 ) + *k++; - if ( (g = (h & 0xf0000000)) != 0 ) - h ^= g >> 24; - h &= ~g; - } - } - if ( !h ) - h = 1; - return h; -} - -/*! - \class QTranslatorMessage - - \brief The QTranslatorMessage class contains a translator message and its - properties. - - \ingroup i18n - \ingroup environment - - This class is of no interest to most applications. It is useful - for translation tools such as \link linguist-manual.book Qt - Linguist\endlink. It is provided simply to make the API complete - and regular. - - For a QTranslator object, a lookup key is a triple (\e context, \e - {source text}, \e comment) that uniquely identifies a message. An - extended key is a quadruple (\e hash, \e context, \e {source - text}, \e comment), where \e hash is computed from the source text - and the comment. Unless you plan to read and write messages - yourself, you need not worry about the hash value. - - QTranslatorMessage stores this triple or quadruple and the relevant - translation if there is any. - - \sa QTranslator -*/ - -/*! - Constructs a translator message with the extended key (0, 0, 0, 0) - and QString::null as translation. -*/ - -QTranslatorMessage::QTranslatorMessage() - : h( 0 ), cx( 0 ), st( 0 ), cm( 0 ) -{ -} - - -/*! - Constructs an translator message with the extended key (\e h, \a - context, \a sourceText, \a comment), where \e h is computed from - \a sourceText and \a comment, and possibly with a \a translation. -*/ - -QTranslatorMessage::QTranslatorMessage( const char * context, - const char * sourceText, - const char * comment, - const QString& translation ) - : cx( context ), st( sourceText ), cm( comment ), tn( translation ) -{ - // 0 means we don't know, "" means empty - if ( cx == (const char*)0 ) - cx = ""; - if ( st == (const char*)0 ) - st = ""; - if ( cm == (const char*)0 ) - cm = ""; - h = elfHash( st + cm ); -} - - -/*! - Constructs a translator message read from the \a stream. The - resulting message may have any combination of content. - - \sa QTranslator::save() -*/ - -QTranslatorMessage::QTranslatorMessage( QDataStream & stream ) - : cx( 0 ), st( 0 ), cm( 0 ) -{ - QString str16; - char tag; - Q_UINT8 obs1; - - for ( ;; ) { - tag = 0; - if ( !stream.atEnd() ) - stream.readRawBytes( &tag, 1 ); - switch( (Tag)tag ) { - case Tag_End: - if ( h == 0 ) - h = elfHash( st + cm ); - return; - case Tag_SourceText16: // obsolete - stream >> str16; - st = str16.latin1(); - break; - case Tag_Translation: - stream >> tn; - break; - case Tag_Context16: // obsolete - stream >> str16; - cx = str16.latin1(); - break; - case Tag_Hash: - stream >> h; - break; - case Tag_SourceText: - stream >> st; - break; - case Tag_Context: - stream >> cx; - if ( cx == "" ) // for compatibility - cx = 0; - break; - case Tag_Comment: - stream >> cm; - break; - case Tag_Obsolete1: // obsolete - stream >> obs1; - break; - default: - h = 0; - st = 0; - cx = 0; - cm = 0; - tn = QString::null; - return; - } - } -} - - -/*! - Constructs a copy of translator message \a m. -*/ - -QTranslatorMessage::QTranslatorMessage( const QTranslatorMessage & m ) - : cx( m.cx ), st( m.st ), cm( m.cm ), tn( m.tn ) -{ - h = m.h; -} - - -/*! - Assigns message \a m to this translator message and returns a - reference to this translator message. -*/ - -QTranslatorMessage & QTranslatorMessage::operator=( - const QTranslatorMessage & m ) -{ - h = m.h; - cx = m.cx; - st = m.st; - cm = m.cm; - tn = m.tn; - return *this; -} - - -/*! - \fn uint QTranslatorMessage::hash() const - - Returns the hash value used internally to represent the lookup - key. This value is zero only if this translator message was - constructed from a stream containing invalid data. - - The hashing function is unspecified, but it will remain unchanged - in future versions of Qt. -*/ - -/*! - \fn const char *QTranslatorMessage::context() const - - Returns the context for this message (e.g. "MyDialog"). - - \warning This may return 0 if the QTranslator object is stripped - (compressed). -*/ - -/*! - \fn const char *QTranslatorMessage::sourceText() const - - Returns the source text of this message (e.g. "&Save"). - - \warning This may return 0 if the QTranslator object is stripped - (compressed). -*/ - -/*! - \fn const char *QTranslatorMessage::comment() const - - Returns the comment for this message (e.g. "File|Save"). - - \warning This may return 0 if the QTranslator object is stripped - (compressed). -*/ - -/*! - \fn void QTranslatorMessage::setTranslation( const QString & translation ) - - Sets the translation of the source text to \a translation. - - \sa translation() -*/ - -/*! - \fn QString QTranslatorMessage::translation() const - - Returns the translation of the source text (e.g., "&Sauvegarder"). - - \sa setTranslation() -*/ - -/*! - \enum QTranslatorMessage::Prefix - - Let (\e h, \e c, \e s, \e m) be the extended key. The possible - prefixes are - - \value NoPrefix no prefix - \value Hash only (\e h) - \value HashContext only (\e h, \e c) - \value HashContextSourceText only (\e h, \e c, \e s) - \value HashContextSourceTextComment the whole extended key, (\e - h, \e c, \e s, \e m) - - \sa write() commonPrefix() -*/ - -/*! - Writes this translator message to the \a stream. If \a strip is - FALSE (the default), all the information in the message is - written. If \a strip is TRUE, only the part of the extended key - specified by \a prefix is written with the translation (\c - HashContextSourceTextComment by default). - - \sa commonPrefix() -*/ - -void QTranslatorMessage::write( QDataStream & stream, bool strip, - Prefix prefix ) const -{ - char tag; - - tag = (char)Tag_Translation; - stream.writeRawBytes( &tag, 1 ); - stream << tn; - - bool mustWriteHash = TRUE; - if ( !strip ) - prefix = HashContextSourceTextComment; - - switch ( prefix ) { - case HashContextSourceTextComment: - tag = (char)Tag_Comment; - stream.writeRawBytes( &tag, 1 ); - stream << cm; - // fall through - case HashContextSourceText: - tag = (char)Tag_SourceText; - stream.writeRawBytes( &tag, 1 ); - stream << st; - // fall through - case HashContext: - tag = (char)Tag_Context; - stream.writeRawBytes( &tag, 1 ); - stream << cx; - // fall through - default: - if ( mustWriteHash ) { - tag = (char)Tag_Hash; - stream.writeRawBytes( &tag, 1 ); - stream << h; - } - } - - tag = (char)Tag_End; - stream.writeRawBytes( &tag, 1 ); -} - - -/*! - Returns the widest lookup prefix that is common to this translator - message and to message \a m. - - For example, if the extended key is for this message is (71, - "PrintDialog", "Yes", "Print?") and that for \a m is (71, - "PrintDialog", "No", "Print?"), this function returns \c - HashContext. - - \sa write() -*/ - -QTranslatorMessage::Prefix QTranslatorMessage::commonPrefix( - const QTranslatorMessage& m ) const -{ - if ( h != m.h ) - return NoPrefix; - if ( cx != m.cx ) - return Hash; - if ( st != m.st ) - return HashContext; - if ( cm != m.cm ) - return HashContextSourceText; - return HashContextSourceTextComment; -} - - -/*! - Returns TRUE if the extended key of this object is equal to that of - \a m; otherwise returns FALSE. -*/ - -bool QTranslatorMessage::operator==( const QTranslatorMessage& m ) const -{ - return h == m.h && cx == m.cx && st == m.st && cm == m.cm; -} - - -/*! - \fn bool QTranslatorMessage::operator!=( const QTranslatorMessage& m ) const - - Returns TRUE if the extended key of this object is different from - that of \a m; otherwise returns FALSE. -*/ - - -/*! - Returns TRUE if the extended key of this object is - lexicographically before than that of \a m; otherwise returns - FALSE. -*/ - -bool QTranslatorMessage::operator<( const QTranslatorMessage& m ) const -{ - return h != m.h ? h < m.h - : ( cx != m.cx ? cx < m.cx - : (st != m.st ? st < m.st : cm < m.cm) ); -} - - -/*! - \fn bool QTranslatorMessage::operator<=( const QTranslatorMessage& m ) const - - Returns TRUE if the extended key of this object is - lexicographically before that of \a m or if they are equal; - otherwise returns FALSE. -*/ - -/*! - \fn bool QTranslatorMessage::operator>( const QTranslatorMessage& m ) const - - Returns TRUE if the extended key of this object is - lexicographically after that of \a m; otherwise returns FALSE. -*/ - -/*! - \fn bool QTranslatorMessage::operator>=( const QTranslatorMessage& m ) const - - Returns TRUE if the extended key of this object is - lexicographically after that of \a m or if they are equal; - otherwise returns FALSE. -*/ - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqtranslator.h b/qtinterface/interface_tqt3/tqtranslator.h index 9956f9c..2fc57e7 100644 --- a/qtinterface/interface_tqt3/tqtranslator.h +++ b/qtinterface/interface_tqt3/tqtranslator.h @@ -23,74 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTRANSLATOR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QTranslator class -// For Qt3, no changes are needed - #include <ntqtranslator.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QTranslator class -// For Qt4, some changes are needed - -#include <Qt/ntqtranslator.h> - -//class Q_EXPORT QTranslatorMessage -class QTranslatorMessage -{ -public: - QTranslatorMessage(); - QTranslatorMessage( const char * context, - const char * sourceText, - const char * comment, - const QString& translation = QString::null ); - QTranslatorMessage( QDataStream & ); - QTranslatorMessage( const QTranslatorMessage & m ); - - QTranslatorMessage & operator=( const QTranslatorMessage & m ); - - uint hash() const { return h; } - const char *context() const { return cx; } - const char *sourceText() const { return st; } - const char *comment() const { return cm; } - - void setTranslation( const QString & translation ) { tn = translation; } - QString translation() const { return tn; } - - enum Prefix { NoPrefix, Hash, HashContext, HashContextSourceText, - HashContextSourceTextComment }; - void write( QDataStream & s, bool strip = FALSE, - Prefix prefix = HashContextSourceTextComment ) const; - Prefix commonPrefix( const QTranslatorMessage& ) const; - - bool operator==( const QTranslatorMessage& m ) const; - bool operator!=( const QTranslatorMessage& m ) const - { return !operator==( m ); } - bool operator<( const QTranslatorMessage& m ) const; - bool operator<=( const QTranslatorMessage& m ) const - { return !m.operator<( *this ); } - bool operator>( const QTranslatorMessage& m ) const - { return m.operator<( *this ); } - bool operator>=( const QTranslatorMessage& m ) const - { return !operator<( m ); } - -private: - uint h; - Q3CString cx; - Q3CString st; - Q3CString cm; - QString tn; - - enum Tag { Tag_End = 1, Tag_SourceText16, Tag_Translation, Tag_Context16, - Tag_Hash, Tag_SourceText, Tag_Context, Tag_Comment, - Tag_Obsolete1 }; -}; - -#endif // USE_QT4 - #endif /* TQT_TQTRANSLATOR_H */ diff --git a/qtinterface/interface_tqt3/tqtsciicodec.h b/qtinterface/interface_tqt3/tqtsciicodec.h index 916a970..16708bd 100644 --- a/qtinterface/interface_tqt3/tqtsciicodec.h +++ b/qtinterface/interface_tqt3/tqtsciicodec.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQTSCIICODEC_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QTsciiCodec class -// For Qt3, no changes are needed - #include <ntqtsciicodec.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QTsciiCodec class -// For Qt4, this class has been removed! - -#endif // USE_QT4 - #endif /* TQT_TQTSCIICODEC_H */ diff --git a/qtinterface/interface_tqt3/tqurl.h b/qtinterface/interface_tqt3/tqurl.h index a7a207b..0700281 100644 --- a/qtinterface/interface_tqt3/tqurl.h +++ b/qtinterface/interface_tqt3/tqurl.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQURL_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QUrl class -// For Qt3, no changes are needed - #include <ntqurl.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QUrl class -// For Qt4, some changes are needed - -#include <Qt/ntqurl.h> - -#endif // USE_QT4 - #endif /* TQT_TQURL_H */ diff --git a/qtinterface/interface_tqt3/tqurlinfo.h b/qtinterface/interface_tqt3/tqurlinfo.h index 63a6bfa..c583089 100644 --- a/qtinterface/interface_tqt3/tqurlinfo.h +++ b/qtinterface/interface_tqt3/tqurlinfo.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQURLINFO_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QUrlInfo class -// For Qt3, no changes are needed - #include <ntqurlinfo.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QUrlInfo class -// For Qt4, some changes are needed - -#include <Qt/ntqurlinfo.h> - -#endif // USE_QT4 - #endif /* TQT_TQURL_H */ diff --git a/qtinterface/interface_tqt3/tqurloperator.h b/qtinterface/interface_tqt3/tqurloperator.h index 9426bc8..6e8bb60 100644 --- a/qtinterface/interface_tqt3/tqurloperator.h +++ b/qtinterface/interface_tqt3/tqurloperator.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQURLOPERATOR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QUrlOperator class -// For Qt3, no changes are needed - #include <ntqurloperator.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QUrlOperator class -// For Qt4, some changes are needed - -#include <Qt/q3urloperator.h> - -#endif // USE_QT4 - #endif /* TQT_TQURLOPERATOR_H */ diff --git a/qtinterface/interface_tqt3/tqutfcodec.h b/qtinterface/interface_tqt3/tqutfcodec.h index aa3be3b..700078c 100644 --- a/qtinterface/interface_tqt3/tqutfcodec.h +++ b/qtinterface/interface_tqt3/tqutfcodec.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQUTFCODEC_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QUtfCodec class -// For Qt3, no changes are needed - #include <ntqutfcodec.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QUtfCodec class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQUTFCODEC_H */ diff --git a/qtinterface/interface_tqt3/tquuid.h b/qtinterface/interface_tqt3/tquuid.h index 9f93b07..fc56972 100644 --- a/qtinterface/interface_tqt3/tquuid.h +++ b/qtinterface/interface_tqt3/tquuid.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQUUID_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QUuid class -// For Qt3, no changes are needed - #include <ntquuid.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QUuid class -// For Qt4, some changes are needed - -#include <Qt/ntquuid.h> - -#endif // USE_QT4 - #endif /* TQT_TQUUID_H */ diff --git a/qtinterface/interface_tqt3/tqvalidator.h b/qtinterface/interface_tqt3/tqvalidator.h index 18c11c8..d8640e2 100644 --- a/qtinterface/interface_tqt3/tqvalidator.h +++ b/qtinterface/interface_tqt3/tqvalidator.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQVALIDATOR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QValidator class -// For Qt3, no changes are needed - #include <ntqvalidator.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QValidator class -// For Qt4, some changes are needed - -#include <Qt/ntqvalidator.h> - -#endif // USE_QT4 - #endif /* TQT_TQVALIDATOR_H */ diff --git a/qtinterface/interface_tqt3/tqvaluelist.h b/qtinterface/interface_tqt3/tqvaluelist.h index 6237fde..0b40bd5 100644 --- a/qtinterface/interface_tqt3/tqvaluelist.h +++ b/qtinterface/interface_tqt3/tqvaluelist.h @@ -24,697 +24,6 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqdatastream.h> - -#ifdef USE_QT3 - -// Reimplement the QValueList class -// For Qt3, no changes are needed - #include <ntqvaluelist.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QValueList class -// For Qt4, some changes are needed - -#include <Qt/q3shared.h> -#include <Qt/q3valuelist.h> -#include <Qt/ntqlist.h> - -/**************************************************************************** -** $Id: qt/ntqvaluelist.h 3.3.7 edited Aug 31 2005 $ -** -** Definition of TQValueList class -** -** Created : 990406 -** -** Copyright (C) 1992-2005 Trolltech AS. All rights reserved. -** -** This file is part of the tools module of the Qt GUI Toolkit. -** -** This file may be distributed under the terms of the Q Public License -** as defined by Trolltech AS of Norway and appearing in the file -** LICENSE.QPL included in the packaging of this file. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** See http://www.trolltech.com/qpl/ for QPL licensing information. -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -//#define QT_CHECK_VALUELIST_RANGE - -#if defined(Q_CC_MSVC) -#pragma warning(disable:4284) // "return type for operator -> is not a UDT" -#endif - -template <class T> -class TQValueListNode -{ -public: - TQValueListNode( const T& t ) : data( t ) { } - TQValueListNode() { } -#if defined(Q_TEMPLATEDLL) - // Workaround MS bug in memory de/allocation in DLL vs. EXE - virtual ~TQValueListNode() { } -#endif - - TQValueListNode<T>* next; - TQValueListNode<T>* prev; - T data; -}; - -template<class T> -class TQValueListIterator -{ - public: - /** - * Typedefs - */ - typedef TQValueListNode<T>* NodePtr; -#ifndef TQT_NO_STL - typedef std::bidirectional_iterator_tag iterator_category; -#endif - typedef T value_type; - typedef size_t size_type; -#ifndef TQT_NO_STL - typedef ptrdiff_t difference_type; -#else - typedef int difference_type; -#endif - typedef T* pointer; - typedef T& reference; - - /** - * Variables - */ - NodePtr node; - - /** - * Functions - */ - TQValueListIterator() : node( 0 ) {} - TQValueListIterator( NodePtr p ) : node( p ) {} - TQValueListIterator( const TQValueListIterator<T>& it ) : node( it.node ) {} - - bool operator==( const TQValueListIterator<T>& it ) const { return node == it.node; } - bool operator!=( const TQValueListIterator<T>& it ) const { return node != it.node; } - const T& operator*() const { return node->data; } - T& operator*() { return node->data; } - // UDT for T = x* - // T* operator->() const { return &node->data; } - - TQValueListIterator<T>& operator++() { - node = node->next; - return *this; - } - - TQValueListIterator<T> operator++(int) { - TQValueListIterator<T> tmp = *this; - node = node->next; - return tmp; - } - - TQValueListIterator<T>& operator--() { - node = node->prev; - return *this; - } - - TQValueListIterator<T> operator--(int) { - TQValueListIterator<T> tmp = *this; - node = node->prev; - return tmp; - } - - TQValueListIterator<T>& operator+=( int j ) { - while ( j-- ) - node = node->next; - return *this; - } - - TQValueListIterator<T>& operator-=( int j ) { - while ( j-- ) - node = node->prev; - return *this; - } - -}; - -template<class T> -class TQValueListConstIterator -{ - public: - /** - * Typedefs - */ - typedef TQValueListNode<T>* NodePtr; -#ifndef TQT_NO_STL - typedef std::bidirectional_iterator_tag iterator_category; -#endif - typedef T value_type; - typedef size_t size_type; -#ifndef TQT_NO_STL - typedef ptrdiff_t difference_type; -#else - typedef int difference_type; -#endif - typedef const T* pointer; - typedef const T& reference; - - /** - * Variables - */ - NodePtr node; - - /** - * Functions - */ - TQValueListConstIterator() : node( 0 ) {} - TQValueListConstIterator( NodePtr p ) : node( p ) {} - TQValueListConstIterator( const TQValueListConstIterator<T>& it ) : node( it.node ) {} - TQValueListConstIterator( const TQValueListIterator<T>& it ) : node( it.node ) {} - - bool operator==( const TQValueListConstIterator<T>& it ) const { return node == it.node; } - bool operator!=( const TQValueListConstIterator<T>& it ) const { return node != it.node; } - const T& operator*() const { return node->data; } - // UDT for T = x* - // const T* operator->() const { return &node->data; } - - TQValueListConstIterator<T>& operator++() { - node = node->next; - return *this; - } - - TQValueListConstIterator<T> operator++(int) { - TQValueListConstIterator<T> tmp = *this; - node = node->next; - return tmp; - } - - TQValueListConstIterator<T>& operator--() { - node = node->prev; - return *this; - } - - TQValueListConstIterator<T> operator--(int) { - TQValueListConstIterator<T> tmp = *this; - node = node->prev; - return tmp; - } -}; - -template <class T> -class TQValueListPrivate : public Q3Shared -{ -public: - /** - * Typedefs - */ - typedef TQValueListIterator<T> Iterator; - typedef TQValueListConstIterator<T> ConstIterator; - typedef TQValueListNode<T> Node; - typedef TQValueListNode<T>* NodePtr; - typedef size_t size_type; - - /** - * Functions - */ - TQValueListPrivate(); - TQValueListPrivate( const TQValueListPrivate<T>& _p ); - - void derefAndDelete() // ### hack to get around hp-cc brain damage - { - if ( deref() ) - delete this; - } - -#if defined(Q_TEMPLATEDLL) - // Workaround MS bug in memory de/allocation in DLL vs. EXE - virtual -#endif - ~TQValueListPrivate(); - - Iterator insert( Iterator it, const T& x ); - Iterator remove( Iterator it ); - NodePtr find( NodePtr start, const T& x ) const; - int findIndex( NodePtr start, const T& x ) const; - uint contains( const T& x ) const; - uint remove( const T& x ); - NodePtr at( size_type i ) const; - void clear(); - - NodePtr node; - size_type nodes; -}; - -template <class T> -TQValueListPrivate<T>::TQValueListPrivate() -{ - node = new Node; node->next = node->prev = node; nodes = 0; -} - -template <class T> -TQValueListPrivate<T>::TQValueListPrivate( const TQValueListPrivate<T>& _p ) - : Q3Shared() -{ - node = new Node; node->next = node->prev = node; nodes = 0; - Iterator b( _p.node->next ); - Iterator e( _p.node ); - Iterator i( node ); - while( b != e ) - insert( i, *b++ ); -} - -template <class T> -TQValueListPrivate<T>::~TQValueListPrivate() { - NodePtr p = node->next; - while( p != node ) { - NodePtr x = p->next; - delete p; - p = x; - } - delete node; -} - -template <class T> -Q_TYPENAME TQValueListPrivate<T>::Iterator TQValueListPrivate<T>::insert( Q_TYPENAME TQValueListPrivate<T>::Iterator it, const T& x ) -{ - NodePtr p = new Node( x ); - p->next = it.node; - p->prev = it.node->prev; - it.node->prev->next = p; - it.node->prev = p; - nodes++; - return p; -} - -template <class T> -Q_TYPENAME TQValueListPrivate<T>::Iterator TQValueListPrivate<T>::remove( Q_TYPENAME TQValueListPrivate<T>::Iterator it ) -{ - Q_ASSERT ( it.node != node ); - NodePtr next = it.node->next; - NodePtr prev = it.node->prev; - prev->next = next; - next->prev = prev; - delete it.node; - nodes--; - return Iterator( next ); -} - -template <class T> -Q_TYPENAME TQValueListPrivate<T>::NodePtr TQValueListPrivate<T>::find( Q_TYPENAME TQValueListPrivate<T>::NodePtr start, const T& x ) const -{ - ConstIterator first( start ); - ConstIterator last( node ); - while( first != last) { - if ( *first == x ) - return first.node; - ++first; - } - return last.node; -} - -template <class T> -int TQValueListPrivate<T>::findIndex( Q_TYPENAME TQValueListPrivate<T>::NodePtr start, const T& x ) const -{ - ConstIterator first( start ); - ConstIterator last( node ); - int pos = 0; - while( first != last) { - if ( *first == x ) - return pos; - ++first; - ++pos; - } - return -1; -} - -template <class T> -uint TQValueListPrivate<T>::contains( const T& x ) const -{ - uint result = 0; - Iterator first = Iterator( node->next ); - Iterator last = Iterator( node ); - while( first != last) { - if ( *first == x ) - ++result; - ++first; - } - return result; -} - -template <class T> -uint TQValueListPrivate<T>::remove( const T& _x ) -{ - const T x = _x; - uint result = 0; - Iterator first = Iterator( node->next ); - Iterator last = Iterator( node ); - while( first != last) { - if ( *first == x ) { - first = remove( first ); - ++result; - } else - ++first; - } - return result; -} - -template <class T> -Q_TYPENAME TQValueListPrivate<T>::NodePtr TQValueListPrivate<T>::at( size_type i ) const -{ - Q_ASSERT( i <= nodes ); - NodePtr p = node->next; - for( size_type x = 0; x < i; ++x ) - p = p->next; - return p; -} - -template <class T> -void TQValueListPrivate<T>::clear() -{ - nodes = 0; - NodePtr p = node->next; - while( p != node ) { - NodePtr next = p->next; - delete p; - p = next; - } - node->next = node->prev = node; -} - -#ifdef QT_CHECK_RANGE -# if !defined( TQT_NO_DEBUG ) && defined( QT_CHECK_VALUELIST_RANGE ) -# define QT_CHECK_INVALID_LIST_ELEMENT if ( empty() ) qWarning( "TQValueList: Warning invalid element" ) -# define QT_CHECK_INVALID_LIST_ELEMENT_FATAL Q_ASSERT( !empty() ); -# else -# define QT_CHECK_INVALID_LIST_ELEMENT -# define QT_CHECK_INVALID_LIST_ELEMENT_FATAL -# endif -#else -# define QT_CHECK_INVALID_LIST_ELEMENT -# define QT_CHECK_INVALID_LIST_ELEMENT_FATAL -#endif - -template <class T> class QDeepCopy; - -template <class T> -class TQValueList -{ -public: - /** - * Typedefs - */ - typedef TQValueListIterator<T> iterator; - typedef TQValueListConstIterator<T> const_iterator; - typedef T value_type; - typedef value_type* pointer; - typedef const value_type* const_pointer; - typedef value_type& reference; - typedef const value_type& const_reference; - typedef size_t size_type; -#ifndef TQT_NO_STL - typedef ptrdiff_t difference_type; -#else - typedef int difference_type; -#endif - - /** - * API - */ - TQValueList() { sh = new TQValueListPrivate<T>; } - TQValueList( const TQValueList<T>& l ) { sh = l.sh; sh->ref(); } -#ifndef TQT_NO_STL - TQValueList( const std::list<T>& l ) - { - sh = new TQValueListPrivate<T>; - qCopy( l.begin(), l.end(), std::back_inserter( *this ) ); - } -#endif - ~TQValueList() { sh->derefAndDelete(); } - - TQValueList<T>& operator= ( const TQValueList<T>& l ) - { - l.sh->ref(); - sh->derefAndDelete(); - sh = l.sh; - return *this; - } -#ifndef TQT_NO_STL - TQValueList<T>& operator= ( const std::list<T>& l ) - { - detach(); - qCopy( l.begin(), l.end(), std::back_inserter( *this ) ); - return *this; - } - bool operator== ( const std::list<T>& l ) const - { - if ( size() != l.size() ) - return FALSE; - const_iterator it2 = begin(); -#if !defined(Q_CC_MIPS) - typename -#endif - std::list<T>::const_iterator it = l.begin(); - for ( ; it2 != end(); ++it2, ++it ) - if ( !((*it2) == (*it)) ) - return FALSE; - return TRUE; - } -#endif - - // Interoperability - TQValueList(const QList<T>& l) - { - for (int i = 0; i < l.size(); ++i) append(l.at(i)); - } - - TQValueList<T>& operator= (const QList<T>& l) - { - this->clear(); - for (int i = 0; i < l.size(); ++i) append(l.at(i)); - return *this; - } - - operator QList<T>() const { - QList<T> list; - for (typename TQValueList<T>::const_iterator it = this->constBegin(); - it != this->constEnd(); ++it) - list.append(*it); - return list; - } - - bool operator== ( const TQValueList<T>& l ) const; - bool operator!= ( const TQValueList<T>& l ) const { return !( *this == l ); } - iterator begin() { detach(); return iterator( sh->node->next ); } - const_iterator begin() const { return const_iterator( sh->node->next ); } - const_iterator constBegin() const { return const_iterator( sh->node->next ); } - iterator end() { detach(); return iterator( sh->node ); } - const_iterator end() const { return const_iterator( sh->node ); } - const_iterator constEnd() const { return const_iterator( sh->node ); } - iterator insert( iterator it, const T& x ) { detach(); return sh->insert( it, x ); } - uint remove( const T& x ) { detach(); return sh->remove( x ); } - void clear(); - - // ### 4.0: move out of class - TQValueList<T>& operator<< ( const T& x ) - { - append( x ); - return *this; - } - - size_type size() const { return sh->nodes; } - bool empty() const { return sh->nodes == 0; } - void push_front( const T& x ) { detach(); sh->insert( begin(), x ); } - void push_back( const T& x ) { detach(); sh->insert( end(), x ); } - iterator erase( iterator pos ) { detach(); return sh->remove( pos ); } - iterator erase( iterator first, iterator last ); - reference front() { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *begin(); } - const_reference front() const { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *begin(); } - reference back() { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *(--end()); } - const_reference back() const { QT_CHECK_INVALID_LIST_ELEMENT_FATAL; return *(--end()); } - void pop_front() { QT_CHECK_INVALID_LIST_ELEMENT; erase( begin() ); } - void pop_back() { - QT_CHECK_INVALID_LIST_ELEMENT; - iterator tmp = end(); - erase( --tmp ); - } - void insert( iterator pos, size_type n, const T& x ); - // Some compilers (incl. vc++) would instantiate this function even if - // it is not used; this would constrain TQValueList to classes that provide - // an operator< - /* - void sort() - { - qHeapSort( *this ); - } - */ - - TQValueList<T> operator+ ( const TQValueList<T>& l ) const; - TQValueList<T>& operator+= ( const TQValueList<T>& l ); - - iterator fromLast() { detach(); return iterator( sh->node->prev ); } - const_iterator fromLast() const { return const_iterator( sh->node->prev ); } - - bool isEmpty() const { return ( sh->nodes == 0 ); } - - iterator append( const T& x ) { detach(); return sh->insert( end(), x ); } - iterator prepend( const T& x ) { detach(); return sh->insert( begin(), x ); } - - iterator remove( iterator it ) { detach(); return sh->remove( it ); } - - T& first() { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return sh->node->next->data; } - const T& first() const { QT_CHECK_INVALID_LIST_ELEMENT; return sh->node->next->data; } - T& last() { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return sh->node->prev->data; } - const T& last() const { QT_CHECK_INVALID_LIST_ELEMENT; return sh->node->prev->data; } - - T& operator[] ( size_type i ) { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return sh->at(i)->data; } - const T& operator[] ( size_type i ) const { QT_CHECK_INVALID_LIST_ELEMENT; return sh->at(i)->data; } - iterator at( size_type i ) { QT_CHECK_INVALID_LIST_ELEMENT; detach(); return iterator( sh->at(i) ); } - const_iterator at( size_type i ) const { QT_CHECK_INVALID_LIST_ELEMENT; return const_iterator( sh->at(i) ); } - iterator find ( const T& x ) { detach(); return iterator( sh->find( sh->node->next, x) ); } - const_iterator find ( const T& x ) const { return const_iterator( sh->find( sh->node->next, x) ); } - iterator find ( iterator it, const T& x ) { detach(); return iterator( sh->find( it.node, x ) ); } - const_iterator find ( const_iterator it, const T& x ) const { return const_iterator( sh->find( it.node, x ) ); } - int findIndex( const T& x ) const { return sh->findIndex( sh->node->next, x) ; } - size_type contains( const T& x ) const { return sh->contains( x ); } - - size_type count() const { return sh->nodes; } - - TQValueList<T>& operator+= ( const T& x ) - { - append( x ); - return *this; - } - typedef TQValueListIterator<T> Iterator; - typedef TQValueListConstIterator<T> ConstIterator; - typedef T ValueType; - -protected: - /** - * Helpers - */ - void detach() { if ( sh->count > 1 ) detachInternal(); } - - /** - * Variables - */ - TQValueListPrivate<T>* sh; - -private: - void detachInternal(); - - friend class QDeepCopy< TQValueList<T> >; -}; - -template <class T> -bool TQValueList<T>::operator== ( const TQValueList<T>& l ) const -{ - if ( size() != l.size() ) - return FALSE; - const_iterator it2 = begin(); - const_iterator it = l.begin(); - for( ; it != l.end(); ++it, ++it2 ) - if ( !( *it == *it2 ) ) - return FALSE; - return TRUE; -} - -template <class T> -void TQValueList<T>::clear() -{ - if ( sh->count == 1 ) sh->clear(); else { sh->deref(); sh = new TQValueListPrivate<T>; } -} - -template <class T> -Q_TYPENAME TQValueList<T>::iterator TQValueList<T>::erase( Q_TYPENAME TQValueList<T>::iterator first, Q_TYPENAME TQValueList<T>::iterator last ) -{ - while ( first != last ) - erase( first++ ); - return last; -} - - -template <class T> -void TQValueList<T>::insert( Q_TYPENAME TQValueList<T>::iterator pos, size_type n, const T& x ) -{ - for ( ; n > 0; --n ) - insert( pos, x ); -} - -template <class T> -TQValueList<T> TQValueList<T>::operator+ ( const TQValueList<T>& l ) const -{ - TQValueList<T> l2( *this ); - for( const_iterator it = l.begin(); it != l.end(); ++it ) - l2.append( *it ); - return l2; -} - -template <class T> -TQValueList<T>& TQValueList<T>::operator+= ( const TQValueList<T>& l ) -{ - TQValueList<T> copy = l; - for( const_iterator it = copy.begin(); it != copy.end(); ++it ) - append( *it ); - return *this; -} - -template <class T> -void TQValueList<T>::detachInternal() -{ - sh->deref(); sh = new TQValueListPrivate<T>( *sh ); -} - -#ifndef TQT_NO_DATASTREAM -template <class T> -QDataStream& operator>>( QDataStream& s, TQValueList<T>& l ) -{ - l.clear(); - Q_UINT32 c; - s >> c; - for( Q_UINT32 i = 0; i < c; ++i ) - { - T t; - s >> t; - l.append( t ); - if ( s.atEnd() ) - break; - } - return s; -} - -template <class T> -QDataStream& operator<<( QDataStream& s, const TQValueList<T>& l ) -{ - s << (Q_UINT32)l.size(); - TQValueListConstIterator<T> it = l.begin(); - for( ; it != l.end(); ++it ) - s << *it; - return s; -} -#endif // TQT_NO_DATASTREAM - -/****************************************************************************/ - -#endif // USE_QT4 - #endif /* TQT_TQVALUELIST_H */ diff --git a/qtinterface/interface_tqt3/tqvaluestack.h b/qtinterface/interface_tqt3/tqvaluestack.h index 0afc0c5..665f5c4 100644 --- a/qtinterface/interface_tqt3/tqvaluestack.h +++ b/qtinterface/interface_tqt3/tqvaluestack.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQVALUESTACK_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QValueStack class -// For Qt3, no changes are needed - #include <ntqvaluestack.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QValueStack class -// For Qt4, some changes are needed - -#include <Qt/q3valuestack.h> - -#endif // USE_QT4 - #endif /* TQT_TQVALUESTACK_H */ diff --git a/qtinterface/interface_tqt3/tqvaluevector.h b/qtinterface/interface_tqt3/tqvaluevector.h index 608db82..96742ed 100644 --- a/qtinterface/interface_tqt3/tqvaluevector.h +++ b/qtinterface/interface_tqt3/tqvaluevector.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQVALUEVECTOR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QValueVector class -// For Qt3, no changes are needed - #include <ntqvaluevector.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QValueVector class -// For Qt4, some changes are needed - -#include <Qt/q3valuevector.h> - -#endif // USE_QT4 - #endif /* TQT_TQVALUEVECTOR_H */ diff --git a/qtinterface/interface_tqt3/tqvariant.cpp b/qtinterface/interface_tqt3/tqvariant.cpp index da08e5a..6459cdf 100644 --- a/qtinterface/interface_tqt3/tqvariant.cpp +++ b/qtinterface/interface_tqt3/tqvariant.cpp @@ -21,109 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqvariant.h> - -#ifdef USE_QT4 - -#include <Qt/ntqbitmap.h> - -// This is taken straight from <private/qvariant_p.h> -#ifdef Q_CC_SUN // Sun CC picks the wrong overload, so introduce awful hack - -template <typename T> -inline T *v_cast(const QVariant::Private *nd, T * = 0) -{ - QVariant::Private *d = const_cast<QVariant::Private *>(nd); - return ((sizeof(T) > sizeof(QVariant::Private::Data)) - ? static_cast<T *>(d->data.shared->ptr) - : static_cast<T *>(static_cast<void *>(&d->data.c))); -} - -#else // every other compiler in this world - -template <typename T> -inline const T *v_cast(const QVariant::Private *d, T * = 0) -{ - return ((sizeof(T) > sizeof(QVariant::Private::Data)) - ? static_cast<const T *>(d->data.shared->ptr) - : static_cast<const T *>(static_cast<const void *>(&d->data.c))); -} - -template <typename T> -inline T *v_cast(QVariant::Private *d, T * = 0) -{ - return ((sizeof(T) > sizeof(QVariant::Private::Data)) - ? static_cast<T *>(d->data.shared->ptr) - : static_cast<T *>(static_cast<void *>(&d->data.c))); -} - -#endif - -template <typename T> -inline T qVariantToHelper(const QVariant::Private &d, QVariant::Type t, - const QVariant::Handler *handler, T * = 0) -{ - if (d.type == t) - return *v_cast<T>(&d); - - T ret; - handler->convert(&d, t, &ret, 0); - return ret; -} - -QFont QVariant::toFont() const { - return qVariantToHelper<QFont>(d, Font, handler); -} - -QColor QVariant::toColor() const { - return qVariantToHelper<QColor>(d, Color, handler); -} - -QCursor QVariant::toCursor() const { - return qVariantToHelper<QCursor>(d, Cursor, handler); -} - -QBitmap QVariant::toBitmap() const { - return qVariantToHelper<QBitmap>(d, Bitmap, handler); -} - -Q3PointArray QVariant::toPointArray() const { - return qVariantToHelper<Q3PointArray>(d, PointArray, handler); -} - -QRegion QVariant::toRegion() const { - return qVariantToHelper<QRegion>(d, Region, handler); -} - -QPixmap QVariant::toPixmap() const { - return qVariantToHelper<QPixmap>(d, Pixmap, handler); -} - -QImage QVariant::toImage() const { - return qVariantToHelper<QImage>(d, Image, handler); -} - -QBrush QVariant::toBrush() const { - return qVariantToHelper<QBrush>(d, Brush, handler); -} - -QPalette QVariant::toPalette() const { - return qVariantToHelper<QPalette>(d, Palette, handler); -} - -QColorGroup QVariant::toColorGroup() const { - return qVariantToHelper<QColorGroup>(d, ColorGroup, handler); -} - -QIconSet QVariant::toIconSet() const { - return qVariantToHelper<QIconSet>(d, IconSet, handler); -} - -QFont QVariant::asFont() { - return toFont(); -} - -QColor QVariant::asColor() { - return toColor(); -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqvariant.h b/qtinterface/interface_tqt3/tqvariant.h index b03b514..2e0259a 100644 --- a/qtinterface/interface_tqt3/tqvariant.h +++ b/qtinterface/interface_tqt3/tqvariant.h @@ -24,23 +24,6 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqdatastream.h> - -#ifdef USE_QT3 - -// Reimplement the QVariant class -// For Qt3, no changes are needed - #include <ntqvariant.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QVariant class -// For Qt4, some changes are needed - -#include <tqt4/Qt/ntqvariant.h> - -#endif // USE_QT4 - #endif /* TQT_TQVARIANT_H */ diff --git a/qtinterface/interface_tqt3/tqvbox.h b/qtinterface/interface_tqt3/tqvbox.h index 82ba68f..d104faf 100644 --- a/qtinterface/interface_tqt3/tqvbox.h +++ b/qtinterface/interface_tqt3/tqvbox.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQVBOX_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QVBox class -// For Qt3, no changes are needed - #include <ntqvbox.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QVBox class -// For Qt4, some changes are needed - -#include <Qt/q3vbox.h> - -#endif // USE_QT4 - #endif /* TQT_TQVBOX_H */ diff --git a/qtinterface/interface_tqt3/tqvbuttongroup.h b/qtinterface/interface_tqt3/tqvbuttongroup.h index 467184f..4555412 100644 --- a/qtinterface/interface_tqt3/tqvbuttongroup.h +++ b/qtinterface/interface_tqt3/tqvbuttongroup.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQVBUTTONGROUP_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QVButtonGroup class -// For Qt3, no changes are needed - #include <ntqvbuttongroup.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QVButtonGroup class -// For Qt4, no changes are needed - -#include <Qt/q3buttongroup.h> - -#endif // USE_QT4 - #endif /* TQT_TQVBUTTONGROUP_H */ diff --git a/qtinterface/interface_tqt3/tqvfbhdr.h b/qtinterface/interface_tqt3/tqvfbhdr.h index f42a418..cbc40ec 100644 --- a/qtinterface/interface_tqt3/tqvfbhdr.h +++ b/qtinterface/interface_tqt3/tqvfbhdr.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQVFBHDR_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QVFBHDR class -// For Qt3, no changes are needed - #include <ntqvfbhdr.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QVFBHDR class -// For Qt4, some changes are needed - -#include <Qt/ntqvfbhdr.h> - -#endif // USE_QT4 - #endif /* TQT_TQVFBHDR_H */ diff --git a/qtinterface/interface_tqt3/tqvgroupbox.h b/qtinterface/interface_tqt3/tqvgroupbox.h index fc04aae..4b00b0b 100644 --- a/qtinterface/interface_tqt3/tqvgroupbox.h +++ b/qtinterface/interface_tqt3/tqvgroupbox.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQVGROUPBOX_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QVGroupBox class -// For Qt3, no changes are needed - #include <ntqvgroupbox.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QVGroupBox class -// For Qt4, some changes are needed - -#include <Qt/q3vgroupbox.h> - -#endif // USE_QT4 - #endif /* TQT_TQVGROUPBOX_H */ diff --git a/qtinterface/interface_tqt3/tqwaitcondition.h b/qtinterface/interface_tqt3/tqwaitcondition.h index 397a8fa..cf1c125 100644 --- a/qtinterface/interface_tqt3/tqwaitcondition.h +++ b/qtinterface/interface_tqt3/tqwaitcondition.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQWAITCONDITION_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QWaitCondition class -// For Qt3, no changes are needed - #include <ntqwaitcondition.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QWaitCondition class -// For Qt4, some changes are needed - -#include <Qt/ntqwaitcondition.h> - -#endif // USE_QT4 - #endif /* TQT_TQWAITCONDITION_H */ diff --git a/qtinterface/interface_tqt3/tqwhatsthis.cpp b/qtinterface/interface_tqt3/tqwhatsthis.cpp index 8a4ff7d..b22ead3 100644 --- a/qtinterface/interface_tqt3/tqwhatsthis.cpp +++ b/qtinterface/interface_tqt3/tqwhatsthis.cpp @@ -21,15 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqwhatsthis.h> - -#ifdef USE_QT4 - -static QString textFor( QWidget * widget, const QPoint & pos, bool includeParents ) { - QString text; - Q3WhatsThis *wt = new Q3WhatsThis(widget); - text = wt->text(pos); - delete wt; - return text; -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqwhatsthis.h b/qtinterface/interface_tqt3/tqwhatsthis.h index 86cee74..d6ee76f 100644 --- a/qtinterface/interface_tqt3/tqwhatsthis.h +++ b/qtinterface/interface_tqt3/tqwhatsthis.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQWHATSTHIS_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QWhatsThis class -// For Qt3, no changes are needed - #include <ntqwhatsthis.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QWhatsThis class -// For Qt4, some changes are needed - -#include <tqt4/Qt/q3whatsthis.h> - -#endif // USE_QT4 - #endif /* TQT_TQWHATSTHIS_H */ diff --git a/qtinterface/interface_tqt3/tqwidget.cpp b/qtinterface/interface_tqt3/tqwidget.cpp index af0c6c7..f495c50 100644 --- a/qtinterface/interface_tqt3/tqwidget.cpp +++ b/qtinterface/interface_tqt3/tqwidget.cpp @@ -21,15 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <ntqwidget.h> - -#ifdef USE_QT4 - -Qt::WidgetAttribute QWidget::testWState( Qt::WidgetAttribute s ) const { - return (Qt::WidgetAttribute)(data->widget_attributes & s); -} - -Qt::WindowFlags QWidget::testWFlags( Qt::WindowFlags f ) const { - return (Qt::WindowFlags)(data->window_flags & f); -} - -#endif // USE_QT4 diff --git a/qtinterface/interface_tqt3/tqwidget.h b/qtinterface/interface_tqt3/tqwidget.h index af408e3..4ad01a1 100644 --- a/qtinterface/interface_tqt3/tqwidget.h +++ b/qtinterface/interface_tqt3/tqwidget.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQWIDGET_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QWidget class -// For Qt3, no changes are needed - #include <ntqwidget.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QWidget class -// For Qt4, some changes are needed - -#include <tqt4/Qt/ntqwidget.h> - -#endif // USE_QT4 - #endif /* TQT_TQWIDGET_H */ diff --git a/qtinterface/interface_tqt3/tqwidgetfactory.h b/qtinterface/interface_tqt3/tqwidgetfactory.h index 75e301d..77e7882 100644 --- a/qtinterface/interface_tqt3/tqwidgetfactory.h +++ b/qtinterface/interface_tqt3/tqwidgetfactory.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQWIDGETFACTORY_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QWidgetFactory class -// For Qt3, no changes are needed - #include <ntqwidgetfactory.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QWidgetFactory class -// For Qt4, some changes are needed - -#include <QtDesigner/formbuilder.h> - -#endif // USE_QT4 - #endif /* TQT_TQWIDGETFACTORY_H */ diff --git a/qtinterface/interface_tqt3/tqwidgetintdict.h b/qtinterface/interface_tqt3/tqwidgetintdict.h index ce19cde..99ed483 100644 --- a/qtinterface/interface_tqt3/tqwidgetintdict.h +++ b/qtinterface/interface_tqt3/tqwidgetintdict.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQWIDGETINTDICT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QWidgetIntDict class -// For Qt3, no changes are needed - #include <ntqwidgetintdict.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QWidgetIntDict class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQWIDGETINTDICT_H */ diff --git a/qtinterface/interface_tqt3/tqwidgetlist.h b/qtinterface/interface_tqt3/tqwidgetlist.h index 8b5bba4..043c25d 100644 --- a/qtinterface/interface_tqt3/tqwidgetlist.h +++ b/qtinterface/interface_tqt3/tqwidgetlist.h @@ -23,69 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQWIDGETLIST_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the TQWidgetList class -// For Qt3, no changes are needed - #include <ntqwidgetlist.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the TQWidgetList class -// For Qt4, this class was removed! - -#include <ntqwidget.h> -#include <ntqptrlist.h> - -class TQWidgetList : public TQPtrList<QWidget> -{ -public: - TQWidgetList() : TQPtrList<QWidget>() {} - TQWidgetList( const TQWidgetList &list ) : TQPtrList<QWidget>(list) {} - ~TQWidgetList() { clear(); } - TQWidgetList &operator=(const TQWidgetList &list) - { return (TQWidgetList&)TQPtrList<QWidget>::operator=(list); } - - // Interoperability - TQWidgetList(const QWidgetList& l) - { - for (int i = 0; i < l.size(); ++i) append(l.at(i)); - } - - TQWidgetList& operator= (const QWidgetList& l) - { - this->clear(); - for (int i = 0; i < l.size(); ++i) append(l.at(i)); - return *this; - } - - operator QWidgetList() const { - QWidgetList list; - for (TQWidgetList::const_iterator it = TQWidgetList::constBegin(); - it != TQWidgetList::constEnd(); ++it) - list.append(*it); - return list; - } - - operator TQWidgetList*() { - TQWidgetList *qwl; - qwl = new TQWidgetList(*this); - return qwl; - } -}; - -class TQWidgetListIt : public TQPtrListIterator<QWidget> -{ -public: - TQWidgetListIt( const TQWidgetList &l ) : TQPtrListIterator<QWidget>(l) {} - TQWidgetListIt &operator=(const TQWidgetListIt &i) - { return (TQWidgetListIt&)TQPtrListIterator<QWidget>::operator=(i); } -}; - -#endif // USE_QT4 - #endif /* TQT_TQWIDGETLIST_H */ diff --git a/qtinterface/interface_tqt3/tqwidgetplugin.h b/qtinterface/interface_tqt3/tqwidgetplugin.h index ffe3e60..0e45288 100644 --- a/qtinterface/interface_tqt3/tqwidgetplugin.h +++ b/qtinterface/interface_tqt3/tqwidgetplugin.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQWIDGETPLUGIN_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QWidgetPlugin class -// For Qt3, no changes are needed - #include <ntqwidgetplugin.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QWidgetPlugin class -// For Qt4, this class was removed! - -#endif // USE_QT4 - #endif /* TQT_TQWIDGETPLUGIN_H */ diff --git a/qtinterface/interface_tqt3/tqwidgetstack.h b/qtinterface/interface_tqt3/tqwidgetstack.h index 7fb3f0b..2e6d054 100644 --- a/qtinterface/interface_tqt3/tqwidgetstack.h +++ b/qtinterface/interface_tqt3/tqwidgetstack.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQWIDGETSTACK_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QWidgetStack class -// For Qt3, no changes are needed - #include <ntqwidgetstack.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QWidgetStack class -// For Qt4, some changes are needed - -#include <Qt/q3widgetstack.h> - -#endif // USE_QT4 - #endif /* TQT_TQWIDGETSTACK_H */ diff --git a/qtinterface/interface_tqt3/tqwindowdefs.h b/qtinterface/interface_tqt3/tqwindowdefs.h index 8cf652a..8b8abea 100644 --- a/qtinterface/interface_tqt3/tqwindowdefs.h +++ b/qtinterface/interface_tqt3/tqwindowdefs.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQWINDOWDEFS_H #include <tqt.h> - -#ifdef USE_QT3 - -// Pull in Qt3 qwindowdefs defines - #include <ntqwindowdefs.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Pull in Qt4 qwindowdefs defines - -#include <Qt/ntqwindowdefs.h> - -#endif // USE_QT4 - #endif /* TQT_TQWINDOWDEFS_H */ diff --git a/qtinterface/interface_tqt3/tqwindowsstyle.h b/qtinterface/interface_tqt3/tqwindowsstyle.h index 05dadfa..932da39 100644 --- a/qtinterface/interface_tqt3/tqwindowsstyle.h +++ b/qtinterface/interface_tqt3/tqwindowsstyle.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQWINDOWSSTYLE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QWindowsStyle class -// For Qt3, no changes are needed - #include <ntqwindowsstyle.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QWindowsStyle class -// For Qt4, some changes are needed - -#include <Qt/ntqwindowsstyle.h> - -#endif // USE_QT4 - #endif /* TQT_TQWINDOWSSTYLE_H */ diff --git a/qtinterface/interface_tqt3/tqwinexport.h b/qtinterface/interface_tqt3/tqwinexport.h index 3c4d5b4..d68d4d4 100644 --- a/qtinterface/interface_tqt3/tqwinexport.h +++ b/qtinterface/interface_tqt3/tqwinexport.h @@ -23,21 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQWINEXPORT_H #include <tqt.h> - -#ifdef USE_QT3 - -// Pull in Qt3 qwinexport defines - #include <ntqwinexport.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Pull in Qt4 qwinexport defines - -#include <ntqwinexport.h> - -#endif // USE_QT4 - #endif /* TQT_TQWINEXPORT_H */ diff --git a/qtinterface/interface_tqt3/tqwizard.h b/qtinterface/interface_tqt3/tqwizard.h index c8ea464..8860e13 100644 --- a/qtinterface/interface_tqt3/tqwizard.h +++ b/qtinterface/interface_tqt3/tqwizard.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQWIZARD_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QWizard class -// For Qt3, no changes are needed - #include <ntqwizard.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QWizard class -// For Qt4, some changes are needed - -#include <Qt/q3wizard.h> - -#endif // USE_QT4 - #endif /* TQT_TQWIZARD_H */ diff --git a/qtinterface/interface_tqt3/tqwmatrix.h b/qtinterface/interface_tqt3/tqwmatrix.h index 4bcceb1..d371c57 100644 --- a/qtinterface/interface_tqt3/tqwmatrix.h +++ b/qtinterface/interface_tqt3/tqwmatrix.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQWMATRIX_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QWMatrix class -// For Qt3, no changes are needed - #include <ntqwmatrix.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QWMatrix class -// For Qt4, some changes are needed - -#include <Qt/qmatrix.h> - -#endif // USE_QT4 - #endif /* TQT_TQWMATRIX_H */ diff --git a/qtinterface/interface_tqt3/tqworkspace.h b/qtinterface/interface_tqt3/tqworkspace.h index c30b630..0ac18cb 100644 --- a/qtinterface/interface_tqt3/tqworkspace.h +++ b/qtinterface/interface_tqt3/tqworkspace.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQWORKSPACE_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QWorkspace class -// For Qt3, no changes are needed - #include <ntqworkspace.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QWorkspace class -// For Qt4, some changes are needed - -#include <Qt/ntqworkspace.h> - -#endif // USE_QT4 - #endif /* TQT_TQWORKSPACE_H */ diff --git a/qtinterface/interface_tqt3/tqxml.h b/qtinterface/interface_tqt3/tqxml.h index 7d4a9ef..8064951 100644 --- a/qtinterface/interface_tqt3/tqxml.h +++ b/qtinterface/interface_tqt3/tqxml.h @@ -23,23 +23,6 @@ Boston, MA 02110-1301, USA. #define TQT_TQXML_H #include <tqt.h> - -#ifdef USE_QT3 - -// Reimplement the QXml class -// For Qt3, no changes are needed - #include <ntqxml.h> -#endif // USE_QT3 - -#ifdef USE_QT4 - -// Reimplement the QXml class -// For Qt4, some changes are needed - -#include <Qt/ntqxml.h> - -#endif // USE_QT4 - #endif /* TQT_TQXML_H */ diff --git a/qtinterface/iqtimer.cpp b/qtinterface/iqtimer.cpp index f4fd0e7..6e6a3df 100644 --- a/qtinterface/iqtimer.cpp +++ b/qtinterface/iqtimer.cpp @@ -21,10 +21,3 @@ Boston, MA 02110-1301, USA. #include <tqt.h> #include <tqtimer.h> - -#ifdef USE_QT3 - -//class IQTimer : public QTimer {}; -//typedef QTimer IQTimer; - -#endif diff --git a/qtinterface/tqt.h.cmake b/qtinterface/tqt.h.cmake index d40bdd3..1d870ff 100644 --- a/qtinterface/tqt.h.cmake +++ b/qtinterface/tqt.h.cmake @@ -22,8 +22,6 @@ Boston, MA 02110-1301, USA. #ifndef TQT_H #define TQT_H -#define USE_QT@QT_VERSION@ - #ifndef TQT_VERSION_ONLY #ifdef TQT_METHOD |