• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KTextEditor

searchinterface.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2001 Christoph Cullmann (cullmann@kde.org)
00003    Copyright (C) 2005 Dominik Haumann (dhdev@gmx.de) (documentation)
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018    Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KDELIBS_KTEXTEDITOR_SEARCHINTERFACE_H
00022 #define KDELIBS_KTEXTEDITOR_SEARCHINTERFACE_H
00023 
00024 #include <ktexteditor/ktexteditor_export.h>
00025 #include <ktexteditor/range.h>
00026 
00027 class QString;
00028 
00029 namespace KTextEditor
00030 {
00031 
00032 class Document;
00033 
00037 namespace Search
00038 {
00049   enum SearchOptionsEnum
00050   {
00051     Default             = 0,      
00052 
00053     // modes
00054     Regex               = 1 << 1, 
00055 
00056     // options for all modes
00057     CaseInsensitive     = 1 << 4, 
00058     Backwards           = 1 << 5, 
00059     BlockInputRange     = 1 << 6, 
00060 
00061     // options for plaintext
00062     EscapeSequences     = 1 << 10, 
00063     WholeWords          = 1 << 11, 
00064 
00065     // options for regex
00066     DotMatchesNewline   = 1 << 15  
00067   };
00068 
00069   Q_DECLARE_FLAGS(SearchOptions, SearchOptionsEnum)
00070   Q_DECLARE_OPERATORS_FOR_FLAGS(SearchOptions)
00071 }
00072 
00104 class KTEXTEDITOR_EXPORT SearchInterface
00105 {
00106   public:
00110     SearchInterface();
00111 
00115     virtual ~SearchInterface();
00116 
00117   public:
00140     virtual QVector<KTextEditor::Range> searchText(
00141         const KTextEditor::Range & range,
00142         const QString & pattern,
00143         const Search::SearchOptions options = Search::Default) = 0;
00144 
00153     virtual Search::SearchOptions supportedSearchOptions() const = 0;
00154 
00155   private:
00156     class SearchInterfacePrivate* const d;
00157 };
00158 
00159 }
00160 
00161 Q_DECLARE_INTERFACE(KTextEditor::SearchInterface, "org.kde.KTextEditor.SearchInterface")
00162 
00163 #endif
00164 
00165 // kate: space-indent on; indent-width 2; replace-tabs on;

KTextEditor

Skip menu "KTextEditor"
  • Main Page
  • Modules
  • 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
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
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