From caef3c4fb4407e0a0ea993bdcee2fbcacfbfaf25 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Sat, 26 Mar 2011 01:30:39 +0000 Subject: [PATCH] 2011-03-25 18:24 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + contrib/hbqt/qtsql + contrib/hbqt/qtsql/doc + contrib/hbqt/qtsql/hbqtsql.ch + contrib/hbqt/qtsql/hbqtsql.hbc + contrib/hbqt/qtsql/hbqtsql.hbm + contrib/hbqt/qtsql/hbqtsql.hbp + contrib/hbqt/qtsql/hbqtsql.hbx + contrib/hbqt/qtsql/hbqtsqls.hbp + contrib/hbqt/qtsql/qth + contrib/hbqt/qtsql/qth/filelist.hbm + contrib/hbqt/qtsql/qth/QSqlDatabase.qth + contrib/hbqt/qtsql/qth/QSqlDriver.qth + contrib/hbqt/qtsql/qth/QSqlError.qth + contrib/hbqt/qtsql/qth/QSqlField.qth + contrib/hbqt/qtsql/qth/QSqlIndex.qth + contrib/hbqt/qtsql/qth/QSqlQuery.qth + contrib/hbqt/qtsql/qth/QSqlQueryModel.qth + contrib/hbqt/qtsql/qth/QSqlRecord.qth + contrib/hbqt/qtsql/qth/QSqlRelationalTableModel.qth + contrib/hbqt/qtsql/qth/QSqlResult.qth + contrib/hbqt/qtsql/qth/QSqlTableModel.qth * contrib/hbqt/hbqt.hbc * contrib/hbqt/hbqt_all.hbp + Initial upload of classes contained in QtSql module. --- harbour/ChangeLog | 28 ++++ harbour/contrib/hbqt/hbqt.hbc | 1 + harbour/contrib/hbqt/hbqt_all.hbp | 2 + harbour/contrib/hbqt/qtsql/hbqtsql.ch | 56 +++++++ harbour/contrib/hbqt/qtsql/hbqtsql.hbc | 23 +++ harbour/contrib/hbqt/qtsql/hbqtsql.hbm | 12 ++ harbour/contrib/hbqt/qtsql/hbqtsql.hbp | 12 ++ harbour/contrib/hbqt/qtsql/hbqtsql.hbx | 55 +++++++ harbour/contrib/hbqt/qtsql/hbqtsqls.hbp | 7 + .../contrib/hbqt/qtsql/qth/QSqlDatabase.qth | 138 +++++++++++++++++ harbour/contrib/hbqt/qtsql/qth/QSqlDriver.qth | 122 +++++++++++++++ harbour/contrib/hbqt/qtsql/qth/QSqlError.qth | 106 +++++++++++++ harbour/contrib/hbqt/qtsql/qth/QSqlField.qth | 120 +++++++++++++++ harbour/contrib/hbqt/qtsql/qth/QSqlIndex.qth | 103 +++++++++++++ harbour/contrib/hbqt/qtsql/qth/QSqlQuery.qth | 140 ++++++++++++++++++ .../contrib/hbqt/qtsql/qth/QSqlQueryModel.qth | 113 ++++++++++++++ harbour/contrib/hbqt/qtsql/qth/QSqlRecord.qth | 120 +++++++++++++++ .../qtsql/qth/QSqlRelationalTableModel.qth | 99 +++++++++++++ harbour/contrib/hbqt/qtsql/qth/QSqlResult.qth | 94 ++++++++++++ .../contrib/hbqt/qtsql/qth/QSqlTableModel.qth | 124 ++++++++++++++++ harbour/contrib/hbqt/qtsql/qth/filelist.hbm | 22 +++ 21 files changed, 1497 insertions(+) create mode 100644 harbour/contrib/hbqt/qtsql/hbqtsql.ch create mode 100644 harbour/contrib/hbqt/qtsql/hbqtsql.hbc create mode 100644 harbour/contrib/hbqt/qtsql/hbqtsql.hbm create mode 100644 harbour/contrib/hbqt/qtsql/hbqtsql.hbp create mode 100644 harbour/contrib/hbqt/qtsql/hbqtsql.hbx create mode 100644 harbour/contrib/hbqt/qtsql/hbqtsqls.hbp create mode 100644 harbour/contrib/hbqt/qtsql/qth/QSqlDatabase.qth create mode 100644 harbour/contrib/hbqt/qtsql/qth/QSqlDriver.qth create mode 100644 harbour/contrib/hbqt/qtsql/qth/QSqlError.qth create mode 100644 harbour/contrib/hbqt/qtsql/qth/QSqlField.qth create mode 100644 harbour/contrib/hbqt/qtsql/qth/QSqlIndex.qth create mode 100644 harbour/contrib/hbqt/qtsql/qth/QSqlQuery.qth create mode 100644 harbour/contrib/hbqt/qtsql/qth/QSqlQueryModel.qth create mode 100644 harbour/contrib/hbqt/qtsql/qth/QSqlRecord.qth create mode 100644 harbour/contrib/hbqt/qtsql/qth/QSqlRelationalTableModel.qth create mode 100644 harbour/contrib/hbqt/qtsql/qth/QSqlResult.qth create mode 100644 harbour/contrib/hbqt/qtsql/qth/QSqlTableModel.qth create mode 100644 harbour/contrib/hbqt/qtsql/qth/filelist.hbm diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b8d862d328..faeb450ea7 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,34 @@ The license applies to all entries newer than 2009-04-28. */ +2011-03-25 18:24 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + + contrib/hbqt/qtsql + + contrib/hbqt/qtsql/doc + + contrib/hbqt/qtsql/hbqtsql.ch + + contrib/hbqt/qtsql/hbqtsql.hbc + + contrib/hbqt/qtsql/hbqtsql.hbm + + contrib/hbqt/qtsql/hbqtsql.hbp + + contrib/hbqt/qtsql/hbqtsql.hbx + + contrib/hbqt/qtsql/hbqtsqls.hbp + + contrib/hbqt/qtsql/qth + + contrib/hbqt/qtsql/qth/filelist.hbm + + contrib/hbqt/qtsql/qth/QSqlDatabase.qth + + contrib/hbqt/qtsql/qth/QSqlDriver.qth + + contrib/hbqt/qtsql/qth/QSqlError.qth + + contrib/hbqt/qtsql/qth/QSqlField.qth + + contrib/hbqt/qtsql/qth/QSqlIndex.qth + + contrib/hbqt/qtsql/qth/QSqlQuery.qth + + contrib/hbqt/qtsql/qth/QSqlQueryModel.qth + + contrib/hbqt/qtsql/qth/QSqlRecord.qth + + contrib/hbqt/qtsql/qth/QSqlRelationalTableModel.qth + + contrib/hbqt/qtsql/qth/QSqlResult.qth + + contrib/hbqt/qtsql/qth/QSqlTableModel.qth + + * contrib/hbqt/hbqt.hbc + * contrib/hbqt/hbqt_all.hbp + + + Initial upload of classes contained in QtSql module. + 2011-03-25 08:24 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbide/idedocks.prg ! Fixed: mystery of flashing and disappearing windows before diff --git a/harbour/contrib/hbqt/hbqt.hbc b/harbour/contrib/hbqt/hbqt.hbc index 71ce35f21a..2f66e6c93a 100644 --- a/harbour/contrib/hbqt/hbqt.hbc +++ b/harbour/contrib/hbqt/hbqt.hbc @@ -13,3 +13,4 @@ libs=hbqtgui.hbc libs=hbqtnetwork.hbc libs=hbqtuitools.hbc # libs=hbqtwebkit.hbc +libs=hbqtsql.hbc diff --git a/harbour/contrib/hbqt/hbqt_all.hbp b/harbour/contrib/hbqt/hbqt_all.hbp index fcb4f5f4a9..7b755184a9 100644 --- a/harbour/contrib/hbqt/hbqt_all.hbp +++ b/harbour/contrib/hbqt/hbqt_all.hbp @@ -16,3 +16,5 @@ hbqtgui.hbc hbqtnetwork.hbc hbqtuitools.hbc hbqtwebkit.hbc +hbqtsql.hbc + diff --git a/harbour/contrib/hbqt/qtsql/hbqtsql.ch b/harbour/contrib/hbqt/qtsql/hbqtsql.ch new file mode 100644 index 0000000000..7c28d1730a --- /dev/null +++ b/harbour/contrib/hbqt/qtsql/hbqtsql.ch @@ -0,0 +1,56 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * + * Copyright 2009 Pritpal Bedi + * http://harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +#ifndef _HBQTGUI_CH +#define _HBQTGUI_CH + + +#endif diff --git a/harbour/contrib/hbqt/qtsql/hbqtsql.hbc b/harbour/contrib/hbqt/qtsql/hbqtsql.hbc new file mode 100644 index 0000000000..de807e0e88 --- /dev/null +++ b/harbour/contrib/hbqt/qtsql/hbqtsql.hbc @@ -0,0 +1,23 @@ +# +# $Id$ +# + +# --------------------------------------------------------------- +# Copyright 2010 Viktor Szakats (harbour.01 syenar.hu) +# See COPYING for licensing terms. +# --------------------------------------------------------------- + +incpaths=. + +libs=../qtcore/hbqtcore.hbc + +{!HB_STATIC_QT}libs=${_HB_DYNPREF}${hb_name}${_HB_DYNSUFF} +{!HB_STATIC_QT&(allwin|os2)}libs=QtSql4 +{!HB_STATIC_QT&(linux|beos|symbian)}libs=QtSql +{!HB_STATIC_QT&darwin}frameworks=QtSql +{HB_STATIC_QT&allwin}libs=${_HB_DYNPREF}${hb_name}s${_HB_DYNSUFF} +{HB_STATIC_QT&linux|beos}libs=${_HB_DYNPREF}${hb_name}${_HB_DYNSUFF} +{HB_STATIC_QT&(allwin|linux|beos)}libs=QtSql + +gui=yes +gt=gtnul diff --git a/harbour/contrib/hbqt/qtsql/hbqtsql.hbm b/harbour/contrib/hbqt/qtsql/hbqtsql.hbm new file mode 100644 index 0000000000..78791f8d2f --- /dev/null +++ b/harbour/contrib/hbqt/qtsql/hbqtsql.hbm @@ -0,0 +1,12 @@ +# +# $Id$ +# + +-i. + +qth/filelist.hbm + +hbqtsql.hbx + + +../qtcore/hbqtcore.hbc diff --git a/harbour/contrib/hbqt/qtsql/hbqtsql.hbp b/harbour/contrib/hbqt/qtsql/hbqtsql.hbp new file mode 100644 index 0000000000..ad1e7da442 --- /dev/null +++ b/harbour/contrib/hbqt/qtsql/hbqtsql.hbp @@ -0,0 +1,12 @@ +# +# $Id$ +# + +../hbqt_common.hbm + +hbqtsql.hbm + +-instfile=inc:hbqtsql.ch +-instfile=inc:hbqtsql.hbx + +hbqtsqls.hbp diff --git a/harbour/contrib/hbqt/qtsql/hbqtsql.hbx b/harbour/contrib/hbqt/qtsql/hbqtsql.hbx new file mode 100644 index 0000000000..4b53ffdcb7 --- /dev/null +++ b/harbour/contrib/hbqt/qtsql/hbqtsql.hbx @@ -0,0 +1,55 @@ +/* + * $Id$ + */ + +/* -------------------------------------------------------------------- */ +/* NOTE: You can add manual override which functions to include or */ +/* exclude from automatically generated EXTERNAL/DYNAMIC list. */ +/* Syntax: // HB_FUNC_INCLUDE */ +/* // HB_FUNC_EXCLUDE */ +/* -------------------------------------------------------------------- */ + +/* -------------------------------------------------------------------- */ +/* WARNING: Automatically generated code below. DO NOT EDIT! */ +/* Regenerate using hbmk2 '-hbx=' option. */ +/* -------------------------------------------------------------------- */ + +#ifndef __HBEXTERN_CH__HBQTSQL__ +#define __HBEXTERN_CH__HBQTSQL__ + +#if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__HBQTSQL__ANNOUNCE ) + ANNOUNCE __HBEXTERN__HBQTSQL__ +#endif + +#if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__HBQTSQL__REQUEST ) + #command DYNAMIC => EXTERNAL +#endif + +DYNAMIC HB_QSQLDATABASE +DYNAMIC HB_QSQLDRIVER +DYNAMIC HB_QSQLERROR +DYNAMIC HB_QSQLFIELD +DYNAMIC HB_QSQLINDEX +DYNAMIC HB_QSQLQUERY +DYNAMIC HB_QSQLQUERYMODEL +DYNAMIC HB_QSQLRECORD +DYNAMIC HB_QSQLRELATIONALTABLEMODEL +DYNAMIC HB_QSQLRESULT +DYNAMIC HB_QSQLTABLEMODEL +DYNAMIC QSQLDATABASE +DYNAMIC QSQLDRIVER +DYNAMIC QSQLERROR +DYNAMIC QSQLFIELD +DYNAMIC QSQLINDEX +DYNAMIC QSQLQUERY +DYNAMIC QSQLQUERYMODEL +DYNAMIC QSQLRECORD +DYNAMIC QSQLRELATIONALTABLEMODEL +DYNAMIC QSQLRESULT +DYNAMIC QSQLTABLEMODEL + +#if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__HBQTSQL__REQUEST ) + #uncommand DYNAMIC => EXTERNAL +#endif + +#endif diff --git a/harbour/contrib/hbqt/qtsql/hbqtsqls.hbp b/harbour/contrib/hbqt/qtsql/hbqtsqls.hbp new file mode 100644 index 0000000000..fec47d6b40 --- /dev/null +++ b/harbour/contrib/hbqt/qtsql/hbqtsqls.hbp @@ -0,0 +1,7 @@ +# +# $Id$ +# + +../hbqt_commons.hbm + +hbqtsql.hbm diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlDatabase.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlDatabase.qth new file mode 100644 index 0000000000..e0e9bd0e30 --- /dev/null +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlDatabase.qth @@ -0,0 +1,138 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009-2011 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +QObject = no +Inherit = +Type = +New = + + + +#include +#include +#include +#include +#include + +/* + * QSqlDatabase () + * QSqlDatabase ( const QSqlDatabase & other ) + * ~QSqlDatabase () + */ +HB_FUNC( QT_QSQLDATABASE ) +{ + __HB_RETPTRGC__( new QSqlDatabase() ); +} + + + + + + +void close () +bool commit () +QString connectOptions () const +QString connectionName () const +QString databaseName () const +QSqlDriver * driver () const +QString driverName () const +QSqlQuery exec ( const QString & query = QString() ) const +QString hostName () const +bool isOpen () const +bool isOpenError () const +bool isValid () const +QSqlError lastError () const +bool open () +bool open ( const QString & user, const QString & password ) +QString password () const +int port () const +QSqlIndex primaryIndex ( const QString & tablename ) const +QSqlRecord record ( const QString & tablename ) const +bool rollback () +void setConnectOptions ( const QString & options = QString() ) +void setDatabaseName ( const QString & name ) +void setHostName ( const QString & host ) +void setPassword ( const QString & password ) +void setPort ( int port ) +void setUserName ( const QString & name ) +QStringList tables ( QSql::TableType type = QSql::Tables ) const +bool transaction () +QString userName () const + +QSqlDatabase addDatabase ( const QString & type, const QString & connectionName = QLatin1String( defaultConnection ) ) +QSqlDatabase addDatabase ( QSqlDriver * driver, const QString & connectionName = QLatin1String( defaultConnection ) ) +QSqlDatabase cloneDatabase ( const QSqlDatabase & other, const QString & connectionName ) +QStringList connectionNames () +bool contains ( const QString & connectionName = QLatin1String( defaultConnection ) ) +QSqlDatabase database ( const QString & connectionName = QLatin1String( defaultConnection ), bool open = true ) +QStringList drivers () +bool isDriverAvailable ( const QString & name ) +void registerSqlDriver ( const QString & name, QSqlDriverCreatorBase * creator ) +void removeDatabase ( const QString & connectionName ) + + + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlDriver.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlDriver.qth new file mode 100644 index 0000000000..9d837c42d4 --- /dev/null +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlDriver.qth @@ -0,0 +1,122 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009-2011 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +QObject = +Inherit = QObject +Type = +New = + + + +#include +#include +#include +#include +#include + + +/* + * QSqlDriver ( QObject * parent = 0 ) + * ~QSqlDriver () + */ +HB_FUNC( QT_QSQLDRIVER ) +{ + __HB_RETPTRGC__( NULL ); +} + + + +enum DriverFeature { Transactions, QuerySize, BLOB, Unicode, ..., MultipleResultSets } +enum IdentifierType { FieldName, TableName } +enum StatementType { WhereStatement, SelectStatement, UpdateStatement, InsertStatement, DeleteStatement } + + + +virtual bool beginTransaction () +virtual void close () = 0 +virtual bool commitTransaction () +virtual QSqlResult * createResult () const = 0 +virtual QString escapeIdentifier ( const QString & identifier, IdentifierType type ) const +virtual QString formatValue ( const QSqlField & field, bool trimStrings = false ) const +virtual QVariant handle () const +virtual bool hasFeature ( DriverFeature feature ) const = 0 +virtual bool isOpen () const +bool isOpenError () const +QSqlError lastError () const +virtual bool open ( const QString & db, const QString & user = QString(), const QString & password = QString(), const QString & host = QString(), int port = -1, const QString & options = QString() ) = 0 +virtual QSqlIndex primaryIndex ( const QString & tableName ) const +virtual QSqlRecord record ( const QString & tableName ) const +virtual bool rollbackTransaction () +virtual QString sqlStatement ( StatementType type, const QString & tableName, const QSqlRecord & rec, bool preparedStatement ) const +bool subscribeToNotification ( const QString & name ) +QStringList subscribedToNotifications () const +virtual QStringList tables ( QSql::TableType tableType ) const +bool unsubscribeFromNotification ( const QString & name ) + + + + + + +void notification ( const QString & name ) + + + + + + + diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlError.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlError.qth new file mode 100644 index 0000000000..297e5d9e58 --- /dev/null +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlError.qth @@ -0,0 +1,106 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009-2011 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +QObject = no +Inherit = +Type = +New = + + + +#include + + +/* + * QSqlError ( const QString & driverText = QString(), const QString & databaseText = QString(), ErrorType type = NoError, int number = -1 ) + * QSqlError ( const QSqlError & other ) + * ~QSqlError () + */ +HB_FUNC( QT_QSQLERROR ) +{ + __HB_RETPTRGC__( new QSqlError() ); +} + + + +enum ErrorType { NoError, ConnectionError, StatementError, TransactionError, UnknownError } + + + +QString databaseText () const +QString driverText () const +bool isValid () const +int number () const +void setDatabaseText ( const QString & databaseText ) +void setDriverText ( const QString & driverText ) +void setNumber ( int number ) +void setType ( ErrorType type ) +QString text () const +ErrorType type () const + + + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlField.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlField.qth new file mode 100644 index 0000000000..2a13adda6d --- /dev/null +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlField.qth @@ -0,0 +1,120 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009-2011 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +QObject = no +Inherit = +Type = +New = + + + +#include + + +/* + * QSqlField ( const QString & fieldName = QString(), QVariant::Type type = QVariant::Invalid ) + * QSqlField ( const QSqlField & other ) + * ~QSqlField () + */ +HB_FUNC( QT_QSQLFIELD ) +{ + __HB_RETPTRGC__( new QSqlField() ); +} + + + +enum RequiredStatus { Required, Optional, Unknown } + + + +void clear () +QVariant defaultValue () const +bool isAutoValue () const +bool isGenerated () const +bool isNull () const +bool isReadOnly () const +bool isValid () const +int length () const +QString name () const +int precision () const +RequiredStatus requiredStatus () const +void setAutoValue ( bool autoVal ) +void setDefaultValue ( const QVariant & value ) +void setGenerated ( bool gen ) +void setLength ( int fieldLength ) +void setName ( const QString & name ) +void setPrecision ( int precision ) +void setReadOnly ( bool readOnly ) +void setRequired ( bool required ) +void setRequiredStatus ( RequiredStatus required ) +void setType ( QVariant::Type type ) +void setValue ( const QVariant & value ) +QVariant::Type type () const +QVariant value () cons + + + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlIndex.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlIndex.qth new file mode 100644 index 0000000000..51a99069fc --- /dev/null +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlIndex.qth @@ -0,0 +1,103 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009-2011 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +QObject = no +Inherit = QSqlRecord +Type = +New = + + + +#include + + +/* + * QSqlIndex ( const QString & cursorname = QString(), const QString & name = QString() ) + * QSqlIndex ( const QSqlIndex & other ) + * ~QSqlIndex () + */ +HB_FUNC( QT_QSQLINDEX ) +{ + __HB_RETPTRGC__( new QSqlIndex() ); +} + + + + + + +void append ( const QSqlField & field ) +void append ( const QSqlField & field, bool desc ) +QString cursorName () const +bool isDescending ( int i ) const +QString name () const +void setCursorName ( const QString & cursorName ) +void setDescending ( int i, bool desc ) +void setName ( const QString & name ) + + + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlQuery.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlQuery.qth new file mode 100644 index 0000000000..8eeb5c35cc --- /dev/null +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlQuery.qth @@ -0,0 +1,140 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009-2011 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +QObject = no +Inherit = +Type = +New = + + + +#include +#include +#include +#include +#include +#include + + +/* + * QSqlQuery ( QSqlResult * result ) + * QSqlQuery ( const QString & query = QString(), QSqlDatabase db = QSqlDatabase() ) + * QSqlQuery ( QSqlDatabase db ) + * QSqlQuery ( const QSqlQuery & other ) + * ~QSqlQuery () + */ +HB_FUNC( QT_QSQLQUERY ) +{ + __HB_RETPTRGC__( new QSqlQuery() ); +} + + + +enum BatchExecutionMode { ValuesAsRows, ValuesAsColumns } + + + +void addBindValue ( const QVariant & val, QSql::ParamType paramType = QSql::In ) +int at () const +void bindValue ( const QString & placeholder, const QVariant & val, QSql::ParamType paramType = QSql::In ) +void bindValue ( int pos, const QVariant & val, QSql::ParamType paramType = QSql::In ) +QVariant boundValue ( const QString & placeholder ) const +QVariant boundValue ( int pos ) const +QMap boundValues () const +void clear () +//const QSqlDriver * driver () const +bool exec ( const QString & query ) +bool exec () +bool execBatch ( BatchExecutionMode mode = ValuesAsRows ) +QString executedQuery () const +void finish () +bool first () +bool isActive () const +bool isForwardOnly () const +bool isNull ( int field ) const +bool isSelect () const +bool isValid () const +bool last () +QSqlError lastError () const +QVariant lastInsertId () const +QString lastQuery () const +bool next () +bool nextResult () +int numRowsAffected () const +QSql::NumericalPrecisionPolicy numericalPrecisionPolicy () const +bool prepare ( const QString & query ) +bool previous () +QSqlRecord record () const +//const QSqlResult * result () const +bool seek ( int index, bool relative = false ) +void setForwardOnly ( bool forward ) +void setNumericalPrecisionPolicy ( QSql::NumericalPrecisionPolicy precisionPolicy ) +int size () const +QVariant value ( int index ) const + + + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlQueryModel.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlQueryModel.qth new file mode 100644 index 0000000000..a29ece4bc5 --- /dev/null +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlQueryModel.qth @@ -0,0 +1,113 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009-2011 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +QObject = +Inherit = QAbstractTableModel +Type = +New = + + + +#include +#include +#include +#include + + +/* + * QSqlQueryModel ( QObject * parent = 0 ) + * virtual ~QSqlQueryModel () + * + */ +HB_FUNC( QT_QSQLQUERYMODEL ) +{ + __HB_RETPTRGC__( new QSqlQueryModel() ); +} + + + + + + +virtual bool canFetchMore ( const QModelIndex & parent = QModelIndex() ) const +virtual void clear () +virtual QVariant data ( const QModelIndex & item, int role = Qt::DisplayRole ) const +virtual void fetchMore ( const QModelIndex & parent = QModelIndex() ) +virtual QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const +virtual bool insertColumns ( int column, int count, const QModelIndex & parent = QModelIndex() ) +QSqlError lastError () const +QSqlQuery query () const +QSqlRecord record ( int row ) const +QSqlRecord record () const +virtual bool removeColumns ( int column, int count, const QModelIndex & parent = QModelIndex() ) +virtual int rowCount ( const QModelIndex & parent = QModelIndex() ) const +virtual bool setHeaderData ( int section, Qt::Orientation orientation, const QVariant & value, int role = Qt::EditRole ) +void setQuery ( const QSqlQuery & query ) +void setQuery ( const QString & query, const QSqlDatabase & db = QSqlDatabase() ) + + + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlRecord.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlRecord.qth new file mode 100644 index 0000000000..0ddbb52bc0 --- /dev/null +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlRecord.qth @@ -0,0 +1,120 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009-2011 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +QObject = no +Inherit = +Type = +New = + + + +#include +#include + +/* + * QSqlRecord () + * QSqlRecord ( const QSqlRecord & other ) + * ~QSqlRecord () + */ +HB_FUNC( QT_QSQLRECORD ) +{ + __HB_RETPTRGC__( new QSqlRecord() ); +} + + + + + + +void append ( const QSqlField & field ) +void clear () +void clearValues () +bool contains ( const QString & name ) const +int count () const +QSqlField field ( int index ) const +QSqlField field ( const QString & name ) const +QString fieldName ( int index ) const +int indexOf ( const QString & name ) const +void insert ( int pos, const QSqlField & field ) +bool isEmpty () const +bool isGenerated ( const QString & name ) const +bool isGenerated ( int index ) const +bool isNull ( const QString & name ) const +bool isNull ( int index ) const +void remove ( int pos ) +void replace ( int pos, const QSqlField & field ) +void setGenerated ( const QString & name, bool generated ) +void setGenerated ( int index, bool generated ) +void setNull ( int index ) +void setNull ( const QString & name ) +void setValue ( int index, const QVariant & val ) +void setValue ( const QString & name, const QVariant & val ) +QVariant value ( int index ) const +QVariant value ( const QString & name ) const + + + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlRelationalTableModel.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlRelationalTableModel.qth new file mode 100644 index 0000000000..a05b692dbc --- /dev/null +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlRelationalTableModel.qth @@ -0,0 +1,99 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009-2011 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +QObject = +Inherit = QSqlTableModel +Type = +New = + + + +#include +#include + + +/* + * QSqlRelationalTableModel ( QObject * parent = 0, QSqlDatabase db = QSqlDatabase() ) + * virtual ~QSqlRelationalTableModel () + */ +HB_FUNC( QT_QSQLRELATIONALTABLEMODEL ) +{ + __HB_RETPTRGC__( new QSqlRelationalTableModel() ); +} + + + + + + +QSqlRelation relation ( int column ) const +virtual QSqlTableModel * relationModel ( int column ) const +virtual bool setData ( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole ) +virtual void setRelation ( int column, const QSqlRelation & relation ) + + + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlResult.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlResult.qth new file mode 100644 index 0000000000..52da406cf9 --- /dev/null +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlResult.qth @@ -0,0 +1,94 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009-2011 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +QObject = no +Inherit = +Type = +New = + + + +#include + + +/* + * + */ +HB_FUNC( QT_QSQLRESULT ) +{ + __HB_RETPTRGC__( NULL ); +} + + + + + + +virtual QVariant handle () const + + + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qtsql/qth/QSqlTableModel.qth b/harbour/contrib/hbqt/qtsql/qth/QSqlTableModel.qth new file mode 100644 index 0000000000..e11bca6913 --- /dev/null +++ b/harbour/contrib/hbqt/qtsql/qth/QSqlTableModel.qth @@ -0,0 +1,124 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009-2011 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +; +; Header File to Generate QT Wrapper Sources +; + + +QObject = +Inherit = QSqlQueryModel +Type = +New = + + + +#include +#include + + +/* + * QSqlTableModel ( QObject * parent = 0, QSqlDatabase db = QSqlDatabase() ) + * virtual ~QSqlTableModel () + */ +HB_FUNC( QT_QSQLTABLEMODEL ) +{ + __HB_RETPTRGC__( new QSqlTableModel() ); +} + + + +enum EditStrategy { OnFieldChange, OnRowChange, OnManualSubmit } + + + +QSqlDatabase database () const +EditStrategy editStrategy () const +int fieldIndex ( const QString & fieldName ) const +QString filter () const +bool insertRecord ( int row, const QSqlRecord & record ) +virtual bool insertRows ( int row, int count, const QModelIndex & parent = QModelIndex() ) +bool isDirty ( const QModelIndex & index ) const +QSqlIndex primaryKey () const +virtual bool removeColumns ( int column, int count, const QModelIndex & parent = QModelIndex() ) +virtual bool removeRows ( int row, int count, const QModelIndex & parent = QModelIndex() ) +virtual void revertRow ( int row ) +virtual bool select () +virtual bool setData ( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole ) +virtual void setEditStrategy ( EditStrategy strategy ) +virtual void setFilter ( const QString & filter ) +bool setRecord ( int row, const QSqlRecord & record ) +virtual void setSort ( int column, Qt::SortOrder order ) +virtual void setTable ( const QString & tableName ) +virtual void sort ( int column, Qt::SortOrder order ) +QString tableName () const + + + +virtual void revert () +void revertAll () +virtual bool submit () +bool submitAll () + + + +void beforeDelete ( int row ) +void beforeInsert ( QSqlRecord & record ) +void beforeUpdate ( int row, QSqlRecord & record ) +void primeInsert ( int row, QSqlRecord & record ) + + + + + + + diff --git a/harbour/contrib/hbqt/qtsql/qth/filelist.hbm b/harbour/contrib/hbqt/qtsql/qth/filelist.hbm new file mode 100644 index 0000000000..5e050e8dff --- /dev/null +++ b/harbour/contrib/hbqt/qtsql/qth/filelist.hbm @@ -0,0 +1,22 @@ +# +# $Id$ +# + +-pflag=-qtver=0x040500 +-pflag=-qtmodule=qtsql +-pflag=-qthdocdir=../doc/ + +QSqlDatabase.qth +QSqlQuery.qth +QSqlError.qth +QSqlIndex.qth +QSqlRecord.qth +QSqlDriver.qth +QSqlResult.qth +QSqlField.qth +QSqlQueryModel.qth +QSqlTableModel.qth +QSqlRelationalTableModel.qth + + +