From 535abb20efbcb9b7161d0e61a1ea7213acc03ef5 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Thu, 9 Sep 2010 01:49:34 +0000 Subject: [PATCH] 2010-09-08 18:41 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/utils/hbqtgen.prg ! Code cleanup. * contrib/hbqt/utils/qtcore.qtp + Added: two more classes. + contrib/hbqt/qtcore/qth/HBQString.qth ! It is exactly QString() class wrapper. + contrib/hbqt/qtcore/qth/QStringRef.qth + Added: two more classes. * contrib/hbqt/qtcore/qth/QObject.qth - Commented out two methods. * contrib/hbqt/qtcore/g/filelist.hbm * contrib/hbqt/qtcore/g/hbqtcore.h + contrib/hbqt/qtcore/g/QObject.cpp + contrib/hbqt/qtcore/g/QStringRef.cpp + contrib/hbqt/qtcore/g/THBQString.prg + contrib/hbqt/qtcore/g/TQStringRef.prg + Auto-generated. + contrib/hbqt/qtcore/hbqt_hbqstring.cpp + contrib/hbqt/qtcore/hbqt_hbqstring.h * contrib/hbqt/qtcore/hbqtcore.hbm + Added: hbqt_hbqstring.cpp * contrib/hbide/hbqreportsmanager.prg ! Some experiments. --- harbour/ChangeLog | 32 + harbour/contrib/hbide/hbqreportsmanager.prg | 21 +- harbour/contrib/hbqt/qtcore/g/QObject.cpp | 4 +- harbour/contrib/hbqt/qtcore/g/QStringRef.cpp | 428 ++++++++ harbour/contrib/hbqt/qtcore/g/THBQString.prg | 916 ++++++++++++++++++ harbour/contrib/hbqt/qtcore/g/TQStringRef.prg | 176 ++++ harbour/contrib/hbqt/qtcore/g/filelist.hbm | 4 + harbour/contrib/hbqt/qtcore/g/hbqtcore.h | 108 ++- .../contrib/hbqt/qtcore/hbqt_hbqstring.cpp | 97 ++ harbour/contrib/hbqt/qtcore/hbqt_hbqstring.h | 81 ++ harbour/contrib/hbqt/qtcore/hbqtcore.hbm | 1 + harbour/contrib/hbqt/qtcore/qth/HBQString.qth | 316 ++++++ harbour/contrib/hbqt/qtcore/qth/QObject.qth | 4 +- .../contrib/hbqt/qtcore/qth/QStringRef.qth | 137 +++ harbour/contrib/hbqt/utils/hbqtgen.prg | 21 +- harbour/contrib/hbqt/utils/qtcore.qtp | 2 + 16 files changed, 2271 insertions(+), 77 deletions(-) create mode 100644 harbour/contrib/hbqt/qtcore/g/QStringRef.cpp create mode 100644 harbour/contrib/hbqt/qtcore/g/THBQString.prg create mode 100644 harbour/contrib/hbqt/qtcore/g/TQStringRef.prg create mode 100644 harbour/contrib/hbqt/qtcore/hbqt_hbqstring.cpp create mode 100644 harbour/contrib/hbqt/qtcore/hbqt_hbqstring.h create mode 100644 harbour/contrib/hbqt/qtcore/qth/HBQString.qth create mode 100644 harbour/contrib/hbqt/qtcore/qth/QStringRef.qth diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 01f9c758f2..e21c939547 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,38 @@ The license applies to all entries newer than 2009-04-28. */ +2010-09-08 18:41 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbqt/utils/hbqtgen.prg + ! Code cleanup. + + * contrib/hbqt/utils/qtcore.qtp + + Added: two more classes. + + + contrib/hbqt/qtcore/qth/HBQString.qth + ! It is exactly QString() class wrapper. + + contrib/hbqt/qtcore/qth/QStringRef.qth + + Added: two more classes. + + * contrib/hbqt/qtcore/qth/QObject.qth + - Commented out two methods. + + * contrib/hbqt/qtcore/g/filelist.hbm + * contrib/hbqt/qtcore/g/hbqtcore.h + + + contrib/hbqt/qtcore/g/QObject.cpp + + contrib/hbqt/qtcore/g/QStringRef.cpp + + contrib/hbqt/qtcore/g/THBQString.prg + + contrib/hbqt/qtcore/g/TQStringRef.prg + + Auto-generated. + + + contrib/hbqt/qtcore/hbqt_hbqstring.cpp + + contrib/hbqt/qtcore/hbqt_hbqstring.h + * contrib/hbqt/qtcore/hbqtcore.hbm + + Added: hbqt_hbqstring.cpp + + * contrib/hbide/hbqreportsmanager.prg + ! Some experiments. + 2010-09-08 14:36 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbide/idemisc.prg * contrib/hbide/idetools.prg diff --git a/harbour/contrib/hbide/hbqreportsmanager.prg b/harbour/contrib/hbide/hbqreportsmanager.prg index 3d1c2d7e61..20e1dbdc9e 100644 --- a/harbour/contrib/hbide/hbqreportsmanager.prg +++ b/harbour/contrib/hbide/hbqreportsmanager.prg @@ -261,7 +261,6 @@ METHOD HbqReportsManager:create( qParent ) ::buildDesignReport() ::qTabBar:setCurrentIndex( 2 ) - ::oWidget:show() RETURN Self @@ -394,10 +393,6 @@ METHOD HbqReportsManager:buildDesignReport() ::qLayoutD:setStretch( 1,1 ) - ::qWidget1:show() - ::qWidget2:show() - ::qWidget3:show() - RETURN Self /*----------------------------------------------------------------------*/ @@ -1370,20 +1365,22 @@ STATIC FUNCTION fetchBarString( cCode, lCheck, nType ) /*----------------------------------------------------------------------*/ METHOD HbqReportsManager:printPreview( qPrinter ) - LOCAL qDlg + LOCAL qDlg, qInfo, qList, i, qStr qPrinter := QPrinter():new() + + qInfo := QPrinterInfo():new( "QPrinter", qPrinter ) + qList := QList():from( qInfo:availablePrinters() ) + FOR i := 0 TO qList:size() - 1 + qStr := QPrinterInfo():from( qList:at( i ) ) +HB_TRACE( HB_TR_ALWAYS, qList:at( i ), valtype( qList:at( i ) ), qStr:printerName() ) + NEXT qPrinter:setOutputFormat( QPrinter_PdfFormat ) qPrinter:setOrientation( ::qScene:orientation() ) - // qPrinter:setPaperSize( ::qScene:pageSize() ) qPrinter:setPaperSize( QRectF():from( ::qScene:paperRect() ):size() ) // qPrinter:setFullPage( .t. ) - IF !empty( qPrinter ) - qDlg := QPrintPreviewDialog():new( qPrinter, ::qView ) - ELSE - qDlg := QPrintPreviewDialog():new( ::qView ) - ENDIF + qDlg := QPrintPreviewDialog():new( qPrinter, ::qView ) qDlg:connect( "paintRequested(QPrinter)", {|p| ::paintRequested( p ) } ) diff --git a/harbour/contrib/hbqt/qtcore/g/QObject.cpp b/harbour/contrib/hbqt/qtcore/g/QObject.cpp index 6e0ec088a1..cb67090ad7 100644 --- a/harbour/contrib/hbqt/qtcore/g/QObject.cpp +++ b/harbour/contrib/hbqt/qtcore/g/QObject.cpp @@ -71,8 +71,6 @@ * *** Unconvered Prototypes *** * ----------------------------- * - * QList findChildren ( const QString & name = QString() ) const - * QList findChildren ( const QRegExp & regExp ) const * const QMetaObject staticMetaObject * * *** Commented out protos which construct fine but do not compile *** @@ -82,6 +80,8 @@ * // bool disconnect ( const char * signal = 0, const QObject * receiver = 0, const char * method = 0 ) * // bool disconnect ( const QObject * receiver, const char * method = 0 ) * //T findChild ( const QString & name = QString() ) const + * //QList findChildren ( const QString & name = QString() ) const + * //QList findChildren ( const QRegExp & regExp ) const * //virtual const QMetaObject * metaObject () const * // bool connect ( const QObject * sender, const char * signal, const QObject * receiver, const char * method, Qt::ConnectionType type = Qt::AutoConnection ) * // bool disconnect ( const QObject * sender, const char * signal, const QObject * receiver, const char * method ) diff --git a/harbour/contrib/hbqt/qtcore/g/QStringRef.cpp b/harbour/contrib/hbqt/qtcore/g/QStringRef.cpp new file mode 100644 index 0000000000..7fe80f9f51 --- /dev/null +++ b/harbour/contrib/hbqt/qtcore/g/QStringRef.cpp @@ -0,0 +1,428 @@ +/* + * $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 "hbqtcore.h" + +/*----------------------------------------------------------------------*/ +#if QT_VERSION >= 0x040500 +/*----------------------------------------------------------------------*/ + +#include + +#include + + +/* + * QStringRef () + * QStringRef ( const QString * string ) + * QStringRef ( const QStringRef & other ) + * QStringRef ( const QString * string, int position, int length ) + * ~QStringRef () + */ + +typedef struct +{ + QStringRef * ph; + bool bNew; + PHBQT_GC_FUNC func; + int type; +} HBQT_GC_T_QStringRef; + +HBQT_GC_FUNC( hbqt_gcRelease_QStringRef ) +{ + HBQT_GC_T * p = ( HBQT_GC_T * ) Cargo; + + if( p && p->bNew ) + { + if( p->ph ) + { + HB_TRACE( HB_TR_DEBUG, ( "ph=%p _rel_QStringRef /.\\", p->ph ) ); + delete ( ( QStringRef * ) p->ph ); + HB_TRACE( HB_TR_DEBUG, ( "ph=%p YES_rel_QStringRef \\./", p->ph ) ); + p->ph = NULL; + } + else + { + HB_TRACE( HB_TR_DEBUG, ( "ph=%p DEL_rel_QStringRef : Object already deleted!", p->ph ) ); + p->ph = NULL; + } + } + else + { + HB_TRACE( HB_TR_DEBUG, ( "ph=%p PTR_rel_QStringRef : Object not created with new=true", p->ph ) ); + p->ph = NULL; + } +} + +void * hbqt_gcAllocate_QStringRef( void * pObj, bool bNew ) +{ + HBQT_GC_T * p = ( HBQT_GC_T * ) hb_gcAllocate( sizeof( HBQT_GC_T ), hbqt_gcFuncs() ); + + p->ph = ( QStringRef * ) pObj; + p->bNew = bNew; + p->func = hbqt_gcRelease_QStringRef; + p->type = HBQT_TYPE_QStringRef; + + if( bNew ) + { + HB_TRACE( HB_TR_DEBUG, ( "ph=%p _new_QStringRef", pObj ) ); + } + else + { + HB_TRACE( HB_TR_DEBUG, ( "ph=%p NOT_new_QStringRef", pObj ) ); + } + return p; +} + +HB_FUNC( QT_QSTRINGREF ) +{ + QStringRef * pObj = NULL; + + if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) + { + pObj = new QStringRef( ( const QString *) hb_parcx( 1 ) ) ; + } + else if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) ) + { + pObj = new QStringRef( * hbqt_par_QStringRef( 1 ) ) ; + } + else if( hb_pcount() == 3 && HB_ISCHAR( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) + { + pObj = new QStringRef( ( const QString *) hb_parcx( 1 ), hb_parni( 2 ), hb_parni( 3 ) ) ; + } + else + { + pObj = new QStringRef() ; + } + + hb_retptrGC( hbqt_gcAllocate_QStringRef( ( void * ) pObj, true ) ); +} + +/* + * const QChar at ( int position ) const + */ +HB_FUNC( QT_QSTRINGREF_AT ) +{ + QStringRef * p = hbqt_par_QStringRef( 1 ); + if( p ) + hb_retptrGC( hbqt_gcAllocate_QChar( new QChar( ( p )->at( hb_parni( 2 ) ) ), true ) ); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QSTRINGREF_AT FP=hb_retptrGC( hbqt_gcAllocate_QChar( new QChar( ( p )->at( hb_parni( 2 ) ) ), true ) ); p is NULL" ) ); + } +} + +/* + * void clear () + */ +HB_FUNC( QT_QSTRINGREF_CLEAR ) +{ + QStringRef * p = hbqt_par_QStringRef( 1 ); + if( p ) + ( p )->clear(); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QSTRINGREF_CLEAR FP=( p )->clear(); p is NULL" ) ); + } +} + +/* + * int compare ( const QString & other, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const + */ +HB_FUNC( QT_QSTRINGREF_COMPARE ) +{ + QStringRef * p = hbqt_par_QStringRef( 1 ); + if( p ) + hb_retni( ( p )->compare( hbqt_par_QString( 2 ), ( HB_ISNUM( 3 ) ? ( Qt::CaseSensitivity ) hb_parni( 3 ) : ( Qt::CaseSensitivity ) Qt::CaseSensitive ) ) ); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QSTRINGREF_COMPARE FP=hb_retni( ( p )->compare( hbqt_par_QString( 2 ), ( HB_ISNUM( 3 ) ? ( Qt::CaseSensitivity ) hb_parni( 3 ) : ( Qt::CaseSensitivity ) Qt::CaseSensitive ) ) ); p is NULL" ) ); + } +} + +/* + * int compare ( const QStringRef & other, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const + */ +HB_FUNC( QT_QSTRINGREF_COMPARE_1 ) +{ + QStringRef * p = hbqt_par_QStringRef( 1 ); + if( p ) + hb_retni( ( p )->compare( *hbqt_par_QStringRef( 2 ), ( HB_ISNUM( 3 ) ? ( Qt::CaseSensitivity ) hb_parni( 3 ) : ( Qt::CaseSensitivity ) Qt::CaseSensitive ) ) ); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QSTRINGREF_COMPARE_1 FP=hb_retni( ( p )->compare( *hbqt_par_QStringRef( 2 ), ( HB_ISNUM( 3 ) ? ( Qt::CaseSensitivity ) hb_parni( 3 ) : ( Qt::CaseSensitivity ) Qt::CaseSensitive ) ) ); p is NULL" ) ); + } +} + +/* + * const QChar * constData () const + */ +HB_FUNC( QT_QSTRINGREF_CONSTDATA ) +{ + QStringRef * p = hbqt_par_QStringRef( 1 ); + if( p ) + hb_retptrGC( hbqt_gcAllocate_QChar( new QChar( *( ( p )->constData() ) ), true ) ); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QSTRINGREF_CONSTDATA FP=hb_retptrGC( hbqt_gcAllocate_QChar( new QChar( *( ( p )->constData() ) ), true ) ); p is NULL" ) ); + } +} + +/* + * int count () const + */ +HB_FUNC( QT_QSTRINGREF_COUNT ) +{ + QStringRef * p = hbqt_par_QStringRef( 1 ); + if( p ) + hb_retni( ( p )->count() ); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QSTRINGREF_COUNT FP=hb_retni( ( p )->count() ); p is NULL" ) ); + } +} + +/* + * const QChar * data () const + */ +HB_FUNC( QT_QSTRINGREF_DATA ) +{ + QStringRef * p = hbqt_par_QStringRef( 1 ); + if( p ) + hb_retptrGC( hbqt_gcAllocate_QChar( new QChar( *( ( p )->data() ) ), true ) ); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QSTRINGREF_DATA FP=hb_retptrGC( hbqt_gcAllocate_QChar( new QChar( *( ( p )->data() ) ), true ) ); p is NULL" ) ); + } +} + +/* + * bool isEmpty () const + */ +HB_FUNC( QT_QSTRINGREF_ISEMPTY ) +{ + QStringRef * p = hbqt_par_QStringRef( 1 ); + if( p ) + hb_retl( ( p )->isEmpty() ); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QSTRINGREF_ISEMPTY FP=hb_retl( ( p )->isEmpty() ); p is NULL" ) ); + } +} + +/* + * bool isNull () const + */ +HB_FUNC( QT_QSTRINGREF_ISNULL ) +{ + QStringRef * p = hbqt_par_QStringRef( 1 ); + if( p ) + hb_retl( ( p )->isNull() ); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QSTRINGREF_ISNULL FP=hb_retl( ( p )->isNull() ); p is NULL" ) ); + } +} + +/* + * int length () const + */ +HB_FUNC( QT_QSTRINGREF_LENGTH ) +{ + QStringRef * p = hbqt_par_QStringRef( 1 ); + if( p ) + hb_retni( ( p )->length() ); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QSTRINGREF_LENGTH FP=hb_retni( ( p )->length() ); p is NULL" ) ); + } +} + +/* + * int localeAwareCompare ( const QString & other ) const + */ +HB_FUNC( QT_QSTRINGREF_LOCALEAWARECOMPARE ) +{ + QStringRef * p = hbqt_par_QStringRef( 1 ); + if( p ) + hb_retni( ( p )->localeAwareCompare( hbqt_par_QString( 2 ) ) ); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QSTRINGREF_LOCALEAWARECOMPARE FP=hb_retni( ( p )->localeAwareCompare( hbqt_par_QString( 2 ) ) ); p is NULL" ) ); + } +} + +/* + * int localeAwareCompare ( const QStringRef & other ) const + */ +HB_FUNC( QT_QSTRINGREF_LOCALEAWARECOMPARE_1 ) +{ + QStringRef * p = hbqt_par_QStringRef( 1 ); + if( p ) + hb_retni( ( p )->localeAwareCompare( *hbqt_par_QStringRef( 2 ) ) ); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QSTRINGREF_LOCALEAWARECOMPARE_1 FP=hb_retni( ( p )->localeAwareCompare( *hbqt_par_QStringRef( 2 ) ) ); p is NULL" ) ); + } +} + +/* + * int position () const + */ +HB_FUNC( QT_QSTRINGREF_POSITION ) +{ + QStringRef * p = hbqt_par_QStringRef( 1 ); + if( p ) + hb_retni( ( p )->position() ); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QSTRINGREF_POSITION FP=hb_retni( ( p )->position() ); p is NULL" ) ); + } +} + +/* + * int size () const + */ +HB_FUNC( QT_QSTRINGREF_SIZE ) +{ + QStringRef * p = hbqt_par_QStringRef( 1 ); + if( p ) + hb_retni( ( p )->size() ); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QSTRINGREF_SIZE FP=hb_retni( ( p )->size() ); p is NULL" ) ); + } +} + +/* + * const QChar * unicode () const + */ +HB_FUNC( QT_QSTRINGREF_UNICODE ) +{ + QStringRef * p = hbqt_par_QStringRef( 1 ); + if( p ) + hb_retptrGC( hbqt_gcAllocate_QChar( new QChar( *( ( p )->unicode() ) ), true ) ); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QSTRINGREF_UNICODE FP=hb_retptrGC( hbqt_gcAllocate_QChar( new QChar( *( ( p )->unicode() ) ), true ) ); p is NULL" ) ); + } +} + +/* + * int compare ( const QStringRef & s1, const QString & s2, Qt::CaseSensitivity cs = Qt::CaseSensitive ) + */ +HB_FUNC( QT_QSTRINGREF_COMPARE_2 ) +{ + QStringRef * p = hbqt_par_QStringRef( 1 ); + if( p ) + hb_retni( ( p )->compare( *hbqt_par_QStringRef( 2 ), hbqt_par_QString( 3 ), ( HB_ISNUM( 4 ) ? ( Qt::CaseSensitivity ) hb_parni( 4 ) : ( Qt::CaseSensitivity ) Qt::CaseSensitive ) ) ); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QSTRINGREF_COMPARE_2 FP=hb_retni( ( p )->compare( *hbqt_par_QStringRef( 2 ), hbqt_par_QString( 3 ), ( HB_ISNUM( 4 ) ? ( Qt::CaseSensitivity ) hb_parni( 4 ) : ( Qt::CaseSensitivity ) Qt::CaseSensitive ) ) ); p is NULL" ) ); + } +} + +/* + * int compare ( const QStringRef & s1, const QStringRef & s2, Qt::CaseSensitivity cs = Qt::CaseSensitive ) + */ +HB_FUNC( QT_QSTRINGREF_COMPARE_3 ) +{ + QStringRef * p = hbqt_par_QStringRef( 1 ); + if( p ) + hb_retni( ( p )->compare( *hbqt_par_QStringRef( 2 ), *hbqt_par_QStringRef( 3 ), ( HB_ISNUM( 4 ) ? ( Qt::CaseSensitivity ) hb_parni( 4 ) : ( Qt::CaseSensitivity ) Qt::CaseSensitive ) ) ); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QSTRINGREF_COMPARE_3 FP=hb_retni( ( p )->compare( *hbqt_par_QStringRef( 2 ), *hbqt_par_QStringRef( 3 ), ( HB_ISNUM( 4 ) ? ( Qt::CaseSensitivity ) hb_parni( 4 ) : ( Qt::CaseSensitivity ) Qt::CaseSensitive ) ) ); p is NULL" ) ); + } +} + +/* + * int localeAwareCompare ( const QStringRef & s1, const QString & s2 ) + */ +HB_FUNC( QT_QSTRINGREF_LOCALEAWARECOMPARE_2 ) +{ + QStringRef * p = hbqt_par_QStringRef( 1 ); + if( p ) + hb_retni( ( p )->localeAwareCompare( *hbqt_par_QStringRef( 2 ), hbqt_par_QString( 3 ) ) ); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QSTRINGREF_LOCALEAWARECOMPARE_2 FP=hb_retni( ( p )->localeAwareCompare( *hbqt_par_QStringRef( 2 ), hbqt_par_QString( 3 ) ) ); p is NULL" ) ); + } +} + +/* + * int localeAwareCompare ( const QStringRef & s1, const QStringRef & s2 ) + */ +HB_FUNC( QT_QSTRINGREF_LOCALEAWARECOMPARE_3 ) +{ + QStringRef * p = hbqt_par_QStringRef( 1 ); + if( p ) + hb_retni( ( p )->localeAwareCompare( *hbqt_par_QStringRef( 2 ), *hbqt_par_QStringRef( 3 ) ) ); + else + { + HB_TRACE( HB_TR_DEBUG, ( "............................... F=QT_QSTRINGREF_LOCALEAWARECOMPARE_3 FP=hb_retni( ( p )->localeAwareCompare( *hbqt_par_QStringRef( 2 ), *hbqt_par_QStringRef( 3 ) ) ); p is NULL" ) ); + } +} + + +/*----------------------------------------------------------------------*/ +#endif /* #if QT_VERSION >= 0x040500 */ +/*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbqt/qtcore/g/THBQString.prg b/harbour/contrib/hbqt/qtcore/g/THBQString.prg new file mode 100644 index 0000000000..6a9772ac0a --- /dev/null +++ b/harbour/contrib/hbqt/qtcore/g/THBQString.prg @@ -0,0 +1,916 @@ +/* + * $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 HBQString INHERIT HbQtObjectHandler + + METHOD new( ... ) + + METHOD append( cStr ) + METHOD append_1( pReference ) + METHOD append_2( pStr ) + METHOD append_3( pBa ) + METHOD append_4( pStr ) + METHOD append_5( pCh ) + METHOD arg( cA, nFieldWidth, pFillChar ) + METHOD arg_1( cA1, cA2 ) + METHOD arg_2( cA1, cA2, cA3 ) + METHOD arg_3( cA1, cA2, cA3, cA4 ) + METHOD arg_4( cA1, cA2, cA3, cA4, cA5 ) + METHOD arg_5( cA1, cA2, cA3, cA4, cA5, cA6 ) + METHOD arg_6( cA1, cA2, cA3, cA4, cA5, cA6, cA7 ) + METHOD arg_7( cA1, cA2, cA3, cA4, cA5, cA6, cA7, cA8 ) + METHOD arg_8( cA1, cA2, cA3, cA4, cA5, cA6, cA7, cA8, cA9 ) + METHOD arg_9( nA, nFieldWidth, nBase, pFillChar ) + METHOD arg_10( nA, nFieldWidth, nBase, pFillChar ) + METHOD arg_11( nA, nFieldWidth, nBase, pFillChar ) + METHOD arg_12( nA, nFieldWidth, nBase, pFillChar ) + METHOD arg_13( nA, nFieldWidth, nBase, pFillChar ) + METHOD arg_14( nA, nFieldWidth, nBase, pFillChar ) + METHOD arg_15( nA, nFieldWidth, nBase, pFillChar ) + METHOD arg_16( nA, nFieldWidth, nBase, pFillChar ) + METHOD arg_17( pA, nFieldWidth, pFillChar ) + METHOD arg_18( cA, nFieldWidth, pFillChar ) + METHOD arg_19( nA, nFieldWidth, cFormat, nPrecision, pFillChar ) + METHOD at( nPosition ) + METHOD capacity() + METHOD chop( nN ) + METHOD clear() + METHOD compare( cOther ) + METHOD compare_1( cOther, nCs ) + METHOD compare_2( pOther, nCs ) + METHOD compare_3( pRef, nCs ) + METHOD constData() + METHOD count( cStr, nCs ) + METHOD count_1( pCh, nCs ) + METHOD count_2( pRx ) + METHOD count_3() + METHOD data() + METHOD data_1() + METHOD endsWith( cS, nCs ) + METHOD endsWith_1( pS, nCs ) + METHOD endsWith_2( pC, nCs ) + METHOD fill( pCh, nSize ) + METHOD indexOf( cStr, nFrom, nCs ) + METHOD indexOf_1( pStr, nFrom, nCs ) + METHOD indexOf_2( pCh, nFrom, nCs ) + METHOD indexOf_3( pRx, nFrom ) + METHOD indexOf_4( pRx, nFrom ) + METHOD insert( nPosition, cStr ) + METHOD insert_1( nPosition, pStr ) + METHOD insert_2( nPosition, pUnicode, nSize ) + METHOD insert_3( nPosition, pCh ) + METHOD isEmpty() + METHOD isNull() + METHOD lastIndexOf( cStr, nFrom, nCs ) + METHOD lastIndexOf_1( pStr, nFrom, nCs ) + METHOD lastIndexOf_2( pCh, nFrom, nCs ) + METHOD lastIndexOf_3( pRx, nFrom ) + METHOD lastIndexOf_4( pRx, nFrom ) + METHOD left( nN ) + METHOD leftJustified( nWidth, pFill, lTruncate ) + METHOD leftRef( nN ) + METHOD length() + METHOD localeAwareCompare( pOther ) + METHOD localeAwareCompare_1( cOther ) + METHOD mid( nPosition, nN ) + METHOD midRef( nPosition, nN ) + METHOD normalized( nMode ) + METHOD normalized_1( nMode, nVersion ) + METHOD prepend( cStr ) + METHOD prepend_1( pStr ) + METHOD prepend_2( pBa ) + METHOD prepend_3( pStr ) + METHOD prepend_4( pCh ) + METHOD push_back( cOther ) + METHOD push_back_1( pCh ) + METHOD push_front( cOther ) + METHOD push_front_1( pCh ) + METHOD remove( nPosition, nN ) + METHOD remove_1( pCh, nCs ) + METHOD remove_2( cStr, nCs ) + METHOD remove_3( pRx ) + METHOD repeated( nTimes ) + METHOD replace( nPosition, nN, cAfter ) + METHOD replace_1( nPosition, nN, pUnicode, nSize ) + METHOD replace_2( nPosition, nN, pAfter ) + METHOD replace_3( cBefore, cAfter, nCs ) + METHOD replace_4( pBefore, nBlen, pAfter, nAlen, nCs ) + METHOD replace_5( pCh, cAfter, nCs ) + METHOD replace_6( pBefore, pAfter, nCs ) + METHOD replace_7( pBefore, pAfter, nCs ) + METHOD replace_8( pBefore, cAfter, nCs ) + METHOD replace_9( cBefore, pAfter, nCs ) + METHOD replace_10( pC, pAfter, nCs ) + METHOD replace_11( pRx, cAfter ) + METHOD reserve( nSize ) + METHOD resize( nSize ) + METHOD right( nN ) + METHOD rightJustified( nWidth, pFill, lTruncate ) + METHOD rightRef( nN ) + METHOD section( pSep, nStart, nEnd, nFlags ) + METHOD section_1( cSep, nStart, nEnd, nFlags ) + METHOD section_2( pReg, nStart, nEnd, nFlags ) + METHOD setNum( nN, nBase ) + METHOD setNum_1( nN, nBase ) + METHOD setNum_2( nN, nBase ) + METHOD setNum_3( nN, nBase ) + METHOD setNum_4( nN, nBase ) + METHOD setNum_5( nN, nBase ) + METHOD setNum_6( nN, nBase ) + METHOD setNum_7( nN, nBase ) + METHOD setNum_8( nN, cFormat, nPrecision ) + METHOD setNum_9( nN, cFormat, nPrecision ) + METHOD setUnicode( pUnicode, nSize ) + METHOD setUtf16( nUnicode, nSize ) + METHOD simplified() + METHOD size() + METHOD split( cSep, nBehavior, nCs ) + METHOD split_1( pSep, nBehavior, nCs ) + METHOD split_2( pRx, nBehavior ) + METHOD squeeze() + METHOD startsWith( cS, nCs ) + METHOD startsWith_1( pS, nCs ) + METHOD startsWith_2( pC, nCs ) + METHOD toAscii() + METHOD toCaseFolded() + METHOD toDouble( lOk ) + METHOD toFloat( lOk ) + METHOD toInt( lOk, nBase ) + METHOD toLatin1() + METHOD toLocal8Bit() + METHOD toLong( lOk, nBase ) + METHOD toLongLong( lOk, nBase ) + METHOD toLower() + METHOD toShort( lOk, nBase ) + METHOD toUInt( lOk, nBase ) + METHOD toULong( lOk, nBase ) + METHOD toULongLong( lOk, nBase ) + METHOD toUShort( lOk, nBase ) + METHOD toUpper() + METHOD toUtf8() + METHOD trimmed() + METHOD truncate( nPosition ) + METHOD unicode() + METHOD compare_4( cS1, cS2, nCs ) + METHOD compare_5( cS1, cS2 ) + METHOD compare_6( cS1, pS2, nCs ) + METHOD compare_7( pS1, cS2, nCs ) + METHOD compare_8( cS1, pS2, nCs ) + METHOD fromAscii( pStr, nSize ) + METHOD fromLatin1( pStr, nSize ) + METHOD fromLocal8Bit( pStr, nSize ) + METHOD fromRawData( pUnicode, nSize ) + METHOD fromUcs4( nUnicode, nSize ) + METHOD fromUtf8( pStr, nSize ) + METHOD fromUtf16( nUnicode, nSize ) + METHOD localeAwareCompare_2( cS1, cS2 ) + METHOD localeAwareCompare_3( cS1, pS2 ) + METHOD number( nN, nBase ) + METHOD number_1( nN, cFormat, nPrecision ) + METHOD number_2( nN, nBase ) + METHOD number_3( nN, nBase ) + METHOD number_4( nN, nBase ) + METHOD number_5( nN, nBase ) + METHOD number_6( nN, nBase ) + + ENDCLASS + + +METHOD HBQString:new( ... ) + LOCAL p + FOR EACH p IN { ... } + hb_pvalue( p:__enumIndex(), hbqt_ptr( p ) ) + NEXT + ::pPtr := Qt_HBQString( ... ) + RETURN Self + + +METHOD HBQString:append( cStr ) + RETURN Qt_HBQString_append( ::pPtr, cStr ) + + +METHOD HBQString:append_1( pReference ) + RETURN Qt_HBQString_append_1( ::pPtr, hbqt_ptr( pReference ) ) + + +METHOD HBQString:append_2( pStr ) + RETURN Qt_HBQString_append_2( ::pPtr, hbqt_ptr( pStr ) ) + + +METHOD HBQString:append_3( pBa ) + RETURN Qt_HBQString_append_3( ::pPtr, hbqt_ptr( pBa ) ) + + +METHOD HBQString:append_4( pStr ) + RETURN Qt_HBQString_append_4( ::pPtr, hbqt_ptr( pStr ) ) + + +METHOD HBQString:append_5( pCh ) + RETURN Qt_HBQString_append_5( ::pPtr, hbqt_ptr( pCh ) ) + + +METHOD HBQString:arg( cA, nFieldWidth, pFillChar ) + RETURN Qt_HBQString_arg( ::pPtr, cA, nFieldWidth, hbqt_ptr( pFillChar ) ) + + +METHOD HBQString:arg_1( cA1, cA2 ) + RETURN Qt_HBQString_arg_1( ::pPtr, cA1, cA2 ) + + +METHOD HBQString:arg_2( cA1, cA2, cA3 ) + RETURN Qt_HBQString_arg_2( ::pPtr, cA1, cA2, cA3 ) + + +METHOD HBQString:arg_3( cA1, cA2, cA3, cA4 ) + RETURN Qt_HBQString_arg_3( ::pPtr, cA1, cA2, cA3, cA4 ) + + +METHOD HBQString:arg_4( cA1, cA2, cA3, cA4, cA5 ) + RETURN Qt_HBQString_arg_4( ::pPtr, cA1, cA2, cA3, cA4, cA5 ) + + +METHOD HBQString:arg_5( cA1, cA2, cA3, cA4, cA5, cA6 ) + RETURN Qt_HBQString_arg_5( ::pPtr, cA1, cA2, cA3, cA4, cA5, cA6 ) + + +METHOD HBQString:arg_6( cA1, cA2, cA3, cA4, cA5, cA6, cA7 ) + RETURN Qt_HBQString_arg_6( ::pPtr, cA1, cA2, cA3, cA4, cA5, cA6, cA7 ) + + +METHOD HBQString:arg_7( cA1, cA2, cA3, cA4, cA5, cA6, cA7, cA8 ) + RETURN Qt_HBQString_arg_7( ::pPtr, cA1, cA2, cA3, cA4, cA5, cA6, cA7, cA8 ) + + +METHOD HBQString:arg_8( cA1, cA2, cA3, cA4, cA5, cA6, cA7, cA8, cA9 ) + RETURN Qt_HBQString_arg_8( ::pPtr, cA1, cA2, cA3, cA4, cA5, cA6, cA7, cA8, cA9 ) + + +METHOD HBQString:arg_9( nA, nFieldWidth, nBase, pFillChar ) + RETURN Qt_HBQString_arg_9( ::pPtr, nA, nFieldWidth, nBase, hbqt_ptr( pFillChar ) ) + + +METHOD HBQString:arg_10( nA, nFieldWidth, nBase, pFillChar ) + RETURN Qt_HBQString_arg_10( ::pPtr, nA, nFieldWidth, nBase, hbqt_ptr( pFillChar ) ) + + +METHOD HBQString:arg_11( nA, nFieldWidth, nBase, pFillChar ) + RETURN Qt_HBQString_arg_11( ::pPtr, nA, nFieldWidth, nBase, hbqt_ptr( pFillChar ) ) + + +METHOD HBQString:arg_12( nA, nFieldWidth, nBase, pFillChar ) + RETURN Qt_HBQString_arg_12( ::pPtr, nA, nFieldWidth, nBase, hbqt_ptr( pFillChar ) ) + + +METHOD HBQString:arg_13( nA, nFieldWidth, nBase, pFillChar ) + RETURN Qt_HBQString_arg_13( ::pPtr, nA, nFieldWidth, nBase, hbqt_ptr( pFillChar ) ) + + +METHOD HBQString:arg_14( nA, nFieldWidth, nBase, pFillChar ) + RETURN Qt_HBQString_arg_14( ::pPtr, nA, nFieldWidth, nBase, hbqt_ptr( pFillChar ) ) + + +METHOD HBQString:arg_15( nA, nFieldWidth, nBase, pFillChar ) + RETURN Qt_HBQString_arg_15( ::pPtr, nA, nFieldWidth, nBase, hbqt_ptr( pFillChar ) ) + + +METHOD HBQString:arg_16( nA, nFieldWidth, nBase, pFillChar ) + RETURN Qt_HBQString_arg_16( ::pPtr, nA, nFieldWidth, nBase, hbqt_ptr( pFillChar ) ) + + +METHOD HBQString:arg_17( pA, nFieldWidth, pFillChar ) + RETURN Qt_HBQString_arg_17( ::pPtr, hbqt_ptr( pA ), nFieldWidth, hbqt_ptr( pFillChar ) ) + + +METHOD HBQString:arg_18( cA, nFieldWidth, pFillChar ) + RETURN Qt_HBQString_arg_18( ::pPtr, cA, nFieldWidth, hbqt_ptr( pFillChar ) ) + + +METHOD HBQString:arg_19( nA, nFieldWidth, cFormat, nPrecision, pFillChar ) + RETURN Qt_HBQString_arg_19( ::pPtr, nA, nFieldWidth, cFormat, nPrecision, hbqt_ptr( pFillChar ) ) + + +METHOD HBQString:at( nPosition ) + RETURN Qt_HBQString_at( ::pPtr, nPosition ) + + +METHOD HBQString:capacity() + RETURN Qt_HBQString_capacity( ::pPtr ) + + +METHOD HBQString:chop( nN ) + RETURN Qt_HBQString_chop( ::pPtr, nN ) + + +METHOD HBQString:clear() + RETURN Qt_HBQString_clear( ::pPtr ) + + +METHOD HBQString:compare( cOther ) + RETURN Qt_HBQString_compare( ::pPtr, cOther ) + + +METHOD HBQString:compare_1( cOther, nCs ) + RETURN Qt_HBQString_compare_1( ::pPtr, cOther, nCs ) + + +METHOD HBQString:compare_2( pOther, nCs ) + RETURN Qt_HBQString_compare_2( ::pPtr, hbqt_ptr( pOther ), nCs ) + + +METHOD HBQString:compare_3( pRef, nCs ) + RETURN Qt_HBQString_compare_3( ::pPtr, hbqt_ptr( pRef ), nCs ) + + +METHOD HBQString:constData() + RETURN Qt_HBQString_constData( ::pPtr ) + + +METHOD HBQString:count( cStr, nCs ) + RETURN Qt_HBQString_count( ::pPtr, cStr, nCs ) + + +METHOD HBQString:count_1( pCh, nCs ) + RETURN Qt_HBQString_count_1( ::pPtr, hbqt_ptr( pCh ), nCs ) + + +METHOD HBQString:count_2( pRx ) + RETURN Qt_HBQString_count_2( ::pPtr, hbqt_ptr( pRx ) ) + + +METHOD HBQString:count_3() + RETURN Qt_HBQString_count_3( ::pPtr ) + + +METHOD HBQString:data() + RETURN Qt_HBQString_data( ::pPtr ) + + +METHOD HBQString:data_1() + RETURN Qt_HBQString_data_1( ::pPtr ) + + +METHOD HBQString:endsWith( cS, nCs ) + RETURN Qt_HBQString_endsWith( ::pPtr, cS, nCs ) + + +METHOD HBQString:endsWith_1( pS, nCs ) + RETURN Qt_HBQString_endsWith_1( ::pPtr, hbqt_ptr( pS ), nCs ) + + +METHOD HBQString:endsWith_2( pC, nCs ) + RETURN Qt_HBQString_endsWith_2( ::pPtr, hbqt_ptr( pC ), nCs ) + + +METHOD HBQString:fill( pCh, nSize ) + RETURN Qt_HBQString_fill( ::pPtr, hbqt_ptr( pCh ), nSize ) + + +METHOD HBQString:indexOf( cStr, nFrom, nCs ) + RETURN Qt_HBQString_indexOf( ::pPtr, cStr, nFrom, nCs ) + + +METHOD HBQString:indexOf_1( pStr, nFrom, nCs ) + RETURN Qt_HBQString_indexOf_1( ::pPtr, hbqt_ptr( pStr ), nFrom, nCs ) + + +METHOD HBQString:indexOf_2( pCh, nFrom, nCs ) + RETURN Qt_HBQString_indexOf_2( ::pPtr, hbqt_ptr( pCh ), nFrom, nCs ) + + +METHOD HBQString:indexOf_3( pRx, nFrom ) + RETURN Qt_HBQString_indexOf_3( ::pPtr, hbqt_ptr( pRx ), nFrom ) + + +METHOD HBQString:indexOf_4( pRx, nFrom ) + RETURN Qt_HBQString_indexOf_4( ::pPtr, hbqt_ptr( pRx ), nFrom ) + + +METHOD HBQString:insert( nPosition, cStr ) + RETURN Qt_HBQString_insert( ::pPtr, nPosition, cStr ) + + +METHOD HBQString:insert_1( nPosition, pStr ) + RETURN Qt_HBQString_insert_1( ::pPtr, nPosition, hbqt_ptr( pStr ) ) + + +METHOD HBQString:insert_2( nPosition, pUnicode, nSize ) + RETURN Qt_HBQString_insert_2( ::pPtr, nPosition, hbqt_ptr( pUnicode ), nSize ) + + +METHOD HBQString:insert_3( nPosition, pCh ) + RETURN Qt_HBQString_insert_3( ::pPtr, nPosition, hbqt_ptr( pCh ) ) + + +METHOD HBQString:isEmpty() + RETURN Qt_HBQString_isEmpty( ::pPtr ) + + +METHOD HBQString:isNull() + RETURN Qt_HBQString_isNull( ::pPtr ) + + +METHOD HBQString:lastIndexOf( cStr, nFrom, nCs ) + RETURN Qt_HBQString_lastIndexOf( ::pPtr, cStr, nFrom, nCs ) + + +METHOD HBQString:lastIndexOf_1( pStr, nFrom, nCs ) + RETURN Qt_HBQString_lastIndexOf_1( ::pPtr, hbqt_ptr( pStr ), nFrom, nCs ) + + +METHOD HBQString:lastIndexOf_2( pCh, nFrom, nCs ) + RETURN Qt_HBQString_lastIndexOf_2( ::pPtr, hbqt_ptr( pCh ), nFrom, nCs ) + + +METHOD HBQString:lastIndexOf_3( pRx, nFrom ) + RETURN Qt_HBQString_lastIndexOf_3( ::pPtr, hbqt_ptr( pRx ), nFrom ) + + +METHOD HBQString:lastIndexOf_4( pRx, nFrom ) + RETURN Qt_HBQString_lastIndexOf_4( ::pPtr, hbqt_ptr( pRx ), nFrom ) + + +METHOD HBQString:left( nN ) + RETURN Qt_HBQString_left( ::pPtr, nN ) + + +METHOD HBQString:leftJustified( nWidth, pFill, lTruncate ) + RETURN Qt_HBQString_leftJustified( ::pPtr, nWidth, hbqt_ptr( pFill ), lTruncate ) + + +METHOD HBQString:leftRef( nN ) + RETURN Qt_HBQString_leftRef( ::pPtr, nN ) + + +METHOD HBQString:length() + RETURN Qt_HBQString_length( ::pPtr ) + + +METHOD HBQString:localeAwareCompare( pOther ) + RETURN Qt_HBQString_localeAwareCompare( ::pPtr, hbqt_ptr( pOther ) ) + + +METHOD HBQString:localeAwareCompare_1( cOther ) + RETURN Qt_HBQString_localeAwareCompare_1( ::pPtr, cOther ) + + +METHOD HBQString:mid( nPosition, nN ) + RETURN Qt_HBQString_mid( ::pPtr, nPosition, nN ) + + +METHOD HBQString:midRef( nPosition, nN ) + RETURN Qt_HBQString_midRef( ::pPtr, nPosition, nN ) + + +METHOD HBQString:normalized( nMode ) + RETURN Qt_HBQString_normalized( ::pPtr, nMode ) + + +METHOD HBQString:normalized_1( nMode, nVersion ) + RETURN Qt_HBQString_normalized_1( ::pPtr, nMode, nVersion ) + + +METHOD HBQString:prepend( cStr ) + RETURN Qt_HBQString_prepend( ::pPtr, cStr ) + + +METHOD HBQString:prepend_1( pStr ) + RETURN Qt_HBQString_prepend_1( ::pPtr, hbqt_ptr( pStr ) ) + + +METHOD HBQString:prepend_2( pBa ) + RETURN Qt_HBQString_prepend_2( ::pPtr, hbqt_ptr( pBa ) ) + + +METHOD HBQString:prepend_3( pStr ) + RETURN Qt_HBQString_prepend_3( ::pPtr, hbqt_ptr( pStr ) ) + + +METHOD HBQString:prepend_4( pCh ) + RETURN Qt_HBQString_prepend_4( ::pPtr, hbqt_ptr( pCh ) ) + + +METHOD HBQString:push_back( cOther ) + RETURN Qt_HBQString_push_back( ::pPtr, cOther ) + + +METHOD HBQString:push_back_1( pCh ) + RETURN Qt_HBQString_push_back_1( ::pPtr, hbqt_ptr( pCh ) ) + + +METHOD HBQString:push_front( cOther ) + RETURN Qt_HBQString_push_front( ::pPtr, cOther ) + + +METHOD HBQString:push_front_1( pCh ) + RETURN Qt_HBQString_push_front_1( ::pPtr, hbqt_ptr( pCh ) ) + + +METHOD HBQString:remove( nPosition, nN ) + RETURN Qt_HBQString_remove( ::pPtr, nPosition, nN ) + + +METHOD HBQString:remove_1( pCh, nCs ) + RETURN Qt_HBQString_remove_1( ::pPtr, hbqt_ptr( pCh ), nCs ) + + +METHOD HBQString:remove_2( cStr, nCs ) + RETURN Qt_HBQString_remove_2( ::pPtr, cStr, nCs ) + + +METHOD HBQString:remove_3( pRx ) + RETURN Qt_HBQString_remove_3( ::pPtr, hbqt_ptr( pRx ) ) + + +METHOD HBQString:repeated( nTimes ) + RETURN Qt_HBQString_repeated( ::pPtr, nTimes ) + + +METHOD HBQString:replace( nPosition, nN, cAfter ) + RETURN Qt_HBQString_replace( ::pPtr, nPosition, nN, cAfter ) + + +METHOD HBQString:replace_1( nPosition, nN, pUnicode, nSize ) + RETURN Qt_HBQString_replace_1( ::pPtr, nPosition, nN, hbqt_ptr( pUnicode ), nSize ) + + +METHOD HBQString:replace_2( nPosition, nN, pAfter ) + RETURN Qt_HBQString_replace_2( ::pPtr, nPosition, nN, hbqt_ptr( pAfter ) ) + + +METHOD HBQString:replace_3( cBefore, cAfter, nCs ) + RETURN Qt_HBQString_replace_3( ::pPtr, cBefore, cAfter, nCs ) + + +METHOD HBQString:replace_4( pBefore, nBlen, pAfter, nAlen, nCs ) + RETURN Qt_HBQString_replace_4( ::pPtr, hbqt_ptr( pBefore ), nBlen, hbqt_ptr( pAfter ), nAlen, nCs ) + + +METHOD HBQString:replace_5( pCh, cAfter, nCs ) + RETURN Qt_HBQString_replace_5( ::pPtr, hbqt_ptr( pCh ), cAfter, nCs ) + + +METHOD HBQString:replace_6( pBefore, pAfter, nCs ) + RETURN Qt_HBQString_replace_6( ::pPtr, hbqt_ptr( pBefore ), hbqt_ptr( pAfter ), nCs ) + + +METHOD HBQString:replace_7( pBefore, pAfter, nCs ) + RETURN Qt_HBQString_replace_7( ::pPtr, hbqt_ptr( pBefore ), hbqt_ptr( pAfter ), nCs ) + + +METHOD HBQString:replace_8( pBefore, cAfter, nCs ) + RETURN Qt_HBQString_replace_8( ::pPtr, hbqt_ptr( pBefore ), cAfter, nCs ) + + +METHOD HBQString:replace_9( cBefore, pAfter, nCs ) + RETURN Qt_HBQString_replace_9( ::pPtr, cBefore, hbqt_ptr( pAfter ), nCs ) + + +METHOD HBQString:replace_10( pC, pAfter, nCs ) + RETURN Qt_HBQString_replace_10( ::pPtr, hbqt_ptr( pC ), hbqt_ptr( pAfter ), nCs ) + + +METHOD HBQString:replace_11( pRx, cAfter ) + RETURN Qt_HBQString_replace_11( ::pPtr, hbqt_ptr( pRx ), cAfter ) + + +METHOD HBQString:reserve( nSize ) + RETURN Qt_HBQString_reserve( ::pPtr, nSize ) + + +METHOD HBQString:resize( nSize ) + RETURN Qt_HBQString_resize( ::pPtr, nSize ) + + +METHOD HBQString:right( nN ) + RETURN Qt_HBQString_right( ::pPtr, nN ) + + +METHOD HBQString:rightJustified( nWidth, pFill, lTruncate ) + RETURN Qt_HBQString_rightJustified( ::pPtr, nWidth, hbqt_ptr( pFill ), lTruncate ) + + +METHOD HBQString:rightRef( nN ) + RETURN Qt_HBQString_rightRef( ::pPtr, nN ) + + +METHOD HBQString:section( pSep, nStart, nEnd, nFlags ) + RETURN Qt_HBQString_section( ::pPtr, hbqt_ptr( pSep ), nStart, nEnd, nFlags ) + + +METHOD HBQString:section_1( cSep, nStart, nEnd, nFlags ) + RETURN Qt_HBQString_section_1( ::pPtr, cSep, nStart, nEnd, nFlags ) + + +METHOD HBQString:section_2( pReg, nStart, nEnd, nFlags ) + RETURN Qt_HBQString_section_2( ::pPtr, hbqt_ptr( pReg ), nStart, nEnd, nFlags ) + + +METHOD HBQString:setNum( nN, nBase ) + RETURN Qt_HBQString_setNum( ::pPtr, nN, nBase ) + + +METHOD HBQString:setNum_1( nN, nBase ) + RETURN Qt_HBQString_setNum_1( ::pPtr, nN, nBase ) + + +METHOD HBQString:setNum_2( nN, nBase ) + RETURN Qt_HBQString_setNum_2( ::pPtr, nN, nBase ) + + +METHOD HBQString:setNum_3( nN, nBase ) + RETURN Qt_HBQString_setNum_3( ::pPtr, nN, nBase ) + + +METHOD HBQString:setNum_4( nN, nBase ) + RETURN Qt_HBQString_setNum_4( ::pPtr, nN, nBase ) + + +METHOD HBQString:setNum_5( nN, nBase ) + RETURN Qt_HBQString_setNum_5( ::pPtr, nN, nBase ) + + +METHOD HBQString:setNum_6( nN, nBase ) + RETURN Qt_HBQString_setNum_6( ::pPtr, nN, nBase ) + + +METHOD HBQString:setNum_7( nN, nBase ) + RETURN Qt_HBQString_setNum_7( ::pPtr, nN, nBase ) + + +METHOD HBQString:setNum_8( nN, cFormat, nPrecision ) + RETURN Qt_HBQString_setNum_8( ::pPtr, nN, cFormat, nPrecision ) + + +METHOD HBQString:setNum_9( nN, cFormat, nPrecision ) + RETURN Qt_HBQString_setNum_9( ::pPtr, nN, cFormat, nPrecision ) + + +METHOD HBQString:setUnicode( pUnicode, nSize ) + RETURN Qt_HBQString_setUnicode( ::pPtr, hbqt_ptr( pUnicode ), nSize ) + + +METHOD HBQString:setUtf16( nUnicode, nSize ) + RETURN Qt_HBQString_setUtf16( ::pPtr, nUnicode, nSize ) + + +METHOD HBQString:simplified() + RETURN Qt_HBQString_simplified( ::pPtr ) + + +METHOD HBQString:size() + RETURN Qt_HBQString_size( ::pPtr ) + + +METHOD HBQString:split( cSep, nBehavior, nCs ) + RETURN Qt_HBQString_split( ::pPtr, cSep, nBehavior, nCs ) + + +METHOD HBQString:split_1( pSep, nBehavior, nCs ) + RETURN Qt_HBQString_split_1( ::pPtr, hbqt_ptr( pSep ), nBehavior, nCs ) + + +METHOD HBQString:split_2( pRx, nBehavior ) + RETURN Qt_HBQString_split_2( ::pPtr, hbqt_ptr( pRx ), nBehavior ) + + +METHOD HBQString:squeeze() + RETURN Qt_HBQString_squeeze( ::pPtr ) + + +METHOD HBQString:startsWith( cS, nCs ) + RETURN Qt_HBQString_startsWith( ::pPtr, cS, nCs ) + + +METHOD HBQString:startsWith_1( pS, nCs ) + RETURN Qt_HBQString_startsWith_1( ::pPtr, hbqt_ptr( pS ), nCs ) + + +METHOD HBQString:startsWith_2( pC, nCs ) + RETURN Qt_HBQString_startsWith_2( ::pPtr, hbqt_ptr( pC ), nCs ) + + +METHOD HBQString:toAscii() + RETURN Qt_HBQString_toAscii( ::pPtr ) + + +METHOD HBQString:toCaseFolded() + RETURN Qt_HBQString_toCaseFolded( ::pPtr ) + + +METHOD HBQString:toDouble( lOk ) + RETURN Qt_HBQString_toDouble( ::pPtr, lOk ) + + +METHOD HBQString:toFloat( lOk ) + RETURN Qt_HBQString_toFloat( ::pPtr, lOk ) + + +METHOD HBQString:toInt( lOk, nBase ) + RETURN Qt_HBQString_toInt( ::pPtr, lOk, nBase ) + + +METHOD HBQString:toLatin1() + RETURN Qt_HBQString_toLatin1( ::pPtr ) + + +METHOD HBQString:toLocal8Bit() + RETURN Qt_HBQString_toLocal8Bit( ::pPtr ) + + +METHOD HBQString:toLong( lOk, nBase ) + RETURN Qt_HBQString_toLong( ::pPtr, lOk, nBase ) + + +METHOD HBQString:toLongLong( lOk, nBase ) + RETURN Qt_HBQString_toLongLong( ::pPtr, lOk, nBase ) + + +METHOD HBQString:toLower() + RETURN Qt_HBQString_toLower( ::pPtr ) + + +METHOD HBQString:toShort( lOk, nBase ) + RETURN Qt_HBQString_toShort( ::pPtr, lOk, nBase ) + + +METHOD HBQString:toUInt( lOk, nBase ) + RETURN Qt_HBQString_toUInt( ::pPtr, lOk, nBase ) + + +METHOD HBQString:toULong( lOk, nBase ) + RETURN Qt_HBQString_toULong( ::pPtr, lOk, nBase ) + + +METHOD HBQString:toULongLong( lOk, nBase ) + RETURN Qt_HBQString_toULongLong( ::pPtr, lOk, nBase ) + + +METHOD HBQString:toUShort( lOk, nBase ) + RETURN Qt_HBQString_toUShort( ::pPtr, lOk, nBase ) + + +METHOD HBQString:toUpper() + RETURN Qt_HBQString_toUpper( ::pPtr ) + + +METHOD HBQString:toUtf8() + RETURN Qt_HBQString_toUtf8( ::pPtr ) + + +METHOD HBQString:trimmed() + RETURN Qt_HBQString_trimmed( ::pPtr ) + + +METHOD HBQString:truncate( nPosition ) + RETURN Qt_HBQString_truncate( ::pPtr, nPosition ) + + +METHOD HBQString:unicode() + RETURN Qt_HBQString_unicode( ::pPtr ) + + +METHOD HBQString:compare_4( cS1, cS2, nCs ) + RETURN Qt_HBQString_compare_4( ::pPtr, cS1, cS2, nCs ) + + +METHOD HBQString:compare_5( cS1, cS2 ) + RETURN Qt_HBQString_compare_5( ::pPtr, cS1, cS2 ) + + +METHOD HBQString:compare_6( cS1, pS2, nCs ) + RETURN Qt_HBQString_compare_6( ::pPtr, cS1, hbqt_ptr( pS2 ), nCs ) + + +METHOD HBQString:compare_7( pS1, cS2, nCs ) + RETURN Qt_HBQString_compare_7( ::pPtr, hbqt_ptr( pS1 ), cS2, nCs ) + + +METHOD HBQString:compare_8( cS1, pS2, nCs ) + RETURN Qt_HBQString_compare_8( ::pPtr, cS1, hbqt_ptr( pS2 ), nCs ) + + +METHOD HBQString:fromAscii( pStr, nSize ) + RETURN Qt_HBQString_fromAscii( ::pPtr, hbqt_ptr( pStr ), nSize ) + + +METHOD HBQString:fromLatin1( pStr, nSize ) + RETURN Qt_HBQString_fromLatin1( ::pPtr, hbqt_ptr( pStr ), nSize ) + + +METHOD HBQString:fromLocal8Bit( pStr, nSize ) + RETURN Qt_HBQString_fromLocal8Bit( ::pPtr, hbqt_ptr( pStr ), nSize ) + + +METHOD HBQString:fromRawData( pUnicode, nSize ) + RETURN Qt_HBQString_fromRawData( ::pPtr, hbqt_ptr( pUnicode ), nSize ) + + +METHOD HBQString:fromUcs4( nUnicode, nSize ) + RETURN Qt_HBQString_fromUcs4( ::pPtr, nUnicode, nSize ) + + +METHOD HBQString:fromUtf8( pStr, nSize ) + RETURN Qt_HBQString_fromUtf8( ::pPtr, hbqt_ptr( pStr ), nSize ) + + +METHOD HBQString:fromUtf16( nUnicode, nSize ) + RETURN Qt_HBQString_fromUtf16( ::pPtr, nUnicode, nSize ) + + +METHOD HBQString:localeAwareCompare_2( cS1, cS2 ) + RETURN Qt_HBQString_localeAwareCompare_2( ::pPtr, cS1, cS2 ) + + +METHOD HBQString:localeAwareCompare_3( cS1, pS2 ) + RETURN Qt_HBQString_localeAwareCompare_3( ::pPtr, cS1, hbqt_ptr( pS2 ) ) + + +METHOD HBQString:number( nN, nBase ) + RETURN Qt_HBQString_number( ::pPtr, nN, nBase ) + + +METHOD HBQString:number_1( nN, cFormat, nPrecision ) + RETURN Qt_HBQString_number_1( ::pPtr, nN, cFormat, nPrecision ) + + +METHOD HBQString:number_2( nN, nBase ) + RETURN Qt_HBQString_number_2( ::pPtr, nN, nBase ) + + +METHOD HBQString:number_3( nN, nBase ) + RETURN Qt_HBQString_number_3( ::pPtr, nN, nBase ) + + +METHOD HBQString:number_4( nN, nBase ) + RETURN Qt_HBQString_number_4( ::pPtr, nN, nBase ) + + +METHOD HBQString:number_5( nN, nBase ) + RETURN Qt_HBQString_number_5( ::pPtr, nN, nBase ) + + +METHOD HBQString:number_6( nN, nBase ) + RETURN Qt_HBQString_number_6( ::pPtr, nN, nBase ) + diff --git a/harbour/contrib/hbqt/qtcore/g/TQStringRef.prg b/harbour/contrib/hbqt/qtcore/g/TQStringRef.prg new file mode 100644 index 0000000000..ef667c5bd9 --- /dev/null +++ b/harbour/contrib/hbqt/qtcore/g/TQStringRef.prg @@ -0,0 +1,176 @@ +/* + * $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 QStringRef INHERIT HbQtObjectHandler + + METHOD new( ... ) + + METHOD at( nPosition ) + METHOD clear() + METHOD compare( cOther, nCs ) + METHOD compare_1( pOther, nCs ) + METHOD constData() + METHOD count() + METHOD data() + METHOD isEmpty() + METHOD isNull() + METHOD length() + METHOD localeAwareCompare( cOther ) + METHOD localeAwareCompare_1( pOther ) + METHOD position() + METHOD size() + METHOD unicode() + METHOD compare_2( pS1, cS2, nCs ) + METHOD compare_3( pS1, pS2, nCs ) + METHOD localeAwareCompare_2( pS1, cS2 ) + METHOD localeAwareCompare_3( pS1, pS2 ) + + ENDCLASS + + +METHOD QStringRef:new( ... ) + LOCAL p + FOR EACH p IN { ... } + hb_pvalue( p:__enumIndex(), hbqt_ptr( p ) ) + NEXT + ::pPtr := Qt_QStringRef( ... ) + RETURN Self + + +METHOD QStringRef:at( nPosition ) + RETURN Qt_QStringRef_at( ::pPtr, nPosition ) + + +METHOD QStringRef:clear() + RETURN Qt_QStringRef_clear( ::pPtr ) + + +METHOD QStringRef:compare( cOther, nCs ) + RETURN Qt_QStringRef_compare( ::pPtr, cOther, nCs ) + + +METHOD QStringRef:compare_1( pOther, nCs ) + RETURN Qt_QStringRef_compare_1( ::pPtr, hbqt_ptr( pOther ), nCs ) + + +METHOD QStringRef:constData() + RETURN Qt_QStringRef_constData( ::pPtr ) + + +METHOD QStringRef:count() + RETURN Qt_QStringRef_count( ::pPtr ) + + +METHOD QStringRef:data() + RETURN Qt_QStringRef_data( ::pPtr ) + + +METHOD QStringRef:isEmpty() + RETURN Qt_QStringRef_isEmpty( ::pPtr ) + + +METHOD QStringRef:isNull() + RETURN Qt_QStringRef_isNull( ::pPtr ) + + +METHOD QStringRef:length() + RETURN Qt_QStringRef_length( ::pPtr ) + + +METHOD QStringRef:localeAwareCompare( cOther ) + RETURN Qt_QStringRef_localeAwareCompare( ::pPtr, cOther ) + + +METHOD QStringRef:localeAwareCompare_1( pOther ) + RETURN Qt_QStringRef_localeAwareCompare_1( ::pPtr, hbqt_ptr( pOther ) ) + + +METHOD QStringRef:position() + RETURN Qt_QStringRef_position( ::pPtr ) + + +METHOD QStringRef:size() + RETURN Qt_QStringRef_size( ::pPtr ) + + +METHOD QStringRef:unicode() + RETURN Qt_QStringRef_unicode( ::pPtr ) + + +METHOD QStringRef:compare_2( pS1, cS2, nCs ) + RETURN Qt_QStringRef_compare_2( ::pPtr, hbqt_ptr( pS1 ), cS2, nCs ) + + +METHOD QStringRef:compare_3( pS1, pS2, nCs ) + RETURN Qt_QStringRef_compare_3( ::pPtr, hbqt_ptr( pS1 ), hbqt_ptr( pS2 ), nCs ) + + +METHOD QStringRef:localeAwareCompare_2( pS1, cS2 ) + RETURN Qt_QStringRef_localeAwareCompare_2( ::pPtr, hbqt_ptr( pS1 ), cS2 ) + + +METHOD QStringRef:localeAwareCompare_3( pS1, pS2 ) + RETURN Qt_QStringRef_localeAwareCompare_3( ::pPtr, hbqt_ptr( pS1 ), hbqt_ptr( pS2 ) ) + diff --git a/harbour/contrib/hbqt/qtcore/g/filelist.hbm b/harbour/contrib/hbqt/qtcore/g/filelist.hbm index 5fed1ea4a6..38b0ad3544 100644 --- a/harbour/contrib/hbqt/qtcore/g/filelist.hbm +++ b/harbour/contrib/hbqt/qtcore/g/filelist.hbm @@ -11,6 +11,7 @@ hbqtcore_extern.prg HBEvents.cpp HBSlots.cpp +HBQString.cpp QAbstractItemModel.cpp QAbstractListModel.cpp QAbstractTableModel.cpp @@ -49,6 +50,7 @@ QSignalMapper.cpp QSize.cpp QSizeF.cpp QStringList.cpp +QStringRef.cpp QTextBoundaryFinder.cpp QTextCodec.cpp QTextDecoder.cpp @@ -64,6 +66,7 @@ QVariant.cpp THBEvents.prg THBSlots.prg +THBQString.prg TQAbstractItemModel.prg TQAbstractListModel.prg TQAbstractTableModel.prg @@ -102,6 +105,7 @@ TQSignalMapper.prg TQSize.prg TQSizeF.prg TQStringList.prg +TQStringRef.prg TQTextBoundaryFinder.prg TQTextCodec.prg TQTextDecoder.prg diff --git a/harbour/contrib/hbqt/qtcore/g/hbqtcore.h b/harbour/contrib/hbqt/qtcore/g/hbqtcore.h index f22503d2ba..edf42926cc 100644 --- a/harbour/contrib/hbqt/qtcore/g/hbqtcore.h +++ b/harbour/contrib/hbqt/qtcore/g/hbqtcore.h @@ -17,6 +17,7 @@ HB_EXTERN_BEGIN extern HB_EXPORT HBQT_GC_FUNC( hbqt_gcRelease_HBEvents ); extern HB_EXPORT HBQT_GC_FUNC( hbqt_gcRelease_HBSlots ); +extern HB_EXPORT HBQT_GC_FUNC( hbqt_gcRelease_HBQString ); extern HB_EXPORT HBQT_GC_FUNC( hbqt_gcRelease_QAbstractItemModel ); extern HB_EXPORT HBQT_GC_FUNC( hbqt_gcRelease_QAbstractListModel ); extern HB_EXPORT HBQT_GC_FUNC( hbqt_gcRelease_QAbstractTableModel ); @@ -55,6 +56,7 @@ extern HB_EXPORT HBQT_GC_FUNC( hbqt_gcRelease_QSignalMapper ); extern HB_EXPORT HBQT_GC_FUNC( hbqt_gcRelease_QSize ); extern HB_EXPORT HBQT_GC_FUNC( hbqt_gcRelease_QSizeF ); extern HB_EXPORT HBQT_GC_FUNC( hbqt_gcRelease_QStringList ); +extern HB_EXPORT HBQT_GC_FUNC( hbqt_gcRelease_QStringRef ); extern HB_EXPORT HBQT_GC_FUNC( hbqt_gcRelease_QTextBoundaryFinder ); extern HB_EXPORT HBQT_GC_FUNC( hbqt_gcRelease_QTextCodec ); extern HB_EXPORT HBQT_GC_FUNC( hbqt_gcRelease_QTextDecoder ); @@ -70,6 +72,7 @@ extern HB_EXPORT HBQT_GC_FUNC( hbqt_gcRelease_QVariant ); extern HB_EXPORT void * hbqt_gcAllocate_HBEvents( void * pObj, bool bNew ); extern HB_EXPORT void * hbqt_gcAllocate_HBSlots( void * pObj, bool bNew ); +extern HB_EXPORT void * hbqt_gcAllocate_HBQString( void * pObj, bool bNew ); extern HB_EXPORT void * hbqt_gcAllocate_QAbstractItemModel( void * pObj, bool bNew ); extern HB_EXPORT void * hbqt_gcAllocate_QAbstractListModel( void * pObj, bool bNew ); extern HB_EXPORT void * hbqt_gcAllocate_QAbstractTableModel( void * pObj, bool bNew ); @@ -108,6 +111,7 @@ extern HB_EXPORT void * hbqt_gcAllocate_QSignalMapper( void * pObj, bool bNew ); extern HB_EXPORT void * hbqt_gcAllocate_QSize( void * pObj, bool bNew ); extern HB_EXPORT void * hbqt_gcAllocate_QSizeF( void * pObj, bool bNew ); extern HB_EXPORT void * hbqt_gcAllocate_QStringList( void * pObj, bool bNew ); +extern HB_EXPORT void * hbqt_gcAllocate_QStringRef( void * pObj, bool bNew ); extern HB_EXPORT void * hbqt_gcAllocate_QTextBoundaryFinder( void * pObj, bool bNew ); extern HB_EXPORT void * hbqt_gcAllocate_QTextCodec( void * pObj, bool bNew ); extern HB_EXPORT void * hbqt_gcAllocate_QTextDecoder( void * pObj, bool bNew ); @@ -125,6 +129,7 @@ HB_EXTERN_END #define hbqt_par_HBEvents( n ) ( ( HBEvents * ) hbqt_gcpointer( n ) ) #define hbqt_par_HBSlots( n ) ( ( HBSlots * ) hbqt_gcpointer( n ) ) +#define hbqt_par_HBQString( n ) ( ( HBQString * ) hbqt_gcpointer( n ) ) #define hbqt_par_QAbstractItemModel( n ) ( ( QAbstractItemModel * ) hbqt_gcpointer( n ) ) #define hbqt_par_QAbstractListModel( n ) ( ( QAbstractListModel * ) hbqt_gcpointer( n ) ) #define hbqt_par_QAbstractTableModel( n ) ( ( QAbstractTableModel * ) hbqt_gcpointer( n ) ) @@ -163,6 +168,7 @@ HB_EXTERN_END #define hbqt_par_QSize( n ) ( ( QSize * ) hbqt_gcpointer( n ) ) #define hbqt_par_QSizeF( n ) ( ( QSizeF * ) hbqt_gcpointer( n ) ) #define hbqt_par_QStringList( n ) ( ( QStringList * ) hbqt_gcpointer( n ) ) +#define hbqt_par_QStringRef( n ) ( ( QStringRef * ) hbqt_gcpointer( n ) ) #define hbqt_par_QTextBoundaryFinder( n ) ( ( QTextBoundaryFinder * ) hbqt_gcpointer( n ) ) #define hbqt_par_QTextCodec( n ) ( ( QTextCodec * ) hbqt_gcpointer( n ) ) #define hbqt_par_QTextDecoder( n ) ( ( QTextDecoder * ) hbqt_gcpointer( n ) ) @@ -180,55 +186,57 @@ HB_EXTERN_END #define HBQT_TYPE_HBEvents ( HBQT_TYPE_QTCORE_BASE + 1 ) #define HBQT_TYPE_HBSlots ( HBQT_TYPE_QTCORE_BASE + 2 ) -#define HBQT_TYPE_QAbstractItemModel ( HBQT_TYPE_QTCORE_BASE + 3 ) -#define HBQT_TYPE_QAbstractListModel ( HBQT_TYPE_QTCORE_BASE + 4 ) -#define HBQT_TYPE_QAbstractTableModel ( HBQT_TYPE_QTCORE_BASE + 5 ) -#define HBQT_TYPE_QBitArray ( HBQT_TYPE_QTCORE_BASE + 6 ) -#define HBQT_TYPE_QBuffer ( HBQT_TYPE_QTCORE_BASE + 7 ) -#define HBQT_TYPE_QByteArray ( HBQT_TYPE_QTCORE_BASE + 8 ) -#define HBQT_TYPE_QChar ( HBQT_TYPE_QTCORE_BASE + 9 ) -#define HBQT_TYPE_QCoreApplication ( HBQT_TYPE_QTCORE_BASE + 10 ) -#define HBQT_TYPE_QDataStream ( HBQT_TYPE_QTCORE_BASE + 11 ) -#define HBQT_TYPE_QDate ( HBQT_TYPE_QTCORE_BASE + 12 ) -#define HBQT_TYPE_QDateTime ( HBQT_TYPE_QTCORE_BASE + 13 ) -#define HBQT_TYPE_QDir ( HBQT_TYPE_QTCORE_BASE + 14 ) -#define HBQT_TYPE_QEvent ( HBQT_TYPE_QTCORE_BASE + 15 ) -#define HBQT_TYPE_QEventLoop ( HBQT_TYPE_QTCORE_BASE + 16 ) -#define HBQT_TYPE_QFile ( HBQT_TYPE_QTCORE_BASE + 17 ) -#define HBQT_TYPE_QFileInfo ( HBQT_TYPE_QTCORE_BASE + 18 ) -#define HBQT_TYPE_QIODevice ( HBQT_TYPE_QTCORE_BASE + 19 ) -#define HBQT_TYPE_QLatin1Char ( HBQT_TYPE_QTCORE_BASE + 20 ) -#define HBQT_TYPE_QLatin1String ( HBQT_TYPE_QTCORE_BASE + 21 ) -#define HBQT_TYPE_QLine ( HBQT_TYPE_QTCORE_BASE + 22 ) -#define HBQT_TYPE_QLineF ( HBQT_TYPE_QTCORE_BASE + 23 ) -#define HBQT_TYPE_QList ( HBQT_TYPE_QTCORE_BASE + 24 ) -#define HBQT_TYPE_QLocale ( HBQT_TYPE_QTCORE_BASE + 25 ) -#define HBQT_TYPE_QMimeData ( HBQT_TYPE_QTCORE_BASE + 26 ) -#define HBQT_TYPE_QModelIndex ( HBQT_TYPE_QTCORE_BASE + 27 ) -#define HBQT_TYPE_QObject ( HBQT_TYPE_QTCORE_BASE + 28 ) -#define HBQT_TYPE_QPoint ( HBQT_TYPE_QTCORE_BASE + 29 ) -#define HBQT_TYPE_QPointF ( HBQT_TYPE_QTCORE_BASE + 30 ) -#define HBQT_TYPE_QProcess ( HBQT_TYPE_QTCORE_BASE + 31 ) -#define HBQT_TYPE_QRect ( HBQT_TYPE_QTCORE_BASE + 32 ) -#define HBQT_TYPE_QRectF ( HBQT_TYPE_QTCORE_BASE + 33 ) -#define HBQT_TYPE_QRegExp ( HBQT_TYPE_QTCORE_BASE + 34 ) -#define HBQT_TYPE_QResource ( HBQT_TYPE_QTCORE_BASE + 35 ) -#define HBQT_TYPE_QSettings ( HBQT_TYPE_QTCORE_BASE + 36 ) -#define HBQT_TYPE_QSignalMapper ( HBQT_TYPE_QTCORE_BASE + 37 ) -#define HBQT_TYPE_QSize ( HBQT_TYPE_QTCORE_BASE + 38 ) -#define HBQT_TYPE_QSizeF ( HBQT_TYPE_QTCORE_BASE + 39 ) -#define HBQT_TYPE_QStringList ( HBQT_TYPE_QTCORE_BASE + 40 ) -#define HBQT_TYPE_QTextBoundaryFinder ( HBQT_TYPE_QTCORE_BASE + 41 ) -#define HBQT_TYPE_QTextCodec ( HBQT_TYPE_QTCORE_BASE + 42 ) -#define HBQT_TYPE_QTextDecoder ( HBQT_TYPE_QTCORE_BASE + 43 ) -#define HBQT_TYPE_QTextEncoder ( HBQT_TYPE_QTCORE_BASE + 44 ) -#define HBQT_TYPE_QTextStream ( HBQT_TYPE_QTCORE_BASE + 45 ) -#define HBQT_TYPE_QThread ( HBQT_TYPE_QTCORE_BASE + 46 ) -#define HBQT_TYPE_QTime ( HBQT_TYPE_QTCORE_BASE + 47 ) -#define HBQT_TYPE_QTimeLine ( HBQT_TYPE_QTCORE_BASE + 48 ) -#define HBQT_TYPE_QTimer ( HBQT_TYPE_QTCORE_BASE + 49 ) -#define HBQT_TYPE_QTranslator ( HBQT_TYPE_QTCORE_BASE + 50 ) -#define HBQT_TYPE_QUrl ( HBQT_TYPE_QTCORE_BASE + 51 ) -#define HBQT_TYPE_QVariant ( HBQT_TYPE_QTCORE_BASE + 52 ) +#define HBQT_TYPE_HBQString ( HBQT_TYPE_QTCORE_BASE + 3 ) +#define HBQT_TYPE_QAbstractItemModel ( HBQT_TYPE_QTCORE_BASE + 4 ) +#define HBQT_TYPE_QAbstractListModel ( HBQT_TYPE_QTCORE_BASE + 5 ) +#define HBQT_TYPE_QAbstractTableModel ( HBQT_TYPE_QTCORE_BASE + 6 ) +#define HBQT_TYPE_QBitArray ( HBQT_TYPE_QTCORE_BASE + 7 ) +#define HBQT_TYPE_QBuffer ( HBQT_TYPE_QTCORE_BASE + 8 ) +#define HBQT_TYPE_QByteArray ( HBQT_TYPE_QTCORE_BASE + 9 ) +#define HBQT_TYPE_QChar ( HBQT_TYPE_QTCORE_BASE + 10 ) +#define HBQT_TYPE_QCoreApplication ( HBQT_TYPE_QTCORE_BASE + 11 ) +#define HBQT_TYPE_QDataStream ( HBQT_TYPE_QTCORE_BASE + 12 ) +#define HBQT_TYPE_QDate ( HBQT_TYPE_QTCORE_BASE + 13 ) +#define HBQT_TYPE_QDateTime ( HBQT_TYPE_QTCORE_BASE + 14 ) +#define HBQT_TYPE_QDir ( HBQT_TYPE_QTCORE_BASE + 15 ) +#define HBQT_TYPE_QEvent ( HBQT_TYPE_QTCORE_BASE + 16 ) +#define HBQT_TYPE_QEventLoop ( HBQT_TYPE_QTCORE_BASE + 17 ) +#define HBQT_TYPE_QFile ( HBQT_TYPE_QTCORE_BASE + 18 ) +#define HBQT_TYPE_QFileInfo ( HBQT_TYPE_QTCORE_BASE + 19 ) +#define HBQT_TYPE_QIODevice ( HBQT_TYPE_QTCORE_BASE + 20 ) +#define HBQT_TYPE_QLatin1Char ( HBQT_TYPE_QTCORE_BASE + 21 ) +#define HBQT_TYPE_QLatin1String ( HBQT_TYPE_QTCORE_BASE + 22 ) +#define HBQT_TYPE_QLine ( HBQT_TYPE_QTCORE_BASE + 23 ) +#define HBQT_TYPE_QLineF ( HBQT_TYPE_QTCORE_BASE + 24 ) +#define HBQT_TYPE_QList ( HBQT_TYPE_QTCORE_BASE + 25 ) +#define HBQT_TYPE_QLocale ( HBQT_TYPE_QTCORE_BASE + 26 ) +#define HBQT_TYPE_QMimeData ( HBQT_TYPE_QTCORE_BASE + 27 ) +#define HBQT_TYPE_QModelIndex ( HBQT_TYPE_QTCORE_BASE + 28 ) +#define HBQT_TYPE_QObject ( HBQT_TYPE_QTCORE_BASE + 29 ) +#define HBQT_TYPE_QPoint ( HBQT_TYPE_QTCORE_BASE + 30 ) +#define HBQT_TYPE_QPointF ( HBQT_TYPE_QTCORE_BASE + 31 ) +#define HBQT_TYPE_QProcess ( HBQT_TYPE_QTCORE_BASE + 32 ) +#define HBQT_TYPE_QRect ( HBQT_TYPE_QTCORE_BASE + 33 ) +#define HBQT_TYPE_QRectF ( HBQT_TYPE_QTCORE_BASE + 34 ) +#define HBQT_TYPE_QRegExp ( HBQT_TYPE_QTCORE_BASE + 35 ) +#define HBQT_TYPE_QResource ( HBQT_TYPE_QTCORE_BASE + 36 ) +#define HBQT_TYPE_QSettings ( HBQT_TYPE_QTCORE_BASE + 37 ) +#define HBQT_TYPE_QSignalMapper ( HBQT_TYPE_QTCORE_BASE + 38 ) +#define HBQT_TYPE_QSize ( HBQT_TYPE_QTCORE_BASE + 39 ) +#define HBQT_TYPE_QSizeF ( HBQT_TYPE_QTCORE_BASE + 40 ) +#define HBQT_TYPE_QStringList ( HBQT_TYPE_QTCORE_BASE + 41 ) +#define HBQT_TYPE_QStringRef ( HBQT_TYPE_QTCORE_BASE + 42 ) +#define HBQT_TYPE_QTextBoundaryFinder ( HBQT_TYPE_QTCORE_BASE + 43 ) +#define HBQT_TYPE_QTextCodec ( HBQT_TYPE_QTCORE_BASE + 44 ) +#define HBQT_TYPE_QTextDecoder ( HBQT_TYPE_QTCORE_BASE + 45 ) +#define HBQT_TYPE_QTextEncoder ( HBQT_TYPE_QTCORE_BASE + 46 ) +#define HBQT_TYPE_QTextStream ( HBQT_TYPE_QTCORE_BASE + 47 ) +#define HBQT_TYPE_QThread ( HBQT_TYPE_QTCORE_BASE + 48 ) +#define HBQT_TYPE_QTime ( HBQT_TYPE_QTCORE_BASE + 49 ) +#define HBQT_TYPE_QTimeLine ( HBQT_TYPE_QTCORE_BASE + 50 ) +#define HBQT_TYPE_QTimer ( HBQT_TYPE_QTCORE_BASE + 51 ) +#define HBQT_TYPE_QTranslator ( HBQT_TYPE_QTCORE_BASE + 52 ) +#define HBQT_TYPE_QUrl ( HBQT_TYPE_QTCORE_BASE + 53 ) +#define HBQT_TYPE_QVariant ( HBQT_TYPE_QTCORE_BASE + 54 ) #endif /* __HBQTCORE_H */ diff --git a/harbour/contrib/hbqt/qtcore/hbqt_hbqstring.cpp b/harbour/contrib/hbqt/qtcore/hbqt_hbqstring.cpp new file mode 100644 index 0000000000..f8fa2d08d8 --- /dev/null +++ b/harbour/contrib/hbqt/qtcore/hbqt_hbqstring.cpp @@ -0,0 +1,97 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2010 Pritpal Bedi + * + * 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_hbqstring.h" + +HBQString::HBQString() +{ +} + +HBQString::HBQString( const QChar * unicode, int size ) : QString( unicode, size ) +{ +} + +HBQString::HBQString( QChar ch ) : QString( ch ) +{ +} + +HBQString::HBQString( int size, QChar ch ) : QString( size, ch ) +{ +} + +HBQString::HBQString( const QLatin1String & str ) : QString( str ) +{ +} + +HBQString::HBQString( const QString & other ) : QString( other ) +{ +} + +HBQString::HBQString( const char * str ) : QString( str ) +{ +} + +HBQString::HBQString( const QByteArray & ba ) : QString( ba ) +{ +} + +HBQString::~HBQString() +{ +} + +#endif diff --git a/harbour/contrib/hbqt/qtcore/hbqt_hbqstring.h b/harbour/contrib/hbqt/qtcore/hbqt_hbqstring.h new file mode 100644 index 0000000000..8d7ca4d842 --- /dev/null +++ b/harbour/contrib/hbqt/qtcore/hbqt_hbqstring.h @@ -0,0 +1,81 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT wrapper main header + * + * Copyright 2010 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_HBQSTRING_H +#define HBQT_HBQSTRING_H + +/*----------------------------------------------------------------------*/ + +#include "hbqtcore.h" + +#include +#include +#include + +class HBQString: public QString +{ + +public: + HBQString(); + HBQString( const QChar * unicode, int size ); + HBQString( QChar ch ); + HBQString( int size, QChar ch ); + HBQString( const QLatin1String & str ); + HBQString( const QString & other ); + HBQString( const char * str ); + HBQString( const QByteArray & ba ); + ~HBQString(); +}; + +/*----------------------------------------------------------------------*/ + +#endif diff --git a/harbour/contrib/hbqt/qtcore/hbqtcore.hbm b/harbour/contrib/hbqt/qtcore/hbqtcore.hbm index ed2b76ae5f..e18f653b09 100644 --- a/harbour/contrib/hbqt/qtcore/hbqtcore.hbm +++ b/harbour/contrib/hbqt/qtcore/hbqtcore.hbm @@ -11,6 +11,7 @@ hbqt_base.cpp hbqt_destruct.cpp hbqt_hbevents.cpp hbqt_hbslots.cpp +hbqt_hbqstring.cpp hbqt_misc.prg diff --git a/harbour/contrib/hbqt/qtcore/qth/HBQString.qth b/harbour/contrib/hbqt/qtcore/qth/HBQString.qth new file mode 100644 index 0000000000..5d3cc379c4 --- /dev/null +++ b/harbour/contrib/hbqt/qtcore/qth/HBQString.qth @@ -0,0 +1,316 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009-2010 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 "hbapi.h" +#include "hbapiitm.h" +#include "hbvm.h" + +#include +#include +#include + +#include "../hbqt_hbqstring.h" + +/* + * HBQString () + * HBQString ( const QChar * unicode, int size ) + * HBQString ( QChar ch ) + * HBQString ( int size, QChar ch ) + * HBQString ( const QLatin1String & str ) + * HBQString ( const QString & other ) + * HBQString ( const char * str ) + * HBQString ( const QByteArray & ba ) + * ~HBQString () + */ +HB_FUNC( QT_HBQSTRING ) +{ + if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) + { + hb_retptr( new HBQString( hbqt_par_QString( 1 ) ) ); + } + else if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) ) + { + hb_retptr( new HBQString( ( const char * ) hb_parptr( 1 ) ) ); + } + else + { + hb_retptr( new HBQString() ); + } +} + + + +class Null +typedef ConstIterator +typedef Iterator +enum NormalizationForm { NormalizationForm_D, NormalizationForm_C, NormalizationForm_KD, NormalizationForm_KC } +enum SectionFlag { SectionDefault, SectionSkipEmpty, SectionIncludeLeadingSep, SectionIncludeTrailingSep, SectionCaseInsensitiveSeps } +flags SectionFlags +enum SplitBehavior { KeepEmptyParts, SkipEmptyParts } +typedef const_iterator +typedef iterator + + + +QString & append ( const QString & str ) +QString & append ( const QStringRef & reference ) +QString & append ( const QLatin1String & str ) +QString & append ( const QByteArray & ba ) +QString & append ( const char * str ) +QString & append ( QChar ch ) +QString arg ( const QString & a, int fieldWidth = 0, const QChar & fillChar = QLatin1Char( ' ' ) ) const +QString arg ( const QString & a1, const QString & a2 ) const +QString arg ( const QString & a1, const QString & a2, const QString & a3 ) const +QString arg ( const QString & a1, const QString & a2, const QString & a3, const QString & a4 ) const +QString arg ( const QString & a1, const QString & a2, const QString & a3, const QString & a4, const QString & a5 ) const +QString arg ( const QString & a1, const QString & a2, const QString & a3, const QString & a4, const QString & a5, const QString & a6 ) const +QString arg ( const QString & a1, const QString & a2, const QString & a3, const QString & a4, const QString & a5, const QString & a6, const QString & a7 ) const +QString arg ( const QString & a1, const QString & a2, const QString & a3, const QString & a4, const QString & a5, const QString & a6, const QString & a7, const QString & a8 ) const +QString arg ( const QString & a1, const QString & a2, const QString & a3, const QString & a4, const QString & a5, const QString & a6, const QString & a7, const QString & a8, const QString & a9 ) const +QString arg ( int a, int fieldWidth = 0, int base = 10, const QChar & fillChar = QLatin1Char( ' ' ) ) const +QString arg ( uint a, int fieldWidth = 0, int base = 10, const QChar & fillChar = QLatin1Char( ' ' ) ) const +QString arg ( long a, int fieldWidth = 0, int base = 10, const QChar & fillChar = QLatin1Char( ' ' ) ) const +QString arg ( ulong a, int fieldWidth = 0, int base = 10, const QChar & fillChar = QLatin1Char( ' ' ) ) const +QString arg ( qlonglong a, int fieldWidth = 0, int base = 10, const QChar & fillChar = QLatin1Char( ' ' ) ) const +QString arg ( qulonglong a, int fieldWidth = 0, int base = 10, const QChar & fillChar = QLatin1Char( ' ' ) ) const +QString arg ( short a, int fieldWidth = 0, int base = 10, const QChar & fillChar = QLatin1Char( ' ' ) ) const +QString arg ( ushort a, int fieldWidth = 0, int base = 10, const QChar & fillChar = QLatin1Char( ' ' ) ) const +QString arg ( QChar a, int fieldWidth = 0, const QChar & fillChar = QLatin1Char( ' ' ) ) const +QString arg ( char a, int fieldWidth = 0, const QChar & fillChar = QLatin1Char( ' ' ) ) const +QString arg ( double a, int fieldWidth = 0, char format = 'g', int precision = -1, const QChar & fillChar = QLatin1Char( ' ' ) ) const +const QChar at ( int position ) const +//iterator begin () +//const_iterator begin () const +int capacity () const +void chop ( int n ) +void clear () +int compare ( const QString & other ) const +int compare ( const QString & other, Qt::CaseSensitivity cs ) const +int compare ( const QLatin1String & other, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +int compare ( const QStringRef & ref, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +//const_iterator constBegin () const +const QChar * constData () const +//const_iterator constEnd () const +//bool contains ( const QString & str, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +//bool contains ( QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +//bool contains ( const QRegExp & rx ) const +//bool contains ( QRegExp & rx ) const +int count ( const QString & str, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +int count ( QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +int count ( const QRegExp & rx ) const +int count () const +QChar * data () +const QChar * data () const +//iterator end () +//const_iterator end () const +bool endsWith ( const QString & s, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +bool endsWith ( const QLatin1String & s, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +bool endsWith ( const QChar & c, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +QString & fill ( QChar ch, int size = -1 ) +int indexOf ( const QString & str, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +int indexOf ( const QLatin1String & str, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +int indexOf ( QChar ch, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +int indexOf ( const QRegExp & rx, int from = 0 ) const +int indexOf ( QRegExp & rx, int from = 0 ) const +QString & insert ( int position, const QString & str ) +QString & insert ( int position, const QLatin1String & str ) +QString & insert ( int position, const QChar * unicode, int size ) +QString & insert ( int position, QChar ch ) +bool isEmpty () const +bool isNull () const +int lastIndexOf ( const QString & str, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +int lastIndexOf ( const QLatin1String & str, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +int lastIndexOf ( QChar ch, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +int lastIndexOf ( const QRegExp & rx, int from = -1 ) const +int lastIndexOf ( QRegExp & rx, int from = -1 ) const +QString left ( int n ) const +QString leftJustified ( int width, QChar fill = QLatin1Char( ' ' ), bool truncate = false ) const +QStringRef leftRef ( int n ) const +int length () const +int localeAwareCompare ( const QStringRef & other ) const +int localeAwareCompare ( const QString & other ) const +QString mid ( int position, int n = -1 ) const +QStringRef midRef ( int position, int n = -1 ) const +QString normalized ( NormalizationForm mode ) const +QString normalized ( NormalizationForm mode, QChar::UnicodeVersion version ) const +QString & prepend ( const QString & str ) +QString & prepend ( const QLatin1String & str ) +QString & prepend ( const QByteArray & ba ) +QString & prepend ( const char * str ) +QString & prepend ( QChar ch ) +void push_back ( const QString & other ) +void push_back ( QChar ch ) +void push_front ( const QString & other ) +void push_front ( QChar ch ) +QString & remove ( int position, int n ) +QString & remove ( QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive ) +QString & remove ( const QString & str, Qt::CaseSensitivity cs = Qt::CaseSensitive ) +QString & remove ( const QRegExp & rx ) +QString repeated ( int times ) const +QString & replace ( int position, int n, const QString & after ) +QString & replace ( int position, int n, const QChar * unicode, int size ) +QString & replace ( int position, int n, QChar after ) +QString & replace ( const QString & before, const QString & after, Qt::CaseSensitivity cs = Qt::CaseSensitive ) +QString & replace ( const QChar * before, int blen, const QChar * after, int alen, Qt::CaseSensitivity cs = Qt::CaseSensitive ) +QString & replace ( QChar ch, const QString & after, Qt::CaseSensitivity cs = Qt::CaseSensitive ) +QString & replace ( QChar before, QChar after, Qt::CaseSensitivity cs = Qt::CaseSensitive ) +QString & replace ( const QLatin1String & before, const QLatin1String & after, Qt::CaseSensitivity cs = Qt::CaseSensitive ) +QString & replace ( const QLatin1String & before, const QString & after, Qt::CaseSensitivity cs = Qt::CaseSensitive ) +QString & replace ( const QString & before, const QLatin1String & after, Qt::CaseSensitivity cs = Qt::CaseSensitive ) +QString & replace ( QChar c, const QLatin1String & after, Qt::CaseSensitivity cs = Qt::CaseSensitive ) +QString & replace ( const QRegExp & rx, const QString & after ) +void reserve ( int size ) +void resize ( int size ) +QString right ( int n ) const +QString rightJustified ( int width, QChar fill = QLatin1Char( ' ' ), bool truncate = false ) const +QStringRef rightRef ( int n ) const +QString section ( QChar sep, int start, int end = -1, SectionFlags flags = SectionDefault ) const +QString section ( const QString & sep, int start, int end = -1, SectionFlags flags = SectionDefault ) const +QString section ( const QRegExp & reg, int start, int end = -1, SectionFlags flags = SectionDefault ) const +QString & setNum ( int n, int base = 10 ) +QString & setNum ( uint n, int base = 10 ) +QString & setNum ( long n, int base = 10 ) +QString & setNum ( ulong n, int base = 10 ) +QString & setNum ( qlonglong n, int base = 10 ) +QString & setNum ( qulonglong n, int base = 10 ) +QString & setNum ( short n, int base = 10 ) +QString & setNum ( ushort n, int base = 10 ) +QString & setNum ( double n, char format = 'g', int precision = 6 ) +QString & setNum ( float n, char format = 'g', int precision = 6 ) +QString & setUnicode ( const QChar * unicode, int size ) +QString & setUtf16 ( const ushort * unicode, int size ) +QString simplified () const +int size () const +QStringList split ( const QString & sep, SplitBehavior behavior = KeepEmptyParts, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +QStringList split ( const QChar & sep, SplitBehavior behavior = KeepEmptyParts, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +QStringList split ( const QRegExp & rx, SplitBehavior behavior = KeepEmptyParts ) const +//QString & sprintf ( const char * cformat, ... ) +void squeeze () +bool startsWith ( const QString & s, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +bool startsWith ( const QLatin1String & s, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +bool startsWith ( const QChar & c, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +QByteArray toAscii () const +QString toCaseFolded () const +double toDouble ( bool * ok = 0 ) const +float toFloat ( bool * ok = 0 ) const +int toInt ( bool * ok = 0, int base = 10 ) const +QByteArray toLatin1 () const +QByteArray toLocal8Bit () const +long toLong ( bool * ok = 0, int base = 10 ) const +qlonglong toLongLong ( bool * ok = 0, int base = 10 ) const +QString toLower () const +short toShort ( bool * ok = 0, int base = 10 ) const +//std::string toStdString () const +//std::wstring toStdWString () const +uint toUInt ( bool * ok = 0, int base = 10 ) const +ulong toULong ( bool * ok = 0, int base = 10 ) const +qulonglong toULongLong ( bool * ok = 0, int base = 10 ) const +ushort toUShort ( bool * ok = 0, int base = 10 ) const +QVector toUcs4 () const +QString toUpper () const +QByteArray toUtf8 () const +//int toWCharArray ( wchar_t * array ) const +QString trimmed () const +void truncate ( int position ) +const QChar * unicode () const +//const ushort * utf16 () const +//QString & vsprintf ( const char * cformat, va_list ap ) + +int compare ( const QString & s1, const QString & s2, Qt::CaseSensitivity cs ) +int compare ( const QString & s1, const QString & s2 ) +int compare ( const QString & s1, const QLatin1String & s2, Qt::CaseSensitivity cs = Qt::CaseSensitive ) +int compare ( const QLatin1String & s1, const QString & s2, Qt::CaseSensitivity cs = Qt::CaseSensitive ) +int compare ( const QString & s1, const QStringRef & s2, Qt::CaseSensitivity cs = Qt::CaseSensitive ) +QString fromAscii ( const char * str, int size = -1 ) +QString fromLatin1 ( const char * str, int size = -1 ) +QString fromLocal8Bit ( const char * str, int size = -1 ) +QString fromRawData ( const QChar * unicode, int size ) +//QString fromStdString ( const std::string & str ) +//QString fromStdWString ( const std::wstring & str ) +QString fromUcs4 ( const uint * unicode, int size = -1 ) +QString fromUtf8 ( const char * str, int size = -1 ) +QString fromUtf16 ( const ushort * unicode, int size = -1 ) +//QString fromWCharArray ( const wchar_t * string, int size = -1 ) +int localeAwareCompare ( const QString & s1, const QString & s2 ) +int localeAwareCompare ( const QString & s1, const QStringRef & s2 ) +QString number ( long n, int base = 10 ) +QString number ( double n, char format = 'g', int precision = 6 ) +QString number ( ulong n, int base = 10 ) +QString number ( int n, int base = 10 ) +QString number ( uint n, int base = 10 ) +QString number ( qlonglong n, int base = 10 ) +QString number ( qulonglong n, int base = 10 ) + + + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/qtcore/qth/QObject.qth b/harbour/contrib/hbqt/qtcore/qth/QObject.qth index 5b968bb35a..e63bf26e67 100644 --- a/harbour/contrib/hbqt/qtcore/qth/QObject.qth +++ b/harbour/contrib/hbqt/qtcore/qth/QObject.qth @@ -85,8 +85,8 @@ QList dynamicPropertyNames () const virtual bool event ( QEvent * e ) virtual bool eventFilter ( QObject * watched, QEvent * event ) //T findChild ( const QString & name = QString() ) const -QList findChildren ( const QString & name = QString() ) const -QList findChildren ( const QRegExp & regExp ) const +//QList findChildren ( const QString & name = QString() ) const +//QList findChildren ( const QRegExp & regExp ) const bool inherits ( const char * className ) const void installEventFilter ( QObject * filterObj ) bool isWidgetType () const diff --git a/harbour/contrib/hbqt/qtcore/qth/QStringRef.qth b/harbour/contrib/hbqt/qtcore/qth/QStringRef.qth new file mode 100644 index 0000000000..b48ad8bb66 --- /dev/null +++ b/harbour/contrib/hbqt/qtcore/qth/QStringRef.qth @@ -0,0 +1,137 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT Source Generator for Harbour + * + * Copyright 2009-2010 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 + + +/* + * QStringRef () + * QStringRef ( const QString * string ) + * QStringRef ( const QStringRef & other ) + * QStringRef ( const QString * string, int position, int length ) + * ~QStringRef () + */ +HB_FUNC( QT_QSTRINGREF ) +{ + if( hb_pcount() == 1 && HB_ISCHAR( 1 ) ) + { + hb_retptr( new QStringRef( ( const QString *) hb_parcx( 1 ) ) ); + } + else if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) ) + { + hb_retptr( new QStringRef( * hbqt_par_QStringRef( 1 ) ) ); + } + else if( hb_pcount() == 3 && HB_ISCHAR( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) ) + { + hb_retptr( new QStringRef( ( const QString *) hb_parcx( 1 ), hb_parni( 2 ), hb_parni( 3 ) ) ); + } + else + { + hb_retptr( new QStringRef() ); + } +} + + + + + + +//QStringRef appendTo ( QString * string ) const +const QChar at ( int position ) const +void clear () +int compare ( const QString & other, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +int compare ( const QStringRef & other, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +//int compare ( QLatin1String other, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const +const QChar * constData () const +int count () const +const QChar * data () const +bool isEmpty () const +bool isNull () const +int length () const +int localeAwareCompare ( const QString & other ) const +int localeAwareCompare ( const QStringRef & other ) const +int position () const +int size () const +//const QString * string () const +//QString toString () const +const QChar * unicode () const + +int compare ( const QStringRef & s1, const QString & s2, Qt::CaseSensitivity cs = Qt::CaseSensitive ) +int compare ( const QStringRef & s1, const QStringRef & s2, Qt::CaseSensitivity cs = Qt::CaseSensitive ) +//int compare ( const QStringRef & s1, QLatin1String s2, Qt::CaseSensitivity cs = Qt::CaseSensitive ) +int localeAwareCompare ( const QStringRef & s1, const QString & s2 ) +int localeAwareCompare ( const QStringRef & s1, const QStringRef & s2 ) + + + + + + + + + + + + + diff --git a/harbour/contrib/hbqt/utils/hbqtgen.prg b/harbour/contrib/hbqt/utils/hbqtgen.prg index c5f195b4f3..c9a7476a12 100644 --- a/harbour/contrib/hbqt/utils/hbqtgen.prg +++ b/harbour/contrib/hbqt/utils/hbqtgen.prg @@ -1085,11 +1085,15 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_, lList, fB cCmd := "" cPrgRet := "" - CASE "" $ aA[ PRT_CAST ] + CASE "QPair" $ aA[ PRT_CAST ] cCmd := "" cPrgRet := "" - - CASE "QPair" $ aA[ PRT_CAST ] + #if 0 + CASE "" $ aA[ PRT_CAST ] .AND. "QList" $ aA[ PRT_CAST ] + cCmd := "hb_retptrGC( hbqt_gcAllocate_QList( new QList< void * >( " + cCmn + " ), true ) )" + cPrgRet := "p" + cDocNM + #endif + CASE "" $ aA[ PRT_CAST ] cCmd := "" cPrgRet := "" @@ -1148,13 +1152,10 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_, lList, fB cPrgRet := "c" + cDocNM CASE aA[ PRT_L_FAR ] .AND. ( aA[ PRT_CAST ] $ "uchar" ) - //cCmd := "hb_retptr( ( " + aA[ PRT_CAST ] + "* ) " + cCmn + " )" cCmd := "hb_retc( ( const char * ) " + cCmn + " )" cPrgRet := "p" + cDocNM -// CASE aA[ PRT_L_FAR ] CASE aA[ PRT_L_FAR ] .AND. !( aA[ PRT_L_CONST ] ) - //cCmd := "hb_retptr( ( " + aA[ PRT_CAST ] + "* ) " + cCmn + " )" IF ( isAqtObject( aA[ PRT_CAST ] ) ) cCmd := Get_Command( aA[ PRT_CAST ], cCmn, .F. ) ELSE @@ -1162,23 +1163,21 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_, lList, fB ENDIF cPrgRet := "p" + cDocNM - CASE ( isAqtObject( aA[ PRT_CAST ] ) ) .AND. ; + CASE ( isAqtObject( aA[ PRT_CAST ] ) ) .AND. ; aA[ PRT_L_FAR ] .AND. ; aA[ PRT_L_CONST ] .AND. ; ( "Abstract" $ aA[ PRT_CAST ] ) - //cCmd := "hb_retptr( ( " + aA[ PRT_CAST ] + "* ) " + cCmn + " )" cCmd := "hb_retptrGC( hbqt_gcAllocate_" + aA[ PRT_CAST ] + "( ( void * ) " + cCmn + ", false ) )" cPrgRet := "p" + cDocNM - CASE ( isAqtObject( aA[ PRT_CAST ] ) ) .AND. ; + CASE ( isAqtObject( aA[ PRT_CAST ] ) ) .AND. ; aA[ PRT_L_FAR ] .AND. ; aA[ PRT_L_CONST ] .AND. ; aA[ PRT_L_VIRT ] - //cCmd := "hb_retptr( ( " + aA[ PRT_CAST ] + "* ) " + cCmn + " )" cCmd := "hb_retptrGC( hbqt_gcAllocate_" + aA[ PRT_CAST ] + "( ( void * ) " + cCmn + ", false ) )" cPrgRet := "p" + cDocNM - CASE ( isAqtObject( aA[ PRT_CAST ] ) ) .AND. ; + CASE ( isAqtObject( aA[ PRT_CAST ] ) ) .AND. ; aA[ PRT_L_FAR ] .AND. ; aA[ PRT_L_CONST ] .AND. ; aA[ PRT_L_CONST_LAST ] diff --git a/harbour/contrib/hbqt/utils/qtcore.qtp b/harbour/contrib/hbqt/utils/qtcore.qtp index bd6a4f96fd..12d3a67ed6 100644 --- a/harbour/contrib/hbqt/utils/qtcore.qtp +++ b/harbour/contrib/hbqt/utils/qtcore.qtp @@ -8,6 +8,7 @@ HBEvents.qth HBSlots.qth +HBQString.qth ; QAbstractEventDispatcher.qth QAbstractItemModel.qth @@ -48,6 +49,7 @@ QSignalMapper.qth QSize.qth QSizeF.qth QStringList.qth +QStringRef.qth QTextBoundaryFinder.qth QTextCodec.qth QTextDecoder.qth