26 #ifndef TERMINALMODEL_H
27 #define TERMINALMODEL_H
30 #include <QtCore/QStringList>
Base class for terminal emulation back-ends.
Provides primitives for opening & closing a pseudo TTY pair, assigning the controlling TTY,...
Represents a terminal session consisting of a pseudo-teletype and a terminal emulation.
void onReceiveBlock(const char *buffer, int len)
void setProfileKey(const QString &profileKey)
Sets the profile associated with this session.
void bellRequest(const QString &message)
Emitted when a bell event occurs in the session.
QColor _modifiedBackground
QSize size()
Returns the terminal session's window size in lines and columns.
TerminalModel(KPty *kpty)
Constructs a new session.
void setCodec(QTextCodec *codec)
Sets the text codec used by this session's terminal emulation.
void profileChangeCommandReceived(const QString &text)
Emitted when a profile change command is received from the terminal.
Emulation * emulation() const
Returns the terminal emulation instance being used to encode / decode characters to / from the proces...
void setAutoClose(bool b)
Specifies whether to close the session automatically when the terminal process terminates.
void updateTerminalSize()
QList< TerminalView * > _views
void viewDestroyed(QObject *view)
void setMonitorSilence(bool)
Enables monitoring for silence in the session.
void sendText(const QString &text) const
Sends text to the current foreground terminal program.
void run()
Starts the terminal session.
void resizeRequest(const QSize &size)
Emitted when the terminal process requests a change in the size of the terminal window.
PseudoTerminal * _shellProcess
void titleChanged()
Emitted when the session's title has changed.
QList< TerminalView * > views() const
Returns the views connected to this session.
void activityStateSet(int)
void sendData(const char *buf, int len)
void addView(TerminalView *widget)
Adds a new view for this session.
void stateChanged(int state)
Emitted when the activity state of this session changes.
void onViewSizeChange(int height, int width)
void changeBackgroundColorRequest(const QColor &)
Requests that the background color of views on this session should be changed.
void receivedData(const QString &text)
Emitted when output is received from the terminal process.
void refresh()
Attempts to get the shell program to redraw the current display area.
const HistoryType & historyType() const
Returns the type of history store used by this session.
void onEmulationSizeChange(int lines, int columns)
bool isMonitorActivity() const
Returns true if monitoring for activity is enabled.
bool isMonitorSilence() const
Returns true if monitoring for inactivity (silence) in the session is enabled.
void setMonitorActivity(bool)
Enables monitoring for activity in the session.
void setKeyBindings(const QString &id)
Sets the key bindings used by this session.
void started()
Emitted when the terminal process starts.
void changeTabTextColorRequest(int)
Requests that the color the text for any tabs associated with this session should be changed;.
QString profileKey() const
Returns the profile key associated with this session.
void setAddToUtmp(bool)
Specifies whether a utmp entry should be created for the pty used by this session.
void clearHistory()
Clears the history store used by this session.
void setDarkBackground(bool darkBackground)
Sets whether the session has a dark background or not.
void openUrlRequest(const QString &url)
TODO: Document me.
void setSize(const QSize &size)
Emits a request to resize the session to accommodate the specified window size.
void removeView(TerminalView *widget)
Removes a view from this session.
bool hasDarkBackground() const
Returns true if the session has a dark background.
void profileChanged(const QString &profile)
Emitted when the session's profile has changed.
void close()
Closes the terminal session.
void finished()
Emitted when the terminal process exits.
void setMonitorSilenceSeconds(int seconds)
See setMonitorSilence()
SelfListener * _selfListener
void setHistoryType(const HistoryType &type)
Sets the type of history store used by this session.
A widget which displays output from a terminal emulation and sends input keypresses and mouse activit...
void message(const char *name, const char *fmt,...)
static uint32_t state[624]