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

Kate

Public Member Functions

KatePlainTextSearch Class Reference

Object to help to search for plain text. More...

#include <kateplaintextsearch.h>

List of all members.

Public Member Functions

 KatePlainTextSearch (KTextEditor::Document *document, Qt::CaseSensitivity caseSensitivity, bool wholeWords)
 ~KatePlainTextSearch ()
KTextEditor::Range search (const QString &text, const KTextEditor::Range &inputRange, bool backwards=false)

Detailed Description

Object to help to search for plain text.

This should be NO QObject, it is created to often! I measured that, if you create it 20k times to replace for example " " in a document, that takes seconds on a modern machine!

Definition at line 40 of file kateplaintextsearch.h.


Constructor & Destructor Documentation

KatePlainTextSearch::KatePlainTextSearch ( KTextEditor::Document *  document,
Qt::CaseSensitivity  caseSensitivity,
bool  wholeWords 
) [explicit]

Definition at line 37 of file kateplaintextsearch.cpp.

KatePlainTextSearch::~KatePlainTextSearch ( )

Definition at line 47 of file kateplaintextsearch.cpp.


Member Function Documentation

KTextEditor::Range KatePlainTextSearch::search ( const QString &  text,
const KTextEditor::Range &  inputRange,
bool  backwards = false 
)

Search for the given text inside the range inputRange taking into account whether to search casesensitive and backwards.

Parameters:
texttext to search for
inputRangeRange to search in
casesensitiveif true, the search is performed case sensitive, otherwise case insensitive
backwardsif true, the search will be backwards
Returns:
The valid range of the matched text if text was found. If the text was not found, the returned range is not valid (see Range::isValid()).
See also:
KTextEditor::Range

Definition at line 52 of file kateplaintextsearch.cpp.


The documentation for this class was generated from the following files:
  • kateplaintextsearch.h
  • kateplaintextsearch.cpp

Kate

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
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