diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-21 21:18:36 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-21 21:18:36 +0000 |
commit | 5e266f8f85ead4c33f7a9d227a82b0461df7e09a (patch) | |
tree | 29ee823e9a8b87b3213db0a14fbe7148edcd5365 /qtinterface/tqtimer.h | |
parent | ce4313a6257fee35d97e07d22956f42916d4905c (diff) | |
download | tqtinterface-5e266f8f85ead4c33f7a9d227a82b0461df7e09a.tar.gz tqtinterface-5e266f8f85ead4c33f7a9d227a82b0461df7e09a.zip |
Significant upgrades to the TQT system; kdelibs and kdebase now build and run correctly through TQT and Qt3
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/tqtinterface@1152745 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'qtinterface/tqtimer.h')
-rw-r--r-- | qtinterface/tqtimer.h | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/qtinterface/tqtimer.h b/qtinterface/tqtimer.h index f1c1390..d1960f1 100644 --- a/qtinterface/tqtimer.h +++ b/qtinterface/tqtimer.h @@ -38,82 +38,8 @@ Boston, MA 02110-1301, USA. // Reimplement the QTimer class // For Qt4, some changes are needed -// Linker tricks required to override a class without changing its name -#define QTimer IQTimer #include <QtCore/qtimer.h> -#undef QTimer - -class QTimer : public IQTimer { -// This is taken straight from the Qt header file, with all Q_OBJECT, slot, and similar keywords stripped out. -// Also, all inline functions must be converted to simple declarations. -// This is the last and most obnoxious part of the linker tricks mentioned above -// Essentially, the compiler needs to know that these Q functions exist so that the above I functions -// are not attempted to link. Instead, these empty declarations allow the linker to pull in the complete Q function -// from the Qt toolkit in use. Convoluted, yes, but it should make maintinance MUCH easier as the Qt API changes. -public: - explicit QTimer(QObject *parent = 0); - ~QTimer(); - - inline bool isActive() const; - int timerId() const; - - void setInterval(int msec); - int interval() const; - - inline void setSingleShot(bool singleShot); - inline bool isSingleShot() const; - - static void singleShot(int msec, QObject *receiver, const char *member); - - void start(int msec); - - void start(); - void stop(); - - void timeout(); -// End Qt header file copy - -// This is where the new member functions should be placed -// Unlike the above copied block, these members must be defined in the associated .cpp file, -// and they should usually do something. Feel free to include as many Qt files as needed -// in the cpp source file, but DO NOT include them in this header file. - int myNewFunction(int parameter_one); - -// Begin Qt header file copy -protected: - void timerEvent(QTimerEvent *); - -private: - inline int startTimer(int); - inline void killTimer(int); -}; - -//inline void QTimer::setSingleShot(bool asingleShot) { single = asingleShot; } -// End Qt header file copy #endif // USE_QT4 -// #ifdef USE_QT4 -// -// // Reimplement the QTimer class -// // For Qt4, a few overrides are required -// // Specifically, these functions were altered: -// // OLD: NEW: -// // -// -// #include <qtimer.h> -// -// class Q_EXPORT TQTimer : public QTimer -// { -// Q_OBJECT -// public: -// TQTimer( QObject *parent=0, const char *name=0 ); -// ~TQTimer(); -// -// // FIXME: Example ONLY -// virtual void oldFunction (); -// }; -// -// #endif // USE_QT4 - #endif /* TQTIMER_H */
\ No newline at end of file |