]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/qtTimeout.h
enable Font cache only for MacOSX and inline width() for other platform.
[lyx.git] / src / frontends / qt4 / qtTimeout.h
1 // -*- C++ -*-
2 /**
3  * \file qtTimeout.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 QTTIMEOUT_H
13 #define QTTIMEOUT_H
14
15 #include "frontends/Timeout.h"
16 #include <qobject.h>
17 //Added by qt3to4:
18 #include <QTimerEvent>
19
20 // stupid Qt
21 #undef emit
22
23 /**
24  * This class executes the callback when the timeout expires
25  * using Qt mechanisms
26  */
27 class qtTimeout : QObject, public Timeout::Impl {
28 public:
29         ///
30         qtTimeout(Timeout & owner_);
31         ///
32         virtual bool running() const;
33         /// start the timer
34         virtual void start();
35         /// stop the timer
36         virtual void stop();
37         /// reset
38         virtual void reset();
39
40 protected:
41         /// slot
42         virtual void timerEvent(QTimerEvent *);
43
44 private:
45         /// timout id
46         int timeout_id;
47 };
48
49 #endif // QTTIMEOUT_H