GNU Octave  3.8.0
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 Types | Private Member Functions | Private Attributes | List of all members
UrlFilter::HotSpot Class Reference

Hotspot type created by UrlFilter instances. More...

#include "Filter.h"

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

Public Types

enum  Type { NotSpecified, Link, Marker }

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.
virtual ~HotSpot ()
virtual QList< QAction * > actions ()
 Returns a list of actions associated with the hotspot which can be used in a menu or toolbar.
virtual void activate (QObject *object=0)
 Open a web browser at the current URL.
QStringList capturedTexts () const
 Returns the texts found by the filter when matching the filter's regular expression.
int endColumn () const
 Returns the column on endLine() where the hotspot area ends.
int endLine () const
 Returns the line where the hotspot area ends.
void setCapturedTexts (const QStringList &texts)
 Sets the captured texts associated with this hotspot.
int startColumn () const
 Returns the column on startLine() where the hotspot area starts.
int startLine () const
 Returns the line when the hotspot area starts.
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.
Type type () const
 Returns the type of the hotspot.

Protected Member Functions

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

Private Types

enum  UrlType { StandardUrl, Email, Unknown }

Private Member Functions

UrlType urlType () const

Private Attributes

FilterObject_urlObject

Detailed Description

Hotspot type created by UrlFilter instances.

The activate() method opens a web browser at the given URL when called.

Definition at line 255 of file Filter.h.

Member Enumeration Documentation

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

Definition at line 79 of file Filter.h.

Enumerator:
StandardUrl 
Email 
Unknown 

Definition at line 271 of file Filter.h.

Constructor & Destructor Documentation

UrlFilter::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.

Reimplemented from RegExpFilter::HotSpot.

Definition at line 422 of file Filter.cpp.

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

UrlFilter::HotSpot::~HotSpot ( )
virtual

Reimplemented from Filter::HotSpot.

Definition at line 510 of file Filter.cpp.

Member Function Documentation

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

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

Reimplemented from Filter::HotSpot.

Definition at line 518 of file Filter.cpp.

void UrlFilter::HotSpot::activate ( QObject object = 0)
virtual

Open a web browser at the current URL.

The url itself can be determined using the capturedTexts() method.

Reimplemented from RegExpFilter::HotSpot.

Definition at line 453 of file Filter.cpp.

QStringList RegExpFilter::HotSpot::capturedTexts ( ) const
inherited

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)
inherited

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.

Referenced by RegExpFilter::HotSpot::HotSpot(), and 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 UrlFilter::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 from Filter::HotSpot.

Definition at line 428 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().

UrlFilter::HotSpot::UrlType UrlFilter::HotSpot::urlType ( ) const
private

Definition at line 441 of file Filter.cpp.

References UrlFilter::EmailAddressRegExp, and UrlFilter::FullUrlRegExp.

Member Data Documentation

FilterObject* UrlFilter::HotSpot::_urlObject
private

Definition at line 279 of file Filter.h.


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