author | jowenn <jowenn> | 2002-11-10 21:08:01 (UTC) |
---|---|---|
committer | jowenn <jowenn> | 2002-11-10 21:08:01 (UTC) |
commit | e97a6da57804aa14907dec327fbae71bff9b383e (patch) (unidiff) | |
tree | 15f6ee292dba24bdda72f5c72f6d2224c3516763 /noncore/apps/tinykate/libkate/qt3back/qregexp3.h | |
parent | 7c012ee8cd16d8befacc6f6750711443fac0fd5e (diff) | |
download | opie-e97a6da57804aa14907dec327fbae71bff9b383e.zip opie-e97a6da57804aa14907dec327fbae71bff9b383e.tar.gz opie-e97a6da57804aa14907dec327fbae71bff9b383e.tar.bz2 |
import of tiny kate. (saving not possible yet)
Diffstat (limited to 'noncore/apps/tinykate/libkate/qt3back/qregexp3.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/tinykate/libkate/qt3back/qregexp3.h | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/noncore/apps/tinykate/libkate/qt3back/qregexp3.h b/noncore/apps/tinykate/libkate/qt3back/qregexp3.h new file mode 100644 index 0000000..5b75131 --- a/dev/null +++ b/noncore/apps/tinykate/libkate/qt3back/qregexp3.h | |||
@@ -0,0 +1,111 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of QRegExp class | ||
5 | ** | ||
6 | ** Created : 950126 | ||
7 | ** | ||
8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QREGEXP3_H | ||
39 | #define QREGEXP3_H | ||
40 | #ifndef QT_H | ||
41 | #include "qstringlist.h" | ||
42 | #endif // QT_H | ||
43 | |||
44 | |||
45 | #if QT_VERSION >=300 | ||
46 | #include <qregexp.h> | ||
47 | #else | ||
48 | class QRegExpEngine; | ||
49 | struct QRegExpPrivate; | ||
50 | |||
51 | class Q_EXPORT QRegExp3 | ||
52 | { | ||
53 | public: | ||
54 | QRegExp3(); | ||
55 | QRegExp3( const QString& pattern, bool caseSensitive = TRUE, | ||
56 | bool wildcard = FALSE ); | ||
57 | QRegExp3( const QRegExp3& rx ); | ||
58 | ~QRegExp3(); | ||
59 | QRegExp3& operator=( const QRegExp3& rx ); | ||
60 | |||
61 | bool operator==( const QRegExp3& rx ) const; | ||
62 | bool operator!=( const QRegExp3& rx ) const { return !operator==( rx ); } | ||
63 | |||
64 | bool isEmpty() const; | ||
65 | bool isValid() const; | ||
66 | QString pattern() const; | ||
67 | void setPattern( const QString& pattern ); | ||
68 | bool caseSensitive() const; | ||
69 | void setCaseSensitive( bool sensitive ); | ||
70 | #ifndef QT_NO_REGEXP_WILDCARD | ||
71 | bool wildcard() const; | ||
72 | void setWildcard( bool wildcard ); | ||
73 | #endif | ||
74 | bool minimal() const; | ||
75 | void setMinimal( bool minimal ); | ||
76 | |||
77 | bool exactMatch( const QString& str ); | ||
78 | bool exactMatch( const QString& str ) const; | ||
79 | #ifndef QT_NO_COMPAT | ||
80 | int match( const QString& str, int index, int *len = 0, | ||
81 | bool indexIsStart = TRUE ); | ||
82 | #endif | ||
83 | int search( const QString& str, int start = 0 ); | ||
84 | int search( const QString& str, int start = 0 ) const; | ||
85 | // QChar versions | ||
86 | #ifdef QCHAR_SUPPORT | ||
87 | int search(const QChar *str,int start=0); | ||
88 | int search(const QChar *str,int start=0) const; | ||
89 | int searchRev(const QChar *str,int start=-1); | ||
90 | int searchRev(const QChar *str,int start=-1) const ; | ||
91 | bool exactMatch(const QChar *str); | ||
92 | bool exactMatch(const QChar *str) const; | ||
93 | // end QChar versions | ||
94 | #endif | ||
95 | int searchRev( const QString& str, int start = -1 ); | ||
96 | int searchRev( const QString& str, int start = -1 ) const; | ||
97 | int matchedLength(); | ||
98 | #ifndef QT_NO_REGEXP_CAPTURE | ||
99 | QStringList capturedTexts(); | ||
100 | QString cap( int nth = 0 ); | ||
101 | int pos( int nth = 0 ); | ||
102 | #endif | ||
103 | |||
104 | private: | ||
105 | void compile( bool caseSensitive ); | ||
106 | |||
107 | QRegExpEngine *eng; | ||
108 | QRegExpPrivate *priv; | ||
109 | }; | ||
110 | #endif // QT_VERSION >= 300 | ||
111 | #endif // QREGEXP_H | ||