53 connect (file_filter, SIGNAL (request_edit_mfile_signal (
const QString&,
int)),
54 _parent, SLOT (edit_mfile (
const QString&,
int)));
55 connect (file_filter, SIGNAL (request_open_file_signal (
const QString&,
int)),
56 _parent, SLOT (open_file (
const QString&,
int)));
58 connect(
m_terminalView, SIGNAL(customContextMenuRequested(QPoint)),
65 QFont font = QFont(
"Monaco");
66 font.setStyleHint(QFont::TypeWriter);
67 font.setPointSize(11);
69 QFont font = QFont(
"Monospace");
70 font.setStyleHint(QFont::TypeWriter);
71 font.setPointSize(10);
74 setFocusPolicy (Qt::StrongFocus);
76 setFocus(Qt::OtherFocusReason);
117 dup2 (fds, STDOUT_FILENO);
118 dup2 (fds, STDERR_FILENO);
121 qDebug(
"Error: stdin is not a tty.");
124 if(!
isatty(STDOUT_FILENO)) {
125 qDebug(
"Error: stdout is not a tty.");
128 if(!
isatty(STDERR_FILENO)) {
129 qDebug(
"Error: stderr is not a tty.");
183 cols[i] = curr_cols[i];
190 QString css = QString (
"TerminalView {\n"
192 "}\n").arg (color.name ());
203 cols[i] = curr_cols[i];
#define DEFAULT_FORE_COLOR
#define DEFAULT_BACK_COLOR
An entry in a terminal display's color palette.
QColor color
The color value of this entry for display.
void addFilter(Filter *filter)
Adds a new filter to the chain.
Provides primitives for opening & closing a pseudo TTY pair, assigning the controlling TTY,...
bool open()
Create a pty master/slave pair.
void interrupt_signal(void)
virtual void handleCustomContextMenuRequested(const QPoint &at)
void terminal_interrupt(void)
virtual void handle_visibility_changed(bool visible)
QUnixTerminalImpl(QWidget *parent=nullptr)
void sendText(const QString &text)
virtual ~QUnixTerminalImpl()
void setSelectionColor(const QColor &color)
void setTerminalFont(const QFont &font)
void setSize(int h, int v)
void setCursorType(CursorType type, bool blinking)
void setBackgroundColor(const QColor &color)
void has_extra_interrupt(bool extra_interrupt)
QList< QAction * > get_hotspot_actions(const QPoint &at)
void setCursorColor(bool useForegroundColor, const QColor &color)
TerminalModel * m_terminalModel
void setScrollBufferSize(int value)
void showEvent(QShowEvent *)
void setForegroundColor(const QColor &color)
TerminalView * m_terminalView
virtual void resizeEvent(QResizeEvent *)
Represents a terminal session consisting of a pseudo-teletype and a terminal emulation.
void setCodec(QTextCodec *codec)
Sets the text codec used by this session's terminal emulation.
void setAutoClose(bool b)
Specifies whether to close the session automatically when the terminal process terminates.
void sendText(const QString &text) const
Sends text to the current foreground terminal program.
void run()
Starts the terminal session.
void addView(TerminalView *widget)
Adds a new view for this session.
void setKeyBindings(const QString &id)
Sets the key bindings 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 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 selectAll()
selects all content
FilterChain * filterChain() const
Returns the display's filter chain.
void pasteClipboard()
Pastes the content of the clipboard into the display.
void setTerminalSizeStartup(bool on)
Sets whether the terminal size display is shown briefly after the widget is first shown.
void setBellMode(int mode)
Sets the type of effect used to alert the user when a 'bell' occurs in the terminal session.
void copyClipboard(bool extra_interrupt)
Copies the selected text to the clipboard.
@ SelectWholeLine
Select the whole line underneath the cursor.
void setColorTable(const ColorEntry table[])
Sets the terminal color palette used by the display.
void setScrollBarPosition(ScrollBarPosition position)
Specifies whether the terminal display has a vertical scroll bar, and if so whether it is shown on th...
void setKeyboardCursorShape(KeyboardCursorShape shape)
Sets the shape of the keyboard cursor.
void setKeyboardCursorColor(bool useForegroundColor, const QColor &color)
Sets the color used to draw the keyboard cursor.
void setVTFont(const QFont &font)
Sets the font used to draw the display.
void updateImage()
Causes the terminal display to fetch the latest character image from the associated terminal screen (...
@ NotifyBell
KDE notification.
void setBlinkingCursor(bool blink)
Specifies whether or not the cursor blinks.
QList< QAction * > filterActions(const QPoint &position)
Returns a list of menu actions created by the filters for the content at the given position.
void setTripleClickMode(TripleClickMode mode)
Sets how the text is selected when the user triple clicks within the display.
@ ScrollBarRight
Show the scroll bar on the right side of the display.
@ UnderlineCursor
A single flat line which occupies the space at the bottom of the cursor character's area.
@ IBeamCursor
An cursor shaped like the capital letter 'I', similar to the IBeam cursor used in Qt/KDE text editors...
@ BlockCursor
A rectangular block which covers the entire area of the cursor character.
const ColorEntry * colorTable() const
Returns the terminal color palette used by the display.
void visibility_changed(bool visible)
Is called, when the terminal's visibility has changed in order to stop orstart timers etc.
void setSize(int cols, int lins)
void setTerminalSizeHint(bool on)
Sets whether or not the current height and width of the terminal in lines and columns is displayed wh...
A filter which matches URLs in blocks of text.
int dup2(int old_fd, int new_fd)