KTextEditor
searchinterface.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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
00054 Regex = 1 << 1,
00055
00056
00057 CaseInsensitive = 1 << 4,
00058 Backwards = 1 << 5,
00059 BlockInputRange = 1 << 6,
00060
00061
00062 EscapeSequences = 1 << 10,
00063 WholeWords = 1 << 11,
00064
00065
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