65
64
* Provides an xterm compatible terminal emulation based on the DEC VT102 terminal.
66
65
* A full description of this terminal can be found at http://vt100.net/docs/vt102-ug/
68
* In addition, various additional xterm escape sequences are supported to provide
67
* In addition, various additional xterm escape sequences are supported to provide
69
68
* features such as mouse input handling.
70
69
* See http://rtfm.etla.org/xterm/ctlseq.html for a description of xterm's escape
74
73
class Vt102Emulation : public Emulation
79
78
/** Constructs a new emulation */
83
82
// reimplemented from Emulation
84
83
virtual void clearEntireScreen();
85
84
virtual void reset();
86
85
virtual char eraseChar() const;
89
// reimplemented from Emulation
88
// reimplemented from Emulation
90
89
virtual void sendString(const char*,int length = -1);
91
90
virtual void sendText(const QString& text);
92
91
virtual void sendKeyEvent(QKeyEvent*);
93
92
virtual void sendMouseEvent(int buttons, int column, int line, int eventType);
96
95
// reimplemented from Emulation
97
96
virtual void setMode(int mode);
98
97
virtual void resetMode(int mode);
99
98
virtual void receiveChar(int cc);
102
101
//causes changeTitle() to be emitted for each (int,QString) pair in pendingTitleUpdates
103
102
//used to buffer multiple title updates
120
119
bool getMode (int mode);
121
120
// saves the current boolean value of 'mode'
122
121
void saveMode (int mode);
123
// restores the boolean value of 'mode'
122
// restores the boolean value of 'mode'
124
123
void restoreMode(int mode);
125
124
// resets all modes
126
125
// (except MODE_Allow132Columns)
177
176
TerminalState _currentModes;
178
177
TerminalState _savedModes;
180
//hash table and timer for buffering calls to the session instance
179
//hash table and timer for buffering calls to the session instance
181
180
//to update the name of the session
182
181
//or window title.
183
//these calls occur when certain escape sequences are seen in the
182
//these calls occur when certain escape sequences are seen in the
184
183
//output from the terminal
185
184
QHash<int,QString> _pendingTitleUpdates;
186
185
QTimer* _titleUpdateTimer;