24 #ifndef TERMINALVIEW_H
25 #define TERMINALVIEW_H
29 #include <QtCore/QPointer>
37 class QDragEnterEvent;
249 void setSize(
int cols,
int lins);
319 virtual void setFont(
const QFont &);
530 virtual void dropEvent(QDropEvent* event);
584 const QColor& backgroundColor ,
bool& invertColors);
587 const Character* style,
bool invertCharacterColor);
unsigned short vt100_graphics[32]
A single character in the terminal which consists of a unicode character value, foreground and backgr...
An entry in a terminal display's color palette.
A chain which allows a group of filters to be processed as one.
Provides a window onto a section of a terminal screen.
A filter chain which processes character images from terminal displays.
A widget which displays output from a terminal emulation and sends input keypresses and mouse activit...
void selectAll()
selects all content
virtual void showEvent(QShowEvent *)
bool _flowControlWarningEnabled
FilterChain * filterChain() const
Returns the display's filter chain.
QGridLayout * _gridLayout
bool blinkingCursor()
Returns true if the cursor is set to blink or false otherwise.
uint randomSeed() const
Returns the seed used to generate random colors for the display (in color schemes that support them).
QRect preeditRect() const
virtual void inputMethodEvent(QInputMethodEvent *event)
bool _columnSelectionMode
void setWordCharacters(const QString &wc)
Sets which characters, in addition to letters and numbers, are regarded as being part of a word for t...
void processFilters()
Updates the filters in the display's filter chain.
static const int BLINK_DELAY
int fontHeight()
Returns the height of the characters in the font used to draw the text in the display.
void updateLineProperties()
Causes the terminal display to fetch the latest line status flags from the associated terminal screen...
virtual void extendSelection(const QPoint &pos)
void pasteClipboard()
Pastes the content of the clipboard into the display.
static const int DEFAULT_TOP_MARGIN
void sendStringToEmu(const char *)
virtual void resizeEvent(QResizeEvent *)
QVector< LineProperty > _lineProperties
void drawInputMethodPreeditString(QPainter &painter, const QRect &rect)
void drawBackground(QPainter &painter, const QRect &rect, const QColor &color)
void setTerminalSizeStartup(bool on)
Sets whether the terminal size display is shown briefly after the widget is first shown.
virtual void setFont(const QFont &)
Reimplemented.
void drawCursor(QPainter &painter, const QRect &rect, const QColor &foregroundColor, const QColor &backgroundColor, bool &invertColors)
void drawTextFragment(QPainter &painter, const QRect &rect, const QString &text, const Character *style)
int bellMode()
Returns the type of effect used to alert the user when a 'bell' occurs in the terminal session.
void getCharacterPosition(const QPoint &widgetPoint, int &line, int &column) const
virtual void hideEvent(QHideEvent *)
QTimer * _blinkCursorTimer
void setBellMode(int mode)
Sets the type of effect used to alert the user when a 'bell' occurs in the terminal session.
void setUsesMouse(bool usesMouse)
Sets whether the program whoose output is being displayed in the view is interested in mouse events.
void changedFontMetricSignal(int height, int width)
virtual void mouseReleaseEvent(QMouseEvent *)
void scrollBarPositionChanged(int value)
static const int DEFAULT_LEFT_MARGIN
void setScroll(int cursor, int lines)
Sets the current position and range of the display's scroll bar.
void configureRequest(TerminalView *, int state, const QPoint &position)
Emitted when the user right clicks on the display, or right-clicks with the Shift key held down if us...
void setRandomSeed(uint seed)
Sets the seed used to generate random colors for the display (in color schemes that support them).
void isBusySelecting(bool)
void copyClipboard(bool extra_interrupt)
Copies the selected text to the clipboard.
void interrupt_signal(void)
QPoint cursorPosition() const
TripleClickMode
This enum describes the methods for selecting text when the user triple-clicks within the display.
@ SelectForwardsFromCursor
Select from the current cursor position to the end of the line.
@ SelectWholeLine
Select the whole line underneath the cursor.
void setColorTable(const ColorEntry table[])
Sets the terminal color palette used by the display.
QFont getVTFont()
Returns the font used to draw characters in 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...
QString wordCharacters()
Returns the characters which are considered part of a word for the purpose of selecting words in the ...
ScreenWindow * screenWindow() const
Returns the terminal screen section which is displayed in this widget.
void setKeyboardCursorShape(KeyboardCursorShape shape)
Sets the shape of the keyboard cursor.
static void setAntialias(bool antialias)
Specified whether anti-aliasing of text in the terminal display is enabled or not.
void focusInEvent(QFocusEvent *focusEvent)
QPointer< ScreenWindow > _screenWindow
TerminalImageFilterChain * _filterChain
virtual bool focusNextPrevChild(bool next)
void setScreenWindow(ScreenWindow *window)
Sets the terminal screen section which is displayed in this widget.
virtual int charClass(quint16) const
void setKeyboardCursorColor(bool useForegroundColor, const QColor &color)
Sets the color used to draw the keyboard cursor.
ColorEntry _colorTable[TABLE_COLORS]
TripleClickMode _tripleClickMode
bool _terminalSizeStartup
void bracketText(QString &text)
change and wrap text corresponding to paste mode
void setVTFont(const QFont &font)
Sets the font used to draw the display.
QRect _mouseOverHotspotArea
void updateImage()
Causes the terminal display to fetch the latest character image from the associated terminal screen (...
int columns()
Returns the number of characters of text which can be displayed on each line in the widget.
void disableBracketedPasteMode(bool disable)
virtual void mouseMoveEvent(QMouseEvent *)
BellMode
This enum describes the different types of sounds and visual effects which can be used to alert the u...
@ VisualBell
A silent, visual bell (eg.
@ NotifyBell
KDE notification.
@ SystemBeepBell
A system beep.
InputMethodData _inputMethodData
void focusOutEvent(QFocusEvent *focusEvent)
void mouseSignal(int button, int column, int line, int eventType)
A mouse event occurred.
void setReadOnly(bool readonly)
Specified whether terminal widget should be at read-only mode Defaults to false.
void setSelection(const QString &t)
void setBlinkingCursor(bool blink)
Specifies whether or not the cursor blinks.
void drawCharacters(QPainter &painter, const QRect &rect, const QString &text, const Character *style, bool invertCharacterColor)
bool usesMouse() const
See setUsesMouse()
virtual void mousePressEvent(QMouseEvent *)
KeyboardCursorShape _cursorShape
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const
virtual void mouseDoubleClickEvent(QMouseEvent *ev)
void paintFilters(QPainter &painter)
QList< QAction * > filterActions(const QPoint &position)
Returns a list of menu actions created by the filters for the content at the given position.
virtual void keyPressEvent(QKeyEvent *event)
void setTripleClickMode(TripleClickMode mode)
Sets how the text is selected when the user triple clicks within the display.
ScrollBarPosition
This enum describes the location where the scroll bar is positioned in the display widget.
@ ScrollBarLeft
Show the scroll bar on the left side of the display.
@ NoScrollBar
Do not show the scroll bar.
@ ScrollBarRight
Show the scroll bar on the right side of the display.
virtual void dropEvent(QDropEvent *event)
QRect imageToWidget(const QRect &imageArea) const
virtual void dragEnterEvent(QDragEnterEvent *event)
void setFixedSize(int cols, int lins)
void setBlinkingCursorState(bool blink)
void set_global_shortcuts_signal(bool)
Emitted when focus changes.
void setCtrlDrag(bool enable)
int lines()
Returns the number of lines of text which can be displayed in the widget.
virtual void fontChange(const QFont &font)
void tripleClickTimeout()
virtual void wheelEvent(QWheelEvent *)
QLabel * _outputSuspendedLabel
struct TerminalView::_dragInfo dragInfo
KeyboardCursorShape
This enum describes the available shapes for the keyboard cursor.
@ 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.
QColor keyboardCursorColor() const
Returns the color of the keyboard cursor, or an invalid color if the keyboard cursor color is set to ...
KeyboardCursorShape keyboardCursorShape() const
Returns the shape of the keyboard cursor.
void setLineSpacing(uint)
void outputSuspended(bool suspended)
Causes the widget to display or hide a message informing the user that terminal output has been suspe...
bool _disabledBracketedPasteMode
const ColorEntry * colorTable() const
Returns the terminal color palette used by the display.
virtual void paintEvent(QPaintEvent *)
bool bracketedPasteMode() const
void pasteSelection()
Pastes the content of the selection into the display.
bool terminalSizeHint()
Returns whether or not the current height and width of the terminal in lines and columns is displayed...
void visibility_changed(bool visible)
Is called, when the terminal's visibility has changed in order to stop orstart timers etc.
void tripleClicked(const QString &text)
void setSize(int cols, int lins)
void showResizeNotification()
QRegion hotSpotRegion() const
int fontWidth()
Returns the width of the characters in the display.
ScrollBarPosition _scrollbarLocation
TerminalView(QWidget *parent=nullptr)
Constructs a new terminal display widget with the specified parent.
void keyPressedSignal(QKeyEvent *e)
Emitted when the user presses a key whilst the terminal widget has focus.
TripleClickMode tripleClickMode()
See setTripleClickSelectionMode()
void setBracketedPasteMode(bool bracketedPasteMode)
void changedContentSizeSignal(int height, int width)
void mouseTripleClickEvent(QMouseEvent *ev)
static bool _antialiasText
void emitSelection(bool useXselection, bool appendReturn)
void drawContents(QPainter &paint, const QRect &rect)
bool _possibleTripleClick
bool bracketedPasteModeIsDisabled() const
QTimer * _process_filter_timer
void scrollImage(int lines, const QRect ®ion)
void setTerminalSizeHint(bool on)
Sets whether or not the current height and width of the terminal in lines and columns is displayed wh...
static bool antialias()
Returns true if anti-aliasing of text in the terminal is enabled.
static uint32_t state[624]