Fix problems with special characters on gdb's command line.
[kdbg.git] / kdbg / ttywnd.h
blob9b1c18efdbcab20b71986788cc270f74e9caa77e
1 // $Id$
3 // Copyright by Johannes Sixt
4 // This file is under GPL, the GNU General Public Licence
6 #ifndef TTYWND_H
7 #define TTYWND_H
9 #include <textvw.h>
11 class QSocketNotifier;
12 class QPopupMenu;
14 /**
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
27 Q_OBJECT
28 public:
29 STTY();
30 ~STTY();
32 QString slaveTTY(){ return m_slavetty; };
34 protected slots:
35 void outReceived(int);
37 signals:
38 void output(char* buffer, int charlen);
40 protected:
41 int m_masterfd;
42 int m_slavefd;
43 QSocketNotifier* m_outNotifier;
44 QString m_slavetty;
45 bool findTTY();
48 class TTYWindow : public KTextView
50 Q_OBJECT
51 public:
52 TTYWindow(QWidget* parent, const char* name);
53 ~TTYWindow();
55 QString activate();
56 void deactivate();
58 protected:
59 STTY* m_tty;
60 QPopupMenu* m_popmenu;
61 virtual void mousePressEvent(QMouseEvent* mouseEvent);
63 protected slots:
64 void slotAppend(char* buffer, int count);
65 void clear();
68 #endif // TTYWND_H