2 * Copyright Johannes Sixt
3 * This file is licensed under the GNU General Public License Version 2.
4 * See the file COPYING in the toplevel directory of the source directory.
10 #include <QPlainTextEdit>
12 class QSocketNotifier
;
15 * This class is cortesy Judin Max <novaprint@mtu-net.ru>.
17 * The master side of the TTY is the emulator.
19 * The slave side is where a client process can write output and can read
20 * input. For this purpose, it must open the file (terminal device) whose
21 * name is returned by @ref slaveTTY for both reading and writing. To
22 * establish the stdin, stdout, and stderr channels the file descriptor
23 * obtained by this must be dup'd to file descriptors 0, 1, and 2, resp.
25 class STTY
: public QObject
32 QString
slaveTTY(){ return m_slavetty
; };
35 void outReceived(int);
38 void output(char* buffer
, int charlen
);
43 QSocketNotifier
* m_outNotifier
;
48 class TTYWindow
: public QPlainTextEdit
52 TTYWindow(QWidget
* parent
);
60 QTextCursor m_pos
; //!< tracks horizontal cursor position
61 virtual void contextMenuEvent(QContextMenuEvent
*);
64 void slotAppend(char* buffer
, int count
);