Eneboo - Documentación para desarrolladores
src/qt/include/qsqlselectcursor.h
Ir a la documentación de este archivo.
00001 /****************************************************************************
00002 **
00003 ** Definition of QSqlSelectCursor class
00004 **
00005 ** Created : 2002-11-13
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 QSQLSELECTCURSOR_H
00038 #define QSQLSELECTCURSOR_H
00039 
00040 #ifndef QT_H
00041 #include "qsqlcursor.h"
00042 #endif // QT_H
00043 
00044 #if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
00045 #define QM_EXPORT_SQL
00046 #else
00047 #define QM_EXPORT_SQL Q_EXPORT
00048 #endif
00049 
00050 #ifndef QT_NO_SQL
00051 
00052 class QSqlSelectCursorPrivate;
00053 
00054 class QM_EXPORT_SQL QSqlSelectCursor : public QSqlCursor
00055 {
00056 public:
00057     QSqlSelectCursor( const QString& query = QString::null, QSqlDatabase* db = 0 );
00058     QSqlSelectCursor( const QSqlSelectCursor& other );
00059     ~QSqlSelectCursor();
00060     bool exec( const QString& query );
00061     bool select() { return QSqlCursor::select(); }
00062     
00063 protected:
00064     QSqlIndex primaryIndex( bool = TRUE ) const { return QSqlIndex(); }
00065     QSqlIndex index( const QStringList& ) const { return QSqlIndex(); }
00066     QSqlIndex index( const QString& ) const { return QSqlIndex(); }
00067     QSqlIndex index( const char* ) const { return QSqlIndex(); }
00068     void setPrimaryIndex( const QSqlIndex& ) {}
00069     void append( const QSqlFieldInfo& ) {}
00070     void insert( int, const QSqlFieldInfo& ) {}
00071     void remove( int ) {}
00072     void clear() {}
00073     void setGenerated( const QString&, bool ) {}
00074     void setGenerated( int, bool ) {}
00075     QSqlRecord* editBuffer( bool = FALSE ) { return 0; }
00076     QSqlRecord* primeInsert() { return 0; }
00077     QSqlRecord* primeUpdate() { return 0; }
00078     QSqlRecord* primeDelete() { return 0; }
00079     int insert( bool = TRUE ) { return 0; }
00080     int update( bool = TRUE ) { return 0; }
00081     int del( bool = TRUE ) { return 0; }
00082     void setMode( int ) {}
00083 
00084     void setSort( const QSqlIndex& ) {}
00085     QSqlIndex sort() const { return QSqlIndex(); }
00086     void setFilter( const QString& ) {}
00087     QString filter() const { return QString::null; }
00088     void setName( const QString&, bool = TRUE ) {}
00089     QString name() const { return QString::null; }
00090     QString toString( const QString& = QString::null, const QString& = "," ) const { return QString::null; }
00091     bool select( const QString &, const QSqlIndex& = QSqlIndex() );
00092 
00093 private:
00094     void populateCursor();
00095     
00096     QSqlSelectCursorPrivate * d;
00097 };
00098 
00099 #endif // QT_NO_SQL
00100 #endif // QSQLSELECTCURSOR_H
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'