mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-31 07:45:44 +00:00
make lyxserver work
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4633 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9f2722a944
commit
6a18ddc586
@ -1,3 +1,8 @@
|
||||
2002-07-14 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* io_callback.h:
|
||||
* lyx_gui.C: make set_read_callback() work
|
||||
|
||||
2002-07-14 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* lyx_gui.C: add set_read_callback()
|
||||
|
@ -52,6 +52,7 @@ libqt2_la_SOURCES = \
|
||||
emptytable.C \
|
||||
emptytable.h \
|
||||
guiapi.C \
|
||||
io_callback.h \
|
||||
lengthcombo.C \
|
||||
lengthcombo.h \
|
||||
lyx_gui.C \
|
||||
|
@ -16,7 +16,6 @@ lyx_gui (qt)
|
||||
|
||||
- move out lyxserver
|
||||
- do dpi
|
||||
- implement set_read_callback
|
||||
|
||||
Menubar_pimpl
|
||||
|
||||
|
38
src/frontends/qt2/io_callback.h
Normal file
38
src/frontends/qt2/io_callback.h
Normal file
@ -0,0 +1,38 @@
|
||||
/**
|
||||
* \file io_callback.h
|
||||
* Copyright 2002 the LyX Team
|
||||
* Read the file COPYING
|
||||
*
|
||||
* \author unknown
|
||||
* \author John Levon <moz@compsoc.man.ac.uk>
|
||||
*/
|
||||
|
||||
#ifndef IO_CALLBACK_H
|
||||
#define IO_CALLBACK_H
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "lyxserver.h"
|
||||
|
||||
#include <qsocketnotifier.h>
|
||||
|
||||
class io_callback : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
io_callback(int fd, LyXComm * comm)
|
||||
: comm_(comm) {
|
||||
QSocketNotifier * sn = new QSocketNotifier(fd,
|
||||
QSocketNotifier::Read, this);
|
||||
connect(sn, SIGNAL(activated(int)), this, SLOT(data_received()));
|
||||
}
|
||||
|
||||
public slots:
|
||||
void data_received() {
|
||||
comm_->read_ready();
|
||||
}
|
||||
|
||||
private:
|
||||
LyXComm * comm_;
|
||||
};
|
||||
|
||||
#endif // IO_CALLBACK_H
|
@ -38,6 +38,7 @@
|
||||
#include "QtView.h"
|
||||
#include "QLImage.h"
|
||||
#include "qfont_loader.h"
|
||||
#include "io_callback.h"
|
||||
|
||||
#include <qapplication.h>
|
||||
|
||||
@ -146,5 +147,6 @@ bool lyx_gui::font_available(LyXFont const & font)
|
||||
|
||||
void lyx_gui::set_read_callback(int fd, LyXComm * comm)
|
||||
{
|
||||
// FIXME
|
||||
// FIXME: "leak"
|
||||
new io_callback(fd, comm);
|
||||
}
|
||||
|
@ -25,9 +25,10 @@ nodist_libqt2moc_la_SOURCES = \
|
||||
QContentPane_moc.C \
|
||||
Qt2Base_moc.C \
|
||||
QtView_moc.C \
|
||||
io_callback_moc.C \
|
||||
$(MOCDIALOGS)
|
||||
|
||||
libqt2moc.la: $(libqt2moc_la_OBJECTS) $(libqt2moc_la_DEPENDENCIES)
|
||||
|
||||
|
||||
%_moc.C: ../%.h
|
||||
$(MOC) -o $@ $<
|
||||
|
Loading…
Reference in New Issue
Block a user