Kate
kateescapedtextsearch.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 #ifndef _KATE_ESCAPEDTEXTSEARCH_H_
00021 #define _KATE_ESCAPEDTEXTSEARCH_H_
00022
00023 #include <QtCore/QObject>
00024
00025 #include <ktexteditor/range.h>
00026
00027 class KateDocument;
00028
00029
00030 struct ReplacementPart {
00031 enum Type {
00032 Reference,
00033 Text,
00034 UpperCase,
00035 LowerCase,
00036 KeepCase,
00037 Counter
00038 };
00039
00040 Type type;
00041
00042
00043 int index;
00044
00045
00046 QString text;
00047 };
00048
00049 class KateEscapedTextSearch : public QObject
00050 {
00051 Q_OBJECT
00052
00053 public:
00054 explicit KateEscapedTextSearch (KateDocument *document, bool casesensitive, bool wholeWords);
00055 ~KateEscapedTextSearch ();
00056
00057
00058
00059
00060 public Q_SLOTS:
00061 QVector<KTextEditor::Range> search (const KTextEditor::Range & inputRange,
00062 const QString &text, bool backwards = false);
00063
00064
00065
00066
00067
00068
00069
00070 public:
00081 static QString escapePlaintext(const QString & text, QList<ReplacementPart> * parts = NULL,
00082 bool replacementGoodies = false);
00083
00084 private:
00085 KateDocument *const m_document;
00086 bool m_casesensitive;
00087 bool m_wholeWords;
00088 };
00089
00090 #endif
00091
00092
00093