GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
TerminalImageFilterChain Class Reference

A filter chain which processes character images from terminal displays. More...

#include "Filter.h"

Inheritance diagram for TerminalImageFilterChain:
Collaboration diagram for TerminalImageFilterChain:

Public Member Functions

 TerminalImageFilterChain ()
 
virtual ~TerminalImageFilterChain ()
 
void addFilter (Filter *filter)
 Adds a new filter to the chain. More...
 
void clear ()
 Removes all filters from the chain. More...
 
bool containsFilter (Filter *filter)
 Returns true if the chain contains filter. More...
 
Filter::HotSpothotSpotAt (int line, int column) const
 Returns the first hotspot which occurs at line, column or 0 if no hotspot was found. More...
 
QList< Filter::HotSpot * > hotSpots () const
 Returns a list of all the hotspots in all the chain's filters. More...
 
QList< Filter::HotSpothotSpotsAtLine (int line) const
 Returns a list of all hotspots at the given line in all the chain's filters. More...
 
void process ()
 Processes each filter in the chain. More...
 
void removeFilter (Filter *filter)
 Removes a filter from the chain. More...
 
void reset ()
 Resets each filter in the chain. More...
 
void setBuffer (const QString *buffer, const QList< int > *linePositions)
 Sets the buffer for each filter in the chain to process. More...
 
void setImage (const Character *const image, int lines, int columns, const QVector< LineProperty > &lineProperties)
 Set the current terminal image to image. More...
 

Private Attributes

QString * _buffer
 
QList< int > * _linePositions
 

Detailed Description

A filter chain which processes character images from terminal displays.

Definition at line 395 of file Filter.h.

Constructor & Destructor Documentation

◆ TerminalImageFilterChain()

TerminalImageFilterChain::TerminalImageFilterChain ( )

Definition at line 113 of file Filter.cpp.

◆ ~TerminalImageFilterChain()

TerminalImageFilterChain::~TerminalImageFilterChain ( )
virtual

Definition at line 119 of file Filter.cpp.

References _buffer, and _linePositions.

Member Function Documentation

◆ addFilter()

void FilterChain::addFilter ( Filter filter)
inherited

Adds a new filter to the chain.

The chain will delete this filter when it is destroyed

Definition at line 51 of file Filter.cpp.

References filter().

Referenced by QUnixTerminalImpl::initialize().

◆ clear()

void FilterChain::clear ( void  )
inherited

Removes all filters from the chain.

Definition at line 81 of file Filter.cpp.

◆ containsFilter()

bool FilterChain::containsFilter ( Filter filter)
inherited

Returns true if the chain contains filter.

Definition at line 59 of file Filter.cpp.

References filter().

◆ hotSpotAt()

Filter::HotSpot * FilterChain::hotSpotAt ( int  line,
int  column 
) const
inherited

Returns the first hotspot which occurs at line, column or 0 if no hotspot was found.

Definition at line 85 of file Filter.cpp.

References filter().

Referenced by TerminalView::filterActions(), TerminalView::mouseMoveEvent(), and TerminalView::mousePressEvent().

◆ hotSpots()

QList< Filter::HotSpot * > FilterChain::hotSpots ( ) const
inherited

Returns a list of all the hotspots in all the chain's filters.

Definition at line 101 of file Filter.cpp.

References filter().

Referenced by TerminalView::hotSpotRegion(), and TerminalView::paintFilters().

◆ hotSpotsAtLine()

QList<Filter::HotSpot> FilterChain::hotSpotsAtLine ( int  line) const
inherited

Returns a list of all hotspots at the given line in all the chain's filters.

◆ process()

void FilterChain::process ( )
inherited

Processes each filter in the chain.

Definition at line 75 of file Filter.cpp.

Referenced by TerminalView::processFilters().

◆ removeFilter()

void FilterChain::removeFilter ( Filter filter)
inherited

Removes a filter from the chain.

The chain will no longer delete the filter when destroyed

Definition at line 55 of file Filter.cpp.

References filter().

◆ reset()

void FilterChain::reset ( void  )
inherited

Resets each filter in the chain.

Definition at line 63 of file Filter.cpp.

Referenced by setImage().

◆ setBuffer()

void FilterChain::setBuffer ( const QString *  buffer,
const QList< int > *  linePositions 
)
inherited

Sets the buffer for each filter in the chain to process.

Definition at line 69 of file Filter.cpp.

Referenced by setImage().

◆ setImage()

void TerminalImageFilterChain::setImage ( const Character *const  image,
int  lines,
int  columns,
const QVector< LineProperty > &  lineProperties 
)

Set the current terminal image to image.

Parameters
imageThe terminal image
linesThe number of lines in the terminal image
columnsThe number of columns in the terminal image

Definition at line 125 of file Filter.cpp.

References _buffer, _linePositions, PlainTextDecoder::begin(), PlainTextDecoder::decodeLine(), PlainTextDecoder::end(), LINE_DEFAULT, LINE_WRAPPED, FilterChain::reset(), FilterChain::setBuffer(), and PlainTextDecoder::setTrailingWhitespace().

Referenced by TerminalView::processFilters().

Member Data Documentation

◆ _buffer

QString* TerminalImageFilterChain::_buffer
private

Definition at line 412 of file Filter.h.

Referenced by ~TerminalImageFilterChain(), and setImage().

◆ _linePositions

QList<int>* TerminalImageFilterChain::_linePositions
private

Definition at line 413 of file Filter.h.

Referenced by ~TerminalImageFilterChain(), and setImage().


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