29 setMinimumSize(300, 200);
46 connect(
m_terminalView, SIGNAL(customContextMenuRequested(QPoint)),
53 QFont font = QFont(
"Monaco");
54 font.setStyleHint(QFont::TypeWriter);
55 font.setPointSize(11);
57 QFont font = QFont(
"Monospace");
58 font.setStyleHint(QFont::TypeWriter);
59 font.setPointSize(10);
62 setFocusPolicy (Qt::StrongFocus);
64 setFocus(Qt::OtherFocusReason);
98 dup2 (fds, STDIN_FILENO);
99 dup2 (fds, STDOUT_FILENO);
100 dup2 (fds, STDERR_FILENO);
102 if(!isatty(STDIN_FILENO)) {
103 qDebug(
"Error: stdin is not a tty.");
106 if(!isatty(STDOUT_FILENO)) {
107 qDebug(
"Error: stdout is not a tty.");
110 if(!isatty(STDERR_FILENO)) {
111 qDebug(
"Error: stderr is not a tty.");
161 cols[i] = curr_cols[i];
176 cols[i] = curr_cols[i];
An entry in a terminal display's color palette.
void addView(TerminalView *widget)
Adds a new view for this session.
void setTerminalSizeStartup(bool on)
Sets whether the terminal size display is shown briefly after the widget is first shown...
void setScrollBarPosition(ScrollBarPosition position)
Specifies whether the terminal display has a vertical scroll bar, and if so whether it is shown on th...
void setSize(int h, int v)
Represents a terminal session consisting of a pseudo-teletype and a terminal emulation.
void setTerminalSizeHint(bool on)
Sets whether or not the current height and width of the terminal in lines and columns is displayed wh...
void setKeyboardCursorShape(KeyboardCursorShape shape)
Sets the shape of the keyboard cursor.
void sendText(const QString &text) const
Sends text to the current foreground terminal program.
void run()
Starts the terminal session.
void clearHistory()
Clears the history store used by this session.
#define DEFAULT_FORE_COLOR
void interrupt_signal(void)
void setColorTable(const ColorEntry table[])
Sets the terminal color palette used by the display.
void setCursorType(CursorType type, bool blinking)
void setKeyBindings(const QString &id)
Sets the key bindings used by this session.
Select the whole line underneath the cursor.
void terminal_interrupt(void)
TerminalView * m_terminalView
void setSize(int cols, int lins)
bool open()
Create a pty master/slave pair.
QColor color
The color value of this entry for display.
void setHistoryType(const HistoryType &type)
Sets the type of history store used by this session.
Show the scroll bar on the right side of the display.
An cursor shaped like the capital letter 'I', similar to the IBeam cursor used in Qt/KDE text editors...
A rectangular block which covers the entire area of the cursor character.
void selectAll()
selects all content
TerminalModel * m_terminalModel
void has_extra_interrupt(bool extra_interrupt)
virtual ~QUnixTerminalImpl()
void setBellMode(int mode)
Sets the type of effect used to alert the user when a 'bell' occurs in the terminal session...
void setCursorColor(bool useForegroundColor, const QColor &color)
size_t size(T const (&)[z])
void pasteClipboard()
Pastes the content of the clipboard into the display.
void setDarkBackground(bool darkBackground)
Sets whether the session has a dark background or not.
void setBlinkingCursor(bool blink)
Specifies whether or not the cursor blinks.
void setForegroundColor(const QColor &color)
void setTerminalFont(const QFont &font)
virtual void resizeEvent(QResizeEvent *)
void setKeyboardCursorColor(bool useForegroundColor, const QColor &color)
Sets the color used to draw the keyboard cursor.
void showEvent(QShowEvent *)
void setCodec(QTextCodec *codec)
Sets the text codec used by this session's terminal emulation.
void sendText(const QString &text)
QUnixTerminalImpl(QWidget *parent=0)
void copyClipboard(bool extra_interrupt)
Copies the selected text to the clipboard.
void setAutoClose(bool b)
Specifies whether to close the session automatically when the terminal process terminates.
void setScrollBufferSize(int value)
void setBackgroundColor(const QColor &color)
A single flat line which occupies the space at the bottom of the cursor character's area...
A widget which displays output from a terminal emulation and sends input keypresses and mouse activit...
Provides primitives for opening & closing a pseudo TTY pair, assigning the controlling TTY...
const ColorEntry * colorTable() const
Returns the terminal color palette used by the display.
void setVTFont(const QFont &font)
Sets the font used to draw the display.
void setSelectionColor(const QColor &color)
void updateImage()
Causes the terminal display to fetch the latest character image from the associated terminal screen (...
virtual void handleCustomContextMenuRequested(const QPoint &at)
void setTripleClickMode(TripleClickMode mode)
Sets how the text is selected when the user triple clicks within the display.
#define DEFAULT_BACK_COLOR