Index: trunk/include/qdatabrowser.h
===================================================================
--- trunk/include/qdatabrowser.h	(revision 196)
+++ trunk/include/qdatabrowser.h	(revision 196)
@@ -0,0 +1,173 @@
+/****************************************************************************
+**
+** Definition of QDataBrowser class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech ASA of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QDATABROWSER_H
+#define QDATABROWSER_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#include "qstring.h"
+#include "qstringlist.h"
+#include "qsql.h"
+#include "qsqlindex.h"
+#include "qsqlcursor.h"
+#include "qsqlerror.h"
+#endif // QT_H
+
+#ifndef QT_NO_SQL_VIEW_WIDGETS
+
+class QSqlForm;
+class QDataBrowserPrivate;
+
+class Q_EXPORT QDataBrowser : public QWidget
+{
+    Q_OBJECT
+    Q_PROPERTY( bool boundaryChecking READ boundaryChecking WRITE setBoundaryChecking )
+    Q_PROPERTY( QString filter READ filter WRITE setFilter )
+    Q_PROPERTY( QStringList sort READ sort WRITE setSort )
+    Q_PROPERTY( bool confirmEdits READ confirmEdits WRITE setConfirmEdits )
+    Q_PROPERTY( bool confirmInsert READ confirmInsert WRITE setConfirmInsert )
+    Q_PROPERTY( bool confirmUpdate READ confirmUpdate WRITE setConfirmUpdate )
+    Q_PROPERTY( bool confirmDelete READ confirmDelete WRITE setConfirmDelete )
+    Q_PROPERTY( bool confirmCancels READ confirmCancels WRITE setConfirmCancels )
+    Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
+    Q_PROPERTY( bool autoEdit READ autoEdit WRITE setAutoEdit )
+
+public:
+    QDataBrowser( QWidget* parent=0, const char* name=0, WFlags fl = 0 );
+    ~QDataBrowser();
+
+    enum Boundary {
+	Unknown,
+	None,
+	BeforeBeginning,
+	Beginning,
+	End,
+	AfterEnd
+    };
+
+    Boundary boundary();
+    void setBoundaryChecking( bool active );
+    bool boundaryChecking() const;
+
+    void setSort( const QSqlIndex& sort );
+    void setSort( const QStringList& sort );
+    QStringList  sort() const;
+    void setFilter( const QString& filter );
+    QString filter() const;
+    virtual void setSqlCursor( QSqlCursor* cursor, bool autoDelete = FALSE );
+    QSqlCursor* sqlCursor() const;
+    virtual void setForm( QSqlForm* form );
+    QSqlForm* form();
+
+    virtual void setConfirmEdits( bool confirm );
+    virtual void setConfirmInsert( bool confirm );
+    virtual void setConfirmUpdate( bool confirm );
+    virtual void setConfirmDelete( bool confirm );
+    virtual void setConfirmCancels( bool confirm );
+    bool confirmEdits() const;
+    bool confirmInsert() const;
+    bool confirmUpdate() const;
+    bool confirmDelete() const;
+    bool confirmCancels() const;
+
+    virtual void setReadOnly( bool active );
+    bool isReadOnly() const;
+    virtual void setAutoEdit( bool autoEdit );
+    bool autoEdit() const;
+
+    virtual bool seek( int i, bool relative = FALSE );
+
+signals:
+    void firstRecordAvailable( bool available );
+    void lastRecordAvailable( bool available );
+    void nextRecordAvailable( bool available );
+    void prevRecordAvailable( bool available );
+
+    void currentChanged( const QSqlRecord* record );
+    void primeInsert( QSqlRecord* buf );
+    void primeUpdate( QSqlRecord* buf );
+    void primeDelete( QSqlRecord* buf );
+    void beforeInsert( QSqlRecord* buf );
+    void beforeUpdate( QSqlRecord* buf );
+    void beforeDelete( QSqlRecord* buf );
+    void cursorChanged( QSqlCursor::Mode mode );
+
+public slots:
+    virtual void refresh();
+
+    virtual void insert();
+    virtual void update();
+    virtual void del();
+
+    virtual void first();
+    virtual void last();
+    virtual void next();
+    virtual void prev();
+
+    virtual void readFields();
+    virtual void writeFields();
+    virtual void clearValues();
+
+    void updateBoundary();
+
+protected:
+    virtual bool insertCurrent();
+    virtual bool updateCurrent();
+    virtual bool deleteCurrent();
+    virtual bool currentEdited();
+
+    virtual QSql::Confirm confirmEdit( QSql::Op m );
+    virtual QSql::Confirm confirmCancel( QSql::Op m );
+
+    virtual void handleError( const QSqlError& error );
+
+private:
+    typedef bool (QSqlCursor::*Nav)();
+    bool preNav();
+    void postNav( bool primeUpd );
+    void nav( Nav nav );
+    QDataBrowserPrivate* d;
+
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    QDataBrowser( const QDataBrowser & );
+    QDataBrowser &operator=( const QDataBrowser & );
+#endif
+};
+
+
+#endif
+#endif
Index: trunk/include/qdatatable.h
===================================================================
--- trunk/include/qdatatable.h	(revision 196)
+++ trunk/include/qdatatable.h	(revision 196)
@@ -0,0 +1,240 @@
+/****************************************************************************
+**
+** Definition of QDataTable class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech ASA of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QDATATABLE_H
+#define QDATATABLE_H
+
+#ifndef QT_H
+#include "qstring.h"
+#include "qvariant.h"
+#include "qtable.h"
+#include "qsql.h"
+#include "qsqlcursor.h"
+#include "qsqlindex.h"
+#include "qsqleditorfactory.h"
+#include "qiconset.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define QM_EXPORT_SQL
+#else
+#define QM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL_VIEW_WIDGETS
+
+class QPainter;
+class QSqlField;
+class QSqlPropertyMap;
+class QDataTablePrivate;
+
+class QM_EXPORT_SQL QDataTable : public QTable
+{
+    Q_OBJECT
+
+    Q_PROPERTY( QString nullText READ nullText WRITE setNullText )
+    Q_PROPERTY( QString trueText READ trueText WRITE setTrueText )
+    Q_PROPERTY( QString falseText READ falseText WRITE setFalseText )
+    Q_PROPERTY( DateFormat dateFormat READ dateFormat WRITE setDateFormat )
+    Q_PROPERTY( bool confirmEdits READ confirmEdits WRITE setConfirmEdits )
+    Q_PROPERTY( bool confirmInsert READ confirmInsert WRITE setConfirmInsert )
+    Q_PROPERTY( bool confirmUpdate READ confirmUpdate WRITE setConfirmUpdate )
+    Q_PROPERTY( bool confirmDelete READ confirmDelete WRITE setConfirmDelete )
+    Q_PROPERTY( bool confirmCancels READ confirmCancels WRITE setConfirmCancels )
+    Q_PROPERTY( bool autoEdit READ autoEdit WRITE setAutoEdit )
+    Q_PROPERTY( QString filter READ filter WRITE setFilter )
+    Q_PROPERTY( QStringList sort READ sort WRITE setSort )
+    Q_PROPERTY( int numCols READ numCols )
+    Q_PROPERTY( int numRows READ numRows )
+
+public:
+    QDataTable ( QWidget* parent=0, const char* name=0 );
+    QDataTable ( QSqlCursor* cursor, bool autoPopulate = FALSE, QWidget* parent=0, const char* name=0 );
+    ~QDataTable();
+
+    virtual void addColumn( const QString& fieldName,
+			    const QString& label = QString::null,
+			    int width = -1,
+			    const QIconSet& iconset = QIconSet() );
+    virtual void removeColumn( uint col );
+    virtual void setColumn( uint col, const QString& fieldName,
+			    const QString& label = QString::null,
+			    int width = -1,
+			    const QIconSet& iconset = QIconSet() );
+
+    QString      nullText() const;
+    QString      trueText() const;
+    QString      falseText() const;
+    DateFormat   dateFormat() const;
+    bool         confirmEdits() const;
+    bool         confirmInsert() const;
+    bool         confirmUpdate() const;
+    bool         confirmDelete() const;
+    bool         confirmCancels() const;
+    bool         autoDelete() const;
+    bool         autoEdit() const;
+    QString      filter() const;
+    QStringList  sort() const;
+
+    virtual void setSqlCursor( QSqlCursor* cursor = 0,
+			    bool autoPopulate = FALSE, bool autoDelete = FALSE );
+    QSqlCursor* sqlCursor() const;
+
+    virtual void setNullText( const QString& nullText );
+    virtual void setTrueText( const QString& trueText );
+    virtual void setFalseText( const QString& falseText );
+    virtual void setDateFormat( const DateFormat f );
+    virtual void setConfirmEdits( bool confirm );
+    virtual void setConfirmInsert( bool confirm );
+    virtual void setConfirmUpdate( bool confirm );
+    virtual void setConfirmDelete( bool confirm );
+    virtual void setConfirmCancels( bool confirm );
+    virtual void setAutoDelete( bool enable );
+    virtual void setAutoEdit( bool autoEdit );
+    virtual void setFilter( const QString& filter );
+    virtual void setSort( const QStringList& sort );
+    virtual void setSort( const QSqlIndex& sort );
+
+    enum Refresh {
+	RefreshData = 1,
+	RefreshColumns = 2,
+	RefreshAll = 3
+    };
+    void         refresh( Refresh mode );
+    void         sortColumn ( int col, bool ascending = TRUE,
+			      bool wholeRows = FALSE );
+    QString      text ( int row, int col ) const;
+    QVariant     value ( int row, int col ) const;
+    QSqlRecord*  currentRecord() const;
+
+    void         installEditorFactory( QSqlEditorFactory * f );
+    void         installPropertyMap( QSqlPropertyMap* m );
+
+    int          numCols() const;
+    int          numRows() const;
+    void         setNumCols( int c );
+    void         setNumRows ( int r );
+    bool         findBuffer( const QSqlIndex& idx, int atHint = 0 );
+
+    void 	 hideColumn( int col );
+    void 	 showColumn( int col );
+signals:
+    void         currentChanged( QSqlRecord* record );
+    void         primeInsert( QSqlRecord* buf );
+    void         primeUpdate( QSqlRecord* buf );
+    void         primeDelete( QSqlRecord* buf );
+    void         beforeInsert( QSqlRecord* buf );
+    void         beforeUpdate( QSqlRecord* buf );
+    void         beforeDelete( QSqlRecord* buf );
+    void         cursorChanged( QSql::Op mode );
+
+public slots:
+    virtual void find( const QString & str, bool caseSensitive,
+			     bool backwards );
+    virtual void sortAscending( int col );
+    virtual void sortDescending( int col );
+    virtual void refresh();
+    void setColumnWidth( int col, int w );
+    void adjustColumn( int col );
+    void setColumnStretchable( int col, bool stretch );
+    void swapColumns( int col1, int col2, bool swapHeaders = FALSE );
+
+protected:
+    virtual bool insertCurrent();
+    virtual bool updateCurrent();
+    virtual bool deleteCurrent();
+
+    virtual QSql::Confirm confirmEdit( QSql::Op m );
+    virtual QSql::Confirm confirmCancel( QSql::Op m );
+
+    virtual void handleError( const QSqlError& e );
+
+    virtual bool beginInsert();
+    virtual QWidget* beginUpdate ( int row, int col, bool replace );
+
+    bool         eventFilter( QObject *o, QEvent *e );
+    void         keyPressEvent( QKeyEvent* );
+    void         resizeEvent ( QResizeEvent * );
+    void         contentsMousePressEvent( QMouseEvent* e );
+    void         contentsContextMenuEvent( QContextMenuEvent* e );
+    void         endEdit( int row, int col, bool accept, bool replace );
+    QWidget *    createEditor( int row, int col, bool initFromCell ) const;
+    void         activateNextCell();
+    int          indexOf( uint i ) const; // ### make this public in 4.0
+    void         reset();
+    void         setSize( QSqlCursor* sql );
+    void         repaintCell( int row, int col );
+    void         paintCell ( QPainter * p, int row, int col, const QRect & cr,
+			     bool selected, const QColorGroup &cg );
+    virtual void paintField( QPainter * p, const QSqlField* field, const QRect & cr,
+			     bool selected );
+    void	 drawContents( QPainter * p, int cx, int cy, int cw, int ch );
+    virtual int  fieldAlignment( const QSqlField* field );
+    void         columnClicked ( int col );
+    void         resizeData ( int len );
+
+    QTableItem * item ( int row, int col ) const;
+    void         setItem ( int row, int col, QTableItem * item );
+    void         clearCell ( int row, int col ) ;
+    void         setPixmap ( int row, int col, const QPixmap & pix );
+    void         takeItem ( QTableItem * i );
+
+private slots:
+    void         loadNextPage();
+    void         setCurrentSelection( int row, int col );
+    void         updateCurrentSelection();
+    void 	 sliderPressed();
+    void 	 sliderReleased();
+    void	 doInsertCurrent();
+    void	 doUpdateCurrent();
+    
+private:
+    QString 	 fieldToString( const QSqlField * field );
+    void         init();
+    QWidget*     beginEdit ( int row, int col, bool replace );
+    void         updateRow( int row );
+    void         endInsert();
+    void         endUpdate();
+    QDataTablePrivate* d;
+
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    QDataTable( const QDataTable & );
+    QDataTable &operator=( const QDataTable & );
+#endif
+};
+
+#endif
+#endif
Index: trunk/include/qdataview.h
===================================================================
--- trunk/include/qdataview.h	(revision 196)
+++ trunk/include/qdataview.h	(revision 196)
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Definition of QDataView class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech ASA of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QDATAVIEW_H
+#define QDATAVIEW_H
+
+#ifndef QT_H
+#include "qwidget.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define QM_EXPORT_SQL
+#else
+#define QM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL_VIEW_WIDGETS
+
+class QSqlForm;
+class QSqlRecord;
+class QDataViewPrivate;
+
+class QM_EXPORT_SQL QDataView : public QWidget
+{
+    Q_OBJECT
+
+public:
+    QDataView( QWidget* parent=0, const char* name=0, WFlags fl = 0 );
+    ~QDataView();
+
+    virtual void setForm( QSqlForm* form );
+    QSqlForm* form();
+    virtual void setRecord( QSqlRecord* record );
+    QSqlRecord* record();
+
+public slots:
+    virtual void refresh( QSqlRecord* buf );
+    virtual void readFields();
+    virtual void writeFields();
+    virtual void clearValues();
+
+private:
+    QDataViewPrivate* d;
+
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    QDataView( const QDataView & );
+    QDataView &operator=( const QDataView & );
+#endif
+};
+
+
+#endif
+#endif
Index: trunk/include/qeditorfactory.h
===================================================================
--- trunk/include/qeditorfactory.h	(revision 196)
+++ trunk/include/qeditorfactory.h	(revision 196)
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Definition of QEditorFactory class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech ASA of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**  
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QEDITORFACTORY_H
+#define QEDITORFACTORY_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qvariant.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define QM_EXPORT_SQL
+#else
+#define QM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL_EDIT_WIDGETS
+
+class QM_EXPORT_SQL QEditorFactory : public QObject
+{
+public:
+    QEditorFactory ( QObject * parent = 0, const char * name = 0 );
+    ~QEditorFactory();
+    
+    virtual QWidget * createEditor( QWidget * parent, const QVariant & v );
+    
+    static QEditorFactory * defaultFactory();
+    static void installDefaultFactory( QEditorFactory * factory);
+
+private:
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    QEditorFactory( const QEditorFactory & );
+    QEditorFactory &operator=( const QEditorFactory & );
+#endif
+}; 
+
+#endif // QT_NO_SQL
+#endif // QEDITORFACTORY_H
Index: trunk/include/qmodules.h
===================================================================
--- trunk/include/qmodules.h	(revision 196)
+++ trunk/include/qmodules.h	(revision 196)
@@ -0,0 +1,12 @@
+// These modules are present in this configuration of Qt
+#define QT_MODULE_KERNEL
+#define QT_MODULE_TOOLS
+#define QT_MODULE_WIDGETS
+#define QT_MODULE_DIALOGS
+#define QT_MODULE_STYLES
+#define QT_MODULE_NETWORK
+#define QT_MODULE_WORKSPACE
+#define QT_MODULE_ICONVIEW
+#define QT_MODULE_TABLE
+#define QT_MODULE_CANVAS
+#define QT_MODULE_XML
Index: trunk/include/qsql.h
===================================================================
--- trunk/include/qsql.h	(revision 196)
+++ trunk/include/qsql.h	(revision 196)
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Definition of QSql class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech ASA of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSQL_H
+#define QSQL_H
+
+#ifndef QT_H
+#include "qglobal.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define QM_EXPORT_SQL
+#else
+#define QM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL
+
+class QM_EXPORT_SQL QSql
+{
+public:
+    QSql() {}
+    enum Op {
+	None = -1,
+	Insert = 0,
+	Update = 1,
+	Delete = 2
+    };
+
+    enum Location {
+	BeforeFirst = -1,
+	AfterLast = -2
+    };
+
+    enum Confirm {
+	Cancel = -1,
+	No = 0,
+	Yes = 1
+    };
+
+    enum ParameterType {
+	In = 1,
+	Out = 2,
+	InOut = 3  //InOut = In | Out
+    };
+
+    enum TableType { 
+	Tables = 0x01,
+	SystemTables = 0x02,
+	Views = 0x04,
+	AllTables = 0xff
+    };
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    QSql( const QSql & );
+    QSql &operator=( const QSql & );
+#endif
+
+};
+
+#endif
+#endif
Index: trunk/include/qsqlcursor.h
===================================================================
--- trunk/include/qsqlcursor.h	(revision 196)
+++ trunk/include/qsqlcursor.h	(revision 196)
@@ -0,0 +1,156 @@
+/****************************************************************************
+**
+** Definition of QSqlCursor class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech ASA of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSQLCURSOR_H
+#define QSQLCURSOR_H
+
+#ifndef QT_H
+#include "qsqlrecord.h"
+#include "qstringlist.h"
+#include "qsqlquery.h"
+#include "qsqlindex.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define QM_EXPORT_SQL
+#else
+#define QM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL
+
+class QSqlDatabase;
+class QSqlCursorPrivate;
+
+class QM_EXPORT_SQL QSqlCursor : public QSqlRecord, public QSqlQuery
+{
+public:
+    QSqlCursor( const QString & name = QString::null, bool autopopulate = TRUE, QSqlDatabase* db = 0 );
+    QSqlCursor( const QSqlCursor & other );
+    QSqlCursor& operator=( const QSqlCursor& other );
+    ~QSqlCursor();
+
+    enum Mode {
+	ReadOnly = 0,
+	Insert = 1,
+	Update = 2,
+	Delete = 4,
+	Writable = 7
+    };
+
+    QVariant		value( int i ) const;
+    QVariant		value( const QString& name ) const;
+    void         	setValue( int i, const QVariant& val );
+    void         	setValue( const QString& name, const QVariant& val );
+    virtual QSqlIndex	primaryIndex( bool prime = TRUE ) const;
+    virtual QSqlIndex	index( const QStringList& fieldNames ) const;
+    QSqlIndex		index( const QString& fieldName ) const;
+    QSqlIndex		index( const char* fieldName ) const;
+    virtual void	setPrimaryIndex( const QSqlIndex& idx );
+
+    virtual void	append( const QSqlFieldInfo& fieldInfo );
+    virtual void	insert( int pos, const QSqlFieldInfo& fieldInfo );
+    void		remove( int pos );
+    void		clear();
+    void		setGenerated( const QString& name, bool generated );
+    void		setGenerated( int i, bool generated );
+
+    virtual QSqlRecord*	editBuffer( bool copy = FALSE );
+    virtual QSqlRecord*	primeInsert();
+    virtual QSqlRecord*	primeUpdate();
+    virtual QSqlRecord*	primeDelete();
+    virtual int		insert( bool invalidate = TRUE );
+    virtual int		update( bool invalidate = TRUE );
+    virtual int		del( bool invalidate = TRUE );
+
+    virtual void	setMode( int flags );
+    int			mode() const;
+    virtual void	setCalculated( const QString& name, bool calculated );
+    bool		isCalculated( const QString& name ) const;
+    virtual void	setTrimmed( const QString& name, bool trim );
+    bool		isTrimmed( const QString& name ) const;
+
+    bool		isReadOnly() const;
+    bool		canInsert() const;
+    bool		canUpdate() const;
+    bool		canDelete() const;
+
+    bool		select();
+    bool		select( const QSqlIndex& sort );
+    bool		select( const QSqlIndex & filter, const QSqlIndex & sort );
+    virtual bool	select( const QString & filter, const QSqlIndex & sort = QSqlIndex() );
+
+    virtual void	setSort( const QSqlIndex& sort );
+    QSqlIndex		sort() const;
+    virtual void	setFilter( const QString& filter );
+    QString		filter() const;
+    virtual void	setName( const QString& name, bool autopopulate = TRUE );
+    QString		name() const;
+    QString		toString( const QString& prefix = QString::null,
+				const QString& sep = "," ) const;
+    bool 		isNull( int i ) const;
+    bool 		isNull( const QString& name ) const;
+    
+protected:
+    void		afterSeek();
+    bool		exec( const QString & sql );
+
+    virtual QVariant	calculateField( const QString& name );
+    virtual int		update( const QString & filter, bool invalidate = TRUE );
+    virtual int		del( const QString & filter, bool invalidate = TRUE );
+
+    virtual QString	toString( const QString& prefix, QSqlField* field, const QString& fieldSep ) const;
+    virtual QString	toString( QSqlRecord* rec, const QString& prefix, const QString& fieldSep,
+				const QString& sep ) const;
+    virtual QString	toString( const QSqlIndex& i, QSqlRecord* rec, const QString& prefix,
+				const QString& fieldSep, const QString& sep ) const;
+
+private:
+    void		sync();
+    int			apply( const QString& q, bool invalidate );
+    int			applyPrepared( const QString& q, bool invalidate );
+    QSqlRecord&		operator=( const QSqlRecord & list );
+    void 		append( const QSqlField& field );
+    void 		insert( int pos, const QSqlField& field );
+
+    QSqlCursorPrivate*	d;
+};
+
+
+
+
+#endif	// QT_NO_SQL
+#endif
Index: trunk/include/qsqldatabase.h
===================================================================
--- trunk/include/qsqldatabase.h	(revision 196)
+++ trunk/include/qsqldatabase.h	(revision 196)
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** Definition of QSqlDatabase class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech ASA of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSQLDATABASE_H
+#define QSQLDATABASE_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qstring.h"
+#include "qsqlquery.h"
+#include "qstringlist.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define QM_EXPORT_SQL
+#else
+#define QM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL
+
+class QSqlError;
+class QSqlDriver;
+class QSqlIndex;
+class QSqlRecord;
+class QSqlRecordInfo;
+class QSqlDatabasePrivate;
+
+class QM_EXPORT_SQL QSqlDriverCreatorBase
+{
+public:
+    virtual QSqlDriver* createObject() = 0;
+};
+
+template <class type>
+class QM_EXPORT_SQL QSqlDriverCreator: public QSqlDriverCreatorBase
+{
+public:
+    QSqlDriver* createObject() { return new type; }
+};
+
+class QM_EXPORT_SQL QSqlDatabase : public QObject
+{
+    Q_OBJECT
+    Q_PROPERTY( QString databaseName  READ databaseName WRITE setDatabaseName )
+    Q_PROPERTY( QString userName  READ userName WRITE setUserName )
+    Q_PROPERTY( QString password  READ password WRITE setPassword )
+    Q_PROPERTY( QString hostName  READ hostName WRITE setHostName )
+    Q_PROPERTY( int port READ port WRITE setPort )
+    Q_PROPERTY( QString connectOptions READ connectOptions WRITE setConnectOptions )
+
+public:
+    ~QSqlDatabase();
+
+    bool		open();
+    bool		open( const QString& user, const QString& password );
+    void		close();
+    bool		isOpen() const;
+    bool		isOpenError() const;
+    QStringList		tables() const;
+    QStringList		tables( QSql::TableType type ) const;
+    QSqlIndex		primaryIndex( const QString& tablename ) const;
+    QSqlRecord		record( const QString& tablename ) const;
+    QSqlRecord		record( const QSqlQuery& query ) const;
+    QSqlRecordInfo	recordInfo( const QString& tablename ) const;
+    QSqlRecordInfo	recordInfo( const QSqlQuery& query ) const;
+    QSqlQuery		exec( const QString& query = QString::null ) const;
+    QSqlError		lastError() const;
+
+    bool		transaction();
+    bool		commit();
+    bool		rollback();
+
+    virtual void	setDatabaseName( const QString& name );
+    virtual void	setUserName( const QString& name );
+    virtual void	setPassword( const QString& password );
+    virtual void	setHostName( const QString& host );
+    virtual void	setPort( int p );
+    void 		setConnectOptions( const QString& options = QString::null );
+    QString		databaseName() const;
+    QString		userName() const;
+    QString		password() const;
+    QString		hostName() const;
+    QString		driverName() const;
+    int         	port() const;
+    QString 		connectOptions() const;
+
+    QSqlDriver*		driver() const;
+    
+    // MOC_SKIP_BEGIN
+    QT_STATIC_CONST char * const defaultConnection;
+    // MOC_SKIP_END
+
+    static QSqlDatabase* addDatabase( const QString& type, const QString& connectionName = defaultConnection );
+    static QSqlDatabase* addDatabase( QSqlDriver* driver, const QString& connectionName = defaultConnection );
+    static QSqlDatabase* database( const QString& connectionName = defaultConnection, bool open = TRUE );
+    static void          removeDatabase( const QString& connectionName );
+    static void          removeDatabase( QSqlDatabase* db );
+    static bool          contains( const QString& connectionName = defaultConnection );
+    static QStringList   drivers();
+    static void          registerSqlDriver( const QString& name, const QSqlDriverCreatorBase* creator ); // ### 4.0: creator should not be const
+    static bool 	 isDriverAvailable( const QString& name );
+    
+protected:
+    QSqlDatabase( const QString& type, const QString& name, QObject * parent=0, const char * objname=0 );
+    QSqlDatabase( QSqlDriver* driver, QObject * parent=0, const char * objname=0 );
+private:
+    void 	init( const QString& type, const QString& name );
+    QSqlDatabasePrivate* d;
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    QSqlDatabase( const QSqlDatabase & );
+    QSqlDatabase &operator=( const QSqlDatabase & );
+#endif
+
+};
+
+#endif // QT_NO_SQL
+#endif
Index: trunk/include/qsqldriver.h
===================================================================
--- trunk/include/qsqldriver.h	(revision 196)
+++ trunk/include/qsqldriver.h	(revision 196)
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** Definition of QSqlDriver class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech ASA of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSQLDRIVER_H
+#define QSQLDRIVER_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qptrdict.h"
+#include "qstring.h"
+#include "qsqlerror.h"
+#include "qsqlquery.h"
+#include "qsqlfield.h"
+#include "qsqlindex.h"
+#include "qstringlist.h"
+#include "qmap.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define QM_EXPORT_SQL
+#else
+#define QM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL
+
+class QSqlDriverExtension;
+
+class QSqlDatabase;
+
+class QM_EXPORT_SQL QSqlDriver : public QObject
+{
+    friend class QSqlDatabase;
+    Q_OBJECT
+public:
+    enum DriverFeature { Transactions, QuerySize, BLOB, Unicode, PreparedQueries,
+			 NamedPlaceholders, PositionalPlaceholders };
+
+    QSqlDriver( QObject * parent=0, const char * name=0 );
+    ~QSqlDriver();
+    bool			isOpen() const;
+    bool			isOpenError() const;
+
+    virtual bool		beginTransaction();
+    virtual bool		commitTransaction();
+    virtual bool		rollbackTransaction();
+    virtual QStringList		tables( const QString& tableType ) const;
+    virtual QSqlIndex		primaryIndex( const QString& tableName ) const;
+    virtual QSqlRecord		record( const QString& tableName ) const;
+    virtual QSqlRecord		record( const QSqlQuery& query ) const;
+    virtual QSqlRecordInfo	recordInfo( const QString& tablename ) const;
+    virtual QSqlRecordInfo	recordInfo( const QSqlQuery& query ) const;
+    virtual QString		nullText() const;
+    virtual QString		formatValue( const QSqlField* field, bool trimStrings = FALSE ) const;
+    QSqlError			lastError() const;
+
+    virtual bool		hasFeature( DriverFeature f ) const = 0;
+    virtual bool		open( const QString & db,
+				      const QString & user = QString::null,
+				      const QString & password = QString::null,
+				      const QString & host = QString::null,
+				      int port = -1 ) = 0;
+    virtual void		close() = 0;
+    virtual QSqlQuery		createQuery() const = 0;
+
+    // ### remove for 4.0
+    bool			open( const QString& db,
+				      const QString& user,
+				      const QString& password,
+				      const QString& host,
+				      int port,
+				      const QString& connOpts );
+protected:
+    virtual void		setOpen( bool o );
+    virtual void		setOpenError( bool e );
+    virtual void		setLastError( const QSqlError& e );
+private:
+    // ### This class needs a d-pointer in 4.0.
+    int		          dbState;
+    QSqlError	          error;
+#if defined(Q_DISABLE_COPY)
+    QSqlDriver( const QSqlDriver & );
+    QSqlDriver &operator=( const QSqlDriver & );
+#endif
+};
+
+#endif	// QT_NO_SQL
+#endif
Index: trunk/include/qsqldriverplugin.h
===================================================================
--- trunk/include/qsqldriverplugin.h	(revision 196)
+++ trunk/include/qsqldriverplugin.h	(revision 196)
@@ -0,0 +1,69 @@
+/****************************************************************************
+** $Id: qsqldriverplugin.h 2051 2007-02-21 10:04:20Z chehrlic $
+**
+** Definition of QSqlDriverPlugin class
+**
+** Created : 2001-09-20
+**
+** Copyright (C) 2001-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech ASA of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSQLDRIVERPLUGIN_H
+#define QSQLDRIVERPLUGIN_H
+
+#ifndef QT_H
+#include "qgplugin.h"
+#include "qstringlist.h"
+#endif // QT_H
+
+#ifndef QT_NO_SQL
+#ifndef QT_NO_COMPONENT
+
+class QSqlDriver;
+class QSqlDriverPluginPrivate;
+
+class Q_EXPORT QSqlDriverPlugin : public QGPlugin
+{
+    Q_OBJECT
+public:
+    QSqlDriverPlugin();
+    ~QSqlDriverPlugin();
+
+    virtual QStringList keys() const = 0;
+    virtual QSqlDriver *create( const QString &key ) = 0;
+
+private:
+    QSqlDriverPluginPrivate *d;
+};
+
+#endif // QT_NO_COMPONENT
+#endif // QT_NO_SQL
+
+#endif // QSQLDRIVERPLUGIN_H
Index: trunk/include/qsqleditorfactory.h
===================================================================
--- trunk/include/qsqleditorfactory.h	(revision 196)
+++ trunk/include/qsqleditorfactory.h	(revision 196)
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Definition of QSqlEditorFactory class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech ASA of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSQLEDITORFACTORY_H
+#define QSQLEDITORFACTORY_H
+
+#ifndef QT_H
+#include "qeditorfactory.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define QM_EXPORT_SQL
+#else
+#define QM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL_EDIT_WIDGETS
+
+class QSqlField;
+
+class QM_EXPORT_SQL QSqlEditorFactory : public QEditorFactory
+{
+public:
+    QSqlEditorFactory ( QObject * parent = 0, const char * name = 0 );
+    ~QSqlEditorFactory();
+    virtual QWidget * createEditor( QWidget * parent, const QVariant & variant );
+    virtual QWidget * createEditor( QWidget * parent, const QSqlField * field );
+
+    static QSqlEditorFactory * defaultFactory();
+    static void installDefaultFactory( QSqlEditorFactory * factory );
+
+private:
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    QSqlEditorFactory( const QSqlEditorFactory & );
+    QSqlEditorFactory &operator=( const QSqlEditorFactory & );
+#endif
+};
+
+#endif // QT_NO_SQL
+#endif // QSQLEDITORFACTORY_H
Index: trunk/include/qsqlerror.h
===================================================================
--- trunk/include/qsqlerror.h	(revision 196)
+++ trunk/include/qsqlerror.h	(revision 196)
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Definition of QSqlError class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech ASA of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSQLERROR_H
+#define QSQLERROR_H
+
+#ifndef QT_H
+#include "qstring.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define QM_EXPORT_SQL
+#else
+#define QM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL
+
+class QM_EXPORT_SQL QSqlError
+{
+public:
+    enum Type {
+	None,
+	Connection,
+	Statement,
+	Transaction,
+	Unknown
+    };
+    QSqlError(  const QString& driverText = QString::null,
+		const QString& databaseText = QString::null,
+		int type = QSqlError::None,
+		int number = -1 );
+    QSqlError( const QSqlError& other );
+    QSqlError& operator=( const QSqlError& other );
+    virtual ~QSqlError();
+
+    QString	driverText() const;
+    virtual void setDriverText( const QString& driverText );
+    QString	databaseText() const;
+    virtual void setDatabaseText( const QString& databaseText );
+    int		type() const;
+    virtual void setType( int type );
+    int		number() const;
+    virtual void setNumber( int number );
+    QString 	text() const;
+    void 	showMessage( const QString& msg = QString::null ) const;
+    
+private:
+    QString	driverError;
+    QString	databaseError;
+    int		errorType;
+    int	errorNumber;
+};
+
+#endif // QT_NO_SQL
+#endif
Index: trunk/include/qsqlfield.h
===================================================================
--- trunk/include/qsqlfield.h	(revision 196)
+++ trunk/include/qsqlfield.h	(revision 196)
@@ -0,0 +1,150 @@
+/****************************************************************************
+**
+** Definition of QSqlField class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech ASA of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSQLFIELD_H
+#define QSQLFIELD_H
+
+#ifndef QT_H
+#include "qstring.h"
+#include "qvariant.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define QM_EXPORT_SQL
+#else
+#define QM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL
+
+class QSqlFieldPrivate
+{
+public:
+    QVariant::Type type;
+};
+
+class QM_EXPORT_SQL QSqlField
+{
+public:
+    QSqlField( const QString& fieldName = QString::null, QVariant::Type type = QVariant::Invalid );
+    QSqlField( const QSqlField& other );
+    QSqlField& operator=( const QSqlField& other );
+    bool operator==(const QSqlField& other) const;
+    virtual ~QSqlField();
+
+    virtual void	setValue( const QVariant& value );
+    virtual QVariant	value() const;
+    virtual void	setName( const QString& name );
+    QString		name() const;
+    virtual void	setNull();
+    bool		isNull() const;
+    virtual void	setReadOnly( bool readOnly );
+    bool		isReadOnly() const;
+    void		clear( bool nullify = TRUE );
+    QVariant::Type	type() const;
+
+private:
+    QString       nm;
+    QVariant      val;
+    uint          ro: 1;
+    uint          nul: 1;
+    QSqlFieldPrivate* d;
+};
+
+inline QVariant QSqlField::value() const
+{ return val; }
+
+inline QString QSqlField::name() const
+{ return nm; }
+
+inline bool QSqlField::isNull() const
+{ return nul; }
+
+inline bool QSqlField::isReadOnly() const
+{ return ro; }
+
+inline QVariant::Type QSqlField::type() const
+{ return d->type; }
+
+
+/******************************************/
+/*******     QSqlFieldInfo Class     ******/
+/******************************************/
+
+struct QSqlFieldInfoPrivate;
+
+class QM_EXPORT_SQL QSqlFieldInfo
+{
+public:
+    QSqlFieldInfo( const QString& name = QString::null,
+		   QVariant::Type typ = QVariant::Invalid,
+		   int required = -1,
+		   int len = -1,
+		   int prec = -1,
+		   const QVariant& defValue = QVariant(),
+		   int sqlType = 0,
+		   bool generated = TRUE,
+		   bool trim = FALSE,
+		   bool calculated = FALSE );
+    QSqlFieldInfo( const QSqlFieldInfo & other );
+    QSqlFieldInfo( const QSqlField & other, bool generated = TRUE );
+    virtual ~QSqlFieldInfo();
+    QSqlFieldInfo& operator=( const QSqlFieldInfo& other );
+    bool operator==( const QSqlFieldInfo& f ) const;
+
+    QSqlField		toField() const;
+    int			isRequired() const;
+    QVariant::Type	type() const;
+    int			length() const;
+    int			precision() const;
+    QVariant		defaultValue() const;
+    QString		name() const;
+    int			typeID() const;
+    bool		isGenerated() const;
+    bool		isTrim() const;
+    bool		isCalculated() const;
+
+    virtual void	setTrim( bool trim );
+    virtual void	setGenerated( bool gen );
+    virtual void	setCalculated( bool calc );
+
+private:
+    QSqlFieldInfoPrivate* d;
+};
+
+
+#endif	// QT_NO_SQL
+#endif
Index: trunk/include/qsqlform.h
===================================================================
--- trunk/include/qsqlform.h	(revision 196)
+++ trunk/include/qsqlform.h	(revision 196)
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Definition of QSqlForm class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech ASA of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSQLFORM_H
+#define QSQLFORM_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qmap.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define QM_EXPORT_SQL
+#else
+#define QM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL_FORM
+
+class QSqlField;
+class QSqlRecord;
+class QSqlEditorFactory;
+class QSqlPropertyMap;
+class QWidget;
+class QSqlFormPrivate;
+
+class QM_EXPORT_SQL QSqlForm : public QObject
+{
+    Q_OBJECT
+public:
+    QSqlForm( QObject * parent = 0, const char * name = 0 );
+    ~QSqlForm();
+
+    virtual void insert( QWidget * widget, const QString& field );
+    virtual void remove( const QString& field );
+    uint         count() const;
+
+    QWidget *   widget( uint i ) const;
+    QSqlField * widgetToField( QWidget * widget ) const;
+    QWidget *   fieldToWidget( QSqlField * field ) const;
+
+    void        installPropertyMap( QSqlPropertyMap * map );
+
+    virtual void setRecord( QSqlRecord* buf );
+
+public slots:
+    virtual void readField( QWidget * widget );
+    virtual void writeField( QWidget * widget );
+    virtual void readFields();
+    virtual void writeFields();
+
+    virtual void clear();
+    virtual void clearValues( bool nullify = FALSE );
+
+protected:
+    virtual void insert( QWidget * widget, QSqlField * field );
+    virtual void remove( QWidget * widget );
+    void clearMap();
+
+private:
+    virtual void sync();
+    QSqlFormPrivate* d;
+
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    QSqlForm( const QSqlForm & );
+    QSqlForm &operator=( const QSqlForm & );
+#endif
+};
+
+#endif // QT_NO_SQL
+#endif // QSQLFORM_H
Index: trunk/include/qsqlindex.h
===================================================================
--- trunk/include/qsqlindex.h	(revision 196)
+++ trunk/include/qsqlindex.h	(revision 196)
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Definition of QSqlIndex class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech ASA of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSQLINDEX_H
+#define QSQLINDEX_H
+
+#ifndef QT_H
+#include "qstring.h"
+#include "qstringlist.h"
+#include "qsqlfield.h"
+#include "qsqlrecord.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define QM_EXPORT_SQL
+#define QM_TEMPLATE_EXTERN_SQL
+#else
+#define QM_EXPORT_SQL Q_EXPORT
+#define QM_TEMPLATE_EXTERN_SQL Q_TEMPLATE_EXTERN
+#endif
+
+#ifndef QT_NO_SQL
+
+class QSqlCursor;
+
+class QM_EXPORT_SQL QSqlIndex : public QSqlRecord
+{
+public:
+    QSqlIndex( const QString& cursorName = QString::null, const QString& name = QString::null );
+    QSqlIndex( const QSqlIndex& other );
+    ~QSqlIndex();
+    QSqlIndex&       operator=( const QSqlIndex& other );
+    virtual void     setCursorName( const QString& cursorName );
+    QString          cursorName() const { return cursor; }
+    virtual void     setName( const QString& name );
+    QString          name() const { return nm; }
+
+    void             append( const QSqlField& field );
+    virtual void     append( const QSqlField& field, bool desc );
+
+    bool             isDescending( int i ) const;
+    virtual void     setDescending( int i, bool desc );
+
+    QString          toString( const QString& prefix = QString::null,
+			       const QString& sep = ",",
+			       bool verbose = TRUE ) const;
+    QStringList      toStringList( const QString& prefix = QString::null,
+				   bool verbose = TRUE ) const;
+
+    static QSqlIndex fromStringList( const QStringList& l, const QSqlCursor* cursor );
+
+private:
+    QString          createField( int i, const QString& prefix, bool verbose ) const;
+    QString          cursor;
+    QString          nm;
+    QValueList<bool> sorts;
+};
+
+#define Q_DEFINED_QSQLINDEX
+#include "qwinexport.h"
+#endif	// QT_NO_SQL
+#endif
Index: trunk/include/qsqlpropertymap.h
===================================================================
--- trunk/include/qsqlpropertymap.h	(revision 196)
+++ trunk/include/qsqlpropertymap.h	(revision 196)
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Definition of QSqlPropertyMap class
+**
+** Created : 2000-11-20
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech ASA of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSQLPROPERTYMAP_H
+#define QSQLPROPERTYMAP_H
+
+#ifndef QT_H
+#include "qvariant.h"
+#include "qstring.h"
+#endif // QT_H
+
+#ifndef QT_NO_SQL_FORM
+
+class QWidget;
+class QSqlPropertyMapPrivate;
+
+class Q_EXPORT QSqlPropertyMap {
+public:
+    QSqlPropertyMap();
+    virtual ~QSqlPropertyMap();
+
+    QVariant      property( QWidget * widget );
+    virtual void  setProperty( QWidget * widget, const QVariant & value );
+
+    void insert( const QString & classname, const QString & property );
+    void remove( const QString & classname );
+
+    static QSqlPropertyMap * defaultMap();
+    static void installDefaultMap( QSqlPropertyMap * map );
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    QSqlPropertyMap( const QSqlPropertyMap & );
+    QSqlPropertyMap &operator=( const QSqlPropertyMap & );
+#endif
+    QSqlPropertyMapPrivate* d;
+
+};
+
+#endif // QT_NO_SQL_FORM
+#endif // QSQLPROPERTYMAP_H
Index: trunk/include/qsqlquery.h
===================================================================
--- trunk/include/qsqlquery.h	(revision 196)
+++ trunk/include/qsqlquery.h	(revision 196)
@@ -0,0 +1,129 @@
+/****************************************************************************
+**
+** Definition of QSqlQuery class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech ASA of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSQLQUERY_H
+#define QSQLQUERY_H
+
+#ifndef QT_H
+#include "qobject.h"
+#include "qstring.h"
+#include "qvariant.h"
+#include "qvaluelist.h"
+#include "qsqlerror.h"
+#include "qsqlfield.h"
+#include "qsql.h"
+#endif // QT_H
+
+#ifndef QT_NO_SQL
+
+class QSqlDriver;
+class QSqlResult;
+class QSqlDatabase;
+
+class Q_EXPORT QSqlResultShared : public QObject, public QShared
+{
+    Q_OBJECT
+public:
+    QSqlResultShared( QSqlResult* result );
+    virtual ~QSqlResultShared();
+    QSqlResult* sqlResult;
+    QString executedQuery;
+private slots:
+    void slotResultDestroyed();
+};
+
+class Q_EXPORT QSqlQuery
+{
+public:
+    QSqlQuery( QSqlResult * r );
+    QSqlQuery( const QString& query = QString::null, QSqlDatabase* db = 0 );
+    Q_EXPLICIT QSqlQuery( QSqlDatabase* db );
+    QSqlQuery( const QSqlQuery& other );
+    QSqlQuery& operator=( const QSqlQuery& other );
+    virtual ~QSqlQuery();
+
+    bool                isValid() const;
+    bool                isActive() const;
+    bool	        isNull( int field ) const;
+    int                 at() const;
+    QString             lastQuery() const;
+    int                 numRowsAffected() const;
+    QSqlError	        lastError() const;
+    bool                isSelect() const;
+    int                 size() const;
+    const QSqlDriver*   driver() const;
+    const QSqlResult*   result() const;
+    bool		isForwardOnly() const;
+    void		setForwardOnly( bool forward );
+
+    virtual bool	exec ( const QString& query );
+    virtual QVariant    value( int i ) const;
+
+    virtual bool	seek( int i, bool relative = FALSE );
+    virtual bool        next();
+    virtual bool        prev();
+    virtual bool        first();
+    virtual bool        last();
+
+    // prepared query support
+    bool		exec();
+    bool		prepare( const QString& query );
+    void		bindValue( const QString& placeholder, const QVariant& val );
+    void		bindValue( int pos, const QVariant& val );
+    void		addBindValue( const QVariant& val );
+    // remove these overloads in 4.0
+    void		bindValue( const QString& placeholder, const QVariant& val, QSql::ParameterType type );
+    void		bindValue( int pos, const QVariant& val, QSql::ParameterType type );
+    void		addBindValue( const QVariant& val, QSql::ParameterType type );
+    QVariant		boundValue( const QString& placeholder ) const;
+    QVariant		boundValue( int pos ) const;
+    QMap<QString, QVariant> boundValues() const;
+    QString             executedQuery() const;
+    
+protected:
+    virtual void        beforeSeek();
+    virtual void        afterSeek();
+
+private:
+    void 		init( const QString& query, QSqlDatabase* db );
+    void                deref();
+    bool                checkDetach();
+    QSqlResultShared*   d;
+};
+
+
+#endif // QT_NO_SQL
+#endif
Index: trunk/include/qsqlrecord.h
===================================================================
--- trunk/include/qsqlrecord.h	(revision 196)
+++ trunk/include/qsqlrecord.h	(revision 196)
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Definition of QSqlRecord class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech ASA of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSQLRECORD_H
+#define QSQLRECORD_H
+
+#ifndef QT_H
+#include "qstring.h"
+#include "qstringlist.h"
+#include "qvariant.h"
+#include "qsqlfield.h"
+#endif // QT_H
+
+#ifndef QT_NO_SQL
+
+class QSqlRecordPrivate;
+
+class QSqlRecordShared : public QShared
+{
+public:
+    QSqlRecordShared( QSqlRecordPrivate* sqlRecordPrivate )
+    : d( sqlRecordPrivate )
+    {}
+    virtual ~QSqlRecordShared();
+    QSqlRecordPrivate* d;
+};
+
+class Q_EXPORT QSqlRecord
+{
+public:
+    QSqlRecord();
+    QSqlRecord( const QSqlRecord& other );
+    QSqlRecord& operator=( const QSqlRecord& other );
+    virtual ~QSqlRecord();
+    virtual QVariant     value( int i ) const;
+    virtual QVariant     value( const QString& name ) const;
+    virtual void         setValue( int i, const QVariant& val );
+    virtual void         setValue( const QString& name, const QVariant& val );
+    bool                 isGenerated( int i ) const;
+    bool                 isGenerated( const QString& name ) const;
+    virtual void         setGenerated( const QString& name, bool generated );
+    virtual void         setGenerated( int i, bool generated );
+    virtual void         setNull( int i );
+    virtual void         setNull( const QString& name );
+    bool                 isNull( int i ); // remove in 4.0
+    bool                 isNull( const QString& name ); // remove in 4.0
+    bool                 isNull( int i ) const;
+    bool                 isNull( const QString& name ) const;
+
+    int                  position( const QString& name ) const;
+    QString              fieldName( int i ) const;
+    QSqlField*           field( int i );
+    QSqlField*           field( const QString& name );
+    const QSqlField*     field( int i ) const;
+    const QSqlField*     field( const QString& name ) const;
+
+    virtual void         append( const QSqlField& field );
+    virtual void         insert( int pos, const QSqlField& field );
+    virtual void         remove( int pos );
+
+    bool                 isEmpty() const;
+    bool                 contains( const QString& name ) const;
+    virtual void         clear();
+    virtual void         clearValues( bool nullify = FALSE );
+    uint                 count() const;
+    virtual QString      toString( const QString& prefix = QString::null,
+				   const QString& sep = "," ) const;
+    virtual QStringList  toStringList( const QString& prefix = QString::null ) const;
+
+private:
+    QString              createField( int i, const QString& prefix ) const;
+    void                 deref();
+    bool                 checkDetach();
+    QSqlRecordShared*    sh;
+};
+
+/******************************************/
+/*******     QSqlRecordInfo Class    ******/
+/******************************************/
+
+#if defined(Q_TEMPLATEDLL)
+// MOC_SKIP_BEGIN
+Q_TEMPLATE_EXTERN template class Q_EXPORT QValueList<QSqlFieldInfo>;
+// MOC_SKIP_END
+#endif
+
+typedef QValueList<QSqlFieldInfo> QSqlFieldInfoList;
+
+class Q_EXPORT QSqlRecordInfo: public QSqlFieldInfoList
+{
+public:
+    QSqlRecordInfo(): QSqlFieldInfoList() {}
+    QSqlRecordInfo( const QSqlFieldInfoList& other ): QSqlFieldInfoList( other ) {}
+    QSqlRecordInfo( const QSqlRecord& other );
+
+    size_type contains( const QString& fieldName ) const;
+    QSqlFieldInfo find( const QString& fieldName ) const;
+    QSqlRecord toRecord() const;
+
+};
+
+
+#endif	// QT_NO_SQL
+#endif
Index: trunk/include/qsqlresult.h
===================================================================
--- trunk/include/qsqlresult.h	(revision 196)
+++ trunk/include/qsqlresult.h	(revision 196)
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Definition of QSqlResult class
+**
+** Created : 2000-11-03
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech ASA of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSQLRESULT_H
+#define QSQLRESULT_H
+
+#ifndef QT_H
+#include "qstring.h"
+#include "qvariant.h"
+#include "qsqlerror.h"
+#include "qsqlfield.h"
+#include "qsql.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define QM_EXPORT_SQL
+#else
+#define QM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL
+
+class QSqlDriver;
+class QSql;
+class QSqlResultPrivate;
+class QSqlExtension;
+
+class QM_EXPORT_SQL QSqlResult
+{
+friend class QSqlQuery;
+friend class QSqlResultShared;
+public:
+    virtual ~QSqlResult();
+    
+    // BCI HACK - remove in 4.0
+    void 	    setExtension( QSqlExtension * ext );
+    QSqlExtension * extension();
+
+protected:
+    QSqlResult(const QSqlDriver * db );
+    int		    at() const;
+    QString         lastQuery() const;
+    QSqlError       lastError() const;
+    bool            isValid() const;
+    bool            isActive() const;
+    bool            isSelect() const;
+    bool            isForwardOnly() const;
+    const QSqlDriver* driver() const;
+    virtual void    setAt( int at );
+    virtual void    setActive( bool a );
+    virtual void    setLastError( const QSqlError& e );
+    virtual void    setQuery( const QString& query );
+    virtual void    setSelect( bool s );
+    virtual void    setForwardOnly( bool forward );
+
+    virtual QVariant data( int i ) = 0;
+    virtual bool    isNull( int i ) = 0;
+    virtual bool    reset ( const QString& sqlquery ) = 0;
+    virtual bool    fetch( int i ) = 0;
+    virtual bool    fetchNext();
+    virtual bool    fetchPrev();
+    virtual bool    fetchFirst() = 0;
+    virtual bool    fetchLast() = 0;
+    virtual int     size() = 0;
+    virtual int     numRowsAffected() = 0;
+private:
+    QSqlResultPrivate* d;
+    bool forwardOnly;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    QSqlResult( const QSqlResult & );
+    QSqlResult &operator=( const QSqlResult & );
+#endif
+};
+
+#endif	// QT_NO_SQL
+#endif
Index: trunk/include/qsqlselectcursor.h
===================================================================
--- trunk/include/qsqlselectcursor.h	(revision 196)
+++ trunk/include/qsqlselectcursor.h	(revision 196)
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Definition of QSqlSelectCursor class
+**
+** Created : 2002-11-13
+**
+** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of the sql module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech ASA of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QSQLSELECTCURSOR_H
+#define QSQLSELECTCURSOR_H
+
+#ifndef QT_H
+#include "qsqlcursor.h"
+#endif // QT_H
+
+#if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL )
+#define QM_EXPORT_SQL
+#else
+#define QM_EXPORT_SQL Q_EXPORT
+#endif
+
+#ifndef QT_NO_SQL
+
+class QSqlSelectCursorPrivate;
+
+class QM_EXPORT_SQL QSqlSelectCursor : public QSqlCursor
+{
+public:
+    QSqlSelectCursor( const QString& query = QString::null, QSqlDatabase* db = 0 );
+    QSqlSelectCursor( const QSqlSelectCursor& other );
+    ~QSqlSelectCursor();
+    bool exec( const QString& query );
+    bool select() { return QSqlCursor::select(); }
+    
+protected:
+    QSqlIndex primaryIndex( bool = TRUE ) const { return QSqlIndex(); }
+    QSqlIndex index( const QStringList& ) const { return QSqlIndex(); }
+    QSqlIndex index( const QString& ) const { return QSqlIndex(); }
+    QSqlIndex index( const char* ) const { return QSqlIndex(); }
+    void setPrimaryIndex( const QSqlIndex& ) {}
+    void append( const QSqlFieldInfo& ) {}
+    void insert( int, const QSqlFieldInfo& ) {}
+    void remove( int ) {}
+    void clear() {}
+    void setGenerated( const QString&, bool ) {}
+    void setGenerated( int, bool ) {}
+    QSqlRecord*	editBuffer( bool = FALSE ) { return 0; }
+    QSqlRecord*	primeInsert() { return 0; }
+    QSqlRecord*	primeUpdate() { return 0; }
+    QSqlRecord*	primeDelete() { return 0; }
+    int	insert( bool = TRUE ) { return 0; }
+    int	update( bool = TRUE ) { return 0; }
+    int	del( bool = TRUE ) { return 0; }
+    void setMode( int ) {}
+
+    void setSort( const QSqlIndex& ) {}
+    QSqlIndex sort() const { return QSqlIndex(); }
+    void setFilter( const QString& ) {}
+    QString filter() const { return QString::null; }
+    void setName( const QString&, bool = TRUE ) {}
+    QString name() const { return QString::null; }
+    QString toString( const QString& = QString::null, const QString& = "," ) const { return QString::null; }
+    bool select( const QString &, const QSqlIndex& = QSqlIndex() );
+
+private:
+    void populateCursor();
+    
+    QSqlSelectCursorPrivate * d;
+};
+
+#endif // QT_NO_SQL
+#endif // QSQLSELECTCURSOR_H
