]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/io_callback.h
Some string(widget->text()) fixes. Weirdness
[lyx.git] / src / frontends / qt2 / io_callback.h
index 101b6d7b19def836f3ceb90efe8939177880da71..efa4103746565793a7c74fe447029c9b52487916 100644 (file)
@@ -1,24 +1,28 @@
+// -*- C++ -*-
 /**
  * \file io_callback.h
- * Copyright 2002 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
  * \author unknown
- * \author John Levon <moz@compsoc.man.ac.uk>
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #ifndef IO_CALLBACK_H
 #define IO_CALLBACK_H
-#include <config.h>
 
-#include "lyxserver.h"
-#include "debug.h"
-#include <qsocketnotifier.h>
+#ifdef __GNUG__
+#pragma interface
+#endif
 
+#include <qobject.h>
+#include <qsocketnotifier.h>
 #include <boost/scoped_ptr.hpp>
+
+class LyXComm;
+
 /**
  * io_callback - a simple wrapper for asynchronous pipe notification
  *
  * FIXME: this code apparently will not work on Windows.
  */
 class io_callback : public QObject {
-       Q_OBJECT 
+       Q_OBJECT
 public:
        /// connect a read ready notification for fd to the LyXComm
-       io_callback(int fd, LyXComm * comm)
-               : comm_(comm) {
-               sn_.reset(new QSocketNotifier(fd, QSocketNotifier::Read, this));
-               connect(sn_.get(), SIGNAL(activated(int)), this, SLOT(data_received()));
-       }
+       io_callback(int fd, LyXComm * comm);
 public slots:
-       void data_received() {
-               comm_->read_ready();
-       }
-
+       void data_received();
 private:
        /// our notifier
        boost::scoped_ptr<QSocketNotifier> sn_;
+
        LyXComm * comm_;
 };
 
-#endif // IO_CALLBACK_H 
+#endif // IO_CALLBACK_H