OpendTect-6_4  6.4
timer.h
Go to the documentation of this file.
1 #ifndef timer_h
2 #define timer_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H. Lammertink
9  Date: 16/10/2000
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "basicmod.h"
16 #include "namedobj.h"
17 
18 mFDQtclass(QTimer)
20 
25 mExpClass(Basic) Timer : public NamedObject
26 {
27 public :
28  Timer(const char* nm="Timer");
29  virtual ~Timer();
30 
31  bool isActive() const;
32  bool isSingleShot() const;
33 
34  void start(int msec,bool singleshot=false);
35  void stop();
36 
38 
39  void notifyHandler();
40 
41  enum ScriptPolicy { DefaultPolicy, DontWait, UserWait, KeepWaiting };
42  void setScriptPolicy(ScriptPolicy);
43 
44 protected:
45  mQtclass(QTimer*) timer_;
47  ScriptPolicy scriptpolicy_;
48 
49 public:
50  // Not for casual use
51 
52  ScriptPolicy scriptPolicy() const;
53  static bool setUserWaitFlag(bool); // returns old state
54 
55  static Notifier<Timer>* timerStarts();
56  static Notifier<Timer>* timerStopped();
57  static Notifier<Timer>* timerShoots();
58  static Notifier<Timer>* timerShot();
59 
60 };
61 
62 
63 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Notifier< Timer > tick
Definition: timer.h:37
#define mQtclass(cls)
Definition: commondefs.h:229
ScriptPolicy
Definition: timer.h:41
Definition: timer.h:41
#define mFDQtclass(cls)
Definition: commondefs.h:228
QTimer communication class.
Definition: qtimercomm.h:26
Object with a name.
Definition: namedobj.h:35
Timer class.
Definition: timer.h:25

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019