MauiKit Terminal
TerminalDisplay.h
80 * @brief A widget which displays output from a terminal emulation and sends input keypresses and mouse activity to the terminal.
82 * When the terminal emulation receives new output from the program running in the terminal, it will update the display by calling updateImage().
84 * This class is exposed to the QML engine as `QMLTermWidget` and forms part of the `Terminal` control implementation.
86 * @note This class is not part of any public API, and its usage is restricted via the QML exposed type `QMLTermWidget`
135 Q_PROPERTY(int scrollbarCurrentValue READ getScrollbarValue WRITE setScrollbarValue NOTIFY scrollbarParamsChanged)
160 Q_PROPERTY(bool fullCursorHeight READ fullCursorHeight WRITE setFullCursorHeight NOTIFY fullCursorHeightChanged)
165 Q_PROPERTY(bool blinkingCursor READ blinkingCursor WRITE setBlinkingCursor NOTIFY blinkingCursorStateChanged)
175 Q_PROPERTY(QStringList availableColorSchemes READ availableColorSchemes NOTIFY availableColorSchemesChanged)
185 Q_PROPERTY(qreal backgroundOpacity READ backgroundOpacity WRITE setBackgroundOpacity NOTIFY backgroundOpacityChanged)
258 * Depending on the type of the hotspots created by the filter ( returned by Filter::Hotspot::type() )
590 /** Returns the terminal screen section which is displayed in this widget. See setScreenWindow() */
675 * The user interaction needed to create selections will also change, and the user will be required
680 * @param usesMouse Set to true if the program running in the terminal is interested in mouse events
718 void simulateKeyPress(int key, int modifiers, bool pressed, quint32 nativeScanCode, const QString &text);
746 * @param button The mouse button (0 for left button, 1 for middle button, 2 for right button, 3 for release)
767 * When the shortcut is overridden, the key sequence will be sent to the terminal emulation instead
898 void drawTextFragment(QPainter &painter, const QRect &rect, const QString &text, const Character *style);
903 void drawBackground(QPainter &painter, const QRect &rect, const QColor &color, bool useOpacitySetting);
905 void drawCursor(QPainter &painter, const QRect &rect, const QColor &foregroundColor, const QColor &backgroundColor, bool &invertColors);
907 void drawCharacters(QPainter &painter, const QRect &rect, const QString &text, const Character *style, bool invertCharacterColor);
KeyboardCursorShape
This enum describes the available shapes for the keyboard cursor.
Definition Emulation.h:128
A chain which allows a group of filters to be processed as one.
Definition Filter.h:320
Provides a window onto a section of a terminal screen.
Definition ScreenWindow.h:52
static bool antialias()
Returns true if anti-aliasing of text in the terminal is enabled.
Definition TerminalDisplay.h:509
CustomColorScheme * customColorScheme
Access to the CustomColorScheme object, which allows to modify manually the colors.
Definition TerminalDisplay.h:190
Q_INVOKABLE int fontHeight()
Returns the height of the characters in the font used to draw the text in the display.
Definition TerminalDisplay.h:404
bool readOnly
A read only mode prevents the user from sending keyevents.
Definition TerminalDisplay.h:195
void bell(const QString &message)
Shows a notification that a bell event has occurred in the terminal.
Definition TerminalDisplay.cpp:2760
void setBlinkingCursor(bool blink)
Specifies whether or not the cursor blinks.
Definition TerminalDisplay.cpp:1161
void keyPressedSignal(QKeyEvent *e, bool fromPaste)
Emitted when the user presses a key whilst the terminal widget has focus.
QFont getVTFont()
Returns the font used to draw characters in the display.
Definition TerminalDisplay.h:487
bool blinkingCursor()
Returns true if the cursor is set to blink or false otherwise.
Definition TerminalDisplay.h:290
int lines()
Returns the number of lines of text which can be displayed in the widget.
Definition TerminalDisplay.h:385
void setRandomSeed(uint seed)
Sets the seed used to generate random colors for the display (in color schemes that support them).
Definition TerminalDisplay.cpp:822
void setTerminalSizeHint(bool on)
Sets whether or not the current height and width of the terminal in lines and columns is displayed wh...
Definition TerminalDisplay.h:541
void setTerminalSizeStartup(bool on)
Sets whether the terminal size display is shown briefly after the widget is first shown.
Definition TerminalDisplay.h:560
bool getBoldIntense()
Returns true if characters with intense colors are rendered in bold.
Definition TerminalDisplay.h:531
TerminalDisplay(QQuickItem *parent=nullptr)
Constructs a new terminal display widget with the specified parent.
Definition TerminalDisplay.cpp:276
void configureRequest(const QPoint &position)
Emitted when the user right clicks on the display, or right-clicks with the Shift key held down if us...
int bellMode()
Returns the type of effect used to alert the user when a 'bell' occurs in the terminal session.
Definition TerminalDisplay.h:460
bool isBidiEnabled()
Returns the status of the BiDi rendering in this widget.
Definition TerminalDisplay.h:576
QString wordCharacters()
Returns the characters which are considered part of a word for the purpose of selecting words in the ...
Definition TerminalDisplay.h:441
void setTripleClickMode(TripleClickMode mode)
Sets how the text is selected when the user triple clicks within the display.
Definition TerminalDisplay.h:320
static void setAntialias(bool antialias)
Specified whether anti-aliasing of text in the terminal display is enabled or not.
Definition TerminalDisplay.h:502
BellMode
This enum describes the different types of sounds and visual effects which can be used to alert the u...
Definition TerminalDisplay.h:470
ScrollBarPosition
This enum describes the location where the scroll bar is positioned in the display widget.
Definition TerminalDisplay.h:226
@ ScrollBarRight
Show the scroll bar on the right side of the display.
Definition TerminalDisplay.h:232
void setBackgroundOpacity(qreal backgroundOpacity)
Sets the backgroundOpacity of the terminal display.
Definition TerminalDisplay.cpp:666
bool terminalSizeHint()
Returns whether or not the current height and width of the terminal in lines and columns is displayed...
Definition TerminalDisplay.h:550
void mouseSignal(int button, int column, int line, int eventType)
A mouse event occurred.
void overrideShortcutCheck(QKeyEvent *keyEvent, bool &override)
When a shortcut which is also a valid terminal key sequence is pressed while the terminal widget has ...
TripleClickMode
This enum describes the methods for selecting text when the user triple-clicks within the display.
Definition TerminalDisplay.h:313
@ SelectForwardsFromCursor
Select from the current cursor position to the end of the line.
Definition TerminalDisplay.h:317
void setColorTable(std::array< ColorEntry, TABLE_COLORS > &&table)
Sets the terminal color palette used by the display.
Definition TerminalDisplay.cpp:157
bool flowControlWarningEnabled() const
Returns true if the flow control warning box is enabled.
Definition TerminalDisplay.h:654
void setVTFont(const QFont &font)
Sets the font used to draw the display.
Definition TerminalDisplay.cpp:238
void setDrawLineChars(bool drawLineChars)
Specify whether line chars should be drawn by ourselves or left to underlying font rendering librarie...
Definition TerminalDisplay.h:518
void setBoldIntense(bool value)
Specifies whether characters with intense colors should be rendered as bold.
Definition TerminalDisplay.cpp:261
std::span< const ColorEntry > colorTable() const
Returns the terminal color palette used by the display.
Definition TerminalDisplay.cpp:113
uint randomSeed() const
Returns the seed used to generate random colors for the display (in color schemes that support them).
Definition TerminalDisplay.cpp:826
void setBidiEnabled(bool set)
Sets the status of the BiDi rendering inside the terminal display.
Definition TerminalDisplay.h:569
int columns()
Returns the number of characters of text which can be displayed on each line in the widget.
Definition TerminalDisplay.h:396
Q_SCRIPTABLE QString start(QString train="")
void update(Part *part, const QByteArray &data, qint64 dataSize)
const QList< QKeySequence > & pasteSelection()
Q_INVOKABLEQ_INVOKABLE
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
ColorRole
QQuickItem(QQuickItem *parent)
height
parent
width
QQuickPaintedItem(QQuickItem *parent)
InputMethodQuery
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 21 2025 11:50:35 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 21 2025 11:50:35 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.