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

Konsole

  • Konsole
  • IncrementalSearchBar
Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
Konsole::IncrementalSearchBar Class Reference

#include <IncrementalSearchBar.h>

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

Public Types

enum  SearchOptions { HighlightMatches = 0, MatchCase = 1, RegExp = 2, ReverseSearch = 3 }
 

Public Slots

void clearLineEdit ()
 

Signals

void closeClicked ()
 
void findNextClicked ()
 
void findPreviousClicked ()
 
void highlightMatchesToggled (bool)
 
void matchCaseToggled (bool)
 
void matchRegExpToggled (bool)
 
void searchChanged (const QString &text)
 
void searchFromClicked ()
 
void searchReturnPressed (const QString &text)
 
void searchShiftPlusReturnPressed ()
 
void unhandledMovementKeyPressed (QKeyEvent *event)
 

Public Member Functions

 IncrementalSearchBar (QWidget *parent=0)
 
void focusLineEdit ()
 
const QBitArray optionsChecked ()
 
QString searchText ()
 
void setFoundMatch (bool match)
 
void setSearchText (const QString &text)
 
virtual void setVisible (bool visible)
 

Protected Member Functions

virtual bool eventFilter (QObject *watched, QEvent *event)
 
virtual void keyPressEvent (QKeyEvent *event)
 

Detailed Description

A widget which allows users to search incrementally through a document for a a text string or regular expression.

The widget consists of a text box into which the user can enter their search text and buttons to trigger a search for the next and previous matches for the search text.

When the search text is changed, the searchChanged() signal is emitted. A search through the document for the new text should begin immediately and the active view of the document should jump to display any matches if found. setFoundMatch() should be called whenever the search text changes to indicate whether a match for the text was found in the document.

findNextClicked() and findPreviousClicked() signals are emitted when the user presses buttons to find next and previous matches respectively.

The first indicates whether searches are case sensitive. The matchCaseToggled() signal is emitted when this is changed. The second indicates whether the search text should be treated as a plain string or as a regular expression. The matchRegExpToggled() signal is emitted when this is changed.

Definition at line 56 of file IncrementalSearchBar.h.

Member Enumeration Documentation

enum Konsole::IncrementalSearchBar::SearchOptions

This enum defines the options that can be checked.

Enumerator
HighlightMatches 

Highlight all matches.

MatchCase 

Searches are case-sensitive or not.

RegExp 

Searches use regular expressions.

ReverseSearch 

Search from the bottom and up.

Definition at line 64 of file IncrementalSearchBar.h.

Constructor & Destructor Documentation

IncrementalSearchBar::IncrementalSearchBar ( QWidget *  parent = 0)
explicit

Constructs a new incremental search bar with the given parent widget.

Definition at line 39 of file IncrementalSearchBar.cpp.

Member Function Documentation

void IncrementalSearchBar::clearLineEdit ( )
slot

Definition at line 263 of file IncrementalSearchBar.cpp.

void Konsole::IncrementalSearchBar::closeClicked ( )
signal

Emitted when the close button is clicked.

bool IncrementalSearchBar::eventFilter ( QObject *  watched,
QEvent *  event 
)
protectedvirtual

Definition at line 186 of file IncrementalSearchBar.cpp.

void Konsole::IncrementalSearchBar::findNextClicked ( )
signal

Emitted when the user clicks the button to find the next match.

void Konsole::IncrementalSearchBar::findPreviousClicked ( )
signal

Emitted when the user clicks the button to find the previous match.

void IncrementalSearchBar::focusLineEdit ( )

Definition at line 268 of file IncrementalSearchBar.cpp.

void Konsole::IncrementalSearchBar::highlightMatchesToggled ( bool  )
signal

Emitted when the user toggles the checkbox to indicate whether matches for the search text should be highlighted.

void IncrementalSearchBar::keyPressEvent ( QKeyEvent *  event)
protectedvirtual

Definition at line 217 of file IncrementalSearchBar.cpp.

void Konsole::IncrementalSearchBar::matchCaseToggled ( bool  )
signal

Emitted when the user toggles the checkbox to indicate whether matching for the search text should be case sensitive.

void Konsole::IncrementalSearchBar::matchRegExpToggled ( bool  )
signal

Emitted when the user toggles the checkbox to indicate whether the search text should be treated as a plain string or a regular expression.

const QBitArray IncrementalSearchBar::optionsChecked ( )

Definition at line 274 of file IncrementalSearchBar.cpp.

void Konsole::IncrementalSearchBar::searchChanged ( const QString &  text)
signal

Emitted when the text entered in the search box is altered.

void Konsole::IncrementalSearchBar::searchFromClicked ( )
signal

The search from beginning/end button.

void Konsole::IncrementalSearchBar::searchReturnPressed ( const QString &  text)
signal

Emitted when the return button is pressed in the search box.

void Konsole::IncrementalSearchBar::searchShiftPlusReturnPressed ( )
signal

Emitted when shift+return buttons are pressed in the search box.

QString IncrementalSearchBar::searchText ( )

Returns the current search text.

Definition at line 175 of file IncrementalSearchBar.cpp.

void IncrementalSearchBar::setFoundMatch ( bool  match)

Sets an indicator for the user as to whether or not a match for the current search text was found in the document.

The indicator will not be shown if the search text is empty ( because the user has not yet entered a query ).

Parameters
matchTrue if a match was found or false otherwise. If true, and the search text is non-empty, an indicator that no matches were found will be shown.

Definition at line 242 of file IncrementalSearchBar.cpp.

void IncrementalSearchBar::setSearchText ( const QString &  text)

Definition at line 180 of file IncrementalSearchBar.cpp.

void IncrementalSearchBar::setVisible ( bool  visible)
virtual

Definition at line 233 of file IncrementalSearchBar.cpp.

void Konsole::IncrementalSearchBar::unhandledMovementKeyPressed ( QKeyEvent *  event)
signal

A movement key not handled is forwarded to the terminal display.


The documentation for this class was generated from the following files:
  • IncrementalSearchBar.h
  • IncrementalSearchBar.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:24 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