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

Kate

Public Member Functions | List of all members
KatePlainTextSearch Class Reference

#include <kateplaintextsearch.h>

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 too 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
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:57:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Kate

Skip menu "Kate"
  • 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
  • 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