Konsole
#include <Filter.h>
Public Types | |
enum | Type { NotSpecified, Link, Marker } |
Public Member Functions | |
HotSpot (int startLine, int startColumn, int endLine, int endColumn) | |
virtual | ~HotSpot () |
virtual QList< QAction * > | actions () |
virtual void | activate (QObject *object=0)=0 |
int | endColumn () const |
int | endLine () const |
int | startColumn () const |
int | startLine () const |
Type | type () const |
Protected Member Functions | |
void | setType (Type type) |
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.
Member Enumeration Documentation
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.
Definition at line 256 of file Filter.cpp.
|
virtual |
Reimplemented in Konsole::UrlFilter::HotSpot.
Definition at line 220 of file Filter.cpp.
Member Function Documentation
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 264 of file Filter.cpp.
|
pure virtual |
Causes the 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::UrlFilter::HotSpot, and Konsole::RegExpFilter::HotSpot.
int Filter::HotSpot::endColumn | ( | ) | const |
Returns the column on endLine() where the hotspot area ends.
Definition at line 280 of file Filter.cpp.
int Filter::HotSpot::endLine | ( | ) | const |
Returns the line where the hotspot area ends.
Definition at line 272 of file Filter.cpp.
|
protected |
int Filter::HotSpot::startColumn | ( | ) | const |
Returns the column on startLine() where the hotspot area starts.
Definition at line 276 of file Filter.cpp.
int Filter::HotSpot::startLine | ( | ) | const |
Returns the line when the hotspot area starts.
Definition at line 268 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 284 of file Filter.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.