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

Kate

  • kde-4.14
  • applications
  • kate
  • part
  • search
kateregexpsearch.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries and the Kate part.
2  *
3  * Copyright (C) 2010 Bernhard Beschow <bbeschow@cs.tu-berlin.de>
4  * Copyright (C) 2007 Sebastian Pipping <webmaster@hartwork.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public License
17  * along with this library; see the file COPYING.LIB. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef _KATE_REGEXPSEARCH_H_
23 #define _KATE_REGEXPSEARCH_H_
24 
25 #include <QtCore/QObject>
26 
27 #include <ktexteditor/range.h>
28 
29 #include "katepartprivate_export.h"
30 
31 namespace KTextEditor {
32  class Document;
33 }
34 
40 class KATEPART_TESTS_EXPORT KateRegExpSearch
41 {
42  public:
43  explicit KateRegExpSearch (KTextEditor::Document *document, Qt::CaseSensitivity caseSensitivity);
44  ~KateRegExpSearch ();
45 
46  //
47  // KTextEditor::SearchInterface stuff
48  //
49  public:
63  QVector<KTextEditor::Range> search (const QString &pattern,
64  const KTextEditor::Range & inputRange, bool backwards = false);
65 
72  static QString escapePlaintext(const QString &text);
73 
85  static QString buildReplacement(const QString &text, const QStringList &capturedTexts, int replacementCounter);
86 
87  private:
97  static QString buildReplacement(const QString &text, const QStringList &capturedTexts, int replacementCounter, bool replacementGoodies);
98 
99  private:
100  KTextEditor::Document *const m_document;
101  Qt::CaseSensitivity m_caseSensitivity;
102  class ReplacementStream;
103 };
104 
105 #endif
106 
107 // kate: space-indent on; indent-width 2; replace-tabs on;
108 
KATEPART_TESTS_EXPORT
#define KATEPART_TESTS_EXPORT
Definition: katepartprivate_export.h:36
KateRegExpSearch
Object to help to search for regexp.
Definition: kateregexpsearch.h:40
katepartprivate_export.h
QString
QStringList
QVector< KTextEditor::Range >
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:58 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