Konsole
Konsole::SearchHistoryTask Class Reference
A task which searches through the output of sessions for matches for a given regular expression. More...
#include <SessionController.h>

Public Types | |
enum | SearchDirection { ForwardsSearch, BackwardsSearch } |
Public Member Functions | |
void | addScreenWindow (Session *session, ScreenWindow *searchWindow) |
virtual void | execute () |
QRegExp | regExp () const |
SearchDirection | searchDirection () const |
SearchHistoryTask (QObject *parent=0) | |
void | setRegExp (const QRegExp ®Exp) |
void | setSearchDirection (SearchDirection direction) |
Detailed Description
A task which searches through the output of sessions for matches for a given regular expression.SearchHistoryTask operates on ScreenWindow instances rather than sessions added by addSession(). A screen window can be added to the list to search using addScreenWindow()
When execute() is called, the search begins in the direction specified by searchDirection(), starting at the position of the current selection.
FIXME - This is not a proper implementation of SessionTask, in that it ignores sessions specified with addSession()
TODO - Implementation requirements: May provide progress feedback to the user when searching very large output logs.
Definition at line 376 of file SessionController.h.
Member Enumeration Documentation
This enum describes the strategies available for searching through the session's output.
- Enumerator:
-
ForwardsSearch Searches forwards through the output, starting at the current selection. BackwardsSearch Searches backwars through the output, starting at the current selection.
Definition at line 385 of file SessionController.h.
Constructor & Destructor Documentation
SearchHistoryTask::SearchHistoryTask | ( | QObject * | parent = 0 |
) | [explicit] |
Member Function Documentation
void SearchHistoryTask::addScreenWindow | ( | Session * | session, | |
ScreenWindow * | searchWindow | |||
) |
Adds a screen window to the list to search when execute() is called.
Definition at line 1183 of file SessionController.cpp.
void SearchHistoryTask::execute | ( | ) | [virtual] |
Performs a search through the session's history, starting at the position of the current selection, in the direction specified by setSearchDirection().
If it finds a match, the ScreenWindow specified in the constructor is scrolled to the position where the match occurred and the selection is set to the matching text. execute() then returns immediately.
To continue the search looking for further matches, call execute() again.
Implements Konsole::SessionTask.
Definition at line 1187 of file SessionController.cpp.
QRegExp SearchHistoryTask::regExp | ( | ) | const |
Returns the regular expression which is searched for when execute() is called.
Definition at line 1355 of file SessionController.cpp.
SearchHistoryTask::SearchDirection SearchHistoryTask::searchDirection | ( | ) | const |
Returns the current search direction.
See setSearchDirection().
Definition at line 1347 of file SessionController.cpp.
void SearchHistoryTask::setRegExp | ( | const QRegExp & | regExp | ) |
Sets the regular expression which is searched for when execute() is called.
Definition at line 1351 of file SessionController.cpp.
void SearchHistoryTask::setSearchDirection | ( | SearchDirection | direction | ) |
Specifies the direction to search in when execute() is called.
Definition at line 1343 of file SessionController.cpp.
The documentation for this class was generated from the following files: