28 #include <QtCore/QList>
29 #include <QtCore/QObject>
30 #include <QtCore/QStringList>
31 #include <QtCore/QHash>
32 #include <QtCore/QRegExp>
131 virtual QString
tooltip()
const;
182 void getLineColumn(
int position ,
int& startLine ,
int& startColumn);
256 int endLine,
int endColumn,
Type);
289 virtual QString
tooltip()
const;
409 const QVector<LineProperty>& lineProperties);
A single character in the terminal which consists of a unicode character value, foreground and backgr...
A chain which allows a group of filters to be processed as one.
void process()
Processes each filter in the chain.
bool containsFilter(Filter *filter)
Returns true if the chain contains filter.
void addFilter(Filter *filter)
Adds a new filter to the chain.
void removeFilter(Filter *filter)
Removes a filter from the chain.
void reset()
Resets each filter in the chain.
QList< Filter::HotSpot > hotSpotsAtLine(int line) const
Returns a list of all hotspots at the given line in all the chain's filters.
Filter::HotSpot * hotSpotAt(int line, int column) const
Returns the first hotspot which occurs at line, column or 0 if no hotspot was found.
QList< Filter::HotSpot * > hotSpots() const
Returns a list of all the hotspots in all the chain's filters.
void setBuffer(const QString *buffer, const QList< int > *linePositions)
Sets the buffer for each filter in the chain to process.
void clear()
Removes all filters from the chain.
void request_open_file_signal(const QString &, int)
Filter::HotSpot * _filter
void request_open_file(const QString &file, int line)
FilterObject(Filter::HotSpot *filter)
virtual QString tooltip() const
Returns the text of a tooltip to be shown when the mouse moves over the hotspot, or an empty string i...
int endLine() const
Returns the line where the hotspot area ends.
int startLine() const
Returns the line when the hotspot area starts.
int endColumn() const
Returns the column on endLine() where the hotspot area ends.
virtual void activate(QObject *object=nullptr)=0
Causes the an action associated with a hotspot to be triggered.
virtual QList< QAction * > actions()
Returns a list of actions associated with the hotspot which can be used in a menu or toolbar.
void setType(Type type)
Sets the type of a hotspot.
Type type() const
Returns the type of the hotspot.
HotSpot(int startLine, int startColumn, int endLine, int endColumn)
Constructs a new hotspot which covers the area from (startLine,startColumn) to (endLine,...
int startColumn() const
Returns the column on startLine() where the hotspot area starts.
A filter processes blocks of text looking for certain patterns (such as URLs or keywords from a list)...
QList< HotSpot * > _hotspotList
virtual void process()=0
Causes the filter to process the block of text currently in its internal buffer.
void setBuffer(const QString *buffer, const QList< int > *linePositions)
TODO: Document me.
QList< HotSpot * > hotSpotsAtLine(int line) const
Returns the list of hotspots identified by the filter which occur on a given line.
HotSpot * hotSpotAt(int line, int column) const
Adds a new line of text to the filter and increments the line count.
const QString * buffer()
Returns the internal buffer.
QMultiHash< int, HotSpot * > _hotspots
Type
Represents an area of text which matched the pattern a particular filter has been looking for.
const QList< int > * _linePositions
QList< HotSpot * > hotSpots() const
Returns the list of hotspots identified by the filter.
Filter()
Constructs a new filter.
void reset()
Empties the filters internal buffer and resets the line count back to 0.
void getLineColumn(int position, int &startLine, int &startColumn)
Converts a character position within buffer() to a line and column.
void addHotSpot(HotSpot *)
Adds a new hotspot to the list.
Type of hotspot created by RegExpFilter.
QStringList _capturedTexts
virtual void activate(QObject *object=nullptr)
Causes the an action associated with a hotspot to be triggered.
HotSpot(int startLine, int startColumn, int endLine, int endColumn, Filter::Type)
QStringList capturedTexts() const
Returns the texts found by the filter when matching the filter's regular expression.
void setCapturedTexts(const QStringList &texts)
Sets the captured texts associated with this hotspot.
A filter which searches for sections of text matching a regular expression and creates a new RegExpFi...
virtual void process()
Reimplemented to search the filter's text buffer for text matching regExp()
void setRegExp(const QRegExp &text)
Sets the regular expression which the filter searches for in blocks of text.
void request_edit_mfile_signal(const QString &, int)
QRegExp regExp() const
Returns the regular expression which the filter searches for in blocks of text.
RegExpFilter(Type)
Constructs a new regular expression filter.
void request_open_file_signal(const QString &, int)
virtual RegExpFilter::HotSpot * newHotSpot(int startLine, int startColumn, int endLine, int endColumn, Type)
Called when a match for the regular expression is encountered.
A filter chain which processes character images from terminal displays.
TerminalImageFilterChain()
QList< int > * _linePositions
void setImage(const Character *const image, int lines, int columns, const QVector< LineProperty > &lineProperties)
Set the current terminal image to image.
virtual ~TerminalImageFilterChain()
Hotspot type created by UrlFilter instances.
FilterObject * get_urlObject()
FilterObject * _urlObject
virtual void activate(QObject *object=nullptr)
Open a web browser at the current URL.
virtual QString tooltip() const
Returns the text of a tooltip to be shown when the mouse moves over the hotspot, or an empty string i...
HotSpot(int startLine, int startColumn, int endLine, int endColumn, Type t)
virtual QList< QAction * > actions()
Returns a list of actions associated with the hotspot which can be used in a menu or toolbar.
A filter which matches URLs in blocks of text.
void request_open_file(const QString &, int)
static const QRegExp FullUrlRegExp
virtual void process()
Reimplemented to search the filter's text buffer for text matching regExp()
static const QRegExp CompleteUrlRegExp
static const QRegExp ErrorLinkRegExp
static const QRegExp ParseErrorLinkRegExp
virtual HotSpot * newHotSpot(int, int, int, int, Type)
Called when a match for the regular expression is encountered.
static const QRegExp CompleteErrorLinkRegExp
static const QRegExp EmailAddressRegExp
MArray< T > filter(MArray< T > &b, MArray< T > &a, MArray< T > &x, MArray< T > &si, int dim=0)