diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 03:29:42 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 03:29:42 +0000 |
commit | 4cb96b38a38bc4825193e1320e52f692a525df54 (patch) | |
tree | d2ce9ea3e3dc1662b3f013e45eeff6e781cb0e94 /qtinterface | |
parent | a794ba9d8418882f88a1aff1968987d7994f3a7a (diff) | |
download | tqtinterface-4cb96b38a38bc4825193e1320e52f692a525df54.tar.gz tqtinterface-4cb96b38a38bc4825193e1320e52f692a525df54.zip |
Significantly enhanced compatibility with TQt for Qt4 3.4.0 TP1
This should not break compilation of Trinity, but be warned that it may in obscure cases
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/tqtinterface@1211079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'qtinterface')
-rw-r--r-- | qtinterface/tqt.h | 200 |
1 files changed, 197 insertions, 3 deletions
diff --git a/qtinterface/tqt.h b/qtinterface/tqt.h index 82a3a9d..417847b 100644 --- a/qtinterface/tqt.h +++ b/qtinterface/tqt.h @@ -45,13 +45,13 @@ Boston, MA 02110-1301, USA. #endif // __cplusplus #ifdef USE_QT3 +#define TQ_OBJECT /* UNUSED */ + #define qint64 long #define quint64 unsigned long -#define tqchildren children #define tqaccess access #define tqcolorTable colorTable -#define tqmask mask #define TQSO_Default Default #define tqqt_cast ::qt_cast #define TQ_Horizontal Horizontal @@ -363,6 +363,7 @@ Boston, MA 02110-1301, USA. #define TQCustomMenuItem QCustomMenuItem #define TQMenuData QMenuData #define TQMessageBox QMessageBox +#define TQMetaData QMetaData #define TQMetaProperty QMetaProperty #define TQMetaObject QMetaObject #define TQMetaObjectCleanUp QMetaObjectCleanUp @@ -579,7 +580,200 @@ Boston, MA 02110-1301, USA. #define TQXmlLexicalHandler QXmlLexicalHandler #define TQXmlDeclHandler QXmlDeclHandler #define TQXmlDefaultHandler QXmlDefaultHandler -#endif + +#define tqRound qRound +#define tqstrlen qstrlen +#define tqstrncmp qstrncmp +#define tqUncompress qUncompress +#define tqCopy qCopy +#define tqEqual qEqual +#define tqFill qFill +#define tqFind qFind +#define tqCount qCount +#define tqSwap qSwap +#define tqSystemWarning qSystemWarning +#define tqSuppressObsoleteWarnings qSuppressObsoleteWarnings + +#define tqmoc moc +#define TQMOC MOC +#define TQRGB_MASK RGB_MASK + +#define TQ_INT8 Q_INT8 +#define TQ_INT16 Q_INT16 +#define TQ_INT32 Q_INT32 +#define TQ_INT64 Q_INT64 +#define TQ_UINT8 Q_UINT8 +#define TQ_UINT16 Q_UINT16 +#define TQ_UINT32 Q_UINT32 +#define TQ_UINT64 Q_UINT64 + +#define TQ_LONG Q_LONG +#define TQ_LLONG Q_LLONG +#define TQ_ULONG Q_ULONG +#define TQ_ULLONG Q_ULLONG + +#define tqRed qRed +#define tqGreen qGreen +#define tqBlue qBlue +#define tqAlpha qAlpha +#define tqRgb qRgb +#define tqRgba qRgba +#define tqGray qGray +#define tqCompress qCompress +#define tqInstallMsgHandler qInstallMsgHandler +#define tqparentWidget parentWidget +#define tqchildAt childAt +#define tqAppName qAppName +#define tqApp qApp + +#define tqCursorShape CursorShape +#define tqshape shape +#define tqStatus Status +#define tqmetaObject metaObject +#define tqfind find +//#define tqchildren children +#define tqsetObjectName setObjectName +#define tqtopLevelWidget topLevelWidget +#define tqparent parent +#define tqmask mask +#define tqfocusWidget focusWidget +#define tqcontains contains +#define tqunicode unicode +#define tqreplace replace +#define tqsignals signals +#define tqslots slots +#define tqworldMatrix worldMatrix +#define tqsizeHint sizeHint +#define tqminimumSize minimumSize +#define tqmaximumSize maximumSize +#define tqgeometry geometry +#define tqspacerItem spacerItem +#define tqlayout layout +#define tqsetAlignment setAlignment +#define tqinvalidate invalidate +#define tqalignment alignment +#define tqdevice device +#define tqfromLatin1 fromLatin1 +#define tqreceivers receivers +#define tqencodedData encodedData +#define tqcurrentDate currentDate +#define tqstyleHint styleHint +#define tqitemRect itemRect +#define tqvisualRect visualRect +#define tqdrawControl drawControl +#define tqsetSizePolicy setSizePolicy +#define tqpixelMetric pixelMetric +#define tqdrawComplexControl drawComplexControl +#define tqrepaint repaint +#define tqcolorGroup colorGroup +#define tqdrawTextItem drawTextItem +#define tqsetLibraryPaths setLibraryPaths +#define tqsetColorGroup setColorGroup +#define tqfindRev findRev +#define tqfindProperty findProperty +#define tqfindSlot findSlot +#define tqcurrentDateTime currentDateTime +#define tqfindItem findItem +#define tqtopLevelWidgets topLevelWidgets +#define tqcontainsRef containsRef +#define tqfindIndex findIndex +#define tqfindRef findRef +#define tqminimumSizeHint minimumSizeHint +#define tqmaximumSizeHint maximumSizeHint +#define tqreplaceChild replaceChild +#define tqrepaintContents repaintContents +#define tqrepaintCell repaintCell +#define tqrepaintItem repaintItem +#define tqfindSignal findSignal +#define settqStatus setStatus +#define tqfindNextRef findNextRef +#define connecttqStatus connectStatus +#define disconnecttqStatus disconnectStatus +#define tqrepaintChanged repaintChanged + +#define tqdrawControlMask drawControlMask +#define tqdrawComplexControlMask drawComplexControlMask + +#define TQUObject QUObject + +#define tqt_mo_access access + +// BEGIN BLOCK ONE +// This block of text is taken (mostly) straight from TQt for Qt4 tqtglobaldefines.h +// It will need to be updated now and then as TQt for Qt4 changes + +#define TQT_TQOBJECT(x) (static_cast<TQObject*>(static_cast<QObject*>(x))) +#define TQT_TQWIDGET(x) (static_cast<TQWidget*>(static_cast<QWidget*>(x))) +#define TQT_TQSIZEPOLICY(x) (static_cast<TQSizePolicy*>(static_cast<QSizePolicy*>(x))) +#define TQT_TQLAYOUT(x) (static_cast<TQLayout*>(static_cast<QLayout*>(x))) +#define TQT_TQPAINTER(x) (static_cast<TQPainter*>(static_cast<QPainter*>(x))) +#define TQT_TQPAINTDEVICE(x) (static_cast<TQPaintDevice*>(static_cast<QPaintDevice*>(x))) +#define TQT_TQLAYOUTITEM(x) (static_cast<TQLayoutItem*>(static_cast<QLayoutItem*>(x))) +#define TQT_TQIODEVICE(x) (static_cast<TQIODevice*>(static_cast<QIODevice*>(x))) +#define TQT_TQCOLOR(x) (static_cast<TQColor*>(static_cast<QColor*>(x))) +#define TQT_TQCHAR(x) TQChar(x) +#define TQT_TQSTRING(x) TQString(x) +#define TQT_TQBUFFER(x) (static_cast<TQBuffer*>(static_cast<QBuffer*>(x))) +#define TQT_TQWMATRIX(x) (static_cast<TQWMatrix*>(static_cast<QMatrix*>(x))) +#define TQT_TQFILE(x) (static_cast<TQFile*>(static_cast<QFile*>(x))) +#define TQT_TQBYTEARRAY(x) (static_cast<TQByteArray*>(static_cast<QByteArray*>(x))) +#define TQT_TQMIMESOURCE(x) (static_cast<TQMimeSource*>(static_cast<QMimeSource*>(x))) +#define TQT_TQWEXTRA(x) (static_cast<TQWExtra*>(static_cast<QWExtra*>(x))) +#define TQT_TQPIXMAP(x) (static_cast<TQPixmap*>(static_cast<QPixmap*>(x))) +#define TQT_TQCLIPBOARD(x) (static_cast<TQClipboard*>(static_cast<QClipboard*>(x))) +#define TQT_TQPRINTER(x) (static_cast<TQPrinter*>(static_cast<QPrinter*>(x))) +#define TQT_TQVARIANT(x) (static_cast<TQVariant*>(static_cast<QVariant*>(x))) +#define TQT_TQMETAOBJECT(x) (static_cast<TQMetaObject*>(static_cast<QMetaObject*>(x))) +#define TQT_TQSTYLEOPTION(x) (static_cast<TQStyleOption*>(static_cast<TQStyleOption*>(x))) + +#define TQT_TQOBJECT_OBJECT(x) x +#define TQT_TQSIZEPOLICY_OBJECT(x) x +#define TQT_TQLAYOUT_OBJECT(x) x +#define TQT_TQCOLOR_OBJECT(x) x +#define TQT_TQSTRING_OBJECT(x) x +#define TQT_TQSTRLIST_OBJECT(x) x +#define TQT_TQSTRINGLIST_OBJECT(x) x +#define TQT_TQWMATRIX_OBJECT(x) x +#define TQT_TQRECT_OBJECT(x) x +#define TQT_TQBYTEARRAY_OBJECT(x) x +#define TQT_TQPIXMAP_OBJECT(x) x +#define TQT_TQTIME_OBJECT(x) x +#define TQT_TQDATE_OBJECT(x) x +#define TQT_TQDATETIME_OBJECT(x) x +#define TQT_TQBRUSH_OBJECT(x) x +#define TQT_TQPALETTE_OBJECT(x) x +#define TQT_TQPOINT_OBJECT(x) x +#define TQT_TQREGION_OBJECT(x) x +#define TQT_TQIMAGE_OBJECT(x) x +#define TQT_TQPAINTDEVICE_OBJECT(x) x +#define TQT_TQVARIANT_OBJECT(x) x +#define TQT_TQIODEVICE_OBJECT(x) x +#define TQT_TQSTYLEOPTION_OBJECT(x) x + +#define TQT_TQOBJECT_CONST(x) (static_cast<const TQObject*>(static_cast<const TQObject*>(x))) +#define TQT_TQWIDGET_CONST(x) (static_cast<const TQWidget*>(static_cast<const QWidget*>(x))) +#define TQT_TQMIMESOURCE_CONST(x) (static_cast<const TQMimeSource*>(static_cast<const QMimeSource*>(x))) +#define TQT_TQBRUSH_CONST(x) (static_cast<const TQBrush*>(static_cast<const QBrush*>(x))) +#define TQT_TQPIXMAP_CONST(x) (static_cast<const TQPixmap*>(static_cast<const QPixmap*>(x))) +#define TQT_TQCOLOR_CONST(x) (static_cast<const TQColor*>(static_cast<const QColor*>(x))) +#define TQT_TQPRINTER_CONST(x) (static_cast<const TQPrinter*>(static_cast<const QPrinter*>(x))) +#define TQT_TQIODEVICE_CONST(x) (static_cast<const TQIODevice*>(static_cast<const QIODevice*>(x))) +#define TQT_TQVARIANT_CONST(x) (static_cast<const TQVariant*>(static_cast<const QVariant*>(x))) +#define TQT_TQMETAOBJECT_CONST(x) (static_cast<const TQMetaObject*>(static_cast<const QMetaObject*>(x))) +#define TQT_TQSTYLEOPTION_CONST(x) (static_cast<const TQStyleOption*>(static_cast<const TQStyleOption*>(x))) + +#define TQT_BASE_OBJECT_NAME QObject +#define TQT_BASE_OBJECT(x) (static_cast<TQT_BASE_OBJECT_NAME*>(x)) +#define TQT_BASE_OBJECT_CONST(x) (static_cast<const TQT_BASE_OBJECT_NAME*>(x)) + +#define setTqmaximumSize setMaximumSize +#define setTqminimumSize setMinimumSize +#define setTqalignment tqsetAlignment +#define setTqgeometry setGeometry + +// END BLOCK ONE + +#endif // USE_QT3 #ifdef USE_QT4 |