]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/Timeout_pimpl.h
dont use pragma impementation and interface anymore
[lyx.git] / src / frontends / qt2 / Timeout_pimpl.h
1 // -*- C++ -*-
2 /**
3  * \file qt2/Timeout_pimpl.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef TIMEOUTPIMPL_H
13 #define TIMEOUTPIMPL_H
14
15
16 #include "frontends/Timeout.h"
17 #include <qobject.h>
18
19 // stupid Qt
20 #undef emit
21
22 /**
23  * This class executes the callback when the timeout expires
24  * using Qt mechanisms
25  */
26 struct Timeout::Pimpl : QObject {
27 public:
28         ///
29         Pimpl(Timeout * owner_);
30         /// start the timer
31         void start();
32         /// stop the timer
33         void stop();
34         /// reset
35         void reset();
36         /// is the timer running ?
37         bool running() const;
38 protected:
39         /// slot
40         virtual void timerEvent(QTimerEvent *);
41 private:
42         /// the owning timer
43         Timeout * owner_;
44         /// QTimer id
45         int timeout_id;
46 };
47
48 #endif