]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/io_callback.C
better selection and scrolling behaviour
[lyx.git] / src / frontends / qt2 / io_callback.C
1 /**
2  * \file io_callback.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author unknown
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #include <config.h>
13
14 #ifdef __GNUG__
15 #pragma implementation
16 #endif
17
18 #include "lyxserver.h"
19 #include "io_callback.h"
20
21
22 io_callback::io_callback(int fd, LyXComm * comm)
23         : comm_(comm)
24 {
25         sn_.reset(new QSocketNotifier(fd, QSocketNotifier::Read, this));
26         connect(sn_.get(), SIGNAL(activated(int)), this, SLOT(data_received()));
27 }
28
29
30 void io_callback::data_received()
31 {
32         comm_->read_ready();
33 }