]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/Timeout_pimpl.h
ws cleanup
[lyx.git] / src / frontends / qt2 / Timeout_pimpl.h
1 // -*- C++ -*-
2 /**
3  * \file qt2/Timeout_pimpl.h
4  * Copyright 2001 LyX Team
5  * Read COPYING
6  *
7  * \author John Levon
8  */
9
10 #ifndef TIMEOUTPIMPL_H
11 #define TIMEOUTPIMPL_H
12
13 #include <config.h>
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "frontends/Timeout.h"
20
21 #include <sigc++/signal_system.h>
22
23 #include <qobject.h>
24 // stupid Qt
25 #undef emit
26
27 /**
28  * This class executes the callback when the timeout expires
29  * using Qt mechanisms
30  */
31 struct Timeout::Pimpl : QObject {
32 public:
33         ///
34         Pimpl(Timeout * owner_);
35         /// start the timer
36         void start();
37         /// stop the timer
38         void stop();
39         /// reset
40         void reset();
41         /// is the timer running ?
42         bool running() const;
43
44 protected:
45         /// slot
46         virtual void timerEvent(QTimerEvent *);
47 private:
48         /// the owning timer
49         Timeout * owner_;
50         /// xforms id
51         int timeout_id;
52 };
53
54 #endif