summaryrefslogtreecommitdiffstats
path: root/qtinterface/tqtimer.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-16 04:40:14 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-16 04:40:14 +0000
commit99d2d7dbcbd7f241480d94b2fab81a967641b2a7 (patch)
tree889b9743bac4aadec571d6e10965062ad5279d5d /qtinterface/tqtimer.h
parentd939881b7ed498675023602556023422dd936f95 (diff)
downloadtqtinterface-99d2d7dbcbd7f241480d94b2fab81a967641b2a7.tar.gz
tqtinterface-99d2d7dbcbd7f241480d94b2fab81a967641b2a7.zip
Added external libltdl directory
Otherwise, development continues... git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/tqtinterface@1150484 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'qtinterface/tqtimer.h')
-rw-r--r--qtinterface/tqtimer.h51
1 files changed, 25 insertions, 26 deletions
diff --git a/qtinterface/tqtimer.h b/qtinterface/tqtimer.h
index 7b6b72b..f1c1390 100644
--- a/qtinterface/tqtimer.h
+++ b/qtinterface/tqtimer.h
@@ -40,44 +40,37 @@ Boston, MA 02110-1301, USA.
// Linker tricks required to override a class without changing its name
#define QTimer IQTimer
-#include <qtimer.h>
+#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:
- QTimer( QObject *parent=0, const char *name=0 );
- ~QTimer();
+ explicit QTimer(QObject *parent = 0);
+ ~QTimer();
- bool isActive() const;
+ inline bool isActive() const;
+ int timerId() const;
- int start( int msec, bool sshot = FALSE );
- void changeInterval( int msec );
- void stop();
+ void setInterval(int msec);
+ int interval() const;
- static void singleShot( int msec, QObject *receiver, const char *member );
+ inline void setSingleShot(bool singleShot);
+ inline bool isSingleShot() const;
- int timerId() const { return id; }
+ static void singleShot(int msec, QObject *receiver, const char *member);
- void timeout();
+ void start(int msec);
-protected:
- bool event( QEvent * );
+ void start();
+ void stop();
-private:
- int id;
- uint single : 1;
- uint nulltimer : 1;
-
-private: // Disabled copy constructor and operator=
-#if defined(Q_DISABLE_COPY)
- QTimer( const QTimer & );
- QTimer &operator=( const QTimer & );
-#endif
+ void timeout();
// End Qt header file copy
// This is where the new member functions should be placed
@@ -85,12 +78,18 @@ private: // Disabled copy constructor and operator=
// 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 bool QTimer::isActive() const
-{
- return id >= 0;
-}
+//inline void QTimer::setSingleShot(bool asingleShot) { single = asingleShot; }
+// End Qt header file copy
#endif // USE_QT4