Drop USE_QT3/4 code

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/13/head
Michele Calgaro 8 months ago
parent 2ac5e74a45
commit 701d92857c
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -21,7 +21,3 @@ Boston, MA 02110-1301, USA.
#include <tqt.h>
#include <private/qucomextra_p.h>
#ifdef USE_QT4
#endif

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 = &mp;
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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 &region, CoordinateMode cm = CoordDevice ) {
// #warning "Q3Painter::flush is unimplemented!"
// }
void Q3Painter::flush() {
#warning "Q3Painter::flush is unimplemented!"
}
#endif // USE_QT4

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 = &pm;
return pr;
}
#endif // USE_QT4

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -21,9 +21,3 @@ Boston, MA 02110-1301, USA.
#include <tqt.h>
#include <ntqslider.h>
#ifdef USE_QT4
#endif // USE_QT4

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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">
&nbsp;&nbsp;&lt;code_set_name&gt; <i>name</i></br>
&nbsp;&nbsp;&lt;escape_char&gt; <i>character</i></br>
&nbsp;&nbsp;% alias <i>alias</i></br>
&nbsp;&nbsp;CHARMAP</br>
&nbsp;&nbsp;&lt;<i>token</i>&gt; /x<i>hexbyte</i> &lt;U<i>unicode</i>&gt; ...</br>
&nbsp;&nbsp;&lt;<i>token</i>&gt; /d<i>decbyte</i> &lt;U<i>unicode</i>&gt; ...</br>
&nbsp;&nbsp;&lt;<i>token</i>&gt; /<i>octbyte</i> &lt;U<i>unicode</i>&gt; ...</br>
&nbsp;&nbsp;&lt;<i>token</i>&gt; /<i>any</i>/<i>any</i>... &lt;U<i>unicode</i>&gt; ...</br>
&nbsp;&nbsp;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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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 */

@ -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

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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 */

@ -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

@ -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

Loading…
Cancel
Save