GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
PlainTextDecoder Class Reference

A terminal character decoder which produces plain text, ignoring colours and other appearance-related properties of the original characters. More...

#include "TerminalCharacterDecoder.h"

Inheritance diagram for PlainTextDecoder:
Inheritance graph
[legend]
Collaboration diagram for PlainTextDecoder:
Collaboration graph
[legend]

Public Member Functions

 PlainTextDecoder ()
 
virtual void begin (QTextStream *output)
 Begin decoding characters. More...
 
virtual void decodeLine (const Character *const characters, int count, LineProperty properties)
 Converts a line of terminal characters with associated properties into a text string and writes the string into an output QTextStream. More...
 
virtual void end ()
 End decoding. More...
 
void setTrailingWhitespace (bool enable)
 Set whether trailing whitespace at the end of lines should be included in the output. More...
 
bool trailingWhitespace () const
 Returns whether trailing whitespace at the end of lines is included in the output. More...
 

Private Attributes

bool _includeTrailingWhitespace
 
QTextStream * _output
 

Detailed Description

A terminal character decoder which produces plain text, ignoring colours and other appearance-related properties of the original characters.

Definition at line 67 of file TerminalCharacterDecoder.h.

Constructor & Destructor Documentation

PlainTextDecoder::PlainTextDecoder ( )

Definition at line 30 of file TerminalCharacterDecoder.cpp.

Member Function Documentation

void PlainTextDecoder::begin ( QTextStream *  output)
virtual

Begin decoding characters.

The resulting text is appended to output.

Implements TerminalCharacterDecoder.

Definition at line 44 of file TerminalCharacterDecoder.cpp.

References _output.

Referenced by TerminalView::inputMethodQuery(), Screen::selectedText(), and TerminalImageFilterChain::setImage().

void PlainTextDecoder::decodeLine ( const Character *const  characters,
int  count,
LineProperty  properties 
)
virtual

Converts a line of terminal characters with associated properties into a text string and writes the string into an output QTextStream.

Parameters
charactersAn array of characters of length count.
propertiesAdditional properties which affect all characters in the line
outputThe output stream which receives the decoded text

Implements TerminalCharacterDecoder.

Definition at line 52 of file TerminalCharacterDecoder.cpp.

References _includeTrailingWhitespace, and _output.

Referenced by TerminalView::inputMethodQuery(), and TerminalImageFilterChain::setImage().

void PlainTextDecoder::end ( )
virtual
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 36 of file TerminalCharacterDecoder.cpp.

References _includeTrailingWhitespace.

Referenced by TerminalImageFilterChain::setImage().

bool PlainTextDecoder::trailingWhitespace ( ) const

Returns whether trailing whitespace at the end of lines is included in the output.

Definition at line 40 of file TerminalCharacterDecoder.cpp.

References _includeTrailingWhitespace.

Member Data Documentation

bool PlainTextDecoder::_includeTrailingWhitespace
private
QTextStream* PlainTextDecoder::_output
private

Definition at line 93 of file TerminalCharacterDecoder.h.

Referenced by begin(), decodeLine(), and end().


The documentation for this class was generated from the following files: