Konsole::PlainTextDecoder
#include <TerminalCharacterDecoder.h>
Public Member Functions | |
void | begin (QTextStream *output) override |
void | decodeLine (std::span< const Character > characters, LineProperty properties) override |
void | end () override |
QList< int > | linePositions () const |
void | setRecordLinePositions (bool record) |
void | setTrailingWhitespace (bool enable) |
bool | trailingWhitespace () const |
Public Member Functions inherited from Konsole::TerminalCharacterDecoder |
Detailed Description
A terminal character decoder which produces plain text, ignoring colours and other appearance-related properties of the original characters.
Definition at line 71 of file TerminalCharacterDecoder.h.
Constructor & Destructor Documentation
◆ PlainTextDecoder()
PlainTextDecoder::PlainTextDecoder | ( | ) |
Definition at line 41 of file TerminalCharacterDecoder.cpp.
Member Function Documentation
◆ begin()
|
overridevirtual |
Begin decoding characters.
The resulting text is appended to output
.
Implements Konsole::TerminalCharacterDecoder.
Definition at line 55 of file TerminalCharacterDecoder.cpp.
◆ decodeLine()
|
overridevirtual |
Converts a line of terminal characters with associated properties into a text string and writes the string into an output QTextStream.
- Parameters
-
characters An array of characters of length count
.count The number of characters properties Additional properties which affect all characters in the line
Implements Konsole::TerminalCharacterDecoder.
Definition at line 75 of file TerminalCharacterDecoder.cpp.
◆ end()
|
overridevirtual |
End decoding.
Implements Konsole::TerminalCharacterDecoder.
Definition at line 61 of file TerminalCharacterDecoder.cpp.
◆ linePositions()
QList< int > PlainTextDecoder::linePositions | ( | ) | const |
Returns of character positions in the output stream at which new lines where added.
Returns an empty if setTrackLinePositions() is false or if the output device is not a string.
Definition at line 70 of file TerminalCharacterDecoder.cpp.
◆ setRecordLinePositions()
void PlainTextDecoder::setRecordLinePositions | ( | bool | record | ) |
Enables recording of character positions at which new lines are added.
See linePositions()
Definition at line 66 of file TerminalCharacterDecoder.cpp.
◆ setTrailingWhitespace()
void PlainTextDecoder::setTrailingWhitespace | ( | bool | enable | ) |
Set whether trailing whitespace at the end of lines should be included in the output.
Defaults to true.
Definition at line 47 of file TerminalCharacterDecoder.cpp.
◆ trailingWhitespace()
bool PlainTextDecoder::trailingWhitespace | ( | ) | const |
Returns whether trailing whitespace at the end of lines is included in the output.
Definition at line 51 of file TerminalCharacterDecoder.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:04:23 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.