GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
RegExpFilter::HotSpot Class Reference

Type of hotspot created by RegExpFilter. More...

#include "Filter.h"

Inheritance diagram for RegExpFilter::HotSpot:
Collaboration diagram for RegExpFilter::HotSpot:

Public Member Functions

 HotSpot (int startLine, int startColumn, int endLine, int endColumn, Filter::Type)
 
virtual QList< QAction * > actions ()
 Returns a list of actions associated with the hotspot which can be used in a menu or toolbar. More...
 
virtual void activate (QObject *object=nullptr)
 Causes the an action associated with a hotspot to be triggered. More...
 
QStringList capturedTexts () const
 Returns the texts found by the filter when matching the filter's regular expression. More...
 
int endColumn () const
 Returns the column on endLine() where the hotspot area ends. More...
 
int endLine () const
 Returns the line where the hotspot area ends. More...
 
void setCapturedTexts (const QStringList &texts)
 Sets the captured texts associated with this hotspot. More...
 
int startColumn () const
 Returns the column on startLine() where the hotspot area starts. More...
 
int startLine () const
 Returns the line when the hotspot area starts. More...
 
virtual QString tooltip () const
 Returns the text of a tooltip to be shown when the mouse moves over the hotspot, or an empty string if there is no tooltip associated with this hotspot. More...
 
Type type () const
 Returns the type of the hotspot. More...
 

Protected Member Functions

void setType (Type type)
 Sets the type of a hotspot. More...
 

Private Attributes

QStringList _capturedTexts
 

Detailed Description

Type of hotspot created by RegExpFilter.

The capturedTexts() method can be used to find the text matched by the filter's regular expression.

Definition at line 209 of file Filter.h.

Constructor & Destructor Documentation

◆ HotSpot()

RegExpFilter::HotSpot::HotSpot ( int  startLine,
int  startColumn,
int  endLine,
int  endColumn,
Filter::Type  t 
)

Definition at line 335 of file Filter.cpp.

References Filter::HotSpot::setType(), and t.

Member Function Documentation

◆ actions()

QList< QAction * > Filter::HotSpot::actions ( void  )
virtualinherited

Returns a list of actions associated with the hotspot which can be used in a menu or toolbar.

Reimplemented in UrlFilter::HotSpot.

Definition at line 301 of file Filter.cpp.

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

◆ activate()

void RegExpFilter::HotSpot::activate ( QObject object = nullptr)
virtual

Causes the an action associated with a hotspot to be triggered.

Parameters
objectThe object which caused the hotspot to be triggered. This is typically null ( in which case the default action should be performed ) or one of the objects from the actions() list. In which case the associated action should be performed.

Implements Filter::HotSpot.

Reimplemented in UrlFilter::HotSpot.

Definition at line 342 of file Filter.cpp.

◆ capturedTexts()

QStringList RegExpFilter::HotSpot::capturedTexts ( ) const

Returns the texts found by the filter when matching the filter's regular expression.

Definition at line 350 of file Filter.cpp.

◆ endColumn()

int Filter::HotSpot::endColumn ( ) const
inherited

Returns the column on endLine() where the hotspot area ends.

Definition at line 317 of file Filter.cpp.

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

◆ endLine()

int Filter::HotSpot::endLine ( ) const
inherited

Returns the line where the hotspot area ends.

Definition at line 309 of file Filter.cpp.

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

◆ setCapturedTexts()

void RegExpFilter::HotSpot::setCapturedTexts ( const QStringList &  texts)

Sets the captured texts associated with this hotspot.

Definition at line 346 of file Filter.cpp.

◆ setType()

void Filter::HotSpot::setType ( Filter::Type  type)
protectedinherited

Sets the type of a hotspot.

This should only be set once

Definition at line 325 of file Filter.cpp.

References type.

Referenced by HotSpot().

◆ startColumn()

int Filter::HotSpot::startColumn ( ) const
inherited

Returns the column on startLine() where the hotspot area starts.

Definition at line 313 of file Filter.cpp.

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

◆ startLine()

int Filter::HotSpot::startLine ( ) const
inherited

Returns the line when the hotspot area starts.

Definition at line 305 of file Filter.cpp.

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

◆ tooltip()

QString Filter::HotSpot::tooltip ( ) const
virtualinherited

Returns the text of a tooltip to be shown when the mouse moves over the hotspot, or an empty string if there is no tooltip associated with this hotspot.

The default implementation returns an empty string.

Reimplemented in UrlFilter::HotSpot.

Definition at line 297 of file Filter.cpp.

◆ type()

Filter::Type Filter::HotSpot::type ( void  ) const
inherited

Returns the type of the hotspot.

This is usually used as a hint for views on how to represent the hotspot graphically. eg. Link hotspots are typically underlined when the user mouses over them

Definition at line 321 of file Filter.cpp.

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

Member Data Documentation

◆ _capturedTexts

QStringList RegExpFilter::HotSpot::_capturedTexts
private

Definition at line 221 of file Filter.h.


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