2010-07-22 16:58 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

- contrib/hbqt/hbqt_hbdbfmodel.cpp
  * contrib/hbqt/generator/qt45.qtp
  - contrib/hbqt/qth/HBDbfModel.qth
  - contrib/hbqt/qtcore/THBDbfModel.prg
  * contrib/hbqt/qtcore/filelist.hbm
  - contrib/hbqt/qtcore/HBDbfModel.cpp
  - contrib/hbqt/doc/en/class_hbdbfmodel.txt
  * contrib/hbqt/hbqt.h
  - contrib/hbqt/hbqt_hbdbfmodel.h
  * contrib/hbqt/hbqt_garbage.h
  * contrib/hbqt/hbqt.hbm
    - Deleted now obsolete DBFMODEL.

  * src/rtl/gtcrs/gtcrs.h
    * Minor formatting. (from patch by Tamas Tevesz)

  * config/detect.mk
    ! Fixed autodetection of curses under Cygwin.
      Requires Cygwin sh shell to work.
      Patch by Tamas Tevesz.

  * utils/hbmk2/hbmk2.pt_BR.po
  * utils/hbmk2/hbmk2.hu_HU.po
  * utils/hbmk2/hbmk2.prg
    * Minor.
This commit is contained in:
Viktor Szakats
2010-07-22 14:59:03 +00:00
parent 66d5a12c2f
commit 29bb18fba1
17 changed files with 38 additions and 886 deletions

View File

@@ -16,6 +16,33 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-07-22 16:58 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
- contrib/hbqt/hbqt_hbdbfmodel.cpp
* contrib/hbqt/generator/qt45.qtp
- contrib/hbqt/qth/HBDbfModel.qth
- contrib/hbqt/qtcore/THBDbfModel.prg
* contrib/hbqt/qtcore/filelist.hbm
- contrib/hbqt/qtcore/HBDbfModel.cpp
- contrib/hbqt/doc/en/class_hbdbfmodel.txt
* contrib/hbqt/hbqt.h
- contrib/hbqt/hbqt_hbdbfmodel.h
* contrib/hbqt/hbqt_garbage.h
* contrib/hbqt/hbqt.hbm
- Deleted now obsolete DBFMODEL.
* src/rtl/gtcrs/gtcrs.h
* Minor formatting. (from patch by Tamas Tevesz)
* config/detect.mk
! Fixed autodetection of curses under Cygwin.
Requires Cygwin sh shell to work.
Patch by Tamas Tevesz.
* utils/hbmk2/hbmk2.pt_BR.po
* utils/hbmk2/hbmk2.hu_HU.po
* utils/hbmk2/hbmk2.prg
* Minor.
2010-07-22 14:45 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/make.hbs
+ contrib/pkglist

View File

@@ -103,7 +103,7 @@ _DET_VAR_INC_ := HB_INC_CURSES
_DET_VAR_HAS_ := HB_HAS_CURSES
_DET_FLT_PLAT := !os2
_DET_FLT_COMP :=
_DET_INC_DEFP := /usr/include /usr/local/include /sw/include /opt/local/include /boot/develop/headers/3rdparty
_DET_INC_DEFP := /usr/include /usr/include/ncurses /usr/local/include /sw/include /opt/local/include /boot/develop/headers/3rdparty
_DET_INC_HEAD := /curses.h
ifeq ($(HB_COMPILER),djgpp)

View File

@@ -1,56 +0,0 @@
/*
* hbQTgen v1.0 - Harbour Callable Wrappers Generator for Qt v4.5+
* Please do not modify this document as it is subject to change in future.
* Pritpal Bedi <bedipritpal@hotmail.com>
*/
/* $DOC$
$TEMPLATE$
Class
$NAME$
HBDbfModel()
$CATEGORY$
Harbour Bindings for Qt
$SUBCATEGORY$
GUI
$EXTERNALLINK$
http://doc.trolltech.com/4.5/hbdbfmodel.html
$ONELINER$
Creates a new HBDbfModel object.
$INHERITS$
QAbstractItemModel
$SYNTAX$
HBDbfModel():new( ... )
HBDbfModel():from( pPtr_OR_oObj_of_type_HBDbfModel )
HBDbfModel():configure( pPtr_OR_oObj_of_type_HBDbfModel )
$ARGUMENTS$
$RETURNS$
An instance of the object of type HBDbfModel
$METHODS$
:hbSetRowColumns( nRows, nCols ) -> NIL
:reset() -> NIL
:index( nRow, nColumn, pParent ) -> pQModelIndex
$DESCRIPTION$
$EXAMPLES$
$TESTS$
$STATUS$
R
$COMPLIANCE$
Not Clipper Compatible
$PLATFORMS$
Windows, Linux, MacOS, OS2
$VERSION$
4.5 or upper
$FILES$
Prg source : contrib/hbqt/qtcore/THBDbfModel.prg
C++ wrappers : contrib/hbqt/qtcore/HBDbfModel.cpp
Library : hbqtcore
$SEEALSO$
QAbstractItemModel
$END$
*/

View File

@@ -15,7 +15,6 @@
-D=../doc
HBQAbstractItemModel.qth
HBDbfModel.qth
HBEvents.qth
HBQMainWindow.qth
HBQPlainTextEdit.qth
@@ -299,5 +298,3 @@ QWindowsStyle.qth
QWindowStateChangeEvent.qth
QWizard.qth
QWizardPage.qth

View File

@@ -393,7 +393,6 @@ extern void * hbqt_pPtrFromItem( PHB_ITEM pObj );
#define hbqt_par_QWizardPage( n ) ( ( QWizardPage * ) hbqt_gcpointer( n ) )
#define hbqt_par_QWSEvent( n ) ( ( QWSEvent * ) hbqt_gcpointer( n ) )
#define hbqt_par_HBDbfModel( n ) ( ( HBDbfModel * ) hbqt_gcpointer( n ) )
#define hbqt_par_HBQAbstractItemModel( n ) ( ( HBQAbstractItemModel * ) hbqt_gcpointer( n ) )
#define hbqt_par_HBEvents( n ) ( ( HBEvents * ) hbqt_gcpointer( n ) )
#define hbqt_par_HBQMainWindow( n ) ( ( HBQMainWindow * ) hbqt_gcpointer( n ) )
@@ -709,7 +708,6 @@ extern void * hbqt_pPtrFromItem( PHB_ITEM pObj );
#define HBQT_TYPE_QWizardPage 1295
#define HBQT_TYPE_QWSEvent 1296
#define HBQT_TYPE_HBDbfModel 1401
#define HBQT_TYPE_HBQAbstractItemModel 1402
#define HBQT_TYPE_HBEvents 1403
#define HBQT_TYPE_HBQMainWindow 1404

View File

@@ -12,7 +12,6 @@ hbqt_common.hbm
hbqt_base.cpp
hbqt_destruct.cpp
hbqt_hbqabstractitemmodel.cpp
hbqt_hbdbfmodel.cpp
hbqt_hbevents.cpp
hbqt_hbqmainwindow.cpp
hbqt_hbqplaintextedit.cpp
@@ -25,7 +24,6 @@ hbqt_errorsys.prg
THbQtUI.prg
hbqt_hbqabstractitemmodel.h
hbqt_hbdbfmodel.h
hbqt_hbevents.h
hbqt_hbqmainwindow.h
hbqt_hbqplaintextedit.h

View File

@@ -9,7 +9,6 @@
/* -------------------------------------------------------------------- */
extern QT_G_FUNC( hbqt_gcRelease_HBQAbstractItemModel );
extern QT_G_FUNC( hbqt_gcRelease_HBDbfModel );
extern QT_G_FUNC( hbqt_gcRelease_HBEvents );
extern QT_G_FUNC( hbqt_gcRelease_HBQMainWindow );
extern QT_G_FUNC( hbqt_gcRelease_HBQPlainTextEdit );
@@ -292,7 +291,6 @@ extern QT_G_FUNC( hbqt_gcRelease_QWizard );
extern QT_G_FUNC( hbqt_gcRelease_QWizardPage );
extern void * hbqt_gcAllocate_HBQAbstractItemModel( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_HBDbfModel( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_HBEvents( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_HBQMainWindow( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_HBQPlainTextEdit( void * pObj, bool bNew );
@@ -573,4 +571,3 @@ extern void * hbqt_gcAllocate_QWindowsStyle( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QWindowStateChangeEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QWizard( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QWizardPage( void * pObj, bool bNew );

View File

@@ -1,323 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* QT wrapper main header
*
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
* www - 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.
*
*/
/*----------------------------------------------------------------------*/
#include "hbqt.h"
#include "hbapiitm.h"
#include "hbvm.h"
#if QT_VERSION >= 0x040500
#include "hbqt_hbdbfmodel.h"
#include <QtGui/QIcon>
#include <QtGui/QWidget>
#define HBQT_BRW_CELLVALUE 1001
#define HBQT_BRW_COLCOUNT 1002
#define HBQT_BRW_ROWCOUNT 1003
#define HBQT_BRW_COLHEADER 1004
#define HBQT_BRW_COLALIGN 1006
#define HBQT_BRW_COLFGCOLOR 1007
#define HBQT_BRW_COLBGCOLOR 1008
#define HBQT_BRW_COLHEIGHT 1011
#define HBQT_BRW_ROWHEADER 1005
#define HBQT_BRW_DATFGCOLOR 1009
#define HBQT_BRW_DATBGCOLOR 1010
#define HBQT_BRW_DATHEIGHT 1012
#define HBQT_BRW_DATALIGN 1013
#define HBQT_BRW_CELLDECORATION 1014
static QVariant hbqt_fetchRole( PHB_ITEM block, int what, int par1, int par2 )
{
QVariant vv;
if( hb_vmRequestReenter() )
{
PHB_ITEM p0 = hb_itemPutNI( NULL, what );
PHB_ITEM p1 = hb_itemPutNI( NULL, par1 );
PHB_ITEM p2 = hb_itemPutNI( NULL, par2 );
PHB_ITEM ret = hb_vmEvalBlockV( block, 3, p0, p1, p2 );
hb_itemRelease( p0 );
hb_itemRelease( p1 );
hb_itemRelease( p2 );
if( hb_itemType( ret ) & HB_IT_STRING )
{
vv = hb_itemGetCPtr( ret );
HB_TRACE( HB_TR_DEBUG, ( " fetchRole[ s = %s ]", hb_itemGetCPtr( ret ) ) );
}
else if( hb_itemType( ret ) & HB_IT_LOGICAL )
{
vv = hb_itemGetL( ret );
HB_TRACE( HB_TR_DEBUG, ( " fetchRole[ l = %i ]", hb_itemGetL( ret ) ) );
}
else if( hb_itemType( ret ) & HB_IT_DOUBLE )
{
vv = hb_itemGetND( ret );
HB_TRACE( HB_TR_DEBUG, ( " fetchRole[ d = %f ]", hb_itemGetND( ret ) ) );
}
else if( hb_itemType( ret ) & HB_IT_NUMERIC )
{
vv = hb_itemGetNI( ret );
HB_TRACE( HB_TR_DEBUG, ( " fetchRole[ n = %i ]", hb_itemGetNI( ret ) ) );
}
#if 0
else if( hb_itemType( ret ) & HB_IT_OBJECT )
{
hb_vmPushSymbol( hb_dynsymSymbol( hb_dynsymFindName( "PPTR" ) ) );
hb_vmPush( ret );
hb_vmSend( 0 );
QGC_POINTER * p = ( QGC_POINTER * ) hb_parptrGC( hbqt_gcFuncs(), -1 );
vv = qvariant_cast<QColor *>( * ( ( QColor * ) ( p->ph ) ) );
}
#endif
else
{
vv = QVariant();
}
hb_vmRequestRestore();
}
return vv;
}
HBDbfModel::HBDbfModel( PHB_ITEM pBlock ) : QAbstractItemModel()
{
block = hb_itemNew( pBlock );
iRows = 0;
iCols = 0;
}
HBDbfModel::~HBDbfModel( void )
{
if( block )
{
hb_itemRelease( block );
block = NULL;
}
}
Qt::ItemFlags HBDbfModel::flags( const QModelIndex & index ) const
{
if( ! index.isValid() )
return 0;
return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
}
QVariant HBDbfModel::data( const QModelIndex & index, int role ) const
{
HB_TRACE( HB_TR_DEBUG, ( "HBDbfModel::data( row=%i col=%i role=%i )", index.row(), index.column(), role ) );
if( !index.isValid() )
return QVariant();
switch( role )
{
case Qt::SizeHintRole:
{
int iHeight = hbqt_fetchRole( block, HBQT_BRW_DATHEIGHT, index.row()+1, index.column()+1 ).toInt();
return QSize( 20, iHeight );
}
case Qt::TextAlignmentRole:
{
return hbqt_fetchRole( block, HBQT_BRW_DATALIGN, index.row()+1, index.column()+1 );
}
case Qt::BackgroundRole:
{
int iClr = hbqt_fetchRole( block, HBQT_BRW_DATBGCOLOR, index.row()+1, index.column()+1 ).toInt();
if( iClr < 25 )
return QColor( ( Qt::GlobalColor ) iClr );
else
return QColor( ( QRgb ) iClr );
}
case Qt::ForegroundRole:
{
int iClr = hbqt_fetchRole( block, HBQT_BRW_DATFGCOLOR, index.row()+1, index.column()+1 ).toInt();
if( iClr < 25 )
return QColor( ( Qt::GlobalColor ) iClr );
else
return QColor( ( QRgb ) iClr );
}
case Qt::DecorationRole:
{
QVariant image = hbqt_fetchRole( block, HBQT_BRW_CELLDECORATION, index.row()+1, index.column()+1 );
if( image.toString() == ( QString ) "" )
return QVariant();
return QIcon( image.toString() );
//return QPixmap( image.toString() );
}
case Qt::DisplayRole:
{
return hbqt_fetchRole( block, HBQT_BRW_CELLVALUE, index.row()+1, index.column()+1 );
}
}
return QVariant();
}
QVariant HBDbfModel::headerData( int section, Qt::Orientation orientation, int role ) const
{
HB_TRACE( HB_TR_DEBUG, ( "HBDbfModel::headerData( section=%i orient=%i role=%i )", section, orientation, role ) );
if( orientation == Qt::Horizontal )
{
switch( role )
{
case Qt::TextAlignmentRole:
{
return hbqt_fetchRole( block, HBQT_BRW_COLALIGN, 0, section+1 ).toInt();
}
case Qt::SizeHintRole:
{
int iHeight = hbqt_fetchRole( block, HBQT_BRW_COLHEIGHT, 0, section+1 ).toInt();
return QSize( 20, iHeight );
}
case Qt::BackgroundRole:
{
int iClr = hbqt_fetchRole( block, HBQT_BRW_COLBGCOLOR, 0, section+1 ).toInt();
if( iClr < 25 )
return QColor( ( Qt::GlobalColor ) iClr );
else
return QColor( ( QRgb ) iClr );
}
case Qt::ForegroundRole:
{
int iClr = hbqt_fetchRole( block, HBQT_BRW_COLFGCOLOR, 0, section+1 ).toInt();
if( iClr < 25 )
return QColor( ( Qt::GlobalColor ) iClr );
else
return QColor( ( QRgb ) iClr );
}
case Qt::DisplayRole:
{
return hbqt_fetchRole( block, HBQT_BRW_COLHEADER, 0, section+1 );
}
case Qt::FontRole:
case Qt::DecorationRole:
break;
}
}
if( orientation == Qt::Vertical && role == Qt::DisplayRole )
{
return section + 1;
}
return QVariant();
}
int HBDbfModel::rowCount( const QModelIndex & /*parent = QModelIndex()*/ ) const
{
if( hb_vmRequestReenter() )
{
PHB_ITEM p0 = hb_itemPutNI( NULL, HBQT_BRW_ROWCOUNT );
int result = hb_itemGetNI( hb_vmEvalBlockV( block, 1, p0 ) );
hb_itemRelease( p0 );
hb_vmRequestRestore();
return result;
}
else
return 0;
}
int HBDbfModel::columnCount( const QModelIndex & /*parent = QModelIndex()*/ ) const
{
if( hb_vmRequestReenter() )
{
PHB_ITEM p0 = hb_itemPutNI( NULL, HBQT_BRW_COLCOUNT );
int result = hb_itemGetNI( hb_vmEvalBlockV( block, 1, p0 ) );
hb_itemRelease( p0 );
hb_vmRequestRestore();
return result;
}
else
return 0;
}
QModelIndex HBDbfModel::index( int row, int column, const QModelIndex & parent ) const
{
HB_SYMBOL_UNUSED( parent );
return createIndex( row, column, row * column );
}
QModelIndex HBDbfModel::parent( const QModelIndex & /* child */ ) const
{
return QModelIndex();
}
void HBDbfModel::reset()
{
QAbstractItemModel::reset();
}
void HBDbfModel::hbSetRowColumns( int rows, int cols )
{
iRows = rows;
iCols = cols;
}
#endif

View File

@@ -1,89 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* QT wrapper main header
*
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
* www - 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 HBQT_HBDBFMODEL_H
#define HBQT_HBDBFMODEL_H
#include "hbapi.h"
/*----------------------------------------------------------------------*/
#include <QtCore/QAbstractItemModel>
#include <QtCore/QPointer>
class HBDbfModel : public QAbstractItemModel
{
Q_OBJECT
public:
HBDbfModel( PHB_ITEM pBlock );
virtual ~HBDbfModel( void );
PHB_ITEM block;
int iRows;
int iCols;
void hbSetRowColumns( int rows, int cols );
Qt::ItemFlags flags( const QModelIndex & index ) const;
QVariant data( const QModelIndex & index, int role = Qt::DisplayRole ) const;
QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
int rowCount( const QModelIndex & parent = QModelIndex() ) const;
int columnCount( const QModelIndex & parent = QModelIndex() ) const;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
QModelIndex parent(const QModelIndex &child) const;
void reset();
};
/*----------------------------------------------------------------------*/
#endif

View File

@@ -1,198 +0,0 @@
/*
* $Id$
*/
/* -------------------------------------------------------------------- */
/* WARNING: Automatically generated source file. DO NOT EDIT! */
/* Instead, edit corresponding .qth file, */
/* or the generator tool itself, and run regenarate. */
/* -------------------------------------------------------------------- */
/*
* Harbour Project source code:
* QT wrapper main header
*
* Copyright 2009-2010 Pritpal Bedi <pritpal@vouchcac.com>
*
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot com>
* www - 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.
*
*/
/*----------------------------------------------------------------------*/
#include "../hbqt.h"
/*----------------------------------------------------------------------*/
#if QT_VERSION >= 0x040500
/*----------------------------------------------------------------------*/
#include <QtCore/QPointer>
#include <QtCore/QAbstractItemModel>
#include "../hbqt_hbdbfmodel.h"
/*
*
*
*/
typedef struct
{
QPointer< HBDbfModel > ph;
bool bNew;
QT_G_FUNC_PTR func;
int type;
} QGC_POINTER_HBDbfModel;
QT_G_FUNC( hbqt_gcRelease_HBDbfModel )
{
HBDbfModel * ph = NULL ;
QGC_POINTER_HBDbfModel * p = ( QGC_POINTER_HBDbfModel * ) Cargo;
if( p && p->bNew && p->ph )
{
ph = p->ph;
if( ph )
{
const QMetaObject * m = ( ph )->metaObject();
if( ( QString ) m->className() != ( QString ) "QObject" )
{
HB_TRACE( HB_TR_DEBUG, ( "ph=%p %p YES_rel_HBDbfModel /.\\ ", (void*) ph, (void*) p->ph ) );
delete ( p->ph );
HB_TRACE( HB_TR_DEBUG, ( "ph=%p %p YES_rel_HBDbfModel \\./ ", (void*) ph, (void*) p->ph ) );
p->ph = NULL;
}
else
{
HB_TRACE( HB_TR_DEBUG, ( "ph=%p NO__rel_HBDbfModel ", ph ) );
p->ph = NULL;
}
}
else
{
HB_TRACE( HB_TR_DEBUG, ( "ph=%p DEL_rel_HBDbfModel : Object already deleted!", ph ) );
p->ph = NULL;
}
}
else
{
HB_TRACE( HB_TR_DEBUG, ( "ph=%p PTR_rel_HBDbfModel : Object not created with new=true", ph ) );
p->ph = NULL;
}
}
void * hbqt_gcAllocate_HBDbfModel( void * pObj, bool bNew )
{
QGC_POINTER_HBDbfModel * p = ( QGC_POINTER_HBDbfModel * ) hb_gcAllocate( sizeof( QGC_POINTER_HBDbfModel ), hbqt_gcFuncs() );
new( & p->ph ) QPointer< HBDbfModel >( ( HBDbfModel * ) pObj );
p->bNew = bNew;
p->func = hbqt_gcRelease_HBDbfModel;
p->type = HBQT_TYPE_HBDbfModel;
if( bNew )
{
HB_TRACE( HB_TR_DEBUG, ( "ph=%p _new_HBDbfModel under p->pq", pObj ) );
}
else
{
HB_TRACE( HB_TR_DEBUG, ( "ph=%p NOT_new_HBDbfModel", pObj ) );
}
return p;
}
HB_FUNC( QT_HBDBFMODEL )
{
HBDbfModel * pObj = NULL;
pObj = new HBDbfModel( ( PHB_ITEM ) hb_param( 1, HB_IT_BLOCK ) ) ;
hb_retptrGC( hbqt_gcAllocate_HBDbfModel( ( void * ) pObj, true ) );
}
/*
* void hbSetRowColumns( int rows, int cols )
*/
HB_FUNC( QT_HBDBFMODEL_HBSETROWCOLUMNS )
{
HBDbfModel * p = hbqt_par_HBDbfModel( 1 );
if( p )
( p )->hbSetRowColumns( hb_parni( 2 ), hb_parni( 3 ) );
else
{
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_HBDBFMODEL_HBSETROWCOLUMNS FP=( p )->hbSetRowColumns( hb_parni( 2 ), hb_parni( 3 ) ); p is NULL" ) );
}
}
/*
* void reset()
*/
HB_FUNC( QT_HBDBFMODEL_RESET )
{
HBDbfModel * p = hbqt_par_HBDbfModel( 1 );
if( p )
( p )->reset();
else
{
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_HBDBFMODEL_RESET FP=( p )->reset(); p is NULL" ) );
}
}
/*
* QModelIndex index( int row, int column, const QModelIndex & parent = QModelIndex() ) const
*/
HB_FUNC( QT_HBDBFMODEL_INDEX )
{
HBDbfModel * p = hbqt_par_HBDbfModel( 1 );
if( p )
hb_retptrGC( hbqt_gcAllocate_QModelIndex( new QModelIndex( ( p )->index( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QModelIndex( 4 ) : QModelIndex() ) ) ), true ) );
else
{
HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_HBDBFMODEL_INDEX FP=hb_retptrGC( hbqt_gcAllocate_QModelIndex( new QModelIndex( ( p )->index( hb_parni( 2 ), hb_parni( 3 ), ( HB_ISPOINTER( 4 ) ? *hbqt_par_QModelIndex( 4 ) : QModelIndex() ) ) ), true ) ); p is NULL" ) );
}
}
/*----------------------------------------------------------------------*/
#endif /* #if QT_VERSION >= 0x040500 */
/*----------------------------------------------------------------------*/

View File

@@ -1,96 +0,0 @@
/*
* $Id$
*/
/* -------------------------------------------------------------------- */
/* WARNING: Automatically generated source file. DO NOT EDIT! */
/* Instead, edit corresponding .qth file, */
/* or the generator tool itself, and run regenarate. */
/* -------------------------------------------------------------------- */
/*
* Harbour Project source code:
* QT wrapper main header
*
* Copyright 2009-2010 Pritpal Bedi <pritpal@vouchcac.com>
*
* Copyright 2009 Marcos Antonio Gambeta <marcosgambeta at gmail dot com>
* www - 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.
*
*/
/*----------------------------------------------------------------------*/
#include "hbclass.ch"
CREATE CLASS HBDbfModel INHERIT HbQtObjectHandler, QAbstractItemModel
METHOD new( ... )
METHOD hbSetRowColumns( nRows, nCols )
METHOD reset()
METHOD index( nRow, nColumn, pParent )
ENDCLASS
METHOD HBDbfModel:new( ... )
LOCAL p
FOR EACH p IN { ... }
hb_pvalue( p:__enumIndex(), hbqt_ptr( p ) )
NEXT
::pPtr := Qt_HBDbfModel( ... )
RETURN Self
METHOD HBDbfModel:hbSetRowColumns( nRows, nCols )
RETURN Qt_HBDbfModel_hbSetRowColumns( ::pPtr, nRows, nCols )
METHOD HBDbfModel:reset()
RETURN Qt_HBDbfModel_reset( ::pPtr )
METHOD HBDbfModel:index( nRow, nColumn, pParent )
RETURN Qt_HBDbfModel_index( ::pPtr, nRow, nColumn, hbqt_ptr( pParent ) )

View File

@@ -9,7 +9,6 @@
# --------------------------------------------------------------------
HBQAbstractItemModel.cpp
HBDbfModel.cpp
HBEvents.cpp
HBSlots.cpp
QAbstractItemModel.cpp
@@ -64,7 +63,6 @@ QUrl.cpp
QVariant.cpp
THBQAbstractItemModel.prg
THBDbfModel.prg
THBEvents.prg
THBSlots.prg
TQAbstractItemModel.prg

View File

@@ -1,98 +0,0 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
* QT Source Generator for Harbour
*
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
* 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
;
<CLASS>
QObject =
Inherits = QAbstractItemModel
Type =
New =
</CLASS>
<SUBCLASS>
</SUBCLASS>
<DOC>
</DOC>
<CODE>
#include <QtCore/QAbstractItemModel>
#include "../hbqt_hbdbfmodel.h"
/*
*
*
*/
HB_FUNC( QT_HBDBFMODEL )
{
hb_retptr( new HBDbfModel( ( PHB_ITEM ) hb_param( 1, HB_IT_BLOCK ) ) );
}
</CODE>
<ENUMS>
</ENUMS>
<PROTOS>
void hbSetRowColumns( int rows, int cols )
void reset()
QModelIndex index( int row, int column, const QModelIndex & parent = QModelIndex() ) const
</PROTOS>
<SLOTS>
</SLOTS>
<SIGNALS>
</SIGNALS>

View File

@@ -97,7 +97,7 @@
# if defined( __NetBSD__ )
# include <termcap.h>
# define tigetnum(id) tgetnum(id)
# define tigetstr(id) tgetstr(id,NULL)
# define tigetstr(id) tgetstr(id, NULL)
# endif
# elif defined( HB_OS_BSD )
# include <libutil.h> /* for openpty and forkpty */

View File

@@ -224,12 +224,12 @@ msgstr "Gener
#: hbmk2.prg:7941
#, c-format
msgid "convert .xbp (xbuild) project file to .hbp file"
msgid "convert .xbp (xbuild) project <file> to .hbp file"
msgstr ".xbp (xbuild) project állomány konvertálása .hbp állományba"
#: hbmk2.prg:7941
#, c-format
msgid "convert .xhp (xMate) project file to .hbp file"
msgid "convert .xhp (xMate) project <file> to .hbp file"
msgstr ".xhp (xMate) project állomány konvertálása .hbp állományba"
#: hbmk2.prg:7959
@@ -484,7 +484,7 @@ msgstr ""
#: hbmk2.prg:7941
#, c-format
msgid "convert hbmake project file to .hbp file"
msgid "convert hbmake project <file> to .hbp file"
msgstr ""
#: hbmk2.prg:7941

View File

@@ -10879,9 +10879,9 @@ STATIC PROCEDURE ShowHelp( hbmk, lLong )
{ "-blinker" , "" },;
{ "-exospace" , I_( "emulate Clipper compatible linker behavior\ncreate link/copy hbmk2 to rtlink/blinker/exospace for the same effect" ) },;
NIL,;
{ "-hbmake=<file>" , I_( "convert hbmake project file to .hbp file" ) },;
{ "-xbp=<file>" , I_( "convert .xbp (xbuild) project file to .hbp file" ) },;
{ "-xhp=<file>" , I_( "convert .xhp (xMate) project file to .hbp file" ) },;
{ "-hbmake=<file>" , I_( "convert hbmake project <file> to .hbp file" ) },;
{ "-xbp=<file>" , I_( "convert .xbp (xbuild) project <file> to .hbp file" ) },;
{ "-xhp=<file>" , I_( "convert .xhp (xMate) project <file> to .hbp file" ) },;
NIL,;
{ "--hbdirbin" , I_( "output Harbour binary directory" ) },;
{ "--hbdirdyn" , I_( "output Harbour dynamic library directory" ) },;

View File

@@ -333,7 +333,7 @@ msgstr ""
#: hbmk2.prg:7942
#, c-format
msgid "convert .xhp (xMate) project file to .hbp file"
msgid "convert .xhp (xMate) project <file> to .hbp file"
msgstr "converte um projeto .xhp (xMate) em um arquivo .hbp"
#: hbmk2.prg:4451
@@ -510,9 +510,6 @@ msgstr "Multiplos par
msgid "Regular Harbour compiler options are also accepted.\\n(see them with -harbourhelp option)"
msgstr "Opções usadas com o compilador Harbour também são aceitas."
#
# This file is generated by Harbour 2.0.0beta2 (Rev. 12115)
#
#: hbmk2.prg:7960
#, c-format
msgid ".hbc options (they should come in separate lines): libs=[<libname[s]>], hbcs=[<.hbc file[s]>], gt=[gtname], syslibs=[<libname[s]>], prgflags=[Harbour flags], cflags=[C compiler flags], resflags=[resource compiler flags], ldflags=[linker flags], pflags=[flags for plugins], libpaths=[paths], sources=[source files], psources=[source files for plugins], incpaths=[paths], instfiles=[files], instpaths=[paths], autohbcs=[<.ch>:<.hbc>], plugins=[plugins], gui|mt|shared|nulrdd|debug|opt|map|implib|hbcppmm|strip|run|inc=[yes|no], cpp=[yes|no|def], warn=[max|yes|low|no|def], compr=[yes|no|def|min|max], head=[off|partial|full|native], skip=[yes|no], skip=<reason>, stop=<reason>, echo=<text>\nLines starting with '#' char are ignored"
@@ -714,12 +711,12 @@ msgstr "habilitar modo xHb"
#: hbmk2.prg:7942
#, c-format
msgid "convert hbmake project file to .hbp file"
msgid "convert hbmake project <file> to .hbp file"
msgstr "converte um projeto do hbmake em um arquivo .hbp"
#: hbmk2.prg:7942
#, c-format
msgid "convert .xbp (xbuild) project file to .hbp file"
msgid "convert .xbp (xbuild) project <file> to .hbp file"
msgstr "converte um projeto .xbp (xbuild) em um arquivo .hbp"
#: hbmk2.prg:7942