Eneboo - Documentación para desarrolladores
src/qt/include/qstringlist.h
Ir a la documentación de este archivo.
00001 /****************************************************************************
00002 ** $Id: qt/qstringlist.h   3.3.8   edited Jan 11 14:38 $
00003 **
00004 ** Definition of QStringList class
00005 **
00006 ** Created : 990406
00007 **
00008 ** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
00009 **
00010 ** This file is part of the tools module of the Qt GUI Toolkit.
00011 **
00012 ** This file may be distributed under the terms of the Q Public License
00013 ** as defined by Trolltech ASA of Norway and appearing in the file
00014 ** LICENSE.QPL included in the packaging of this file.
00015 **
00016 ** This file may be distributed and/or modified under the terms of the
00017 ** GNU General Public License version 2 as published by the Free Software
00018 ** Foundation and appearing in the file LICENSE.GPL included in the
00019 ** packaging of this file.
00020 **
00021 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
00022 ** licenses may use this file in accordance with the Qt Commercial License
00023 ** Agreement provided with the Software.
00024 **
00025 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00026 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00027 **
00028 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
00029 **   information about Qt Commercial License Agreements.
00030 ** See http://www.trolltech.com/qpl/ for QPL licensing information.
00031 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00032 **
00033 ** Contact info@trolltech.com if any conditions of this licensing are
00034 ** not clear to you.
00035 **
00036 **********************************************************************/
00037 
00038 #ifndef QSTRINGLIST_H
00039 #define QSTRINGLIST_H
00040 
00041 #ifndef QT_H
00042 #include "qvaluelist.h"
00043 #include "qstring.h"
00044 #include "qstrlist.h"
00045 #endif // QT_H
00046 
00047 #ifndef QT_NO_STRINGLIST
00048 
00049 class QRegExp;
00050 template <class T> class QDeepCopy;
00051 
00052 #if defined(Q_TEMPLATEDLL)
00053 // MOC_SKIP_BEGIN
00054 //Q_TEMPLATE_EXTERN template class Q_EXPORT QValueList<QString>; 
00055 // MOC_SKIP_END
00056 #endif
00057 
00058 class Q_EXPORT QStringList : public QValueList<QString>
00059 {
00060 public:
00061     QStringList() { }
00062     QStringList( const QStringList& l ) : QValueList<QString>(l) { }
00063     QStringList( const QValueList<QString>& l ) : QValueList<QString>(l) { }
00064     QStringList( const QString& i ) { append(i); }
00065 #ifndef QT_NO_CAST_ASCII
00066     QStringList( const char* i ) { append(i); }
00067 #endif
00068 
00069     static QStringList fromStrList(const QStrList&);
00070 
00071     void sort();
00072 
00073     static QStringList split( const QString &sep, const QString &str, bool allowEmptyEntries = FALSE );
00074     static QStringList split( const QChar &sep, const QString &str, bool allowEmptyEntries = FALSE );
00075 #ifndef QT_NO_REGEXP
00076     static QStringList split( const QRegExp &sep, const QString &str, bool allowEmptyEntries = FALSE );
00077 #endif
00078     QString join( const QString &sep ) const;
00079 
00080     QStringList grep( const QString &str, bool cs = TRUE ) const;
00081 #ifndef QT_NO_REGEXP
00082     QStringList grep( const QRegExp &expr ) const;
00083 #endif
00084 
00085     QStringList& gres( const QString &before, const QString &after,
00086                        bool cs = TRUE );
00087 #ifndef QT_NO_REGEXP_CAPTURE
00088     QStringList& gres( const QRegExp &expr, const QString &after );
00089 #endif
00090 
00091 protected:
00092     void detach() { QValueList<QString>::detach(); }
00093     friend class QDeepCopy< QStringList >;
00094 };
00095 
00096 #ifndef QT_NO_DATASTREAM
00097 class QDataStream;
00098 extern Q_EXPORT QDataStream &operator>>( QDataStream &, QStringList& );
00099 extern Q_EXPORT QDataStream &operator<<( QDataStream &, const QStringList& );
00100 #endif
00101 
00102 #endif // QT_NO_STRINGLIST
00103 #endif // QSTRINGLIST_H
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'