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