34 #include <QtCore/QTextCodec>
35 #include <QtCore/QTextStream>
36 #include <QtCore/QTimer>
@ NOTIFYBELL
The terminal program has triggered a bell event to get the user's attention.
@ NOTIFYACTIVITY
The emulation is currently receiving data from its terminal input.
@ NOTIFYNORMAL
The emulation is currently receiving user input.
Base class for terminal emulation back-ends.
virtual void receiveChar(int ch)
Processes an incoming character.
void usesMouseChanged(bool usesMouse)
virtual void resetMode(int mode)=0
virtual void sendMouseEvent(int buttons, int column, int line, int eventType)
Converts information about a mouse event into an xterm-compatible escape sequence and emits the chara...
const QTextCodec * _codec
bool programUsesMouse() const
Returns true if the active terminal program wants mouse input events.
void bracketedPasteModeChanged(bool bracketedPasteMode)
virtual void sendKeyEvent(QKeyEvent *)
Interprets a key press event and emits the sendData() signal with the resulting character stream.
void receiveData(const char *buffer, int len)
Processes an incoming stream of characters.
void programUsesMouseChanged(bool usesMouse)
This is emitted when the program running in the shell indicates whether or not it is interested in mo...
Emulation()
Constructs a new terminal emulation.
void bufferedUpdate()
Schedules an update of attached views.
int lineCount()
Returns the total number of lines, including those stored in the history.
const KeyboardTranslator * _keyTranslator
void programBracketedPasteModeChanged(bool bracketedPasteMode)
QString keyBindings()
Returns the name of the emulation's current key bindings.
const HistoryType & history()
Returns the history store used by this emulation.
void useUtf8Request(bool)
Requests that the pty used by the terminal process be set to UTF 8 mode.
ScreenWindow * createWindow()
Creates a new window onto the output from this emulation.
void changeTabTextColorRequest(int color)
Requests that the color of the text used to represent the tabs associated with this emulation be chan...
virtual void sendText(const QString &text)=0
Interprets a sequence of characters and sends the result to the terminal.
void lockPtyRequest(bool suspend)
Requests that sending of input to the emulation from the terminal process be suspended or resumed.
void titleChanged(int title, const QString &newTitle)
Emitted when the program running in the terminal wishes to update the session's title.
void imageSizeChanged(int lineCount, int columnCount)
Emitted when the program running in the terminal changes the screen size.
const QTextCodec * codec()
Returns the codec used to decode incoming characters.
void sendData(const char *data, int len)
Emitted when a buffer of data is ready to send to the standard input of the terminal.
virtual void clearEntireScreen()=0
Copies the current image into the history and clears the screen.
QSize imageSize()
Returns the size of the screen image which the emulation produces.
virtual void setImageSize(int lines, int columns)
Change the size of the emulation's image.
QList< ScreenWindow * > _windows
bool programBracketedPasteMode() const
void setScreen(int index)
Sets the active screen.
virtual void setMode(int mode)=0
void clearHistory()
Clears the history scroll.
void setKeyBindings(const QString &name)
Sets the key bindings used to key events ( received through sendKeyEvent() ) into character streams t...
void setHistory(const HistoryType &)
Sets the history store used by this emulation.
virtual void writeToStream(TerminalCharacterDecoder *decoder, int startLine, int endLine)
Copies the output history from startLine to endLine into stream, using decoder to convert the termina...
void outputChanged()
Emitted when the contents of the screen image change.
void stateSet(int state)
Emitted when the activity state of the emulation is set.
virtual char getErase() const
TODO Document me.
void profileChangeCommandReceived(const QString &text)
Emitted when the terminal program requests to change various properties of the terminal display.
virtual void reset()=0
Resets the state of the terminal.
void setCodec(const QTextCodec *)
Sets the codec used to decode incoming characters.
virtual void sendString(const char *string, int length=-1)=0
Sends a string of characters to the foreground terminal process.
bool utf8()
Convenience method.
A convertor which maps between key sequences pressed by the user and the character strings which shou...
Provides a window onto a section of a terminal screen.
An image of characters with associated attributes.
Base class for terminal character decoders.
static uint32_t state[624]