• 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
katematch.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_MATCH_H
23 #define KATE_MATCH_H
24 
25 #include <ktexteditor/searchinterface.h>
26 
27 class KateDocument;
28 
29 
30 class KateMatch
31 {
32 public:
33  KateMatch(KateDocument *document, KTextEditor::Search::SearchOptions options);
34  KTextEditor::Range searchText(const KTextEditor::Range &range, const QString &pattern);
35  KTextEditor::Range replace(const QString &replacement, bool blockMode, int replacementCounter = 1);
36  bool isValid() const;
37  bool isEmpty() const;
38  KTextEditor::Range range() const;
39 
40 private:
44  QString buildReplacement(const QString &replacement, bool blockMode, int replacementCounter) const;
45 
46 private:
47  KateDocument *m_document;
48  KTextEditor::Search::SearchOptions m_options;
49  QVector<KTextEditor::Range> m_resultRanges;
50 };
51 
52 #endif // KATE_MATCH_H
53 
54 // kate: space-indent on; indent-width 4; replace-tabs on;
KateMatch::isValid
bool isValid() const
Definition: katematch.cpp:79
KateMatch::isEmpty
bool isEmpty() const
Definition: katematch.cpp:73
KateMatch::replace
KTextEditor::Range replace(const QString &replacement, bool blockMode, int replacementCounter=1)
Definition: katematch.cpp:42
KateMatch
Definition: katematch.h:30
QString
KateDocument
Definition: katedocument.h:74
QVector< KTextEditor::Range >
KateMatch::KateMatch
KateMatch(KateDocument *document, KTextEditor::Search::SearchOptions options)
Definition: katematch.cpp:26
KateMatch::range
KTextEditor::Range range() const
Definition: katematch.cpp:64
KateMatch::searchText
KTextEditor::Range searchText(const KTextEditor::Range &range, const QString &pattern)
Definition: katematch.cpp:34
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