GNU Octave  4.2.1
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 Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
RegExpFilter::HotSpot Class Reference

Type of hotspot created by RegExpFilter. More...

#include "Filter.h"

Inheritance diagram for RegExpFilter::HotSpot:
Inheritance graph
[legend]
Collaboration diagram for RegExpFilter::HotSpot:
Collaboration graph
[legend]

Public Types

enum  Type { NotSpecified, Link, Marker }
 

Public Member Functions

 HotSpot (int startLine, int startColumn, int endLine, int endColumn)
 
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=0)
 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 198 of file Filter.h.

Member Enumeration Documentation

enum Filter::HotSpot::Type
inherited
Enumerator
NotSpecified 
Link 
Marker 

Definition at line 79 of file Filter.h.

Constructor & Destructor Documentation

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

Definition at line 332 of file Filter.cpp.

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

Member Function Documentation

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

Referenced by TerminalView::filterActions().

void RegExpFilter::HotSpot::activate ( QObject object = 0)
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 338 of file Filter.cpp.

QStringList RegExpFilter::HotSpot::capturedTexts ( ) const

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

Definition at line 346 of file Filter.cpp.

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

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

Definition at line 315 of file Filter.cpp.

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

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

Returns the line where the hotspot area ends.

Definition at line 307 of file Filter.cpp.

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

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

Sets the captured texts associated with this hotspot.

Definition at line 342 of file Filter.cpp.

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

Sets the type of a hotspot.

This should only be set once

Definition at line 323 of file Filter.cpp.

References type.

Referenced by HotSpot(), and UrlFilter::HotSpot::HotSpot().

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

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

Definition at line 311 of file Filter.cpp.

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

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

Returns the line when the hotspot area starts.

Definition at line 303 of file Filter.cpp.

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

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

Filter::HotSpot::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 319 of file Filter.cpp.

Referenced by TerminalView::paintFilters().

Member Data Documentation

QStringList RegExpFilter::HotSpot::_capturedTexts
private

Definition at line 209 of file Filter.h.


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