GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Filter::HotSpot Class Referenceabstract

#include "Filter.h"

Inheritance diagram for Filter::HotSpot:
Collaboration diagram for Filter::HotSpot:

Public Member Functions

 HotSpot (int startLine, int startColumn, int endLine, int endColumn)
 Constructs a new hotspot which covers the area from (startLine,startColumn) to (endLine,endColumn) in a block of text. More...
 
virtual ~HotSpot ()
 
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)=0
 Causes the an action associated with a hotspot to be triggered. 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...
 
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

int _endColumn
 
int _endLine
 
int _startColumn
 
int _startLine
 
Type _type
 

Detailed Description

Definition at line 86 of file Filter.h.

Constructor & Destructor Documentation

◆ HotSpot()

Filter::HotSpot::HotSpot ( int  startLine,
int  startColumn,
int  endLine,
int  endColumn 
)

Constructs a new hotspot which covers the area from (startLine,startColumn) to (endLine,endColumn) in a block of text.

Definition at line 286 of file Filter.cpp.

◆ ~HotSpot()

Filter::HotSpot::~HotSpot ( )
virtual

Reimplemented in UrlFilter::HotSpot.

Definition at line 246 of file Filter.cpp.

Member Function Documentation

◆ actions()

QList< QAction * > Filter::HotSpot::actions ( )
virtual

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 298 of file Filter.cpp.

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

◆ activate()

virtual void Filter::HotSpot::activate ( QObject object = nullptr)
pure 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.

Implemented in UrlFilter::HotSpot, and RegExpFilter::HotSpot.

◆ endColumn()

int Filter::HotSpot::endColumn ( ) const

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

Definition at line 314 of file Filter.cpp.

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

◆ endLine()

int Filter::HotSpot::endLine ( ) const

Returns the line where the hotspot area ends.

Definition at line 306 of file Filter.cpp.

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

◆ setType()

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

Sets the type of a hotspot.

This should only be set once

Definition at line 322 of file Filter.cpp.

Referenced by RegExpFilter::HotSpot::HotSpot().

◆ startColumn()

int Filter::HotSpot::startColumn ( ) const

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

Definition at line 310 of file Filter.cpp.

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

◆ startLine()

int Filter::HotSpot::startLine ( ) const

Returns the line when the hotspot area starts.

Definition at line 302 of file Filter.cpp.

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

◆ tooltip()

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

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 294 of file Filter.cpp.

Referenced by TerminalView::mouseMoveEvent().

◆ type()

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

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 318 of file Filter.cpp.

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

Member Data Documentation

◆ _endColumn

int Filter::HotSpot::_endColumn
private

Definition at line 141 of file Filter.h.

◆ _endLine

int Filter::HotSpot::_endLine
private

Definition at line 140 of file Filter.h.

◆ _startColumn

int Filter::HotSpot::_startColumn
private

Definition at line 139 of file Filter.h.

◆ _startLine

int Filter::HotSpot::_startLine
private

Definition at line 138 of file Filter.h.

◆ _type

Type Filter::HotSpot::_type
private

Definition at line 142 of file Filter.h.


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