]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/io_callback.h
fix tooltips in toolbar
[lyx.git] / src / frontends / qt2 / io_callback.h
1 /**
2  * \file io_callback.h
3  * Copyright 2002 the LyX Team
4  * Read the file COPYING
5  *
6  * \author unknown
7  * \author John Levon <moz@compsoc.man.ac.uk>
8  */
9
10 #ifndef IO_CALLBACK_H
11 #define IO_CALLBACK_H
12  
13 #include <config.h>
14
15 #include "lyxserver.h"
16  
17 #include <qsocketnotifier.h>
18
19 class io_callback : public QObject {
20         Q_OBJECT 
21 public:
22         io_callback(int fd, LyXComm * comm)
23                 : comm_(comm) {
24                 QSocketNotifier * sn = new QSocketNotifier(fd,
25                         QSocketNotifier::Read, this);
26                 connect(sn, SIGNAL(activated(int)), this, SLOT(data_received()));
27         }
28
29 public slots:
30         void data_received() {
31                 comm_->read_ready();
32         }
33
34 private:
35         LyXComm * comm_;
36 };
37
38 #endif // IO_CALLBACK_H