• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Konsole

Konsole::Filter::HotSpot

Konsole::Filter::HotSpot Class Reference

#include <Filter.h>

Inheritance diagram for Konsole::Filter::HotSpot:

Inheritance graph
[legend]

List of all members.


Detailed Description

Represents an area of text which matched the pattern a particular filter has been looking for.

Each hotspot has a type identifier associated with it ( such as a link or a highlighted section ), and an action. When the user performs some activity such as a mouse-click in a hotspot area ( the exact action will depend on what is displaying the block of text which the filter is processing ), the hotspot's activate() method should be called. Depending on the type of hotspot this will trigger a suitable response.

For example, if a hotspot represents a URL then a suitable action would be opening that URL in a web browser. Hotspots may have more than one action, in which case the list of actions can be obtained using the actions() method. These actions may then be displayed in a popup menu or toolbar for example.

Definition at line 70 of file Filter.h.


Public Types

enum  Type { NotSpecified, Link, Marker }

Public Member Functions

virtual QList< QAction * > actions ()
virtual void activate (QObject *object=0)=0
int endColumn () const
int endLine () const
 HotSpot (int startLine, int startColumn, int endLine, int endColumn)
int startColumn () const
int startLine () const
virtual QString tooltip () const
Type type () const
virtual ~HotSpot ()

Protected Member Functions

void setType (Type type)

Member Enumeration Documentation

enum Konsole::Filter::HotSpot::Type

Enumerator:
NotSpecified 
Link 
Marker 

Definition at line 80 of file Filter.h.


Constructor & Destructor Documentation

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.

Reimplemented in Konsole::RegExpFilter::HotSpot, and Konsole::UrlFilter::HotSpot.

Definition at line 279 of file Filter.cpp.

Filter::HotSpot::~HotSpot (  )  [virtual]

Reimplemented in Konsole::UrlFilter::HotSpot.

Definition at line 239 of file Filter.cpp.


Member Function Documentation

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

Definition at line 291 of file Filter.cpp.

virtual void Konsole::Filter::HotSpot::activate ( QObject *  object = 0  )  [pure virtual]

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

Parameters:
object The 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 Konsole::RegExpFilter::HotSpot, and Konsole::UrlFilter::HotSpot.

int Filter::HotSpot::endColumn (  )  const

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

Definition at line 307 of file Filter.cpp.

int Filter::HotSpot::endLine (  )  const

Returns the line where the hotspot area ends.

Definition at line 299 of file Filter.cpp.

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

Sets the type of a hotspot.

This should only be set once

Definition at line 315 of file Filter.cpp.

int Filter::HotSpot::startColumn (  )  const

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

Definition at line 303 of file Filter.cpp.

int Filter::HotSpot::startLine (  )  const

Returns the line when the hotspot area starts.

Definition at line 295 of file Filter.cpp.

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

Definition at line 287 of file Filter.cpp.

Filter::HotSpot::Type Filter::HotSpot::type (  )  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 311 of file Filter.cpp.


The documentation for this class was generated from the following files:
  • Filter.h
  • Filter.cpp

Konsole

Skip menu "Konsole"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • Konsole
  • Libraries
  •   libkonq
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal