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

Konsole

Konsole::SearchHistoryTask

Konsole::SearchHistoryTask Class Reference

A task which searches through the output of sessions for matches for a given regular expression. More...

#include <SessionController.h>

Inheritance diagram for Konsole::SearchHistoryTask:

Inheritance graph
[legend]

List of all members.


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 &regExp)
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

enum Konsole::SearchHistoryTask::SearchDirection

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]

Constructs a new search task.

Definition at line 1337 of file SessionController.cpp.


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:
  • SessionController.h
  • SessionController.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.7
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