Eneboo - Documentación para desarrolladores
src/qt/include/qsqlindex.h
Ir a la documentación de este archivo.
00001 /****************************************************************************
00002 **
00003 ** Definition of QSqlIndex class
00004 **
00005 ** Created : 2000-11-03
00006 **
00007 ** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
00008 **
00009 ** This file is part of the sql module of the Qt GUI Toolkit.
00010 **
00011 ** This file may be distributed under the terms of the Q Public License
00012 ** as defined by Trolltech ASA of Norway and appearing in the file
00013 ** LICENSE.QPL included in the packaging of this file.
00014 **
00015 ** This file may be distributed and/or modified under the terms of the
00016 ** GNU General Public License version 2 as published by the Free Software
00017 ** Foundation and appearing in the file LICENSE.GPL included in the
00018 ** packaging of this file.
00019 **
00020 ** Licensees holding valid Qt Enterprise Edition licenses may use this
00021 ** file in accordance with the Qt Commercial License Agreement provided
00022 ** with the Software.
00023 **
00024 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00025 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00026 **
00027 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
00028 **   information about Qt Commercial License Agreements.
00029 ** See http://www.trolltech.com/qpl/ for QPL licensing information.
00030 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00031 **
00032 ** Contact info@trolltech.com if any conditions of this licensing are
00033 ** not clear to you.
00034 **
00035 **********************************************************************/
00036 
00037 #ifndef QSQLINDEX_H
00038 #define QSQLINDEX_H
00039 
00040 #ifndef QT_H
00041 #include "qstring.h"
00042 #include "qstringlist.h"
00043 #include "qsqlfield.h"
00044 #include "qsqlrecord.h"
00045 #endif // QT_H
00046 
00047 #if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
00048 #define QM_EXPORT_SQL
00049 #define QM_TEMPLATE_EXTERN_SQL
00050 #else
00051 #define QM_EXPORT_SQL Q_EXPORT
00052 #define QM_TEMPLATE_EXTERN_SQL Q_TEMPLATE_EXTERN
00053 #endif
00054 
00055 #ifndef QT_NO_SQL
00056 
00057 class QSqlCursor;
00058 
00059 class QM_EXPORT_SQL QSqlIndex : public QSqlRecord
00060 {
00061 public:
00062     QSqlIndex( const QString& cursorName = QString::null, const QString& name = QString::null );
00063     QSqlIndex( const QSqlIndex& other );
00064     ~QSqlIndex();
00065     QSqlIndex&       operator=( const QSqlIndex& other );
00066     virtual void     setCursorName( const QString& cursorName );
00067     QString          cursorName() const { return cursor; }
00068     virtual void     setName( const QString& name );
00069     QString          name() const { return nm; }
00070 
00071     void             append( const QSqlField& field );
00072     virtual void     append( const QSqlField& field, bool desc );
00073 
00074     bool             isDescending( int i ) const;
00075     virtual void     setDescending( int i, bool desc );
00076 
00077     QString          toString( const QString& prefix = QString::null,
00078                                const QString& sep = ",",
00079                                bool verbose = TRUE ) const;
00080     QStringList      toStringList( const QString& prefix = QString::null,
00081                                    bool verbose = TRUE ) const;
00082 
00083     static QSqlIndex fromStringList( const QStringList& l, const QSqlCursor* cursor );
00084 
00085 private:
00086     QString          createField( int i, const QString& prefix, bool verbose ) const;
00087     QString          cursor;
00088     QString          nm;
00089     QValueList<bool> sorts;
00090 };
00091 
00092 #define Q_DEFINED_QSQLINDEX
00093 #include "qwinexport.h"
00094 #endif  // QT_NO_SQL
00095 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'