]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/io_callback.h
Some string(widget->text()) fixes. Weirdness
[lyx.git] / src / frontends / qt2 / io_callback.h
1 // -*- C++ -*-
2 /**
3  * \file io_callback.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author unknown
8  * \author John Levon
9  *
10  * Full author contact details are available in file CREDITS
11  */
12
13 #ifndef IO_CALLBACK_H
14 #define IO_CALLBACK_H
15
16 #ifdef __GNUG__
17 #pragma interface
18 #endif
19
20 #include <qobject.h>
21 #include <qsocketnotifier.h>
22 #include <boost/scoped_ptr.hpp>
23
24 class LyXComm;
25
26 /**
27  * io_callback - a simple wrapper for asynchronous pipe notification
28  *
29  * This is used by the lyxserver to notice the pipe is ready to be
30  * read.
31  *
32  * FIXME: this code apparently will not work on Windows.
33  */
34 class io_callback : public QObject {
35         Q_OBJECT
36 public:
37         /// connect a read ready notification for fd to the LyXComm
38         io_callback(int fd, LyXComm * comm);
39 public slots:
40         void data_received();
41 private:
42         /// our notifier
43         boost::scoped_ptr<QSocketNotifier> sn_;
44
45         LyXComm * comm_;
46 };
47
48 #endif // IO_CALLBACK_H