• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

Konsole

  • Konsole
  • SearchHistoryTask
Public Types | Public Member Functions | List of all members
Konsole::SearchHistoryTask Class Reference

#include <SessionController.h>

Inheritance diagram for Konsole::SearchHistoryTask:
Inheritance graph
[legend]

Public Types

enum  SearchDirection { ForwardsSearch, BackwardsSearch }
 

Public Member Functions

 SearchHistoryTask (QObject *parent=0)
 
void addScreenWindow (Session *session, ScreenWindow *searchWindow)
 
virtual void execute ()
 
QRegExp regExp () const
 
SearchDirection searchDirection () const
 
void setRegExp (const QRegExp &regExp)
 
void setSearchDirection (SearchDirection direction)
 
void setStartLine (int startLine)
 
- Public Member Functions inherited from Konsole::SessionTask
 SessionTask (QObject *parent=0)
 
void addSession (Session *session)
 
bool autoDelete () const
 
void setAutoDelete (bool enable)
 

Additional Inherited Members

- Signals inherited from Konsole::SessionTask
void completed (bool success)
 
- Protected Member Functions inherited from Konsole::SessionTask
QList< SessionPtr > sessions () const
 

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 478 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 backwards through the output, starting at the current selection.

Definition at line 487 of file SessionController.h.

Constructor & Destructor Documentation

SearchHistoryTask::SearchHistoryTask ( QObject *  parent = 0)
explicit

Constructs a new search task.

Definition at line 1948 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 1793 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 1797 of file SessionController.cpp.

QRegExp SearchHistoryTask::regExp ( ) const

Returns the regular expression which is searched for when execute() is called.

Definition at line 1970 of file SessionController.cpp.

SearchHistoryTask::SearchDirection SearchHistoryTask::searchDirection ( ) const

Returns the current search direction.

See setSearchDirection().

Definition at line 1962 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 1966 of file SessionController.cpp.

void SearchHistoryTask::setSearchDirection ( SearchDirection  direction)

Specifies the direction to search in when execute() is called.

Definition at line 1954 of file SessionController.cpp.

void SearchHistoryTask::setStartLine ( int  startLine)

The line from which the search will be done.

Definition at line 1958 of file SessionController.cpp.


The documentation for this class was generated from the following files:
  • SessionController.h
  • SessionController.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:25 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Konsole

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

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Applications
  •   Libraries
  •     libkonq
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal