OpendTect  6.3
timer.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: A.H. Lammertink
8  Date: 16/10/2000
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "basicmod.h"
14 #include "namedobj.h"
15 #include "notify.h"
16 
17 mFDQtclass(QTimer)
19 
25 {
26 public:
27 
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 
46  mQtclass(QTimer*) timer_;
48  ScriptPolicy scriptpolicy_;
49 
50 public:
51  // Not for casual use
52 
53  ScriptPolicy scriptPolicy() const;
54  static bool setUserWaitFlag(bool); // returns old state
55 
56  static Notifier<Timer>* timerStarts();
57  static Notifier<Timer>* timerStopped();
58  static Notifier<Timer>* timerShoots();
59  static Notifier<Timer>* timerShot();
60 
61 };
#define mExpClass(module)
Definition: commondefs.h:157
Notifier< Timer > tick
Definition: timer.h:37
#define mQtclass(cls)
Definition: commondefs.h:232
ScriptPolicy
Definition: timer.h:41
Definition: timer.h:41
#define mFDQtclass(cls)
Definition: commondefs.h:231
QTimer communication class.
Definition: qtimercomm.h:25
Timer class.
Definition: timer.h:24
CallBacker object with a name. Use if you want your object to be able to send and receive CallBack&#39;s...
Definition: namedobj.h:50

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