-rw-r--r-- | qmake/include/qstringlist.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/qmake/include/qstringlist.h b/qmake/include/qstringlist.h new file mode 100644 index 0000000..be9d6ae --- a/dev/null +++ b/qmake/include/qstringlist.h | |||
@@ -0,0 +1,86 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of QStringList class | ||
5 | ** | ||
6 | ** Created : 990406 | ||
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 QSTRINGLIST_H | ||
39 | #define QSTRINGLIST_H | ||
40 | |||
41 | #ifndef QT_H | ||
42 | #include "qvaluelist.h" | ||
43 | #include "qstring.h" | ||
44 | #include "qstrlist.h" | ||
45 | #endif // QT_H | ||
46 | |||
47 | #ifndef QT_NO_STRINGLIST | ||
48 | |||
49 | class QRegExp; | ||
50 | |||
51 | class Q_EXPORT QStringList : public QValueList<QString> | ||
52 | { | ||
53 | public: | ||
54 | QStringList() { } | ||
55 | QStringList( const QStringList& l ) : QValueList<QString>(l) { } | ||
56 | QStringList( const QValueList<QString>& l ) : QValueList<QString>(l) { } | ||
57 | QStringList( const QString& i ) { append(i); } | ||
58 | #ifndef QT_NO_CAST_ASCII | ||
59 | QStringList( const char* i ) { append(i); } | ||
60 | #endif | ||
61 | |||
62 | static QStringList fromStrList(const QStrList&); | ||
63 | |||
64 | void sort(); | ||
65 | |||
66 | static QStringList split( const QString &sep, const QString &str, bool allowEmptyEntries = FALSE ); | ||
67 | static QStringList split( const QChar &sep, const QString &str, bool allowEmptyEntries = FALSE ); | ||
68 | #ifndef QT_NO_REGEXP | ||
69 | static QStringList split( const QRegExp &sep, const QString &str, bool allowEmptyEntries = FALSE ); | ||
70 | #endif | ||
71 | QString join( const QString &sep ) const; | ||
72 | |||
73 | QStringList grep( const QString &str, bool cs = TRUE ) const; | ||
74 | #ifndef QT_NO_REGEXP | ||
75 | QStringList grep( const QRegExp &expr ) const; | ||
76 | #endif | ||
77 | }; | ||
78 | |||
79 | #ifndef QT_NO_DATASTREAM | ||
80 | class QDataStream; | ||
81 | extern Q_EXPORT QDataStream &operator>>( QDataStream &, QStringList& ); | ||
82 | extern Q_EXPORT QDataStream &operator<<( QDataStream &, const QStringList& ); | ||
83 | #endif | ||
84 | |||
85 | #endif // QT_NO_STRINGLIST | ||
86 | #endif // QSTRINGLIST_H | ||