From 29bb18fba128ca6f049195864a5e1f91ae96fa25 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 22 Jul 2010 14:59:03 +0000 Subject: [PATCH] 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. --- harbour/ChangeLog | 27 ++ harbour/config/detect.mk | 2 +- .../contrib/hbqt/doc/en/class_hbdbfmodel.txt | 56 --- harbour/contrib/hbqt/generator/qt45.qtp | 3 - harbour/contrib/hbqt/hbqt.h | 2 - harbour/contrib/hbqt/hbqt.hbm | 2 - harbour/contrib/hbqt/hbqt_garbage.h | 3 - harbour/contrib/hbqt/hbqt_hbdbfmodel.cpp | 323 ------------------ harbour/contrib/hbqt/hbqt_hbdbfmodel.h | 89 ----- harbour/contrib/hbqt/qtcore/HBDbfModel.cpp | 198 ----------- harbour/contrib/hbqt/qtcore/THBDbfModel.prg | 96 ------ harbour/contrib/hbqt/qtcore/filelist.hbm | 2 - harbour/contrib/hbqt/qth/HBDbfModel.qth | 98 ------ harbour/src/rtl/gtcrs/gtcrs.h | 2 +- harbour/utils/hbmk2/hbmk2.hu_HU.po | 6 +- harbour/utils/hbmk2/hbmk2.prg | 6 +- harbour/utils/hbmk2/hbmk2.pt_BR.po | 9 +- 17 files changed, 38 insertions(+), 886 deletions(-) delete mode 100644 harbour/contrib/hbqt/doc/en/class_hbdbfmodel.txt delete mode 100644 harbour/contrib/hbqt/hbqt_hbdbfmodel.cpp delete mode 100644 harbour/contrib/hbqt/hbqt_hbdbfmodel.h delete mode 100644 harbour/contrib/hbqt/qtcore/HBDbfModel.cpp delete mode 100644 harbour/contrib/hbqt/qtcore/THBDbfModel.prg delete mode 100644 harbour/contrib/hbqt/qth/HBDbfModel.qth diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 99ca1c808d..cacbc234d7 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -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 diff --git a/harbour/config/detect.mk b/harbour/config/detect.mk index 7efaf88e3a..1b8e56898a 100644 --- a/harbour/config/detect.mk +++ b/harbour/config/detect.mk @@ -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) diff --git a/harbour/contrib/hbqt/doc/en/class_hbdbfmodel.txt b/harbour/contrib/hbqt/doc/en/class_hbdbfmodel.txt deleted file mode 100644 index 1570a70421..0000000000 --- a/harbour/contrib/hbqt/doc/en/class_hbdbfmodel.txt +++ /dev/null @@ -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 - */ - -/* $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$ - */ diff --git a/harbour/contrib/hbqt/generator/qt45.qtp b/harbour/contrib/hbqt/generator/qt45.qtp index 7519067651..0d5b6e28dc 100644 --- a/harbour/contrib/hbqt/generator/qt45.qtp +++ b/harbour/contrib/hbqt/generator/qt45.qtp @@ -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 - - diff --git a/harbour/contrib/hbqt/hbqt.h b/harbour/contrib/hbqt/hbqt.h index 018b3e679f..95d90db898 100644 --- a/harbour/contrib/hbqt/hbqt.h +++ b/harbour/contrib/hbqt/hbqt.h @@ -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 diff --git a/harbour/contrib/hbqt/hbqt.hbm b/harbour/contrib/hbqt/hbqt.hbm index c46346d841..085878246d 100644 --- a/harbour/contrib/hbqt/hbqt.hbm +++ b/harbour/contrib/hbqt/hbqt.hbm @@ -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 diff --git a/harbour/contrib/hbqt/hbqt_garbage.h b/harbour/contrib/hbqt/hbqt_garbage.h index fecfa5ff66..b6a8731170 100644 --- a/harbour/contrib/hbqt/hbqt_garbage.h +++ b/harbour/contrib/hbqt/hbqt_garbage.h @@ -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 ); - diff --git a/harbour/contrib/hbqt/hbqt_hbdbfmodel.cpp b/harbour/contrib/hbqt/hbqt_hbdbfmodel.cpp deleted file mode 100644 index 7bcdfa3e99..0000000000 --- a/harbour/contrib/hbqt/hbqt_hbdbfmodel.cpp +++ /dev/null @@ -1,323 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * QT wrapper main header - * - * Copyright 2009 Pritpal Bedi - * 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 -#include - -#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 * ) ( 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 diff --git a/harbour/contrib/hbqt/hbqt_hbdbfmodel.h b/harbour/contrib/hbqt/hbqt_hbdbfmodel.h deleted file mode 100644 index b4c085d5ec..0000000000 --- a/harbour/contrib/hbqt/hbqt_hbdbfmodel.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * QT wrapper main header - * - * Copyright 2009 Pritpal Bedi - * 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 -#include - -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 diff --git a/harbour/contrib/hbqt/qtcore/HBDbfModel.cpp b/harbour/contrib/hbqt/qtcore/HBDbfModel.cpp deleted file mode 100644 index 77377f74d1..0000000000 --- a/harbour/contrib/hbqt/qtcore/HBDbfModel.cpp +++ /dev/null @@ -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 - * - * Copyright 2009 Marcos Antonio Gambeta - * 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 - -#include -#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 */ -/*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbqt/qtcore/THBDbfModel.prg b/harbour/contrib/hbqt/qtcore/THBDbfModel.prg deleted file mode 100644 index 3a24cb67f3..0000000000 --- a/harbour/contrib/hbqt/qtcore/THBDbfModel.prg +++ /dev/null @@ -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 - * - * Copyright 2009 Marcos Antonio Gambeta - * 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 ) ) - diff --git a/harbour/contrib/hbqt/qtcore/filelist.hbm b/harbour/contrib/hbqt/qtcore/filelist.hbm index 0ddfd5fb89..9aeb7d0586 100644 --- a/harbour/contrib/hbqt/qtcore/filelist.hbm +++ b/harbour/contrib/hbqt/qtcore/filelist.hbm @@ -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 diff --git a/harbour/contrib/hbqt/qth/HBDbfModel.qth b/harbour/contrib/hbqt/qth/HBDbfModel.qth deleted file mode 100644 index 57d9f99cab..0000000000 --- a/harbour/contrib/hbqt/qth/HBDbfModel.qth +++ /dev/null @@ -1,98 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * QT Source Generator for Harbour - * - * Copyright 2009 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 = -Inherits = QAbstractItemModel -Type = -New = - - - - - - - - - -#include -#include "../hbqt_hbdbfmodel.h" - - -/* - * - * - */ -HB_FUNC( QT_HBDBFMODEL ) -{ - hb_retptr( new HBDbfModel( ( PHB_ITEM ) hb_param( 1, HB_IT_BLOCK ) ) ); -} - - - - - - -void hbSetRowColumns( int rows, int cols ) -void reset() -QModelIndex index( int row, int column, const QModelIndex & parent = QModelIndex() ) const - - - - - - - diff --git a/harbour/src/rtl/gtcrs/gtcrs.h b/harbour/src/rtl/gtcrs/gtcrs.h index bdc3b8d1c1..6dc8ace53b 100644 --- a/harbour/src/rtl/gtcrs/gtcrs.h +++ b/harbour/src/rtl/gtcrs/gtcrs.h @@ -97,7 +97,7 @@ # if defined( __NetBSD__ ) # include # define tigetnum(id) tgetnum(id) -# define tigetstr(id) tgetstr(id,NULL) +# define tigetstr(id) tgetstr(id, NULL) # endif # elif defined( HB_OS_BSD ) # include /* for openpty and forkpty */ diff --git a/harbour/utils/hbmk2/hbmk2.hu_HU.po b/harbour/utils/hbmk2/hbmk2.hu_HU.po index bb9b3f459b..5fddbb51a5 100644 --- a/harbour/utils/hbmk2/hbmk2.hu_HU.po +++ b/harbour/utils/hbmk2/hbmk2.hu_HU.po @@ -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 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 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 to .hbp file" msgstr "" #: hbmk2.prg:7941 diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 57b40c8c21..829c01f825 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -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=" , I_( "convert hbmake project file to .hbp file" ) },; - { "-xbp=" , I_( "convert .xbp (xbuild) project file to .hbp file" ) },; - { "-xhp=" , I_( "convert .xhp (xMate) project file to .hbp file" ) },; + { "-hbmake=" , I_( "convert hbmake project to .hbp file" ) },; + { "-xbp=" , I_( "convert .xbp (xbuild) project to .hbp file" ) },; + { "-xhp=" , I_( "convert .xhp (xMate) project to .hbp file" ) },; NIL,; { "--hbdirbin" , I_( "output Harbour binary directory" ) },; { "--hbdirdyn" , I_( "output Harbour dynamic library directory" ) },; diff --git a/harbour/utils/hbmk2/hbmk2.pt_BR.po b/harbour/utils/hbmk2/hbmk2.pt_BR.po index 2a2f8aaf16..d2946b9414 100644 --- a/harbour/utils/hbmk2/hbmk2.pt_BR.po +++ b/harbour/utils/hbmk2/hbmk2.pt_BR.po @@ -333,7 +333,7 @@ msgstr "" #: hbmk2.prg:7942 #, c-format -msgid "convert .xhp (xMate) project file to .hbp file" +msgid "convert .xhp (xMate) project 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=[], hbcs=[<.hbc file[s]>], gt=[gtname], syslibs=[], 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=, stop=, echo=\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 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 to .hbp file" msgstr "converte um projeto .xbp (xbuild) em um arquivo .hbp" #: hbmk2.prg:7942