2012-06-12 16:22 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbqt/gtqtc/gtqtc.cpp
  
  * contrib/hbqt/hbmk2_qt.hb
  
  * contrib/hbqt/qtcore/hbqt.h
  * contrib/hbqt/qtcore/hbqt_bind.cpp
  * contrib/hbqt/qtcore/hbqt_hbqevents.cpp
  * contrib/hbqt/qtcore/hbqt_hbqslots.cpp
  * contrib/hbqt/qtcore/hbqt_init.cpp
  * contrib/hbqt/qtcore/hbqt_misc.prg
  * contrib/hbqt/qtcore/hbqt_pointer.cpp
  
  * contrib/hbqt/qtcore/qth/HBQEvents.qth
  * contrib/hbqt/qtcore/qth/HBQSlots.qth
  * contrib/hbqt/qtcore/qth/QLibraryInfo.qth
  * contrib/hbqt/qtcore/qth/QMimeData.qth
  
  * contrib/hbqt/qtgui/hbqt_hbqabstractitemmodel.cpp
  * contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp
  * contrib/hbqt/qtgui/hbqt_hbqgraphicsscene.cpp
  * contrib/hbqt/qtgui/hbqt_hbqplaintextedit.cpp
  * contrib/hbqt/qtgui/hbqt_hbqtableview.cpp
  * contrib/hbqt/qtgui/hbqt_init.cpp
  
  * contrib/hbqt/qtgui/qth/HBQAbstractItemModel.qth
  * contrib/hbqt/qtgui/qth/HBQGraphicsItem.qth
  * contrib/hbqt/qtgui/qth/HBQGraphicsScene.qth
  * contrib/hbqt/qtgui/qth/HBQPlainTextEdit.qth
  * contrib/hbqt/qtgui/qth/HBQTableView.qth
  * contrib/hbqt/qtgui/qth/QApplication.qth
  * contrib/hbqt/qtgui/qth/QClipboard.qth
  * contrib/hbqt/qtgui/qth/QDirModel.qth
  * contrib/hbqt/qtgui/qth/QDropEvent.qth
  * contrib/hbqt/qtgui/qth/QFileSystemModel.qth
  * contrib/hbqt/qtgui/qth/QGraphicsSceneDragDropEvent.qth
  
  * contrib/hbqt/qtnetwork/hbqt_init.cpp
  
  * contrib/hbqt/tests/draggable.prg
  
  * contrib/hbxbp/xbpbrowse.prg

  * contrib/hbide/ideedit.prg
  * contrib/hbide/idefindreplace.prg
    
    + Implemented: Revamped HBQT. 
        The complete code base has been cleaned as per new API
        and there is no leftover is kept inside the sources.
        All demos and hbIDE seems TO be working fine with few 
        exceptions here and there, but usually all seems fine.
        The only issue left, so far I can assess is that no object 
        is subject to destrution if a connect is issued onto that.
        And I have no idea how TO handle this situation. It is the 
        programmers responsibility to disconnect whenever an object 
        is supposed to go out of scope.
        
        TODO: still debug tracelog entries ( under HB_TR_DEBUG ) are 
              retained in hbqt_bind.c which are schduled TO be 
              removed once code base stabilizes enough.
This commit is contained in:
Pritpal Bedi
2012-06-12 23:45:33 +00:00
parent 5ca8d16243
commit b90666e364
36 changed files with 491 additions and 1657 deletions

View File

@@ -16,6 +16,67 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-06-12 16:22 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/gtqtc/gtqtc.cpp
* contrib/hbqt/hbmk2_qt.hb
* contrib/hbqt/qtcore/hbqt.h
* contrib/hbqt/qtcore/hbqt_bind.cpp
* contrib/hbqt/qtcore/hbqt_hbqevents.cpp
* contrib/hbqt/qtcore/hbqt_hbqslots.cpp
* contrib/hbqt/qtcore/hbqt_init.cpp
* contrib/hbqt/qtcore/hbqt_misc.prg
* contrib/hbqt/qtcore/hbqt_pointer.cpp
* contrib/hbqt/qtcore/qth/HBQEvents.qth
* contrib/hbqt/qtcore/qth/HBQSlots.qth
* contrib/hbqt/qtcore/qth/QLibraryInfo.qth
* contrib/hbqt/qtcore/qth/QMimeData.qth
* contrib/hbqt/qtgui/hbqt_hbqabstractitemmodel.cpp
* contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp
* contrib/hbqt/qtgui/hbqt_hbqgraphicsscene.cpp
* contrib/hbqt/qtgui/hbqt_hbqplaintextedit.cpp
* contrib/hbqt/qtgui/hbqt_hbqtableview.cpp
* contrib/hbqt/qtgui/hbqt_init.cpp
* contrib/hbqt/qtgui/qth/HBQAbstractItemModel.qth
* contrib/hbqt/qtgui/qth/HBQGraphicsItem.qth
* contrib/hbqt/qtgui/qth/HBQGraphicsScene.qth
* contrib/hbqt/qtgui/qth/HBQPlainTextEdit.qth
* contrib/hbqt/qtgui/qth/HBQTableView.qth
* contrib/hbqt/qtgui/qth/QApplication.qth
* contrib/hbqt/qtgui/qth/QClipboard.qth
* contrib/hbqt/qtgui/qth/QDirModel.qth
* contrib/hbqt/qtgui/qth/QDropEvent.qth
* contrib/hbqt/qtgui/qth/QFileSystemModel.qth
* contrib/hbqt/qtgui/qth/QGraphicsSceneDragDropEvent.qth
* contrib/hbqt/qtnetwork/hbqt_init.cpp
* contrib/hbqt/tests/draggable.prg
* contrib/hbxbp/xbpbrowse.prg
* contrib/hbide/ideedit.prg
* contrib/hbide/idefindreplace.prg
+ Implemented: Revamped HBQT.
The complete code base has been cleaned as per new API
and there is no leftover is kept inside the sources.
All demos and hbIDE seems TO be working fine with few
exceptions here and there, but usually all seems fine.
The only issue left, so far I can assess is that no object
is subject to destrution if a connect is issued onto that.
And I have no idea how TO handle this situation. It is the
programmers responsibility to disconnect whenever an object
is supposed to go out of scope.
TODO: still debug tracelog entries ( under HB_TR_DEBUG ) are
retained in hbqt_bind.c which are schduled TO be
removed once code base stabilizes enough.
2012-06-12 22:21 UTC+0200 Francesco Perillo (fperillo at gmail.com)
* contrib/hbqt/qtgui/qth/filelist.hbm
* added remark to QDeclarativeParserStatus since all other

View File

@@ -415,15 +415,9 @@ METHOD IdeEdit:execEvent( nMode, p, p1 )
::oEM:aActions[ 19, 2 ]:setEnabled( len( ::oEditor:aEdits ) == 0 .OR. ::oEditor:nSplOrient == -1 .OR. ::oEditor:nSplOrient == 2 )
::oEM:aActions[ 21, 2 ]:setEnabled( n > 0 )
#ifdef __HBQT_REVAMP__
IF empty( qAct := ::oEM:qContextMenu:exec( ::qEdit:mapToGlobal( p ) ) )
RETURN Self
ENDIF
#else
IF ! ( qAct := ::oEM:qContextMenu:exec( ::qEdit:mapToGlobal( p ) ) ):hasValidPointer()
RETURN Self
ENDIF
#endif
cAct := strtran( qAct:text(), "&", "" )
SWITCH cAct
CASE "Split Horizontally"

View File

@@ -1017,9 +1017,6 @@ METHOD IdeFindInFiles:replaceAll()
METHOD IdeFindInFiles:execContextMenu( p )
LOCAL nLine, qCursor, qMenu, qAct, cAct, cFind
#ifndef __HBQT_REVAMP__
LOCAL aAct := {}
#endif
qCursor := ::oUI:q_editResults:textCursor()
nLine := qCursor:blockNumber() + 1
@@ -1027,7 +1024,6 @@ METHOD IdeFindInFiles:execContextMenu( p )
IF nLine <= len( ::aInfo )
qMenu := QMenu() // ::oUI:q_editResults )
#ifdef __HBQT_REVAMP__
qMenu:addAction( "Copy" )
qMenu:addAction( "Select All" )
qMenu:addAction( "Clear" )
@@ -1046,28 +1042,7 @@ METHOD IdeFindInFiles:execContextMenu( p )
qMenu:addAction( "Zom In" )
qMenu:addAction( "Zoom Out" )
#else
aadd( aAct, qMenu:addAction( "Copy" ) )
aadd( aAct, qMenu:addAction( "Select All" ) )
aadd( aAct, qMenu:addAction( "Clear" ) )
aadd( aAct, qMenu:addAction( "Print" ) )
aadd( aAct, qMenu:addAction( "Save as..." ) )
aadd( aAct, qMenu:addSeparator() )
aadd( aAct, qMenu:addAction( "Find" ) )
aadd( aAct, qMenu:addSeparator() )
IF ::aInfo[ nLine, 1 ] == -2 /* Found Line */
aadd( aAct, qMenu:addAction( "Replace Line" ) )
ELSEIF ::aInfo[ nLine, 1 ] == -1 /* Source File */
aadd( aAct, qMenu:addAction( "Open" ) )
aadd( aAct, qMenu:addAction( "Replace All" ) )
ENDIF
aadd( aAct, qMenu:addSeparator() )
aadd( aAct, qMenu:addAction( "Zoom In" ) )
aadd( aAct, qMenu:addAction( "Zoom Out" ) )
#endif
IF __objGetClsName( qAct := qMenu:exec( ::oUI:q_editResults:mapToGlobal( p ) ) ) == "QACTION"
IF ! empty( qAct := qMenu:exec( ::oUI:q_editResults:mapToGlobal( p ) ) )
IF valtype( cAct := qAct:text() ) == "C"
SWITCH cAct

View File

@@ -1127,13 +1127,14 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
break;
case HB_GTI_WIDGET:
//pInfo->pResult = hb_itemPutPtrGC( pInfo->pResult, hbqt_gcAllocate_QWidget( pWVT->qWnd, false ) );
pInfo->pResult = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QMainWindow( pWVT->qWnd, false ), "HB_QMAINWINDOW" ) );
//pInfo->pResult = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QMainWindow( pWVT->qWnd, false ), "HB_QMAINWINDOW" ) );
pInfo->pResult = hbqt_bindSetHbObject( NULL, pWVT->qWnd, "HB_QMAINWINDOW", NULL, HBQT_BIT_QOBJECT );
break;
case HB_GTI_DRAWINGAREA:
//pInfo->pResult = hb_itemPutPtrGC( pInfo->pResult, hbqt_gcAllocate_QMainWindow( pWVT->qWnd->_drawingArea, false ) );
pInfo->pResult = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QWidget( pWVT->qWnd->_drawingArea, false ), "HB_QWIDGET" ) );
//pInfo->pResult = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QWidget( pWVT->qWnd->_drawingArea, false ), "HB_QWIDGET" ) );
pInfo->pResult = hbqt_bindSetHbObject( NULL, pWVT->qWnd->_drawingArea, "HB_QWIDGET", NULL, HBQT_BIT_QOBJECT );
break;
case HB_GTI_EVENTLOOP:

View File

@@ -33,8 +33,6 @@
#include "directry.ch"
#include "hbclass.ch"
//#define __HBQT_REVAMP__
#define I_( x ) hb_i18n_gettext( x )
#if defined( __HBSCRIPT__HBMK )
@@ -1089,8 +1087,6 @@ CREATE CLASS HbQtSource
METHOD parseVariables( cProto )
METHOD build()
METHOD exploreExtensions()
METHOD buildExtendedSource( t_ )
METHOD buildExtendedHeader()
METHOD getConstructor()
METHOD getConstructorW()
METHOD buildCppCode( oMtd )
@@ -1237,11 +1233,7 @@ METHOD HbQtSource:new( cQtModule, cQtVer, cQTHFileName, cCPPFileName, cDOCFileNa
::isDetached := AScan( ::cls_, {| e_ | Lower( e_[ 1 ] ) == "detached" .AND. Lower( e_[ 2 ] ) == "yes" } ) > 0
::isConstructor := AScan( ::cls_, {| e_ | Lower( e_[ 1 ] ) == "constructor" .AND. Lower( e_[ 2 ] ) == "no" } ) == 0
::isDestructor := AScan( ::cls_, {| e_ | Lower( e_[ 1 ] ) == "destructor" .AND. Lower( e_[ 2 ] ) == "no" } ) == 0
#ifdef __HBQT_REVAMP__
::isObject := qth_is_QObject( ::cQtObject )
#else
::isObject := AScan( ::cls_, {| e_ | Lower( e_[ 1 ] ) == "qobject" .AND. Lower( e_[ 2 ] ) == "no" } ) == 0
#endif
::areMethodsClubbed := AScan( ::cls_, {| e_ | Lower( e_[ 1 ] ) == "clubmethods" .AND. Lower( e_[ 2 ] ) == "no" } ) == 0
/* Determine Constructor - but this is hacky a bit. What could be easiest ? */
IF ! ::isConstructor
@@ -1324,7 +1316,6 @@ METHOD HbQtSource:new( cQtModule, cQtVer, cQTHFileName, cCPPFileName, cDOCFileNa
METHOD HbQtSource:build()
LOCAL i, s, oMtd, tmp, tmp1, n, k, aLine, uQtObject
LOCAL cObjPfx := iif( ::lBuildExtended, "Q", "" )
uQtObject := Upper( ::cQtObject )
@@ -1346,26 +1337,6 @@ METHOD HbQtSource:build()
AAdd( aLine, "" )
ENDIF
/* Insert information about prototypes not converted to functions */
#if 0
AAdd( aLine, "/*" )
AAdd( aLine, " * Constructed[ " + hb_ntos( ::nCnvrtd ) + "/" + hb_ntos( ::nFuncs ) + " [ " + hb_ntos( ::nCnvrtd / ::nFuncs * 100 ) + "% ] ]" )
AAdd( aLine, " * " )
IF ! Empty( ::dummy_ )
AAdd( aLine, " * *** Unconvered Prototypes ***" )
AAdd( aLine, " * " )
AEval( ::dummy_, {| e | AAdd( aLine, " * " + e ) } )
ENDIF
IF ! Empty( ::cmntd_ )
AAdd( aLine, " * " )
AAdd( aLine, " * " + "*** Commented out prototypes ***" )
AAdd( aLine, " * " )
AEval( ::cmntd_, {| e | AAdd( aLine, " * " + e ) } )
ENDIF
AAdd( aLine, " */ " )
AAdd( aLine, "" )
#endif
IF ::isConstructor
FOR i := 3 TO Len( ::new_ ) - 1
IF !( Left( LTrim( ::new_[ i ] ), 2 ) == "//" )
@@ -1381,9 +1352,6 @@ METHOD HbQtSource:build()
NEXT
ENDIF
/*----------------------------------------------------------------------*/
/* Generate necessary declarations */
AAdd( aLine, "HB_EXTERN_BEGIN" )
AAdd( aLine, "" )
AAdd( aLine, "HB_FUNC_EXTERN( __HB" + Upper( ::cQtModule ) + " );" )
@@ -1406,23 +1374,12 @@ METHOD HbQtSource:build()
IF ::cQtVer > "0x040500"
AAdd( aLine, "#if QT_VERSION >= " + ::cQtVer )
ENDIF
FOR EACH s IN ::hRef
AAdd( aLine, "extern HB_EXPORT HBQT_GC_FUNC( hbqt_gcRelease_" + s:__enumKey() + " );" )
NEXT
AAdd( aLine, "" )
FOR EACH s IN ::hRef
AAdd( aLine, "extern HB_EXPORT void * hbqt_gcAllocate_" + s:__enumKey() + "( void * pObj, bool bNew );" )
NEXT
#ifdef __HBQT_REVAMP__
AAdd( aLine, '' )
FOR EACH s IN ::hRef
AAdd( aLine, "extern HB_EXPORT void hbqt_del_" + s:__enumKey() + "( void * pObj, int iFlags );" )
NEXT
AAdd( aLine, '' )
AAdd( aLine, "/*..........................................................*/" )
AAdd( aLine, '' )
#endif
n := AScan( ::cls_, {| e_ | Left( Lower( e_[ 1 ] ), 7 ) == "inherit" .and. ! Empty( e_[ 2 ] ) } )
IF n > 0
@@ -1479,10 +1436,7 @@ METHOD HbQtSource:build()
AAdd( aLine, "#endif" )
ENDIF
AAdd( aLine, "" )
/*----------------------------------------------------------------------*/
/* Insert user defined code - INCLUDEs */
AAdd( aLine, "#include <QtCore/QPointer>" )
IF ! Empty( ::code_ )
IF ::cQtVer > "0x040500"
AAdd( aLine, "#if QT_VERSION >= " + ::cQtVer )
@@ -1499,171 +1453,10 @@ METHOD HbQtSource:build()
AAdd( aLine, "" )
ENDIF
#define __GCMARK__
::buildExtendedSource( aLine ) /* Insert protected functions */
IF ::cQtVer > "0x040500"
AAdd( aLine, "#if QT_VERSION >= " + ::cQtVer )
ENDIF
AAdd( aLine, "typedef struct" )
AAdd( aLine, "{" )
IF ::isObject .AND. ::isConstructor
AAdd( aLine, " QPointer< " + cObjPfx + ::cQtObject + " > ph;" )
ELSE
IF ::isList
AAdd( aLine, " " + cObjPfx + ::cQtObject + "< void * > * ph;" )
ELSE
AAdd( aLine, " " + cObjPfx + ::cQtObject + " * ph;" )
ENDIF
ENDIF
AAdd( aLine, " bool bNew;" )
AAdd( aLine, " PHBQT_GC_FUNC func;" )
AAdd( aLine, " PHBQT_GC_FUNC mark;" )
AAdd( aLine, "} HBQT_GC_T_" + ::cQtObject + ";" )
AAdd( aLine, " " )
AAdd( aLine, " " )
IF n > 0
AEval( ::code_, {| e | AAdd( aLine, StrTran( e, chr( 13 ) ) ) }, n )
ENDIF
AAdd( aLine, " " )
AAdd( aLine, " " )
AAdd( aLine, "HBQT_GC_FUNC( hbqt_gcRelease_" + ::cQtObject + " )" )
AAdd( aLine, "{" )
IF ::isDestructor .AND. ::isConstructor
IF ::isObject
AAdd( aLine, " HBQT_GC_T_" + ::cQtObject + " * p = ( HBQT_GC_T_" + ::cQtObject + " * ) Cargo; " )
AAdd( aLine, " " )
AAdd( aLine, " if( p )" )
AAdd( aLine, " {" )
AAdd( aLine, " if( p->bNew )" )
AAdd( aLine, " {" )
AAdd( aLine, " if( p->ph )" )
AAdd( aLine, " {" )
#ifdef _GEN_TRACE_
AAdd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "ph=%p %p YES_rel_' + ::cQtObject + ' /.\\ ", ( void * ) p, ( void * ) p->ph ) );' )
#endif
AAdd( aLine, " delete ( " + cObjPfx + ::cQtObject + " * )( p->ph ); " )
#ifdef _GEN_TRACE_
AAdd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "ph=%p %p YES_rel_' + ::cQtObject + ' \\./ ", ( void * ) p, ( void * ) p->ph ) );' )
#endif
AAdd( aLine, " }" )
#ifdef _GEN_TRACE_
AAdd( aLine, " else" )
AAdd( aLine, " {" )
AAdd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "ph=%p DEL_rel_' + ::cQtObject + ' : already deleted!", ( void * ) p->ph ) );' )
AAdd( aLine, " }" )
#endif
AAdd( aLine, " }" )
#ifdef _GEN_TRACE_
AAdd( aLine, " else" )
AAdd( aLine, " {" )
AAdd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "ph=%p PTR_rel_' + ::cQtObject + ' : not a _new_ object", ( void * ) p->ph ) );' )
AAdd( aLine, " }" )
#endif
AAdd( aLine, " p->ph = NULL;" )
AAdd( aLine, " }" )
#ifdef _GEN_TRACE_
AAdd( aLine, " else" )
AAdd( aLine, " {" )
AAdd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "DEL_rel_' + ::cQtObject + ' : not valid GC object" ) );' )
AAdd( aLine, " }" )
#endif
ELSE
AAdd( aLine, " HBQT_GC_T_" + ::cQtObject + " * p = ( HBQT_GC_T_" + ::cQtObject + " * ) Cargo; " )
AAdd( aLine, " " )
AAdd( aLine, " if( p )" )
AAdd( aLine, " {" )
AAdd( aLine, " if( p->bNew )" )
AAdd( aLine, " {" )
AAdd( aLine, " if( p->ph )" )
AAdd( aLine, " {" )
#ifdef _GEN_TRACE_
AAdd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "ph=%p _rel_' + ::cQtObject + ' /.\\", ( void * ) p->ph ) );' )
#endif
IF ::isList
AAdd( aLine, " int i; " )
AAdd( aLine, " for( i = 0; i < p->ph->size(); i++ )" )
AAdd( aLine, " {" )
AAdd( aLine, " if( p->ph->at( i ) != NULL )" )
AAdd( aLine, " {" )
AAdd( aLine, " hb_itemRelease( p->ph->at( i ) );" )
AAdd( aLine, " }" )
AAdd( aLine, " }" )
ENDIF
AAdd( aLine, " delete ( ( " + cObjPfx + ::cQtObject + iif( ::isList, "< void * >", "" ) + " * ) p->ph ); " )
#ifdef _GEN_TRACE_
AAdd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "ph=%p YES_rel_' + ::cQtObject + ' \\./", ( void * ) p->ph ) );' )
#endif
AAdd( aLine, " }" )
#ifdef _GEN_TRACE_
AAdd( aLine, " else" )
AAdd( aLine, " {" )
AAdd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "ph=%p DEL_rel_' + ::cQtObject + ' : object already deleted!", ( void * ) p->ph ) );' )
AAdd( aLine, " }" )
#endif
AAdd( aLine, " }" )
#ifdef _GEN_TRACE_
AAdd( aLine, " else" )
AAdd( aLine, " {" )
AAdd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "ph=%p DEL_rel_' + ::cQtObject + ' : not a _new_ object!", ( void * ) p->ph ) );' )
AAdd( aLine, " }" )
#endif
AAdd( aLine, " p->ph = NULL;" )
AAdd( aLine, " }" )
#ifdef _GEN_TRACE_
AAdd( aLine, " else" )
AAdd( aLine, " {" )
AAdd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "ph=%p PTR_rel_' + ::cQtObject + ' : not a valid GC object!", ( void * ) p ) );' )
AAdd( aLine, " }" )
#endif
ENDIF
ELSE
AAdd( aLine, " /* CASE else */" )
AAdd( aLine, " HBQT_GC_T * p = ( HBQT_GC_T * ) Cargo;" )
AAdd( aLine, " " )
AAdd( aLine, " if( p )" ) //&& p->bNew )" )
AAdd( aLine, " p->ph = NULL;" )
ENDIF
AAdd( aLine, "}" )
AAdd( aLine, "" )
AAdd( aLine, "void * hbqt_gcAllocate_" + ::cQtObject + "( void * pObj, bool bNew )" )
AAdd( aLine, "{ " )
IF ::isObject
AAdd( aLine, " HBQT_GC_T_" + ::cQtObject + " * p = ( HBQT_GC_T_" + ::cQtObject + " * ) hb_gcAllocate( sizeof( HBQT_GC_T_" + ::cQtObject + " ), hbqt_gcFuncs() );" )
ELSE
AAdd( aLine, " HBQT_GC_T_" + ::cQtObject + " * p = ( HBQT_GC_T_" + ::cQtObject + " * ) hb_gcAllocate( sizeof( HBQT_GC_T_" + ::cQtObject + " ), hbqt_gcFuncs() );" )
ENDIF
AAdd( aLine, "" )
IF ::isObject .AND. ::isConstructor
AAdd( aLine, " new( & p->ph ) QPointer< "+ cObjPfx + ::cQtObject +" >( ( " + cObjPfx + ::cQtObject + " * ) pObj );" )
ELSE
AAdd( aLine, " p->ph = ( " + cObjPfx + ::cQtObject + iif( ::isList, "< void * >", "" ) + " * ) pObj;" )
ENDIF
AAdd( aLine, " p->bNew = bNew;" )
AAdd( aLine, " p->func = hbqt_gcRelease_" + ::cQtObject + ";" )
if n > 0
AAdd( aLine, " p->mark = hbqt_gcMark_" + ::cQtObject + ";" )
else
AAdd( aLine, " p->mark = NULL;" )
ENDIF
AAdd( aLine, "" )
#ifdef _GEN_TRACE_
AAdd( aLine, " if( bNew )" )
AAdd( aLine, " {" )
AAdd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "ph=%p _new_' + ::cQtObject + iif( ::isObject, ' under p->pq', '' ) + '", ( void * ) pObj ) );' )
AAdd( aLine, " }" )
AAdd( aLine, " else" )
AAdd( aLine, " {" )
AAdd( aLine, ' HB_TRACE( ' + ::cTrMode + ', ( "ph=%p NOT_new_' + ::cQtObject + '", ( void * ) pObj ) );' )
AAdd( aLine, " }" )
#endif
AAdd( aLine, " return p;" )
AAdd( aLine, "}" )
IF ::cQtVer > "0x040500"
AAdd( aLine, "#endif" )
ENDIF
@@ -1672,7 +1465,6 @@ METHOD HbQtSource:build()
AAdd( aLine, 'static PHB_ITEM s_oClass = NULL;' )
AAdd( aLine, "" )
#ifdef __HBQT_REVAMP__
AAdd( aLine, '' )
AAdd( aLine, 'void hbqt_del_' + ::cQtObject + '( void * pObj, int iFlags )' )
AAdd( aLine, '{' )
@@ -1698,9 +1490,7 @@ METHOD HbQtSource:build()
AAdd( aLine, ' pObj = NULL;' )
AAdd( aLine, ' }' )
AAdd( aLine, '}' )
AAdd( aLine, "/*..........................................................*/" )
AAdd( aLine, '' )
#endif
AAdd( aLine, 'void hbqt_register_' + lower( uQtObject ) + '()' )
AAdd( aLine, "{" )
@@ -1776,9 +1566,6 @@ METHOD HbQtSource:build()
/* Build Document File */
::buildDOC()
/* Build Protected Events Implimentation */
::buildExtendedHeader()
/* Distribute in specific lib subfolder */
hbqtgen_CreateTarget( ::cCPPFileName, aLine )
@@ -1795,171 +1582,6 @@ METHOD HbQtSource:exploreExtensions()
ENDIF
ENDIF
// check other events
// Test IF extended code is TO be built
IF ::lPaintEvent // .OR. ::lOtherEvent
::lBuildExtended := .t.
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD HbQtSource:buildExtendedHeader()
LOCAL cPath, txt_, cObj
IF ! ::lBuildExtended
RETURN Self
ENDIF
cObj := ::cQtObject
txt_:= {}
aadd( txt_, '' )
aadd( txt_, '#include "hbapiitm.h" ' )
aadd( txt_, '' )
aadd( txt_, 'HB_EXTERN_BEGIN' )
IF ::lPaintEvent
AAdd( txt_, 'extern HB_EXPORT void * hbqt_gcAllocate_QPaintEvent( void * pObj, bool bNew );' )
AAdd( txt_, 'extern HB_EXPORT void * hbqt_gcAllocate_QPainter( void * pObj, bool bNew );' )
ENDIF
aadd( txt_, 'HB_EXTERN_END' )
aadd( txt_, '' )
aadd( txt_, '#include <QtGui/' + cObj + '>' )
IF ::lPaintEvent
aadd( txt_, '#include <QtGui/QStyleOption>' )
aadd( txt_, '#include <QtGui/QPainter>' )
aadd( txt_, '#include <QtGui/QPaintEvent>' )
ENDIF
aadd( txt_, '' )
aadd( txt_, 'class Q' + cObj + ' : public ' + cObj )
aadd( txt_, '{' )
aadd( txt_, ' Q_OBJECT' )
aadd( txt_, '' )
aadd( txt_, 'public:' )
SWITCH cObj
CASE "QWidget"
aadd( txt_, ' Q' + cObj + '( QWidget * parent = 0, Qt::WindowFlags f = 0 );' )
EXIT
OTHERWISE
aadd( txt_, ' Q' + cObj + '( QWidget * parent = 0 );' )
EXIT
ENDSWITCH
aadd( txt_, ' virtual ~Q' + cObj + '();' )
aadd( txt_, '' )
aadd( txt_, ' void hbSetEventBlock( int event, PHB_ITEM pBlock );' )
aadd( txt_, '' )
IF ::lPaintEvent
aadd( txt_, ' PHB_ITEM pPaintBlock;' )
aadd( txt_, ' void paintEvent ( QPaintEvent * event );' )
ENDIF
aadd( txt_, '};' )
aadd( txt_, '' )
aeval( txt_, {|e,i| txt_[ i ] := trim( e ) } )
hb_fNameSplit( ::cCPPFileName, @cPath )
hbqtgen_CreateTarget( cPath + "q" + lower( ::cQtObject ) + ".h", txt_ )
RETURN Self
/*----------------------------------------------------------------------*/
METHOD HbQtSource:buildExtendedSource( t_ )
LOCAL txt_, cObj
IF ! ::lBuildExtended
RETURN Self
ENDIF
cObj := ::cQtObject
txt_ := {}
IF ::cQtVer > "0x040500"
AAdd( txt_, "#if QT_VERSION >= " + ::cQtVer )
ENDIF
AAdd( txt_, '' )
AAdd( txt_, '#include "q' + Lower( cObj ) + '.h"' )
AAdd( txt_, '' )
SWITCH cObj
CASE "QWidget"
AAdd( txt_, 'Q' + cObj + '::Q' + cObj + '( QWidget * parent, Qt::WindowFlags f ) : ' + cObj + '( parent, f )' )
EXIT
OTHERWISE
AAdd( txt_, 'Q' + cObj + '::Q' + cObj + '( QWidget * parent ) : ' + cObj + '( parent )' )
EXIT
ENDSWITCH
AAdd( txt_, '{' )
IF ::lPaintEvent
AAdd( txt_, ' pPaintBlock = NULL;' )
ENDIF
AAdd( txt_, '}' )
AAdd( txt_, 'Q' + cObj + '::~Q' + cObj + '()' )
AAdd( txt_, '{' )
IF ::lPaintEvent
AAdd( txt_, ' if( pPaintBlock )' )
AAdd( txt_, ' {' )
AAdd( txt_, ' hb_itemRelease( pPaintBlock );' )
AAdd( txt_, ' pPaintBlock = NULL;' )
AAdd( txt_, ' }' )
ENDIF
AAdd( txt_, '}' )
AAdd( txt_, 'void Q' + cObj + '::hbSetEventBlock( int event, PHB_ITEM pBlock )' )
AAdd( txt_, '{' )
AAdd( txt_, ' switch( event )' )
AAdd( txt_, ' {' )
IF ::lPaintEvent
AAdd( txt_, ' case QEvent::Paint:' )
AAdd( txt_, ' {' )
AAdd( txt_, ' if( pPaintBlock )' )
AAdd( txt_, ' {' )
AAdd( txt_, ' hb_itemRelease( pPaintBlock );' )
AAdd( txt_, ' }' )
AAdd( txt_, ' pPaintBlock = hb_itemNew( pBlock );' )
AAdd( txt_, ' hb_gcUnlock( pPaintBlock );' )
AAdd( txt_, ' break;' )
AAdd( txt_, ' }' )
ENDIF
AAdd( txt_, ' }' )
AAdd( txt_, '}' )
IF ::lPaintEvent
AAdd( txt_, 'void Q' + cObj + '::paintEvent( QPaintEvent * event )' )
AAdd( txt_, '{' )
AAdd( txt_, ' bool bEventHandelled = false;' )
AAdd( txt_, ' if( pPaintBlock )' )
AAdd( txt_, ' {' )
AAdd( txt_, ' QPainter painter( this );' )
AAdd( txt_, ' PHB_ITEM p0 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QPaintEvent( event, false ), "hb_QPaintEvent" ) );' )
AAdd( txt_, ' PHB_ITEM p1 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QPainter( &painter, false ), "hb_QPainter" ) );' )
AAdd( txt_, ' bEventHandelled = hb_itemGetL( hb_vmEvalBlockV( pPaintBlock, 2, p0, p1 ) );' )
AAdd( txt_, ' hb_itemRelease( p0 );' )
AAdd( txt_, ' hb_itemRelease( p1 );' )
AAdd( txt_, ' }' )
AAdd( txt_, ' if( ! bEventHandelled )' )
AAdd( txt_, ' {' )
AAdd( txt_, ' QStyleOption opt;' )
AAdd( txt_, ' opt.init( this );' )
AAdd( txt_, ' QPainter p( this );' )
AAdd( txt_, ' style()->drawPrimitive( QStyle::PE_Widget, &opt, &p, this );' )
AAdd( txt_, ' ' + cObj + '::paintEvent( event );' )
AAdd( txt_, ' }' )
AAdd( txt_, '}' )
ENDIF
AAdd( txt_, '' )
AEval( txt_, {|e| aadd( t_, trim( e ) ) } )
IF ::cQtVer > "0x040500"
AAdd( txt_, "#endif" )
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
@@ -1995,11 +1617,8 @@ METHOD HbQtSource:getConstructor()
ENDIF
NEXT
AAdd( aLine, " " )
#ifdef __HBQT_REVAMP__
AAdd( aLine, ' hb_itemReturnRelease( hbqt_bindSetHbObject( NULL, pObj, "' + 'HB_' + upper( ::cQtObject ) +'", hbqt_del_' + ::cQtObject + ', ' + qth_get_bits( ::cQtObject, ! ::isDetached ) + ' ) );' )
#else
AAdd( aLine, " hbqt_itemPushReturn( hbqt_gcAllocate_" + ::cQtObject + "( ( void * ) pObj, " + iif( ::isDetached, "false", "true" ) + " ), hb_stackSelfItem() );" )
#endif
ELSE
FOR i := 3 TO Len( ::new_ ) - 1
AAdd( aLine, ::new_[ i ] )
@@ -2019,8 +1638,6 @@ METHOD HbQtSource:getConstructorW()
LOCAL aLine := ::getConstructor()
AEval( aLine, {| e, i | aLine[ i ] := StrTran( e, "hbqt_bindSetHbObject", "hbqt_bindGetHbObject" ) } )
AEval( aLine, {| e, i | aLine[ i ] := StrTran( e, "hbqt_itemPushReturn" , "hbqt_create_objectGC" ) } )
AEval( aLine, {| e, i | aLine[ i ] := StrTran( e, "hb_stackSelfItem()" , '"HB_' + Upper( ::cQtObject ) + '"' ) } )
RETURN aLine
@@ -2090,13 +1707,13 @@ METHOD HbQtSource:getReturnAsList( oMtd, FP, cPrefix )
AAdd( aLines, cPrefix + ' qList->append( pItem );' )
ELSE
IF lFar
AAdd( aLines, cPrefix + ' qList->append( hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_' + cCast + '( ( void * ) qL.at( i ), false ) , "HB_' + Upper( cCast ) + '" ) ) );' )
AAdd( aLines, cPrefix + ' qList->append( hbqt_bindGetHbObject( NULL, ( void * ) qL.at( i ), "HB_' + Upper( cCast ) + '", NULL, ' + qth_get_bits( cCast, .f. ) + ' ) );' )
ELSE
AAdd( aLines, cPrefix + ' qList->append( hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_' + cCast + '( new ' + cCast + '( qL.at( i ) ), true ) , "HB_' + Upper( cCast ) + '" ) ) );' )
AAdd( aLines, cPrefix + ' qList->append( hbqt_bindGetHbObject( NULL, new ' + cCast + '( qL.at( i ) ), "HB_' + Upper( cCast ) + '", hbqt_del_' + cCast + ', ' + qth_get_bits( cCast, .t. ) + ' ) );' )
ENDIF
ENDIF
AAdd( aLines, cPrefix + '}' )
AAdd( aLines, cPrefix + 'hbqt_create_objectGC( hbqt_gcAllocate_QList( qList, true ), "HB_QLIST" );' )
AAdd( aLines, cPrefix + 'hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, new QList<PHB_ITEM>*( qList ), "HB_QLIST", hbqt_del_QList, HBQT_BIT_OWNER ) );' )
ENDIF
ELSE
AAdd( aLines, cPrefix + FP + ";" )
@@ -2191,9 +1808,6 @@ METHOD HbQtSource:getMethodBody( oMtd, cMtdName, aMethods )
ELSEIF ::cQtVer > "0x040500"
AAdd( txt_, " #if QT_VERSION >= " + ::cQtVer )
ENDIF
#ifdef _GEN_TRACE_
AAdd( txt_, ' HB_TRACE( ' + ::cTrMode + ', ( "' + ::cQtObject + ":" + oMtd:cHBFunc + '" ) );' )
#endif
/* If method is manually written in .qth - no more processing */
IF ! Empty( oMtd:fBody_ )
@@ -2786,12 +2400,7 @@ METHOD HbQtSource:parseProto( cProto, fBody_ )
ENDIF
oArg:cDoc := "c" + oMtd:cDocNM // oArg:cCast - W R O N G
oArg:cTypeHB := "C"
#if 0
CASE oArg:cCast == "FT_Face"
oArg:cBody := "hbqt_par_FT_Face( " + cHBIdx + " )"
oArg:cDoc := "c" + oMtd:cDocNM
oArg:cTypeHB := "C"
#endif
CASE oArg:lFar
cRef := oArg:cCast
oArg:cBody := "hbqt_par_" + oArg:cCast + "( " + cHBIdx + " )"
@@ -2888,7 +2497,7 @@ METHOD HbQtSource:buildCppCode( oMtd )
DO CASE
CASE oMtd:isConstructor
oMtd:cCmd := "hbqt_create_objectGC( hbqt_gcAllocate_" + ::cQtObject + "( new " + oRet:cCast + "( " + cPara + " ), true )" + ', "HB_' + Upper(::cQtObject) +'")'
oMtd:cCmd := 'hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ' + 'new ' + ::cQtObject + '( ' + cPara + ' )' + ', "' + 'HB_' + Upper( ::cQtObject ) + '", hbqt_del_' + ::cQtObject + ', ' + qth_get_bits( ::cQtObject, .t. ) + ' ) )'
oMtd:cPrgRet := "o" + ::cQtObject
CASE "<" $ oRet:cCast
@@ -2912,7 +2521,7 @@ METHOD HbQtSource:buildCppCode( oMtd )
cRefInList := StrTran( cRefInList, "*" )
cRefInList := StrTran( cRefInList, " " )
oMtd:isRetList := .T.
oMtd:cCmd := "hbqt_create_objectGC( hbqt_gcAllocate_QList( new " + oRet:cCast + "( " + oMtd:cCmn + " ), true ) " + ', "HB_' + Upper( ::cQtObject ) + '" )'
oMtd:cCmd := 'hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ' + 'new ' + oRet:cCast + '( ' + oMtd:cCmn + ' )' + ', "' + 'HB_' + 'QList' + '", hbqt_del_' + 'QList' + ', ' + qth_get_bits( 'QList', .t. ) + ' ) )'
oMtd:cPrgRet := "o" + oMtd:cDocNMRet
ENDCASE
@@ -2979,11 +2588,8 @@ METHOD HbQtSource:buildCppCode( oMtd )
oRet:lConst .AND. ;
"Abstract" $ oRet:cCast
cRef := oRet:cCast
#ifdef __HBQT_REVAMP__
oMtd:cCmd := 'hb_itemReturn( hbqt_bindGetHbObject( NULL, ' + "( void * ) " + oMtd:cCmn + ', "' + 'HB_' + Upper( oRet:cCast ) + '", hbqt_del_' + oRet:cCast + ', ' + qth_get_bits( oRet:cCast, .f. ) + ' ) )'
#else
oMtd:cCmd := "hbqt_create_objectGC( hbqt_gcAllocate_" + oRet:cCast + "( ( void * ) " + oMtd:cCmn + ", false ) " + ', "HB_' + Upper( ::cQtObject ) + '" )'
#endif
oMtd:cCmd := 'hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ' + "( void * ) " + oMtd:cCmn + ', "' + 'HB_' + Upper( oRet:cCast ) + '", hbqt_del_' + oRet:cCast + ', ' + qth_get_bits( oRet:cCast, .f. ) + ' ) )'
oMtd:cPrgRet := "o" + oMtd:cDocNMRet
CASE hbqtgen_isAqtObject( oRet:cCast ) .AND. ;
@@ -2991,11 +2597,8 @@ METHOD HbQtSource:buildCppCode( oMtd )
oRet:lConst .AND. ;
oRet:lVirt
cRef := oRet:cCast
#ifdef __HBQT_REVAMP__
oMtd:cCmd := 'hb_itemReturn( hbqt_bindGetHbObject( NULL, ' + "( void * ) " + oMtd:cCmn + ', "' + 'HB_' + Upper( oRet:cCast ) + '", hbqt_del_' + oRet:cCast + ', ' + qth_get_bits( oRet:cCast, .f. ) + ' ) )'
#else
oMtd:cCmd := "hbqt_create_objectGC( hbqt_gcAllocate_" + oRet:cCast + "( ( void * ) " + oMtd:cCmn + ", false ) " + ', "HB_' + Upper( ::cQtObject ) + '" )'
#endif
oMtd:cCmd := 'hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ' + "( void * ) " + oMtd:cCmn + ', "' + 'HB_' + Upper( oRet:cCast ) + '", hbqt_del_' + oRet:cCast + ', ' + qth_get_bits( oRet:cCast, .f. ) + ' ) )'
oMtd:cPrgRet := "o" + oMtd:cDocNMRet
CASE hbqtgen_isAqtObject( oRet:cCast ) .AND. ;
@@ -3217,11 +2820,9 @@ METHOD HbqtArgument:new( cTxt, cQtObject, enum_, lConstL, lIsRetArg )
/*----------------------------------------------------------------------*/
STATIC FUNCTION hbqtgen_Get_Command_1( cWgt, cCmn )
#ifdef __HBQT_REVAMP__
RETURN 'hb_itemReturn( hbqt_bindGetHbObject( NULL, ' + 'new ' + cWgt + '( *( ' + cCmn + ' ) )' + ', "' + 'HB_' + Upper( cWgt ) + '", hbqt_del_' + cWgt + ', ' + qth_get_bits( cWgt, .t. ) + ' ) )'
#else
RETURN "hbqt_create_objectGC( hbqt_gcAllocate_" + cWgt + "( new " + cWgt + "( *( " + cCmn + " ) ), true ), " + '"HB_' + Upper( cWgt ) + '")'
#endif
RETURN 'hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ' + 'new ' + cWgt + '( *( ' + cCmn + ' ) )' + ', "' + 'HB_' + Upper( cWgt ) + '", hbqt_del_' + cWgt + ', ' + qth_get_bits( cWgt, .t. ) + ' ) )'
/*----------------------------------------------------------------------*/
STATIC FUNCTION hbqtgen_Get_Command( cWgt, cCmn, lNew, isRetDetached )
@@ -3233,19 +2834,12 @@ STATIC FUNCTION hbqtgen_Get_Command( cWgt, cCmn, lNew, isRetDetached )
isRetDetached := .f.
ENDIF
#ifdef __HBQT_REVAMP__
IF lNew
RETURN 'hb_itemReturn( hbqt_bindGetHbObject( NULL, ' + 'new ' + cWgt + '( ' + cCmn + ' )' + ', "' + 'HB_' + Upper( cWgt ) + '", hbqt_del_' + cWgt + ', ' + qth_get_bits( cWgt, .t. ) + ' ) )'
RETURN 'hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ' + 'new ' + cWgt + '( ' + cCmn + ' )' + ', "' + 'HB_' + Upper( cWgt ) + '", hbqt_del_' + cWgt + ', ' + qth_get_bits( cWgt, .t. ) + ' ) )'
ELSE
RETURN 'hb_itemReturn( hbqt_bindGetHbObject( NULL, ' + cCmn + ', "' + 'HB_' + Upper( cWgt ) + '", hbqt_del_' + cWgt + ', ' + qth_get_bits( cWgt, isRetDetached ) + ' ) )'
RETURN 'hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ' + cCmn + ', "' + 'HB_' + Upper( cWgt ) + '", hbqt_del_' + cWgt + ', ' + qth_get_bits( cWgt, isRetDetached ) + ' ) )'
ENDIF
#else
IF lNew
RETURN "hbqt_create_objectGC( hbqt_gcAllocate_" + cWgt + "( new " + cWgt + "( " + cCmn + " ), true ), " + '"HB_' + Upper( cWgt ) +'" )'
ELSE
RETURN "hbqt_create_objectGC( hbqt_gcAllocate_" + cWgt + "( " + cCmn + ", " + iif( isRetDetached, "true", "false" ) + " ), " + '"HB_' + Upper( cWgt ) +'" )'
ENDIF
#endif
RETURN ""
/*----------------------------------------------------------------------*/
@@ -3333,9 +2927,7 @@ STATIC FUNCTION hbqtgen_BuildCopyrightText()
/*----------------------------------------------------------------------*/
STATIC PROCEDURE hbqtgen_BuildFooter( txt_ )
AAdd( txt_, "#endif" )
RETURN
/*----------------------------------------------------------------------*/
@@ -3415,7 +3007,6 @@ STATIC FUNCTION qth_is_extended( cQTHFileName )
RETURN lYes
/*----------------------------------------------------------------------*/
#ifdef __HBQT_REVAMP__
STATIC FUNCTION qth_is_QObject( cWidget )
STATIC aQObjects := {}
@@ -3787,5 +3378,4 @@ STATIC FUNCTION qth_get_bits( cWidget, lNew )
RETURN cBits
#endif
/*----------------------------------------------------------------------*/

View File

@@ -59,8 +59,6 @@
#include "hbapistr.h"
#include "hbthread.h"
//#define __HBQT_REVAMP__
#if defined( HB_OS_OS2 )
# define OS2EMX_PLAIN_CHAR
# define INCL_BASE
@@ -101,7 +99,7 @@ typedef void ( * PHBQT_DEL_FUNC )( void * pObj, int iFlags );
HB_EXTERN_BEGIN
extern HB_EXPORT void hbqt_events_register_createobj( QEvent::Type eventtype, QByteArray szCreateObj, PHBQT_EVENT_FUNC pCallback );
extern HB_EXPORT void hbqt_events_register_createobj( QEvent::Type eventtype, QByteArray szCreateObj );
extern HB_EXPORT void hbqt_events_unregister_createobj( QEvent::Type eventtype );
extern HB_EXPORT void hbqt_slots_register_callback( QByteArray sig, PHBQT_SLOT_FUNC pCallback );
extern HB_EXPORT void hbqt_slots_unregister_callback( QByteArray sig );
@@ -109,17 +107,13 @@ extern HB_EXPORT void hbqt_slots_unregister_callback( QByteArray sig );
extern HB_EXPORT void * hbqt_par_ptr( int iParam );
extern HB_EXPORT HBQT_GC_T * hbqt_par_ptrGC( int iParam ); /* returns a pointer to the HBQT_GC_T area */
extern HB_EXPORT void hbqt_par_detach_ptrGC( int iParam );
extern HB_EXPORT void hbqt_itemPushReturn( void * ptr, PHB_ITEM pSelf );
extern HB_EXPORT HB_BOOL hbqt_par_isDerivedFrom( int iParam, const char * pszClsName ); /* check if parameter iParam is class or subclass of szClsName */
extern HB_EXPORT HB_BOOL hbqt_obj_isDerivedFrom( PHB_ITEM pItem, const char * pszClsName ); /* check if parameter iParam is class or subclass of szClsName */
extern HB_EXPORT void * hbqt_get_ptr( PHB_ITEM pObj );
extern HB_EXPORT const HB_GC_FUNCS * hbqt_gcFuncs( void );
extern HB_EXPORT void hbqt_errRT_ARG( void );
extern HB_EXPORT PHB_ITEM hbqt_defineClassBegin( const char * pszClsName, PHB_ITEM s_oClass, const char * pszParentClsStr );
extern HB_EXPORT void hbqt_defineClassEnd( PHB_ITEM s_oClass, PHB_ITEM oClass );
extern HB_EXPORT PHB_ITEM hbqt_create_object( void * pObject, const char * pszObjectName );
extern HB_EXPORT PHB_ITEM hbqt_create_objectGC( void * pObject, const char * pszObjectName );
extern HB_EXPORT void hbqt_addDeleteList( PHB_ITEM item ); /* populate a list of PHB_ITEM to delete at exit time */
HB_EXPORT PHB_ITEM hbqt_bindGetHbObject( PHB_ITEM pItem, void * qtObject, const char * szClassFunc, PHBQT_DEL_FUNC pDelete, int iFlags );
@@ -137,6 +131,10 @@ HB_EXPORT void hbqt_bindAddSlot( PHB_ITEM pSenderObject, int iSignalid, PH
HB_EXPORT void hbqt_bindDelSlot( PHB_ITEM pSenderObject, int iSignalid, PHB_ITEM pCode );
HB_EXPORT PHB_ITEM hbqt_bindGetSlots( PHB_ITEM pSenderObject, int iSignalid );
HB_EXPORT void hbqt_bindAddEvent( PHB_ITEM pSenderObject, int iEventId, PHB_ITEM pCode );
HB_EXPORT void hbqt_bindDelEvent( PHB_ITEM pSenderObject, int iEventId, PHB_ITEM pCode );
HB_EXPORT PHB_ITEM hbqt_bindGetEvents( PHB_ITEM pSenderObject, int iEventId );
HB_EXTERN_END
#define hbqt_par_uchar( n ) ( ( uchar * ) hb_parcx( n ) )

View File

@@ -89,28 +89,33 @@ HBQT_BIND, * PHBQT_BIND;
#define HBQT_BIND_UNLOCK } while( 0 );
void hbqt_bindDelSlots( PHB_ITEM pSenderObject );
void hbqt_bindDelEvents( PHB_ITEM pSenderObject );
static PHBQT_BIND s_hbqt_binds = NULL;
static HBQDestroyer * s_destroyer = NULL;
static PHB_DYNS s_dynsym_NEW = NULL;
static PHB_DYNS s_dynsym___CHILDS = NULL;
static PHB_DYNS s_dynsym___SLOTS = NULL;
static PHB_DYNS s_dynsym_SETSLOTS = NULL;
static PHB_DYNS s_dynsym_NEW = NULL;
static PHB_DYNS s_dynsym___CHILDS = NULL;
static PHB_DYNS s_dynsym___SLOTS = NULL;
static PHB_DYNS s_dynsym_SETSLOTS = NULL;
static PHB_DYNS s_dynsym___EVENTS = NULL;
static PHB_DYNS s_dynsym_SETEVENTS = NULL;
static void hbqt_bind_init( void* cargo )
{
HB_SYMBOL_UNUSED( cargo );
s_dynsym_NEW = hb_dynsymGetCase( "NEW" );
s_dynsym___CHILDS = hb_dynsymGetCase( "__CHILDS" );
s_dynsym___SLOTS = hb_dynsymGetCase( "__SLOTS" );
s_dynsym_SETSLOTS = hb_dynsymGetCase( "SETSLOTS" );
s_dynsym_NEW = hb_dynsymGetCase( "NEW" );
s_dynsym___CHILDS = hb_dynsymGetCase( "__CHILDS" );
s_dynsym___SLOTS = hb_dynsymGetCase( "__SLOTS" );
s_dynsym_SETSLOTS = hb_dynsymGetCase( "SETSLOTS" );
s_dynsym___EVENTS = hb_dynsymGetCase( "__EVENTS" );
s_dynsym_SETEVENTS = hb_dynsymGetCase( "SETEVENTS" );
}
PHB_ITEM hbqt_bindGetHbObject( PHB_ITEM pItem, void * qtObject, const char * szClassName, PHBQT_DEL_FUNC pDelFunc, int iFlags )
{
#if 0
#if 1
char * pname = ( char* ) hb_xgrab( 200 );
char * pname1 = ( char* ) hb_xgrab( 200 );
HB_TRACE( HB_TR_DEBUG, ( ".................HARBOUR_REQUEST_BIND_OBJECT( %p, %i, %s, %s, %s ).................", qtObject, iFlags, szClassName, hb_procname( 0, pname, HB_TRUE ), hb_procname( 1, pname1, HB_TRUE ) ) );
@@ -179,11 +184,15 @@ PHB_ITEM hbqt_bindGetHbObject( PHB_ITEM pItem, void * qtObject, const char * szC
s_destroyer = new HBQDestroyer();
if( pDelFunc != NULL )
QObject::connect( ( QObject * ) qtObject, SIGNAL(destroyed(QObject*)), s_destroyer, SLOT(destroyer()) );
HB_TRACE( HB_TR_DEBUG, ( "hbqt_bindGetHbObject( %p )...%s", qtObject, ( ( QObject * ) qtObject )->metaObject()->className() ) );
HB_TRACE( HB_TR_DEBUG, ( "hbqt_bindGetHbObject( %p )...%s", qtObject, szClassName ) );
hb_vmPushDynSym( s_dynsym_SETSLOTS ); /* initializes __Slots hash */
hb_vmPush( pObject );
hb_vmSend( 0 );
hb_vmPushDynSym( s_dynsym_SETEVENTS ); /* initializes __Events hash */
hb_vmPush( pObject );
hb_vmSend( 0 );
}
else
{
@@ -316,7 +325,6 @@ void * hbqt_bindGetQtObject( PHB_ITEM pObject )
void hbqt_bindDestroyHbObject( PHB_ITEM pObject )
{
void * hbObject = hb_arrayId( pObject );
bool found = HB_FALSE;
if( hbObject )
{
@@ -330,7 +338,6 @@ void hbqt_bindDestroyHbObject( PHB_ITEM pObject )
{
HB_TRACE( HB_TR_DEBUG, ( "..............HARBOUR_DESTROY_BEGINS( %p, %i ).............. %s", bind->qtObject, bind->iFlags, bind->szClassName ) );
found = HB_TRUE;
bool fObject = bind->iFlags & HBQT_BIT_QOBJECT;
QObject * obj = NULL;
const char * classname = NULL;
@@ -344,7 +351,7 @@ void hbqt_bindDestroyHbObject( PHB_ITEM pObject )
{
if( fObject )
{
HB_TRACE( HB_TR_DEBUG, ( "..............HARBOUR_ABOUT_TO_DESTROY_%s( %p )", classname, obj ) );
HB_TRACE( HB_TR_DEBUG, ( "..............HARBOUR_ABOUT_TO_DESTROY_%s( %p )..... %s", classname, obj, bind->szClassName ) );
if( obj )
{
if( classname != ( const char * ) "QAction" )
@@ -359,7 +366,7 @@ void hbqt_bindDestroyHbObject( PHB_ITEM pObject )
bind->fDeleting = false;
}
hb_xfree( bind );
HB_TRACE( HB_TR_DEBUG, ( "HARBOUR_DESTROYED_%s( %p )", classname, obj ) );
HB_TRACE( HB_TR_DEBUG, ( " HARBOUR_DESTROYED_NO_PARENTED_%s( %p )", classname, obj ) );
}
}
}
@@ -397,11 +404,6 @@ void hbqt_bindDestroyHbObject( PHB_ITEM pObject )
bind_ptr = &bind->next;
}
HBQT_BIND_UNLOCK
if( ! found )
{
HB_TRACE( HB_TR_DEBUG, ( "..............HARBOUR_DESTROYING_NOT_FOUND_ARRAYID( %p )", hbObject ) );
}
}
}
@@ -422,7 +424,10 @@ void hbqt_bindDestroyQtObject( void * qtObject )
* bind_ptr = bind->next;
if( ! bind->fDeleting )
{
hbqt_bindDelSlots( hbqt_bindGetHbObjectBYqtObject( bind->qtObject ) );
PHB_ITEM pObj = hbqt_bindGetHbObjectBYqtObject( bind->qtObject );
hbqt_bindDelSlots( pObj );
hbqt_bindDelEvents( pObj );
hb_itemRelease( pObj );
hb_xfree( bind );
}
break;
@@ -685,6 +690,117 @@ PHB_ITEM hbqt_bindGetSlots( PHB_ITEM pSenderObject, int iSignalid )
return pSlots;
}
void hbqt_bindAddEvent( PHB_ITEM pSenderObject, int iEventId, PHB_ITEM pCode )
{
if( HB_IS_BLOCK( pCode ) && hb_vmRequestReenter() )
{
hb_vmPushDynSym( s_dynsym___EVENTS );
hb_vmPush( pSenderObject );
hb_vmSend( 0 );
if( hb_vmRequestQuery() == 0 )
{
PHB_ITEM pArray, pIndex;
pIndex = hb_itemPutNI( hb_stackAllocItem(), iEventId );
pArray = hb_hashGetItemPtr( hb_stackReturnItem(), pIndex, HB_HASH_AUTOADD_ASSIGN );
hb_stackPop();
if( pArray && HB_IS_ARRAY( pArray ) )
hb_arrayAdd( pArray, pCode );
else
hb_errRT_BASE( EG_BOUND, 4005, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
}
hb_vmRequestRestore();
}
}
void hbqt_bindDelEvent( PHB_ITEM pSenderObject, int iEventId, PHB_ITEM pCode )
{
if( hb_vmRequestReenter() )
{
hb_vmPushDynSym( s_dynsym___EVENTS );
hb_vmPush( pSenderObject );
hb_vmSend( 0 );
if( hb_vmRequestQuery() == 0 )
{
PHB_ITEM pArray, pIndex;
pIndex = hb_itemPutNI( hb_stackAllocItem(), iEventId );
pArray = hb_hashGetItemPtr( hb_stackReturnItem(), pIndex, 0 );
hb_stackPop();
if( pArray && HB_IS_ARRAY( pArray ) )
{
if( pCode == NULL )
{
HB_TRACE( HB_TR_DEBUG, ( "hbqt_bindDelEvent( %i )", iEventId ) );
hb_arraySize( pArray, 0 );
}
else
{
void * id = hb_codeblockId( pCode );
HB_SIZE nPos;
for( nPos = hb_arrayLen( pArray ); nPos; --nPos )
{
if( id == hb_codeblockId( hb_arrayGetItemPtr( pArray, nPos ) ) )
{
hb_arrayDel( pArray, nPos );
hb_arraySize( pArray, hb_arrayLen( pArray ) - 1 );
break;
}
}
}
}
}
hb_vmRequestRestore();
}
}
void hbqt_bindDelEvents( PHB_ITEM pSenderObject )
{
if( pSenderObject )
{
if( hb_vmRequestReenter() )
{
HB_TRACE( HB_TR_DEBUG, ( "hbqt_bindDelEvents( PHB_ITEM pSenderObject 0 %p )", pSenderObject ) );
hb_vmPushDynSym( s_dynsym___EVENTS );
hb_vmPush( pSenderObject );
hb_vmSend( 0 );
if( hb_vmRequestQuery() == 0 )
{
HB_TRACE( HB_TR_DEBUG, ( "hbqt_bindDelEvents( PHB_ITEM pSenderObject )" ) );
hb_hashClear( hb_stackReturnItem() );
}
hb_vmRequestRestore();
}
}
}
PHB_ITEM hbqt_bindGetEvents( PHB_ITEM pSenderObject, int iEventId )
{
PHB_ITEM pSlots = NULL;
if( hb_vmRequestReenter() )
{
hb_vmPushDynSym( s_dynsym___EVENTS );
hb_vmPush( pSenderObject );
hb_vmSend( 0 );
if( hb_vmRequestQuery() == 0 )
{
PHB_ITEM pArray, pIndex;
pIndex = hb_itemPutNI( hb_stackAllocItem(), iEventId );
pArray = hb_hashGetItemPtr( hb_stackReturnItem(), pIndex, 0 );
hb_stackPop();
if( pArray && HB_IS_ARRAY( pArray ) && hb_arrayLen( pArray ) > 0 )
pSlots = hb_itemNew( pArray );
}
hb_vmRequestRestore();
}
return pSlots;
}
HB_CALL_ON_STARTUP_BEGIN( _hbqt_bind_init_ )
hb_vmAtInit( hbqt_bind_init, NULL );
HB_CALL_ON_STARTUP_END( _hbqt_bind_init_ )

View File

@@ -66,6 +66,13 @@
#include <QtCore/QVariant>
#include <QtGui/QMessageBox>
HB_FUNC_EXTERN( HB_QCLOSEEVENT );
void _hb_force_link_HBQevents( void )
{
HB_FUNC_EXEC( HB_QCLOSEEVENT );
}
/*----------------------------------------------------------------------*/
#include <QtCore/QStringList>
@@ -74,23 +81,16 @@
static QList<QEvent::Type> s_lstEvent;
static QList<QByteArray> s_lstCreateObj;
static QList<PHBQT_EVENT_FUNC> s_pEventAllocateCallback;
void hbqt_events_register_createobj( QEvent::Type eventtype, QByteArray szCreateObj, PHBQT_EVENT_FUNC pCallback )
{
void hbqt_events_register_createobj( QEvent::Type eventtype, QByteArray szCreateObj )
{
int iIndex = s_lstEvent.indexOf( eventtype );
if( iIndex == -1 )
{
s_lstEvent << eventtype;
s_lstCreateObj << szCreateObj.toUpper();
s_pEventAllocateCallback << pCallback;
}
else
{
s_lstCreateObj[ iIndex ] = szCreateObj.toUpper();
s_pEventAllocateCallback[ iIndex ] = pCallback;
}
}
@@ -102,7 +102,6 @@ void hbqt_events_unregister_createobj( QEvent::Type eventtype )
{
s_lstEvent.removeAt( iIndex );
s_lstCreateObj.removeAt( iIndex );
s_pEventAllocateCallback.removeAt( iIndex );
}
}
@@ -122,67 +121,23 @@ HBQEvents::HBQEvents( PHB_ITEM pObj ) : QObject()
HBQEvents::~HBQEvents()
{
if( hb_vmRequestReenter() )
{
HB_TRACE( HB_TR_DEBUG, ( "HBQEvents::~HBQEvents() Size = %i", listBlock.size() ) );
int i;
for( i = 0; i < listBlock.size(); i++ )
{
if( listBlock[ i ] != NULL )
{
HB_TRACE( HB_TR_DEBUG, ( "HBQEvents::~HBQEvents() item %d", i + 1 ) );
hb_itemRelease( listBlock.at( i ) );
listBlock[ i ] = NULL;
}
}
hb_vmRequestRestore();
}
listBlock.clear();
}
int HBQEvents::hbConnect( PHB_ITEM pObj, int event, PHB_ITEM bBlock )
{
HB_TRACE( HB_TR_DEBUG, ( "HBQEvents::hbConnect( %i )", event ) );
int nResult = -1;
if( true )
if( hb_itemType( bBlock ) & HB_IT_BLOCK )
{
QObject * object = ( QObject * ) hbqt_get_ptr( pObj );
if( object )
{
PHB_ITEM pBlock = hb_itemNew( bBlock );
if( pBlock )
{
hb_gcUnlock( pBlock );
char prop[ 20 ];
hb_snprintf( prop, sizeof( prop ), "P%iP", event ); /* Make it a unique identifier */
int i = object->property( prop ).toInt();
if( i == 0 )
{
listBlock << pBlock;
object->setProperty( prop, ( int ) listBlock.size() );
}
else
{
if( listBlock.at( i - 1 ) != NULL )
{
hb_itemRelease( listBlock.at( i - 1 ) );
}
listBlock[ i - 1 ] = pBlock;
}
nResult = 0;
}
else
nResult = -3;
hbqt_bindAddEvent( pObj, event, bBlock );
nResult = 0;
}
else
nResult = -2;
}
else
nResult = -1;
}
return nResult;
}
@@ -195,27 +150,9 @@ int HBQEvents::hbDisconnect( PHB_ITEM pObj, int event )
QObject * object = ( QObject * ) hbqt_get_ptr( pObj );
if( object )
{
char prop[ 20 ];
hb_snprintf( prop, sizeof( prop ), "P%iP", event ); /* Make it a unique identifier */
int i = object->property( prop ).toInt();
if( i > 0 && i <= listBlock.size() )
{
object->setProperty( prop, 0 );
if( listBlock[ i - 1 ] != NULL )
{
hb_itemRelease( listBlock.at( i - 1 ) );
listBlock[ i - 1 ] = NULL;
}
nResult = 0;
}
else
nResult = -3;
}
else
nResult = -2;
hbqt_bindDelEvent( pObj, event, NULL );
nResult = 0;
}
return nResult;
}
@@ -228,42 +165,26 @@ bool HBQEvents::eventFilter( QObject * object, QEvent * event )
QEvent::Type eventtype = event->type();
if( ( int ) eventtype > 0 )
{
char prop[ 20 ];
hb_snprintf( prop, sizeof( prop ), "%s%i%s", "P", eventtype, "P" );
int found = object->property( prop ).toInt();
if( found > 0 )
int eventId = s_lstEvent.indexOf( eventtype );
if( eventId > -1 && hb_vmRequestReenter() )
{
if( found <= listBlock.size() && listBlock.at( found - 1 ) != NULL )
PHB_ITEM p = hbqt_bindGetEvents( hbqt_bindGetHbObjectBYqtObject( object ), eventtype );
if( p )
{
int eventId = s_lstEvent.indexOf( eventtype );
if( eventId > -1 )
{
PHBQT_EVENT_FUNC pCallback = s_pEventAllocateCallback.at( eventId );
if( pCallback )
{
if( hb_vmRequestReenter() )
{
#ifdef __HBQT_REVAMP__
PHB_ITEM pItem = hbqt_bindGetHbObject( NULL, ( void * ) event, ( s_lstCreateObj.at( eventId ) ), NULL, 0 );
#else
PHB_ITEM pItem = hb_itemNew( hbqt_create_objectGC( ( * pCallback )( event, false ), s_lstCreateObj.at( eventId ) ) );
#endif
stopTheEventChain = ( bool ) hb_itemGetL( hb_vmEvalBlockV( ( PHB_ITEM ) listBlock.at( found - 1 ), 1, pItem ) );
hb_itemRelease( pItem );
hb_vmRequestRestore();
}
}
}
}
}
PHB_ITEM pItem = hbqt_bindGetHbObject( NULL, ( void * ) event, ( s_lstCreateObj.at( eventId ) ), NULL, HBQT_BIT_NONE );
stopTheEventChain = ( bool ) hb_itemGetL( hb_vmEvalBlockV( hb_arrayGetItemPtr( p, 1 ), 1, pItem ) );
hb_itemRelease( pItem );
}
hb_itemRelease( p );
hb_vmRequestRestore();
}
if( eventtype == QEvent::Close )
{
return true;
}
}
}
return stopTheEventChain;
}
@@ -283,7 +204,6 @@ static void hbqt_events_exit( void * cargo )
HB_TRACE( HB_TR_DEBUG, ( "hbqt_events_exit, deleting item %d", i ));
s_lstEvent.removeAt( 0 );
s_lstCreateObj.removeAt( 0 );
s_pEventAllocateCallback.removeAt( 0 );
}
HB_TRACE( HB_TR_DEBUG, ( "EXITING hbqt_events_exit, len=%d", s_lstCreateObj.size() ) );

View File

@@ -116,23 +116,6 @@ HBQSlots::HBQSlots( PHB_ITEM pObj ) : QObject()
HBQSlots::~HBQSlots()
{
if( hb_vmRequestReenter() )
{
HB_TRACE( HB_TR_DEBUG, ( "HBQSlots::~HBQSlots() Size = %i", listBlock.size() ) );
int i;
for( i = 0; i < listBlock.size(); i++ )
{
if( listBlock[ i ] != NULL )
{
HB_TRACE( HB_TR_DEBUG, ( "HBQSlots::~HBQSlots() Item %d", i + 1 ) );
hb_itemRelease( listBlock.at( i ) );
listBlock[ i ] = NULL;
}
}
hb_vmRequestRestore();
}
listBlock.clear();
}
int HBQSlots::hbConnect( PHB_ITEM pObj, char * pszSignal, PHB_ITEM bBlock )
@@ -146,11 +129,8 @@ int HBQSlots::hbConnect( PHB_ITEM pObj, char * pszSignal, PHB_ITEM bBlock )
QObject * object = ( QObject * ) hbqt_get_ptr( pObj );
if( object )
{
PHB_ITEM pBlock = hb_itemNew( bBlock );
if( pBlock )
if( hb_itemType( bBlock ) & HB_IT_BLOCK )
{
hb_gcUnlock( pBlock );
int i = object->property( pszSignal ).toInt();
if( i == 0 )
{
@@ -168,23 +148,17 @@ int HBQSlots::hbConnect( PHB_ITEM pObj, char * pszSignal, PHB_ITEM bBlock )
if( QMetaObject::connect( object, signalId, this, slotId + QObject::staticMetaObject.methodCount(), Qt::AutoConnection ) )
{
nResult = 0;
#ifdef __HBQT_REVAMP__
hb_itemRelease( pBlock );
listBlock << NULL;
#else
listBlock << pBlock;
#endif
char szSlotName[ 20 ];
hb_snprintf( szSlotName, sizeof( szSlotName ), "SLOT_%d", slotId );
object->setProperty( szSlotName, ( int ) listBlock.size() );
object->setProperty( pszSignal, ( int ) listBlock.size() );
HB_TRACE( HB_TR_DEBUG, ( "HBQSlots::hbConnect( %s ) %i", pszSignal, listBlock.size() ) );
#ifdef __HBQT_REVAMP__
HB_TRACE( HB_TR_DEBUG, ( "HBQSlots::hbConnect( %s ) signalId=%i, %p", pszSignal, signalId, object ) );
hbqt_bindAddSlot( pObj, signalId, bBlock );
#endif
}
else
nResult = 8;
@@ -198,23 +172,6 @@ int HBQSlots::hbConnect( PHB_ITEM pObj, char * pszSignal, PHB_ITEM bBlock )
else
nResult = 5;
}
else
{
#ifndef __HBQT_REVAMP__
if( listBlock.at( i - 1 ) != NULL )
{
HB_TRACE( HB_TR_DEBUG, ( "HBQSlots::hbConnect( %s ) Already Exists : %i", pszSignal, i ) );
hb_itemRelease( listBlock.at( i - 1 ) );
}
listBlock[ i - 1 ] = pBlock;
nResult = 0;
#endif
}
if( nResult > 0 )
{
hb_itemRelease( pBlock );
}
}
else
{
@@ -261,17 +218,8 @@ int HBQSlots::hbDisconnect( PHB_ITEM pObj, char * pszSignal )
if( nResult == 0 )
{
#ifdef __HBQT_REVAMP__
HB_TRACE( HB_TR_DEBUG, ( "HBQSlots::hbDisConnect( %s ) signalId=%i, %p", pszSignal, signalId, object ) );
hbqt_bindDelSlot( pObj, signalId, NULL );
#else
if( listBlock.at( i - 1 ) != NULL )
{
hb_itemRelease( listBlock.at( i - 1 ) );
listBlock[ i - 1 ] = NULL;
HB_TRACE( HB_TR_DEBUG, ( "HBQSlots::hbDisconnect( %s ) hb_itemReleased( %i )", pszSignal, i ) );
}
#endif
}
}
else
@@ -346,13 +294,9 @@ int HBQSlots::qt_metacall( QMetaObject::Call c, int id, void ** arguments )
{
if( parameterCount == 0 )
{
#ifdef __HBQT_REVAMP__
PHB_ITEM p = hbqt_bindGetSlots( hbqt_bindGetHbObjectBYqtObject( object ), id );
hb_evalBlock0( hb_arrayGetItemPtr( p, 1 ) );
hb_itemRelease( p );
#else
hb_evalBlock0( this->listBlock.at( i - 1 ) );
#endif
}
else
{
@@ -362,13 +306,9 @@ int HBQSlots::qt_metacall( QMetaObject::Call c, int id, void ** arguments )
pCallback = s_pCallback.at( paramId );
if( pCallback )
{
#ifdef __HBQT_REVAMP__
PHB_ITEM p = hbqt_bindGetSlots( hbqt_bindGetHbObjectBYqtObject( object ), id );
pCallback( ( PHB_ITEM * ) hb_arrayGetItemPtr( p, 1 ), arguments, pList );
hb_itemRelease( p );
#else
pCallback( ( PHB_ITEM * ) this->listBlock.at( i - 1 ), arguments, pList );
#endif
}
}
hb_vmRequestRestore();

View File

@@ -79,26 +79,6 @@
#include <QtCore/QStringList>
HB_EXTERN_BEGIN
extern void * hbqt_gcAllocate_QObject( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QTime( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QSize( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QSizeF( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QPoint( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QRect( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QRectF( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QUrl( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QDate( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QDateTime( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QTime( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QModelIndex( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QStringList( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QList( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QEvent( void * pObj, bool bNew );
HB_EXTERN_END
#ifdef __HBQT_REVAMP__
HB_EXTERN_BEGIN
extern void hbqt_del_QObject( void * pObj, int iFlags );
@@ -119,7 +99,6 @@ extern void hbqt_del_QList( void * pObj, int iFlags );
extern void hbqt_del_QEvent( void * pObj, int iFlags );
HB_EXTERN_END
#endif
/*----------------------------------------------------------------------*/
@@ -129,12 +108,10 @@ static void hbqt_SlotsExecPointer( PHB_ITEM * codeBlock, void ** arguments, QStr
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , ( ( const char * ) pList.at( 0 ).data() ), NULL, HBQT_BIT_QOBJECT ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QObject( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), ( const char * ) pList.at( 0 ).data() ) );
#endif
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , ( const char * ) pList.at( 0 ).data(), NULL, HBQT_BIT_QOBJECT );
hb_vmPush( p0 );
hb_vmSend( 1 );
hb_itemRelease( p0 );
}
static void hbqt_SlotsExecPointerPointer( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -143,14 +120,13 @@ static void hbqt_SlotsExecPointerPointer( PHB_ITEM * codeBlock, void ** argument
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , ( ( const char * ) pList.at( 0 ).data() ), NULL, HBQT_BIT_QOBJECT ) );
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 2 ] ) , ( ( const char * ) pList.at( 0 ).data() ), NULL, HBQT_BIT_QOBJECT ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QObject( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), ( const char * ) pList.at( 0 ).data() ) );
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QObject( ( *reinterpret_cast< void*( * ) >( arguments[ 2 ] ) ), false ), ( const char * ) pList.at( 1 ).data() ) );
#endif
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , ( const char * ) pList.at( 0 ).data(), NULL, HBQT_BIT_QOBJECT );
PHB_ITEM p1 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 2 ] ) , ( const char * ) pList.at( 0 ).data(), NULL, HBQT_BIT_QOBJECT );
hb_vmPush( p0 );
hb_vmPush( p1 );
hb_vmSend( 2 );
hb_itemRelease( p0 );
hb_itemRelease( p1 );
}
static void hbqt_SlotsExecPointerInt( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -159,13 +135,11 @@ static void hbqt_SlotsExecPointerInt( PHB_ITEM * codeBlock, void ** arguments, Q
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
hb_vmPush( hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , ( ( const char * ) pList.at( 0 ).data() ), NULL, HBQT_BIT_QOBJECT ) );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QObject( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), ( const char * ) pList.at( 0 ).data() ) );
#endif
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , ( const char * ) pList.at( 0 ).data(), NULL, HBQT_BIT_QOBJECT );
hb_vmPush( p0 );
hb_vmPushInteger( *reinterpret_cast< int( * ) >( arguments[ 2 ] ) );
hb_vmSend( 2 );
hb_itemRelease( p0 );
}
static void hbqt_SlotsExecBool( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -251,16 +225,10 @@ static void hbqt_SlotsExecModel( PHB_ITEM * codeBlock, void ** arguments, QStrin
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 1 ] ) ) ), "HB_QMODELINDEX", hbqt_del_QModelIndex, HBQT_BIT_OWNER );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QModelIndex( new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QModelIndex" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecModelModel( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -269,20 +237,13 @@ static void hbqt_SlotsExecModelModel( PHB_ITEM * codeBlock, void ** arguments, Q
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 1 ] ) ) ), "HB_QMODELINDEX", hbqt_del_QModelIndex, HBQT_BIT_OWNER );
PHB_ITEM p1 = hbqt_bindGetHbObject( NULL, new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 1 ] ) ) ), "HB_QMODELINDEX", hbqt_del_QModelIndex, HBQT_BIT_OWNER );
hb_vmPush( p0 );
hb_vmPush( p1 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QModelIndex( new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QModelIndex" ) );
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QModelIndex( new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 2 ] ) ) ), true ), "hb_QModelIndex" ) );
#endif
hb_vmSend( 2 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
hb_itemRelease( p1 );
#endif
}
static void hbqt_SlotsExecStringList( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -291,16 +252,10 @@ static void hbqt_SlotsExecStringList( PHB_ITEM * codeBlock, void ** arguments, Q
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QStringList( ( *reinterpret_cast< QStringList( * ) >( arguments[ 1 ] ) ) ), "HB_QSTRINGLIST", hbqt_del_QStringList, HBQT_BIT_OWNER );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QStringList( new QStringList( ( *reinterpret_cast< QStringList( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QStringList" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQPoint( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -309,16 +264,10 @@ static void hbqt_SlotsExecQPoint( PHB_ITEM * codeBlock, void ** arguments, QStri
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QPoint( ( *reinterpret_cast< QPoint( * ) >( arguments[ 1 ] ) ) ), "HB_QPOINT", hbqt_del_QPoint, HBQT_BIT_OWNER );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QPoint( new QPoint( ( *reinterpret_cast< QPoint( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QPoint" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQUrl( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -327,16 +276,10 @@ static void hbqt_SlotsExecQUrl( PHB_ITEM * codeBlock, void ** arguments, QString
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QUrl( ( *reinterpret_cast< QUrl( * ) >( arguments[ 1 ] ) ) ), "HB_QURL", hbqt_del_QUrl, HBQT_BIT_OWNER );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QUrl( new QUrl( ( *reinterpret_cast< QUrl( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QUrl" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQDate( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -345,16 +288,10 @@ static void hbqt_SlotsExecQDate( PHB_ITEM * codeBlock, void ** arguments, QStrin
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QDate( ( *reinterpret_cast< QDate( * ) >( arguments[ 1 ] ) ) ), "HB_QDATE", hbqt_del_QDate, HBQT_BIT_OWNER );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QDate( new QDate( ( *reinterpret_cast< QDate( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QDate" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQDateTime( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -363,16 +300,10 @@ static void hbqt_SlotsExecQDateTime( PHB_ITEM * codeBlock, void ** arguments, QS
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QDateTime( ( *reinterpret_cast< QDateTime( * ) >( arguments[ 1 ] ) ) ), "HB_QDATETIME", hbqt_del_QDateTime, HBQT_BIT_OWNER );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QDateTime( new QDateTime( ( *reinterpret_cast< QDateTime( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QDateTime" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQTime( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -381,16 +312,10 @@ static void hbqt_SlotsExecQTime( PHB_ITEM * codeBlock, void ** arguments, QStrin
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QTime( ( *reinterpret_cast< QTime( * ) >( arguments[ 1 ] ) ) ), "HB_QTIME", hbqt_del_QTime, HBQT_BIT_OWNER );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTime( new QTime( ( *reinterpret_cast< QTime( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QTime" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQRectF( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -399,16 +324,10 @@ static void hbqt_SlotsExecQRectF( PHB_ITEM * codeBlock, void ** arguments, QStri
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QRectF( ( *reinterpret_cast< QRectF( * ) >( arguments[ 1 ] ) ) ), "HB_QRECTF", hbqt_del_QRectF, HBQT_BIT_OWNER );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QRectF( new QRectF( ( *reinterpret_cast< QRectF( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QRectF" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQRectInt( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -417,17 +336,11 @@ static void hbqt_SlotsExecQRectInt( PHB_ITEM * codeBlock, void ** arguments, QSt
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QRect( ( *reinterpret_cast< QRect( * ) >( arguments[ 1 ] ) ) ), "HB_QRECT", hbqt_del_QRect, HBQT_BIT_OWNER );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QRect( new QRect( ( *reinterpret_cast< QRect( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QRect" ) );
#endif
hb_vmPushInteger( *reinterpret_cast< int( * ) >( arguments[ 2 ] ) );
hb_vmSend( 2 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQRect( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -436,16 +349,10 @@ static void hbqt_SlotsExecQRect( PHB_ITEM * codeBlock, void ** arguments, QStrin
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QRect( ( *reinterpret_cast< QRect( * ) >( arguments[ 1 ] ) ) ), "HB_QRECT", hbqt_del_QRect, HBQT_BIT_OWNER );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QRect( new QRect( ( *reinterpret_cast< QRect( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QRect" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQSizeF( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -454,16 +361,10 @@ static void hbqt_SlotsExecQSizeF( PHB_ITEM * codeBlock, void ** arguments, QStri
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QSizeF( ( *reinterpret_cast< QSizeF( * ) >( arguments[ 1 ] ) ) ), "HB_QSIZEF", hbqt_del_QSizeF, HBQT_BIT_OWNER );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QSizeF( new QSizeF( ( *reinterpret_cast< QSizeF( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QSizeF" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecModelIndexIntInt( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -472,18 +373,12 @@ static void hbqt_SlotsExecModelIndexIntInt( PHB_ITEM * codeBlock, void ** argume
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 1 ] ) ) ), "HB_QMODELINDEX", hbqt_del_QModelIndex, HBQT_BIT_OWNER );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QModelIndex( new QModelIndex( ( *reinterpret_cast< QModelIndex( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QModelIndex" ) );
#endif
hb_vmPushInteger( *reinterpret_cast< int( * ) >( arguments[ 2 ] ) );
hb_vmPushInteger( *reinterpret_cast< int( * ) >( arguments[ 3 ] ) );
hb_vmSend( 3 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecModelIndexList( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -492,16 +387,10 @@ static void hbqt_SlotsExecModelIndexList( PHB_ITEM * codeBlock, void ** argument
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QList< QModelIndex *>( ( *reinterpret_cast< QList< QModelIndex *> *>( arguments[ 1 ] ) ) ), "HB_QMODELINDEXLIST", hbqt_del_QList, HBQT_BIT_OWNER );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QList( new QList< QModelIndex *>( ( *reinterpret_cast< QList< QModelIndex *> *>( arguments[ 1 ] ) ) ), true ), "hb_QModelIndexList" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQObject( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -510,16 +399,10 @@ static void hbqt_SlotsExecQObject( PHB_ITEM * codeBlock, void ** arguments, QStr
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , "HB_QOBJECT", NULL, HBQT_BIT_QOBJECT );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QObject( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QObject" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
/*----------------------------------------------------------------------*/
@@ -561,7 +444,7 @@ static void hbqt_registerCallbacks( void )
hbqt_slots_register_callback( "QUrl" , hbqt_SlotsExecQUrl );
hbqt_slots_register_callback( "QObject*" , hbqt_SlotsExecQObject );
hbqt_events_register_createobj( QEvent::Timer , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::Timer , "hb_QEvent" );
}
/*----------------------------------------------------------------------*/

View File

@@ -56,8 +56,6 @@
#define QEvent_Paint 12
//#define __HBQT_REVAMP__
/*----------------------------------------------------------------------*/
CREATE CLASS HbQtObjectHandler
@@ -68,24 +66,24 @@ CREATE CLASS HbQtObjectHandler
VAR __pEvents PROTECTED
VAR hEvents INIT {=>}
#ifdef __HBQT_REVAMP__
VAR __Slots
#endif
VAR __Events
METHOD hasValidPointer()
METHOD connect( cnEvent, bBlock )
METHOD disconnect( cnEvent )
#ifdef __HBQT_REVAMP__
METHOD setSlots()
#endif
METHOD setEvents()
DESTRUCTOR _destroy()
ERROR HANDLER onError()
ENDCLASS
/*----------------------------------------------------------------------*/
#ifdef __HBQT_REVAMP__
METHOD HbQtObjectHandler:setSlots()
IF empty( ::__Slots )
@@ -94,9 +92,20 @@ METHOD HbQtObjectHandler:setSlots()
ENDIF
RETURN Self
#endif
/*----------------------------------------------------------------------*/
METHOD HbQtObjectHandler:setEvents()
IF empty( ::__Events )
::__Events := {=>}
hb_hDefault( ::__Events, {} )
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
/* TOBE: deleted */
METHOD HbQtObjectHandler:hasValidPointer()
RETURN __hbqt_isPointer( ::pPtr )
@@ -256,14 +265,12 @@ METHOD HbQtObjectHandler:disconnect( cnEvent )
/*----------------------------------------------------------------------*/
METHOD HbQtObjectHandler:_destroy()
LOCAL cnEvent
#ifdef __HBQT_REVAMP__
HB_TRACE( HB_TR_DEBUG, " _destroy()", __objDerivedFrom( Self, "QOBJECT" ), __objGetClsName( Self ) )
__hbqt_destroy( Self )
#endif
__hbqt_destroy( Self )
#if 0
IF ! __objDerivedFrom( Self, "QOBJECT" )
RETURN NIL
ENDIF
@@ -271,14 +278,10 @@ METHOD HbQtObjectHandler:_destroy()
RETURN NIL
ENDIF
HB_TRACE( HB_TR_DEBUG, " _destroy()", __objDerivedFrom( Self, "QOBJECT" ), "pSlots", valtype( ::__pSlots ), "pEvents", valtype( ::__pEvents ) )
FOR EACH cnEvent IN ::hEvents
IF HB_ISNUMERIC( cnEvent ) .AND. ! empty( ::__pEvents )
HB_TRACE( HB_TR_DEBUG, " _destroy()", ".....N.....", cnEvent )
::__pEvents:hbDisconnect( Self, cnEvent )
ELSEIF HB_ISSTRING( cnEvent ) .AND. ! empty( ::__pSlots )
HB_TRACE( HB_TR_DEBUG, " _destroy()", ".....C.....", cnEvent )
::__pSlots:hbDisconnect( Self, cnEvent )
ENDIF
NEXT
@@ -287,18 +290,8 @@ METHOD HbQtObjectHandler:_destroy()
::__pSlots := NIL
::__pEvents := NIL
HB_TRACE( HB_TR_DEBUG, " _destroy()", "Exiting..." )
#endif
RETURN NIL
/*----------------------------------------------------------------------*/
FUNCTION hbqt_promoteWidget( oWidget, cWidgetTo )
LOCAL oObj := Eval( hb_macroBlock( "HB_" + cWidgetTo + "()" ) )
oObj:pPtr := oWidget:pPtr
RETURN oObj
/*----------------------------------------------------------------------*/

View File

@@ -69,175 +69,16 @@
/*----------------------------------------------------------------------*/
static HB_GARBAGE_FUNC( Q_release )
{
HBQT_GC_T * p = ( HBQT_GC_T * ) Cargo;
if( p && p->ph )
p->func( p );
}
static HB_GARBAGE_FUNC( Q_mark )
{
HBQT_GC_T * p = ( HBQT_GC_T * ) Cargo;
HB_TRACE( HB_TR_DEBUG, ( "HB_GARBAGE_FUNC( Q_mark ) p=%p p->ph=%p p->mark=%p", p, p->ph, p->mark ) );
if( p && p->ph && p->mark )
p->mark( p );
}
static const HB_GC_FUNCS QT_gcFuncs =
{
Q_release,
Q_mark
};
const HB_GC_FUNCS * hbqt_gcFuncs( void )
{
return &QT_gcFuncs;
}
static void * s_hbqt_GCPointerFromItem( PHB_ITEM pObj )
{
static PHB_DYNS s_pDyns_hPPtrAssign = NULL;
if( hb_itemType( pObj ) == HB_IT_OBJECT )
{
if( ! s_pDyns_hPPtrAssign )
s_pDyns_hPPtrAssign = hb_dynsymGetCase( "PPTR" );
hb_vmPushDynSym( s_pDyns_hPPtrAssign );
hb_vmPush( pObj );
hb_vmSend( 0 );
HBQT_GC_T * p = ( HBQT_GC_T * ) hb_itemGetPtrGC( hb_param( -1, HB_IT_POINTER ), hbqt_gcFuncs() );
if( p && p->ph )
return p->ph;
}
return NULL;
}
void * hbqt_par_ptr( int iParam )
{
HB_TRACE( HB_TR_DEBUG, ( "hbqt_par_ptr( %d )", iParam ) );
#ifdef __HBQT_REVAMP__
return hbqt_bindGetQtObject( hb_param( iParam, HB_IT_OBJECT ) );
#else
return s_hbqt_GCPointerFromItem( hb_param( iParam, HB_IT_ANY ) );
#endif
}
void * hbqt_get_ptr( PHB_ITEM pObj )
{
#ifdef __HBQT_REVAMP__
return hbqt_bindGetQtObject( pObj );
#else
return s_hbqt_GCPointerFromItem( pObj );
#endif
}
static void s_hbqt_set_ptr( PHB_ITEM pSelf, void * ptr )
{
static PHB_DYNS s_pDyns_hPPtrAssign = NULL;
HB_TRACE( HB_TR_DEBUG, ( "s_hbqt_set_ptr( pSelf=%p, ptr=%p )", pSelf, ptr ) );
/* get the position of _PPTR member, the
leading underscore because I want to write to it */
if( pSelf )
{
if( ! s_pDyns_hPPtrAssign )
s_pDyns_hPPtrAssign = hb_dynsymGetCase( "_PPTR" );
/* push the _PPTR address */
hb_vmPushDynSym( s_pDyns_hPPtrAssign );
/* push the instance we want change _PPTR value
it was already on the stack, but we push a pointer to it */
hb_vmPush( pSelf );
/* push the actual value */
hb_vmPushPointerGC( ptr );
/* run the command with 1 parameter */
hb_vmSend( 1 );
}
else
{
HB_TRACE( HB_TR_DEBUG, ( "s_hbqt_set_ptr(): returns NULL" ) );
return; /* TODO: Still better if RTE. */
}
}
void hbqt_itemPushReturn( void* ptr, PHB_ITEM pSelf )
{
HB_TRACE( HB_TR_DEBUG, ( "itemPushReturn( ptr =%p, pSelf=%p )", ptr, pSelf ) );
/* get the position of _PPTR member, the
leading underscore because I want to write to it */
if( ! pSelf )
pSelf = hb_stackSelfItem();
s_hbqt_set_ptr( pSelf, ptr );
if( hb_stackReturnItem() != pSelf )
hb_itemReturn( pSelf );
}
#if 0
HBQT_GC_T * hbqt_par_ptrGC( int iParam )
{
static PHB_DYNS s_pDyns_hPPtr = NULL;
PHB_ITEM pItem = hb_param( iParam, HB_IT_OBJECT );
if( pItem )
{
if( ! s_pDyns_hPPtr )
s_pDyns_hPPtr = hb_dynsymGetCase( "PPTR" );
hb_vmPushDynSym( s_pDyns_hPPtr );
hb_vmPush( pItem );
hb_vmSend( 0 );
return ( HBQT_GC_T * ) hb_itemGetPtrGC( hb_param( -1, HB_IT_POINTER ), hbqt_gcFuncs() );
}
return NULL;
}
#endif
HB_FUNC( HBQT_ISOBJECT )
{
PHB_ITEM pItem;
if( ( pItem = hb_param( 1, HB_IT_OBJECT ) ) != NULL )
{
hb_vmPushSymbol( hb_dynsymSymbol( hb_dynsymFindName( "PPTR" ) ) );
hb_vmPush( pItem );
hb_vmSend( 0 );
hb_retl( hb_param( -1, HB_IT_POINTER ) != NULL );
}
else
hb_retl( HB_FALSE );
}
HB_FUNC( __HBQT_PTR )
{
PHB_ITEM pParam = hb_param( 1, HB_IT_ANY );
if( hb_itemType( pParam ) & HB_IT_OBJECT )
{
PHB_ITEM pRetVal;
hb_vmPushSymbol( hb_dynsymSymbol( hb_dynsymFindName( "PPTR" ) ) );
hb_vmPush( pParam );
hb_vmSend( 0 );
if( ( pRetVal = hb_param( -1, HB_IT_POINTER ) ) != NULL )
return;
}
hb_itemReturn( pParam );
}
void hbqt_errRT_ARG( void )
@@ -248,32 +89,14 @@ void hbqt_errRT_ARG( void )
void hbqt_par_detach_ptrGC( int iParam )
{
HB_TRACE( HB_TR_DEBUG, ( "hbqt_par_detach_ptrGC( %d )", iParam ) );
#ifdef __HBQT_REVAMP__
if( HB_ISOBJECT( iParam ) )
{
hbqt_bindSetOwner( hbqt_bindGetQtObject( hb_param( iParam, HB_IT_OBJECT ) ), HB_FALSE );
}
#else
if( HB_ISOBJECT( iParam ) )
{
PHB_ITEM pObj = hb_param( iParam, HB_IT_ANY );
HBQT_GC_T * p;
hb_vmPushSymbol( hb_dynsymSymbol( hb_dynsymFindName( "PPTR" ) ) );
hb_vmPush( pObj );
hb_vmSend( 0 );
p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), -1 );
if( p && p->ph )
p->bNew = false;
}
#endif
}
HB_FUNC( __HBQT_ISPOINTER )
{
#ifdef __HBQT_REVAMP__
PHB_ITEM pObject = hb_stackSelfItem();
if( pObject == NULL )
pObject = hb_param( 1, HB_IT_OBJECT );
@@ -281,10 +104,6 @@ HB_FUNC( __HBQT_ISPOINTER )
hb_retl( ! ( hbqt_bindGetQtObject( pObject ) == NULL ) );
else
hb_retl( HB_FALSE );
#else
HBQT_GC_T * p = ( HBQT_GC_T * ) hb_parptrGC( hbqt_gcFuncs(), 1 );
hb_retl( p && p->ph );
#endif
}
HB_FUNC( HBQT_ISEQUAL )
@@ -301,9 +120,10 @@ HB_FUNC( __HBQT_ERROR )
HB_FUNC( __HBQT_SETUTF8 )
{
PHB_CODEPAGE cdp = hb_cdpFindExt( "UTF8" );
if( cdp )
{
hb_vmSetCDP( cdp );
}
}
PHB_ITEM hbqt_defineClassBegin( const char * pszClsName, PHB_ITEM s_oClass, const char * pszParentClsStr )
@@ -409,49 +229,6 @@ void hbqt_defineClassEnd( PHB_ITEM s_oClass, PHB_ITEM oClass )
}
}
PHB_ITEM hbqt_create_object( void * pObject, const char * pszObjectName )
{
PHB_ITEM pRetVal;
PHB_ITEM pItem;
HB_TRACE( HB_TR_DEBUG, ( "create_object %s", pszObjectName ) );
hb_vmPushDynSym( hb_dynsymGet( pszObjectName ) );
hb_vmPushNil();
hb_vmDo( 0 );
pItem = hb_itemPutPtr( NULL, pObject );
pRetVal = hb_itemNew( hb_stackReturnItem() );
hb_objSendMsg( pRetVal, "_PPTR", 1, pItem );
hb_itemReturnRelease( pRetVal );
hb_itemRelease( pItem );
return hb_stackReturnItem();
}
PHB_ITEM hbqt_create_objectGC( void * pObject, const char * pszObjectName )
{
PHB_ITEM pItem, pRetVal;
//HB_TRACE( HB_TR_DEBUG, ( "create_object_GC %s", pszObjectName ) );
hb_vmPushDynSym( hb_dynsymGet( pszObjectName ) );
hb_vmPushNil();
hb_vmDo( 0 );
pRetVal = hb_itemNew( hb_stackReturnItem() );
pItem = hb_itemPutPtrGC( NULL, pObject );
hb_objSendMsg( pRetVal, "_PPTR", 1, pItem );
hb_itemReturnRelease( pRetVal );
//hb_itemReturn( pRetVal );
hb_itemRelease( pItem );
//HB_TRACE( HB_TR_DEBUG, ( ".............................create_object_GC %s", pszObjectName ) );
return hb_stackReturnItem();
}
HB_BOOL hbqt_obj_isDerivedFrom( PHB_ITEM pItem, const char * pszClsName )
{
return hb_clsIsParent( hb_objGetClass( pItem ), pszClsName );
@@ -466,17 +243,10 @@ HB_BOOL hbqt_par_isDerivedFrom( int iParam, const char * pszClsName )
if( ( pItem = hb_param( iParam, HB_IT_OBJECT ) ) != NULL )
{
#ifdef __HBQT_REVAMP__
if( hbqt_bindGetQtObject( pItem ) == NULL )
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
else
return hbqt_obj_isDerivedFrom( pItem, pszClsName );
#else
if( s_hbqt_GCPointerFromItem( pItem ) == NULL )
hb_errRT_BASE( EG_ARG, 9999, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
else
return hbqt_obj_isDerivedFrom( pItem, pszClsName );
#endif
}
return HB_FALSE;
}

View File

@@ -39,30 +39,6 @@ HB_FUNC( QT_HBQEVENTS )
__HB_RETPTRGC__( new HBQEvents( hb_param( 1, HB_IT_OBJECT ) ) );
}
static HB_GARBAGE_FUNC( hbqt_gcMark_HBQEvents )
{
HBQT_GC_T_HBQEvents * p = ( HBQT_GC_T_HBQEvents * ) Cargo;
//HB_TRACE( HB_TR_DEBUG, ( "hbqt_gcMark_HBQEvents cargo=%p", (void*)Cargo ) );
if( p )
{
if( p->ph )
{
HBQEvents * t_slots = p->ph;
int i;
for( i = t_slots->listBlock.size() - 1; i >= 0 ; i-- )
{
//HB_TRACE( HB_TR_DEBUG, ( "hbqt_gcMark_HBQEvents marking %d", i ) );
if( t_slots->listBlock[ i ] != NULL )
{
hb_gcMark( t_slots->listBlock[ i ] );
//HB_TRACE( HB_TR_DEBUG, ( " MARKED %d ptr=%p", i, (void *)t_slots->listBlock.at( i ) ) );
}
}
}
}
}
</CODE>
<ENUMS>

View File

@@ -28,30 +28,6 @@ New =
#include <QtCore/QObject>
#include "hbqt_hbqslots.h"
HB_GARBAGE_FUNC( hbqt_gcMark_HBQSlots )
{
HBQT_GC_T_HBQSlots * p = ( HBQT_GC_T_HBQSlots * ) Cargo;
//HB_TRACE( HB_TR_DEBUG, ( "hbqt_gcMark_HBQSlots cargo=%p", Cargo ) );
if( p )
{
if( p->ph )
{
HBQSlots * t_slots = p->ph;
int i;
for( i = t_slots->listBlock.size() - 1; i >= 0 ; i-- )
{
//HB_TRACE( HB_TR_DEBUG, ( "hbqt_gcMark_HBQSlots marking %d", i ) );
if( t_slots->listBlock[ i ] != NULL )
{
hb_gcMark( t_slots->listBlock[ i ] );
//HB_TRACE( HB_TR_DEBUG, ( " MARKED %d ptr=%p", i, (void *)t_slots->listBlock.at( i ) ) );
}
}
}
}
}
/*
* HBQSlots ()
* ~HBQSlots ()

View File

@@ -47,11 +47,7 @@ enum LibraryLocation { PrefixPath, DocumentationPath, HeadersPath, LibrariesPath
<PROTOS>
QDate buildDate (){
#if QT_VERSION >= 0x040600
#ifdef __HBQT_REVAMP__
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, new QDate( QLibraryInfo::buildDate() ), ( "HB_QDATE" ), NULL, 1 ) );
#else
hbqt_create_objectGC( hbqt_gcAllocate_QDate( new QDate( QLibraryInfo::buildDate() ), true ) , "HB_QDATE" );
#endif
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, new QDate( QLibraryInfo::buildDate() ), "HB_QDATE", hbqt_del_QDate, HBQT_BIT_OWNER ) );
#endif
}
QString buildKey (){

View File

@@ -70,11 +70,7 @@ QStringList * hbUrlList() const{
{
strList << ( QString ) url.toString().toAscii().data();
}
#ifdef __HBQT_REVAMP__
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, new QStringList( strList ), ( "HB_QSTRINGLIST" ), NULL, 1 ) );
#else
hbqt_create_objectGC( hbqt_gcAllocate_QStringList( new QStringList( strList ), true ), "hb_QStringList" );
#endif
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, new QStringList( strList ), "HB_QSTRINGLIST", hbqt_del_QStringList, HBQT_BIT_OWNER ) );
}
}
</PROTOS>

View File

@@ -138,7 +138,7 @@ HBQAbstractItemModel::HBQAbstractItemModel( PHB_ITEM pBlock ) : QAbstractItemMod
if( pBlock )
{
block = hb_itemNew( pBlock );
hb_gcUnlock( block );
// hb_gcUnlock( block );
}
}

View File

@@ -65,12 +65,6 @@
#include <math.h>
HB_EXTERN_BEGIN
extern void * hbqt_gcAllocate_QPainter( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QRectF( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QGraphicsSceneContextMenuEvent( void * pObj, bool bNew );
HB_EXTERN_END
HBQGraphicsItem::HBQGraphicsItem( int type, QGraphicsItem * parent ) : QGraphicsItem( parent )
{
iType = type;
@@ -125,7 +119,8 @@ HBQGraphicsItem::HBQGraphicsItem( int type, QGraphicsItem * parent ) : QGraphics
HBQGraphicsItem::~HBQGraphicsItem()
{
if( block ){
if( block )
{
hb_itemRelease( block );
block = NULL;
}
@@ -133,9 +128,10 @@ HBQGraphicsItem::~HBQGraphicsItem()
void HBQGraphicsItem::hbSetBlock( PHB_ITEM b )
{
if( b ){
if( b )
{
block = hb_itemNew( b );
hb_gcUnlock( block );
// hb_gcUnlock( block );
}
}
@@ -490,11 +486,7 @@ void HBQGraphicsItem::contextMenuEvent( QGraphicsSceneContextMenuEvent * event )
{
if( block ){
PHB_ITEM p1 = hb_itemPutNI( NULL, QEvent::GraphicsSceneContextMenu );
#ifdef __HBQT_REVAMP__
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, ( "HB_QGRAPHICSSCENECONTEXTMENUEVENT" ), NULL, 0 );
#else
PHB_ITEM p2 = hbqt_create_objectGC( hbqt_gcAllocate_QGraphicsSceneContextMenuEvent( event, false ), "hb_QGraphicsSceneContextMenuEvent" );
#endif
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, "HB_QGRAPHICSSCENECONTEXTMENUEVENT", NULL, 0 );
PHB_ITEM p3 = hb_itemPutC( NULL, objectName().toLatin1().data() );
hb_vmEvalBlockV( block, 3, p1, p2, p3 );
hb_itemRelease( p1 );
@@ -783,13 +775,8 @@ void HBQGraphicsItem::paint( QPainter * painter, const QStyleOptionGraphicsItem
QRectF rect = ( option->type == QStyleOption::SO_GraphicsItem ) ? boundingRect() : option->exposedRect;
PHB_ITEM p1 = hb_itemPutNI( NULL, 21017 );
#ifdef __HBQT_REVAMP__
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) painter, ( "HB_QPAINTER" ), NULL, 0 );
PHB_ITEM p3 = hbqt_bindGetHbObject( NULL, ( void * ) &rect, ( "HB_QRECTF" ), NULL, 0 );
#else
PHB_ITEM p2 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QPainter( painter, false ), "hb_QPainter" ) );
PHB_ITEM p3 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QRectF( &rect, false ), "hb_QRectF" ) );
#endif
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) painter, "HB_QPAINTER", NULL, 0 );
PHB_ITEM p3 = hbqt_bindGetHbObject( NULL, ( void * ) &rect, "HB_QRECTF", NULL, 0 );
hb_vmEvalBlockV( block, 3, p1, p2, p3 );
hb_itemRelease( p1 );
hb_itemRelease( p2 );

View File

@@ -64,11 +64,6 @@
#include "hbqt_hbqgraphicsscene.h"
HB_EXTERN_BEGIN
extern void * hbqt_gcAllocate_QGraphicsSceneContextMenuEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QGraphicsSceneDragDropEvent( void * pObj, bool bNew );
HB_EXTERN_END
HBQGraphicsScene::HBQGraphicsScene( QObject * parent ) : QGraphicsScene( parent )
{
block = 0;
@@ -93,7 +88,8 @@ HBQGraphicsScene::HBQGraphicsScene( QObject * parent ) : QGraphicsScene( parent
HBQGraphicsScene::~HBQGraphicsScene()
{
if( block ){
if( block )
{
hb_itemRelease( block );
block = NULL;
}
@@ -101,9 +97,10 @@ HBQGraphicsScene::~HBQGraphicsScene()
void HBQGraphicsScene::hbSetBlock( PHB_ITEM b )
{
if( b ){
if( b )
{
block = hb_itemNew( b );
hb_gcUnlock( block );
// hb_gcUnlock( block );
QDesktopWidget * qWid = new QDesktopWidget();
@@ -414,11 +411,7 @@ void HBQGraphicsScene::contextMenuEvent( QGraphicsSceneContextMenuEvent * event
if( ! item ){
if( block ){
PHB_ITEM p1 = hb_itemPutNI( NULL, QEvent::GraphicsSceneContextMenu );
#ifdef __HBQT_REVAMP__
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, ( "HB_QGRAPHICSSCENECONTEXTMENUEVENT" ), NULL, 0 );
#else
PHB_ITEM p2 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QGraphicsSceneContextMenuEvent( event, false ), "hb_QGraphicsSceneContextMenuEvent" ) );
#endif
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, "HB_QGRAPHICSSCENECONTEXTMENUEVENT", NULL, 0 );
hb_vmEvalBlockV( block, 2, p1, p2 );
hb_itemRelease( p1 );
hb_itemRelease( p2 );
@@ -432,11 +425,7 @@ void HBQGraphicsScene::dragEnterEvent( QGraphicsSceneDragDropEvent * event )
if( block )
{
PHB_ITEM p1 = hb_itemPutNI( NULL, ( int ) QEvent::GraphicsSceneDragEnter );
#ifdef __HBQT_REVAMP__
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, ( "HB_QGRAPHICSSCENEDRAGDROPEVENT" ), NULL, 0 );
#else
PHB_ITEM p2 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QGraphicsSceneDragDropEvent( event, false ), "hb_QGraphicsSceneDragDropEvent" ) );
#endif
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, "HB_QGRAPHICSSCENEDRAGDROPEVENT", NULL, 0 );
hb_vmEvalBlockV( block, 2, p1, p2 );
hb_itemRelease( p1 );
hb_itemRelease( p2 );
@@ -451,11 +440,7 @@ void HBQGraphicsScene::dragLeaveEvent( QGraphicsSceneDragDropEvent * event )
if( block )
{
PHB_ITEM p1 = hb_itemPutNI( NULL, ( int ) QEvent::GraphicsSceneDragLeave );
#ifdef __HBQT_REVAMP__
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, ( "HB_QGRAPHICSSCENEDRAGDROPEVENT" ), NULL, 0 );
#else
PHB_ITEM p2 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QGraphicsSceneDragDropEvent( event, false ), "hb_QGraphicsSceneDragDropEvent" ) );
#endif
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, "HB_QGRAPHICSSCENEDRAGDROPEVENT", NULL, 0 );
hb_vmEvalBlockV( block, 2, p1, p2 );
hb_itemRelease( p1 );
hb_itemRelease( p2 );
@@ -470,11 +455,7 @@ void HBQGraphicsScene::dragMoveEvent( QGraphicsSceneDragDropEvent * event )
if( block )
{
PHB_ITEM p1 = hb_itemPutNI( NULL, ( int ) QEvent::GraphicsSceneDragMove );
#ifdef __HBQT_REVAMP__
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, ( "HB_QGRAPHICSSCENEDRAGDROPEVENT" ), NULL, 0 );
#else
PHB_ITEM p2 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QGraphicsSceneDragDropEvent( event, false ), "hb_QGraphicsSceneDragDropEvent" ) );
#endif
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, "HB_QGRAPHICSSCENEDRAGDROPEVENT", NULL, 0 );
hb_vmEvalBlockV( block, 2, p1, p2 );
hb_itemRelease( p1 );
hb_itemRelease( p2 );
@@ -493,11 +474,7 @@ void HBQGraphicsScene::dropEvent( QGraphicsSceneDragDropEvent * event )
if( mime->hasFormat( ( QString ) "application/x-qabstractitemmodeldatalist" ) )
{
PHB_ITEM p1 = hb_itemPutNI( NULL, ( int ) QEvent::GraphicsSceneDrop );
#ifdef __HBQT_REVAMP__
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, ( "HB_QGRAPHICSSCENEDRAGDROPEVENT" ), NULL, 0 );
#else
PHB_ITEM p2 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QGraphicsSceneDragDropEvent( event, false ), "hb_QGraphicsSceneDragDropEvent" ) );
#endif
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, "HB_QGRAPHICSSCENEDRAGDROPEVENT", NULL, 0 );
PHB_ITEM p3 = hb_itemNew( NULL );
QTreeWidget * tree = dynamic_cast< QTreeWidget * >( event->source() );
@@ -524,11 +501,7 @@ void HBQGraphicsScene::dropEvent( QGraphicsSceneDragDropEvent * event )
else
{
PHB_ITEM p1 = hb_itemPutNI( NULL, ( int ) QEvent::GraphicsSceneDrop );
#ifdef __HBQT_REVAMP__
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, ( "HB_QGRAPHICSSCENEDRAGDROPEVENT" ), NULL, 0 );
#else
PHB_ITEM p2 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QGraphicsSceneDragDropEvent( event, false ), "hb_QGraphicsSceneDragDropEvent" ) );
#endif
PHB_ITEM p2 = hbqt_bindGetHbObject( NULL, ( void * ) event, "HB_QGRAPHICSSCENEDRAGDROPEVENT", NULL, 0 );
hb_vmEvalBlockV( block, 2, p1, p2 );
hb_itemRelease( p1 );
hb_itemRelease( p2 );

View File

@@ -271,7 +271,7 @@ void HBQPlainTextEdit::hbSetEventBlock( PHB_ITEM pBlock )
if( pBlock )
{
block = hb_itemNew( pBlock );
hb_gcUnlock( block );
// hb_gcUnlock( block );
}
}
@@ -1377,6 +1377,8 @@ bool HBQPlainTextEdit::hbKeyPressSelection( QKeyEvent * event )
{
PHB_ITEM p1 = hb_itemPutNI( NULL, 21013 );
PHB_ITEM p2 = hb_itemNew( NULL );
PHB_ITEM pObj = hbqt_bindGetHbObject( NULL, ( void * ) event, "HB_QKEYEVENT", NULL, 0 ) ;
hb_arrayNew( p2, 7 );
hb_arraySetNI( p2, 1, rowBegins );
hb_arraySetNI( p2, 2, columnBegins );
@@ -1384,12 +1386,9 @@ bool HBQPlainTextEdit::hbKeyPressSelection( QKeyEvent * event )
hb_arraySetNI( p2, 4, columnEnds );
hb_arraySetNI( p2, 5, selectionMode );
hb_arraySetNI( p2, 6, selectionState );
#ifdef __HBQT_REVAMP__
hb_arraySet( p2, 7, hbqt_bindGetHbObject( NULL, ( void * ) event, ( "HB_QKEYEVENT" ), NULL, 0 ) );
#else
hb_arraySet( p2, 7, hbqt_create_objectGC( hbqt_gcAllocate_QKeyEvent( event, false ), "hb_QKeyEvent" ) );
#endif
hb_arraySet( p2, 7, pObj );
hb_vmEvalBlockV( block, 2, p1, p2 );
hb_itemRelease( pObj );
hb_itemRelease( p1 );
hb_itemRelease( p2 );

View File

@@ -61,11 +61,6 @@
#include <QtCore/QPointer>
HB_EXTERN_BEGIN
extern void * hbqt_gcAllocate_QMouseEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QWheelEvent( void * pObj, bool bNew );
HB_EXTERN_END
HBQTableView::HBQTableView( QWidget * parent ) : QTableView( parent )
{
@@ -90,7 +85,7 @@ void HBQTableView::hbSetBlock( PHB_ITEM b )
hb_itemRelease( block );
}
block = hb_itemNew( b );
hb_gcUnlock( block );
// hb_gcUnlock( block );
}
}
@@ -99,11 +94,7 @@ void HBQTableView::mousePressEvent( QMouseEvent * event )
if( block )
{
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::MouseButtonPress );
#ifdef __HBQT_REVAMP__
PHB_ITEM p1 = hbqt_bindGetHbObject( NULL, ( void * ) event, ( "HB_QMOUSEEVENT" ), NULL, 0 );
#else
PHB_ITEM p1 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QMouseEvent( event, false ), "hb_QMouseEvent" ) );
#endif
PHB_ITEM p1 = hbqt_bindGetHbObject( NULL, ( void * ) event, "HB_QMOUSEEVENT", NULL, 0 );
hb_vmEvalBlockV( block, 2, p0, p1 );
hb_itemRelease( p0 );
hb_itemRelease( p1 );
@@ -116,11 +107,7 @@ void HBQTableView::mouseDoubleClickEvent( QMouseEvent * event )
if( block )
{
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::MouseButtonDblClick );
#ifdef __HBQT_REVAMP__
PHB_ITEM p1 = hbqt_bindGetHbObject( NULL, ( void * ) event, ( "HB_QMOUSEEVENT" ), NULL, 0 );
#else
PHB_ITEM p1 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QMouseEvent( event, false ), "hb_QMouseEvent" ) );
#endif
PHB_ITEM p1 = hbqt_bindGetHbObject( NULL, ( void * ) event, "HB_QMOUSEEVENT", NULL, 0 );
hb_vmEvalBlockV( block, 2, p0, p1 );
hb_itemRelease( p0 );
hb_itemRelease( p1 );
@@ -133,11 +120,7 @@ void HBQTableView::wheelEvent( QWheelEvent * event )
if( block )
{
PHB_ITEM p0 = hb_itemPutNI( NULL, QEvent::Wheel );
#ifdef __HBQT_REVAMP__
PHB_ITEM p1 = hbqt_bindGetHbObject( NULL, ( void * ) event, ( "HB_QWHEELEVENT" ), NULL, 0 );
#else
PHB_ITEM p1 = hb_itemNew( hbqt_create_objectGC( hbqt_gcAllocate_QWheelEvent( event, false ), "hb_QWheelEvent" ) );
#endif
PHB_ITEM p1 = hbqt_bindGetHbObject( NULL, ( void * ) event, "HB_QWHEELEVENT", NULL, 0 );
hb_vmEvalBlockV( block, 2, p0, p1 );
hb_itemRelease( p0 );
hb_itemRelease( p1 );

View File

@@ -81,60 +81,12 @@
#include <QtGui/QTreeWidgetItem>
#include <QtGui/QWidget>
#include <QtGui/QKeyEvent>
#include <QtGui/QCloseEvent>
#include <QtCore/QStringList>
#include <QtCore/QTextCodec>
HB_EXTERN_BEGIN
extern void * hbqt_gcAllocate_QColor( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QItemSelection( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QTextCharFormat( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QFont( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QTextCursor( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QTextBlock( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QAbstractButton( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QAction( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QMdiSubWindow( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QPrinter( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QStandardItem( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QListWidgetItem( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QTreeWidgetItem( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QTableWidgetItem( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QWidget( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QRect( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QActionEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QContextMenuEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QDragEnterEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QDragLeaveEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QDropEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QFocusEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QGraphicsSceneContextMenuEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QGraphicsSceneMouseEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QGraphicsSceneDragDropEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QGraphicsSceneHoverEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QGraphicsSceneMoveEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QGraphicsSceneResizeEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QGraphicsSceneWheelEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QHelpEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QHideEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QHoverEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QInputMethodEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QKeyEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QMouseEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QMoveEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QPaintEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QResizeEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QShortcutEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QShowEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QWheelEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QWindowStateChangeEvent( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QCloseEvent( void * pObj, bool bNew );
HB_EXTERN_END
#ifdef __HBQT_REVAMP__
HB_EXTERN_BEGIN
extern void hbqt_del_QObject( void * pObj, int iFlags );
@@ -185,7 +137,6 @@ extern void hbqt_del_QWindowStateChangeEvent( void * pObj, int iFlags );
extern void hbqt_del_QCloseEvent( void * pObj, int iFlags );
HB_EXTERN_END
#endif
/*----------------------------------------------------------------------*/
@@ -195,16 +146,10 @@ static void hbqt_SlotsExecQColor( PHB_ITEM * codeBlock, void ** arguments, QStri
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QColor( ( *reinterpret_cast< QColor( * ) >( arguments[ 1 ] ) ) ), "HB_QCOLOR", hbqt_del_QColor, HBQT_BIT_OWNER );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QColor( new QColor( ( *reinterpret_cast< QColor( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QColor" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecItemSelItemSel( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -213,20 +158,13 @@ static void hbqt_SlotsExecItemSelItemSel( PHB_ITEM * codeBlock, void ** argument
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QItemSelection( ( *reinterpret_cast< QItemSelection( * ) >( arguments[ 1 ] ) ) ), "HB_QITEMSELECTION", hbqt_del_QObject, HBQT_BIT_OWNER );
PHB_ITEM p1 = hbqt_bindGetHbObject( NULL, new QItemSelection( ( *reinterpret_cast< QItemSelection( * ) >( arguments[ 2 ] ) ) ), "HB_QITEMSELECTION", hbqt_del_QObject, HBQT_BIT_OWNER ) ;
hb_vmPush( p0 );
hb_vmPush( p1 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QItemSelection( new QItemSelection( ( *reinterpret_cast< QItemSelection( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QItemSelection" ) );
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QItemSelection( new QItemSelection( ( *reinterpret_cast< QItemSelection( * ) >( arguments[ 2 ] ) ) ), true ), "hb_QItemSelection" ) );
#endif
hb_vmSend( 2 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
hb_itemRelease( p1 );
#endif
}
static void hbqt_SlotsExecQTextCharFormat( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -235,16 +173,10 @@ static void hbqt_SlotsExecQTextCharFormat( PHB_ITEM * codeBlock, void ** argumen
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QTextCharFormat( ( *reinterpret_cast< QTextCharFormat( * ) >( arguments[ 1 ] ) ) ), "HB_QTEXTCHARFORMAT", hbqt_del_QTextCharFormat, HBQT_BIT_OWNER );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTextCharFormat( new QTextCharFormat( ( *reinterpret_cast< QTextCharFormat( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QTextCharFormat" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQFont( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -253,16 +185,10 @@ static void hbqt_SlotsExecQFont( PHB_ITEM * codeBlock, void ** arguments, QStrin
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QFont( ( *reinterpret_cast< QFont( * ) >( arguments[ 1 ] ) ) ), "HB_QFONT", hbqt_del_QFont, HBQT_BIT_OWNER );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QFont( new QFont( ( *reinterpret_cast< QFont( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QFont" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQTextCursor( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -271,16 +197,10 @@ static void hbqt_SlotsExecQTextCursor( PHB_ITEM * codeBlock, void ** arguments,
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QTextCursor( ( *reinterpret_cast< QTextCursor( * ) >( arguments[ 1 ] ) ) ), "HB_QTEXTCURSOR", hbqt_del_QTextCursor, HBQT_BIT_OWNER );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTextCursor( new QTextCursor( ( *reinterpret_cast< QTextCursor( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QTextCursor" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQTextBlock( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -289,16 +209,10 @@ static void hbqt_SlotsExecQTextBlock( PHB_ITEM * codeBlock, void ** arguments, Q
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QTextBlock( ( *reinterpret_cast< QTextBlock( * ) >( arguments[ 1 ] ) ) ), "HB_QTEXTBLOCK", hbqt_del_QTextBlock, HBQT_BIT_OWNER );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTextBlock( new QTextBlock( ( *reinterpret_cast< QTextBlock( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QTextBlock" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQAbstractButton( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -307,16 +221,10 @@ static void hbqt_SlotsExecQAbstractButton( PHB_ITEM * codeBlock, void ** argumen
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QWidget( ( QAbstractButton * ) ( arguments[ 1 ] ) ), "HB_QABSTRACTBUTTON", hbqt_del_QWidget, HBQT_BIT_OWNER | HBQT_BIT_QOBJECT );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QAbstractButton( new QWidget( ( QAbstractButton * ) ( arguments[ 1 ] ) ) , true ), "hb_QAbstractButton" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQAction( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -325,16 +233,10 @@ static void hbqt_SlotsExecQAction( PHB_ITEM * codeBlock, void ** arguments, QStr
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QAction( ( QAction * ) ( arguments[ 1 ] ) ), "HB_QACTION", hbqt_del_QAction, HBQT_BIT_OWNER | HBQT_BIT_QOBJECT );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QAction( new QAction( ( QAction * ) ( arguments[ 1 ] ) ), true ), "hb_QAction" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQMdiSubWindow( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -343,16 +245,10 @@ static void hbqt_SlotsExecQMdiSubWindow( PHB_ITEM * codeBlock, void ** arguments
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , "HB_QMDISUBWINDOW", NULL, HBQT_BIT_QOBJECT );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QMdiSubWindow( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QMdiSubWindow" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQTreeWidgetItem( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -361,16 +257,10 @@ static void hbqt_SlotsExecQTreeWidgetItem( PHB_ITEM * codeBlock, void ** argumen
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , "HB_QTREEWIDGETITEM", NULL, HBQT_BIT_NONE );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTreeWidgetItem( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QTreeWidgetItem" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQTreeWidgetItemInt( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -379,17 +269,11 @@ static void hbqt_SlotsExecQTreeWidgetItemInt( PHB_ITEM * codeBlock, void ** argu
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , "HB_QTREEWIDGETITEM", NULL, HBQT_BIT_NONE );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTreeWidgetItem( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QTreeWidgetItem" ) );
#endif
hb_vmPushInteger( *reinterpret_cast< int( * ) >( arguments[ 2 ] ) );
hb_vmSend( 2 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQPrinter( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -398,16 +282,10 @@ static void hbqt_SlotsExecQPrinter( PHB_ITEM * codeBlock, void ** arguments, QSt
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , "HB_QPRINTER", NULL, HBQT_BIT_NONE );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QPrinter( ( *reinterpret_cast< void*(*)> ( arguments[ 1 ] ) ), false ), "hb_QPrinter" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQStandardItem( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -416,16 +294,10 @@ static void hbqt_SlotsExecQStandardItem( PHB_ITEM * codeBlock, void ** arguments
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , "HB_QSTANDARDITEM", NULL, HBQT_BIT_NONE );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QStandardItem( ( *reinterpret_cast< void*( * )>( arguments[ 1 ] ) ), false ), "hb_QStandardItem" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQListWidgetItem( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -434,16 +306,10 @@ static void hbqt_SlotsExecQListWidgetItem( PHB_ITEM * codeBlock, void ** argumen
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , "HB_QLISTWIDGETITEM", NULL, HBQT_BIT_NONE );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QListWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 1 ] ) ), false ), "hb_QListWidgetItem" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQListWidgetItemQListWidgetItem( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -452,20 +318,13 @@ static void hbqt_SlotsExecQListWidgetItemQListWidgetItem( PHB_ITEM * codeBlock,
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , "HB_QLISTWIDGETITEM", NULL, HBQT_BIT_NONE );
PHB_ITEM p1 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 2 ] ) , "HB_QLISTWIDGETITEM", NULL, HBQT_BIT_NONE );
hb_vmPush( p0 );
hb_vmPush( p1 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QListWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 1 ] ) ), false ), "hb_QListWidgetItem" ) );
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QListWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 2 ] ) ), false ), "hb_QListWidgetItem" ) );
#endif
hb_vmSend( 2 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
hb_itemRelease( p1 );
#endif
}
static void hbqt_SlotsExecQTableWidgetItem( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -474,16 +333,10 @@ static void hbqt_SlotsExecQTableWidgetItem( PHB_ITEM * codeBlock, void ** argume
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , "HB_QTABLEWIDGETITEM", NULL, HBQT_BIT_NONE );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTableWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 1 ] ) ), false ), "hb_QTableWidgetItem" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQTableWidgetItemQTableWidgetItem( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -492,20 +345,13 @@ static void hbqt_SlotsExecQTableWidgetItemQTableWidgetItem( PHB_ITEM * codeBlock
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , "HB_QTABLEWIDGETITEM", NULL, HBQT_BIT_NONE );
PHB_ITEM p1 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 2 ] ) , "HB_QTABLEWIDGETITEM", NULL, HBQT_BIT_NONE );
hb_vmPush( p0 );
hb_vmPush( p1 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTableWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 1 ] ) ), false ), "hb_QTableWidgetItem" ) );
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTableWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 2 ] ) ), false ), "hb_QTableWidgetItem" ) );
#endif
hb_vmSend( 2 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
hb_itemRelease( p1 );
#endif
}
static void hbqt_SlotsExecQTreeWidgetItemQTreeWidgetItem( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -514,20 +360,13 @@ static void hbqt_SlotsExecQTreeWidgetItemQTreeWidgetItem( PHB_ITEM * codeBlock,
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , "HB_QTREEWIDGETITEM", NULL, HBQT_BIT_NONE );
PHB_ITEM p1 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 2 ] ) , "HB_QTREEWIDGETITEM", NULL, HBQT_BIT_NONE );
hb_vmPush( p0 );
hb_vmPush( p1 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTreeWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 1 ] ) ), false ), "hb_QTreeWidgetItem" ) );
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QTreeWidgetItem( ( *reinterpret_cast<void*( * )>( arguments[ 2 ] ) ), false ), "hb_QTreeWidgetItem" ) );
#endif
hb_vmSend( 2 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
hb_itemRelease( p1 );
#endif
}
static void hbqt_SlotsExecQWidget( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -536,16 +375,10 @@ static void hbqt_SlotsExecQWidget( PHB_ITEM * codeBlock, void ** arguments, QStr
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , "HB_QWIDGET", NULL, HBQT_BIT_QOBJECT );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QWidget( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QWidget" ) );
#endif
hb_vmSend( 1 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQWidgetQWidget( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -554,20 +387,13 @@ static void hbqt_SlotsExecQWidgetQWidget( PHB_ITEM * codeBlock, void ** argument
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , "HB_QWIDGET", NULL, HBQT_BIT_QOBJECT );
PHB_ITEM p1 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 2 ] ) , "HB_QWIDGET", NULL, HBQT_BIT_QOBJECT );
hb_vmPush( p0 );
hb_vmPush( p1 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QWidget( ( *reinterpret_cast<void*( * )>( arguments[ 1 ] ) ), false ), "hb_QWidget" ) );
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QWidget( ( *reinterpret_cast<void*( * )>( arguments[ 2 ] ) ), false ), "hb_QWidget" ) );
#endif
hb_vmSend( 2 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
hb_itemRelease( p1 );
#endif
}
static void hbqt_SlotsExecQWidgetInt( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -576,17 +402,11 @@ static void hbqt_SlotsExecQWidgetInt( PHB_ITEM * codeBlock, void ** arguments, Q
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) , "HB_QWIDGET", NULL, HBQT_BIT_QOBJECT );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QWidget( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), "hb_QWidget" ) );
#endif
hb_vmPushInteger( *reinterpret_cast< int( * ) >( arguments[ 2 ] ) );
hb_vmSend( 2 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
static void hbqt_SlotsExecQRectInt( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -594,17 +414,11 @@ static void hbqt_SlotsExecQRectInt( PHB_ITEM * codeBlock, void ** arguments, QSt
Q_UNUSED( pList );
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
#ifdef __HBQT_REVAMP__
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QRect( ( *reinterpret_cast< QRect( * ) >( arguments[ 1 ] ) ) ), "HB_QRECT", hbqt_del_QRect, HBQT_BIT_OWNER );
hb_vmPush( p0 );
#else
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QRect( new QRect( ( *reinterpret_cast< QRect( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QRect" ) );
#endif
hb_vmPushInteger( *reinterpret_cast< int( * ) >( arguments[ 2 ] ) );
hb_vmSend( 2 );
#ifdef __HBQT_REVAMP__
hb_itemRelease( p0 );
#endif
}
@@ -717,134 +531,134 @@ static void hbqt_registerCallbacks( void )
hbqt_slots_register_callback( "QWidget*" , hbqt_SlotsExecQWidget );
hbqt_slots_register_callback( "QRect$int" , hbqt_SlotsExecQRectInt );
hbqt_events_register_createobj( QEvent::MouseButtonPress , "hb_QMouseEvent" , hbqt_gcAllocate_QMouseEvent );
hbqt_events_register_createobj( QEvent::MouseButtonRelease , "hb_QMouseEvent" , hbqt_gcAllocate_QMouseEvent );
hbqt_events_register_createobj( QEvent::MouseButtonDblClick , "hb_QMouseEvent" , hbqt_gcAllocate_QMouseEvent );
hbqt_events_register_createobj( QEvent::MouseMove , "hb_QMouseEvent" , hbqt_gcAllocate_QMouseEvent );
hbqt_events_register_createobj( QEvent::KeyPress , "hb_QKeyEvent" , hbqt_gcAllocate_QKeyEvent );
hbqt_events_register_createobj( QEvent::KeyRelease , "hb_QKeyEvent" , hbqt_gcAllocate_QKeyEvent );
hbqt_events_register_createobj( QEvent::FocusIn , "hb_QFocusEvent" , hbqt_gcAllocate_QFocusEvent );
hbqt_events_register_createobj( QEvent::FocusOut , "hb_QFocusEvent" , hbqt_gcAllocate_QFocusEvent );
hbqt_events_register_createobj( QEvent::Enter , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::Leave , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::Paint , "hb_QPaintEvent" , hbqt_gcAllocate_QPaintEvent );
hbqt_events_register_createobj( QEvent::Move , "hb_QMoveEvent" , hbqt_gcAllocate_QMoveEvent );
hbqt_events_register_createobj( QEvent::Resize , "hb_QResizeEvent" , hbqt_gcAllocate_QResizeEvent );
hbqt_events_register_createobj( QEvent::Show , "hb_QShowEvent" , hbqt_gcAllocate_QShowEvent );
hbqt_events_register_createobj( QEvent::Hide , "hb_QHideEvent" , hbqt_gcAllocate_QHideEvent );
hbqt_events_register_createobj( QEvent::Close , "hb_QCloseEvent" , hbqt_gcAllocate_QCloseEvent );
hbqt_events_register_createobj( QEvent::ParentChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::WindowActivate , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::WindowDeactivate , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ShowToParent , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::HideToParent , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::Wheel , "hb_QWheelEvent" , hbqt_gcAllocate_QWheelEvent );
hbqt_events_register_createobj( QEvent::WindowTitleChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::WindowIconChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ApplicationWindowIconChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ApplicationFontChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ApplicationLayoutDirectionChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ApplicationPaletteChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::PaletteChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::Clipboard , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::MetaCall , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::SockAct , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ShortcutOverride , "hb_QKeyEvent" , hbqt_gcAllocate_QKeyEvent );
hbqt_events_register_createobj( QEvent::DeferredDelete , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::DragEnter , "hb_QDragEnterEvent" , hbqt_gcAllocate_QDragEnterEvent );
hbqt_events_register_createobj( QEvent::DragLeave , "hb_QDragLeaveEvent" , hbqt_gcAllocate_QDragLeaveEvent );
hbqt_events_register_createobj( QEvent::DragMove , "hb_QDragMoveEvent" , hbqt_gcAllocate_QMoveEvent );
hbqt_events_register_createobj( QEvent::Drop , "hb_QDropEvent" , hbqt_gcAllocate_QDropEvent );
hbqt_events_register_createobj( QEvent::ChildAdded , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ChildPolished , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ChildRemoved , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::PolishRequest , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::Polish , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::LayoutRequest , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::UpdateRequest , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::UpdateLater , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ContextMenu , "hb_QContextMenuEvent" , hbqt_gcAllocate_QContextMenuEvent );
hbqt_events_register_createobj( QEvent::InputMethod , "hb_QInputMethodEvent" , hbqt_gcAllocate_QInputMethodEvent );
hbqt_events_register_createobj( QEvent::AccessibilityPrepare , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::TabletMove , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::LocaleChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::LanguageChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::LayoutDirectionChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::TabletPress , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::TabletRelease , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::OkRequest , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::IconDrag , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::FontChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::EnabledChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ActivationChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::StyleChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::IconTextChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ModifiedChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::WindowBlocked , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::WindowUnblocked , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::WindowStateChange , "hb_QWindowStateChangeEvent" , hbqt_gcAllocate_QWindowStateChangeEvent );
hbqt_events_register_createobj( QEvent::MouseTrackingChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ToolTip , "hb_QHelpEvent" , hbqt_gcAllocate_QHelpEvent );
hbqt_events_register_createobj( QEvent::WhatsThis , "hb_QHelpEvent" , hbqt_gcAllocate_QHelpEvent );
hbqt_events_register_createobj( QEvent::StatusTip , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ActionChanged , "hb_QActionEvent" , hbqt_gcAllocate_QActionEvent );
hbqt_events_register_createobj( QEvent::ActionAdded , "hb_QActionEvent" , hbqt_gcAllocate_QActionEvent );
hbqt_events_register_createobj( QEvent::ActionRemoved , "hb_QActionEvent" , hbqt_gcAllocate_QActionEvent );
hbqt_events_register_createobj( QEvent::FileOpen , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::Shortcut , "hb_QShortcutEvent" , hbqt_gcAllocate_QShortcutEvent );
hbqt_events_register_createobj( QEvent::WhatsThisClicked , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::AccessibilityHelp , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ToolBarChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ApplicationActivate , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ApplicationActivated , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ApplicationDeactivate , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::QueryWhatsThis , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::EnterWhatsThisMode , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::LeaveWhatsThisMode , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ZOrderChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::HoverEnter , "hb_QHoverEvent" , hbqt_gcAllocate_QHoverEvent );
hbqt_events_register_createobj( QEvent::HoverLeave , "hb_QHoverEvent" , hbqt_gcAllocate_QHoverEvent );
hbqt_events_register_createobj( QEvent::HoverMove , "hb_QHoverEvent" , hbqt_gcAllocate_QHoverEvent );
hbqt_events_register_createobj( QEvent::AccessibilityDescription , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ParentAboutToChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::WinEventAct , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::MouseButtonPress , "hb_QMouseEvent" );
hbqt_events_register_createobj( QEvent::MouseButtonRelease , "hb_QMouseEvent" );
hbqt_events_register_createobj( QEvent::MouseButtonDblClick , "hb_QMouseEvent" );
hbqt_events_register_createobj( QEvent::MouseMove , "hb_QMouseEvent" );
hbqt_events_register_createobj( QEvent::KeyPress , "hb_QKeyEvent" );
hbqt_events_register_createobj( QEvent::KeyRelease , "hb_QKeyEvent" );
hbqt_events_register_createobj( QEvent::FocusIn , "hb_QFocusEvent" );
hbqt_events_register_createobj( QEvent::FocusOut , "hb_QFocusEvent" );
hbqt_events_register_createobj( QEvent::Enter , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::Leave , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::Paint , "hb_QPaintEvent" );
hbqt_events_register_createobj( QEvent::Move , "hb_QMoveEvent" );
hbqt_events_register_createobj( QEvent::Resize , "hb_QResizeEvent" );
hbqt_events_register_createobj( QEvent::Show , "hb_QShowEvent" );
hbqt_events_register_createobj( QEvent::Hide , "hb_QHideEvent" );
hbqt_events_register_createobj( QEvent::Close , "hb_QCloseEvent" );
hbqt_events_register_createobj( QEvent::ParentChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::WindowActivate , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::WindowDeactivate , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ShowToParent , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::HideToParent , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::Wheel , "hb_QWheelEvent" );
hbqt_events_register_createobj( QEvent::WindowTitleChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::WindowIconChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ApplicationWindowIconChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ApplicationFontChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ApplicationLayoutDirectionChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ApplicationPaletteChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::PaletteChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::Clipboard , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::MetaCall , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::SockAct , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ShortcutOverride , "hb_QKeyEvent" );
hbqt_events_register_createobj( QEvent::DeferredDelete , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::DragEnter , "hb_QDragEnterEvent" );
hbqt_events_register_createobj( QEvent::DragLeave , "hb_QDragLeaveEvent" );
hbqt_events_register_createobj( QEvent::DragMove , "hb_QDragMoveEvent" );
hbqt_events_register_createobj( QEvent::Drop , "hb_QDropEvent" );
hbqt_events_register_createobj( QEvent::ChildAdded , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ChildPolished , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ChildRemoved , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::PolishRequest , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::Polish , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::LayoutRequest , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::UpdateRequest , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::UpdateLater , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ContextMenu , "hb_QContextMenuEvent" );
hbqt_events_register_createobj( QEvent::InputMethod , "hb_QInputMethodEvent" );
hbqt_events_register_createobj( QEvent::AccessibilityPrepare , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::TabletMove , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::LocaleChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::LanguageChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::LayoutDirectionChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::TabletPress , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::TabletRelease , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::OkRequest , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::IconDrag , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::FontChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::EnabledChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ActivationChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::StyleChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::IconTextChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ModifiedChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::WindowBlocked , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::WindowUnblocked , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::WindowStateChange , "hb_QWindowStateChangeEvent" );
hbqt_events_register_createobj( QEvent::MouseTrackingChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ToolTip , "hb_QHelpEvent" );
hbqt_events_register_createobj( QEvent::WhatsThis , "hb_QHelpEvent" );
hbqt_events_register_createobj( QEvent::StatusTip , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ActionChanged , "hb_QActionEvent" );
hbqt_events_register_createobj( QEvent::ActionAdded , "hb_QActionEvent" );
hbqt_events_register_createobj( QEvent::ActionRemoved , "hb_QActionEvent" );
hbqt_events_register_createobj( QEvent::FileOpen , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::Shortcut , "hb_QShortcutEvent" );
hbqt_events_register_createobj( QEvent::WhatsThisClicked , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::AccessibilityHelp , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ToolBarChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ApplicationActivate , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ApplicationActivated , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ApplicationDeactivate , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::QueryWhatsThis , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::EnterWhatsThisMode , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::LeaveWhatsThisMode , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ZOrderChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::HoverEnter , "hb_QHoverEvent" );
hbqt_events_register_createobj( QEvent::HoverLeave , "hb_QHoverEvent" );
hbqt_events_register_createobj( QEvent::HoverMove , "hb_QHoverEvent" );
hbqt_events_register_createobj( QEvent::AccessibilityDescription , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ParentAboutToChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::WinEventAct , "hb_QEvent" );
#if defined( QT_KEYPAD_NAVIGATION )
hbqt_events_register_createobj( QEvent::EnterEditFocus , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::LeaveEditFocus , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::EnterEditFocus , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::LeaveEditFocus , "hb_QEvent" );
#endif
hbqt_events_register_createobj( QEvent::MenubarUpdated , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::GraphicsSceneMouseMove , "hb_QGraphicsSceneMouseEvent" , hbqt_gcAllocate_QGraphicsSceneMouseEvent );
hbqt_events_register_createobj( QEvent::GraphicsSceneMousePress , "hb_QGraphicsSceneMouseEvent" , hbqt_gcAllocate_QGraphicsSceneMouseEvent );
hbqt_events_register_createobj( QEvent::GraphicsSceneMouseRelease , "hb_QGraphicsSceneMouseEvent" , hbqt_gcAllocate_QGraphicsSceneMouseEvent );
hbqt_events_register_createobj( QEvent::GraphicsSceneMouseDoubleClick , "hb_QGraphicsSceneMouseEvent" , hbqt_gcAllocate_QGraphicsSceneMouseEvent );
hbqt_events_register_createobj( QEvent::GraphicsSceneContextMenu , "hb_QGraphicsSceneContextMenuEvent" , hbqt_gcAllocate_QGraphicsSceneContextMenuEvent );
hbqt_events_register_createobj( QEvent::GraphicsSceneHoverEnter , "hb_QGraphicsSceneHoverEvent" , hbqt_gcAllocate_QGraphicsSceneHoverEvent );
hbqt_events_register_createobj( QEvent::GraphicsSceneHoverMove , "hb_QGraphicsSceneHoverEvent" , hbqt_gcAllocate_QGraphicsSceneHoverEvent );
hbqt_events_register_createobj( QEvent::GraphicsSceneHoverLeave , "hb_QGraphicsSceneHoverEvent" , hbqt_gcAllocate_QGraphicsSceneHoverEvent );
hbqt_events_register_createobj( QEvent::GraphicsSceneHelp , "hb_QHelpEvent" , hbqt_gcAllocate_QHelpEvent );
hbqt_events_register_createobj( QEvent::GraphicsSceneDragEnter , "hb_QGraphicsSceneDragDropEvent" , hbqt_gcAllocate_QGraphicsSceneDragDropEvent );
hbqt_events_register_createobj( QEvent::GraphicsSceneDragMove , "hb_QGraphicsSceneDragDropEvent" , hbqt_gcAllocate_QGraphicsSceneDragDropEvent );
hbqt_events_register_createobj( QEvent::GraphicsSceneDragLeave , "hb_QGraphicsSceneDragDropEvent" , hbqt_gcAllocate_QGraphicsSceneDragDropEvent );
hbqt_events_register_createobj( QEvent::GraphicsSceneDrop , "hb_QGraphicsSceneDragDropEvent" , hbqt_gcAllocate_QGraphicsSceneDragDropEvent );
hbqt_events_register_createobj( QEvent::GraphicsSceneWheel , "hb_QGraphicsSceneWheelEvent" , hbqt_gcAllocate_QGraphicsSceneWheelEvent );
hbqt_events_register_createobj( QEvent::KeyboardLayoutChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::DynamicPropertyChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::TabletEnterProximity , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::TabletLeaveProximity , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::NonClientAreaMouseMove , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::NonClientAreaMouseButtonPress , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::NonClientAreaMouseButtonRelease , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::NonClientAreaMouseButtonDblClick , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::MacSizeChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ContentsRectChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::GraphicsSceneResize , "hb_QGraphicsSceneResizeEvent" , hbqt_gcAllocate_QGraphicsSceneResizeEvent );
hbqt_events_register_createobj( QEvent::GraphicsSceneMove , "hb_QGraphicsSceneMoveEvent" , hbqt_gcAllocate_QGraphicsSceneMoveEvent );
hbqt_events_register_createobj( QEvent::CursorChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::ToolTipChange , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::GrabMouse , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::UngrabMouse , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::GrabKeyboard , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::UngrabKeyboard , "hb_QEvent" , hbqt_gcAllocate_QEvent );
hbqt_events_register_createobj( QEvent::MenubarUpdated , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::GraphicsSceneMouseMove , "hb_QGraphicsSceneMouseEvent" );
hbqt_events_register_createobj( QEvent::GraphicsSceneMousePress , "hb_QGraphicsSceneMouseEvent" );
hbqt_events_register_createobj( QEvent::GraphicsSceneMouseRelease , "hb_QGraphicsSceneMouseEvent" );
hbqt_events_register_createobj( QEvent::GraphicsSceneMouseDoubleClick , "hb_QGraphicsSceneMouseEvent" );
hbqt_events_register_createobj( QEvent::GraphicsSceneContextMenu , "hb_QGraphicsSceneContextMenuEvent" );
hbqt_events_register_createobj( QEvent::GraphicsSceneHoverEnter , "hb_QGraphicsSceneHoverEvent" );
hbqt_events_register_createobj( QEvent::GraphicsSceneHoverMove , "hb_QGraphicsSceneHoverEvent" );
hbqt_events_register_createobj( QEvent::GraphicsSceneHoverLeave , "hb_QGraphicsSceneHoverEvent" );
hbqt_events_register_createobj( QEvent::GraphicsSceneHelp , "hb_QHelpEvent" );
hbqt_events_register_createobj( QEvent::GraphicsSceneDragEnter , "hb_QGraphicsSceneDragDropEvent" );
hbqt_events_register_createobj( QEvent::GraphicsSceneDragMove , "hb_QGraphicsSceneDragDropEvent" );
hbqt_events_register_createobj( QEvent::GraphicsSceneDragLeave , "hb_QGraphicsSceneDragDropEvent" );
hbqt_events_register_createobj( QEvent::GraphicsSceneDrop , "hb_QGraphicsSceneDragDropEvent" );
hbqt_events_register_createobj( QEvent::GraphicsSceneWheel , "hb_QGraphicsSceneWheelEvent" );
hbqt_events_register_createobj( QEvent::KeyboardLayoutChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::DynamicPropertyChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::TabletEnterProximity , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::TabletLeaveProximity , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::NonClientAreaMouseMove , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::NonClientAreaMouseButtonPress , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::NonClientAreaMouseButtonRelease , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::NonClientAreaMouseButtonDblClick , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::MacSizeChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ContentsRectChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::GraphicsSceneResize , "hb_QGraphicsSceneResizeEvent" );
hbqt_events_register_createobj( QEvent::GraphicsSceneMove , "hb_QGraphicsSceneMoveEvent" );
hbqt_events_register_createobj( QEvent::CursorChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::ToolTipChange , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::GrabMouse , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::UngrabMouse , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::GrabKeyboard , "hb_QEvent" );
hbqt_events_register_createobj( QEvent::UngrabKeyboard , "hb_QEvent" );
}
/*----------------------------------------------------------------------*/

View File

@@ -28,27 +28,6 @@ New =
#include <QtCore/QAbstractItemModel>
#include "hbqt_hbqabstractitemmodel.h"
HBQT_GC_FUNC( hbqt_gcMark_HBQAbstractItemModel )
{
HBQT_GC_T_HBQAbstractItemModel * p = ( HBQT_GC_T_HBQAbstractItemModel * ) Cargo;
HB_TRACE( HB_TR_DEBUG, ( "gcMark_HBQAbstractItemModel" ) );
if( p )
{
if( p->ph )
{
HBQAbstractItemModel * ip = ( HBQAbstractItemModel * ) p->ph;
if( ip )
{
if( ip->block )
{
hb_gcMark( ip->block );
}
}
}
}
}
/*
* HBQAbstractItemModel ( ( PHB_ITEM ) hb_param( 1, HB_IT_BLOCK ) )

View File

@@ -22,27 +22,6 @@ New =
#include <QtGui/QGraphicsItem>
#include "hbqt_hbqgraphicsitem.h"
HBQT_GC_FUNC( hbqt_gcMark_HBQGraphicsItem )
{
HBQT_GC_T_HBQGraphicsItem * p = ( HBQT_GC_T_HBQGraphicsItem * ) Cargo;
HB_TRACE( HB_TR_DEBUG, ( "gcMark_HBQGraphicsItem" ) );
if( p )
{
if( p->ph )
{
HBQGraphicsItem * ip = ( HBQGraphicsItem * ) p->ph;
if( ip )
{
if (ip->block)
{
hb_gcMark( ip->block );
}
}
}
}
}
/*
* HBQGraphicsItem ()
* HBQGraphicsItem ( int type )

View File

@@ -22,25 +22,6 @@ New =
#include <QtGui/QGraphicsScene>
#include "hbqt_hbqgraphicsscene.h"
HBQT_GC_FUNC( hbqt_gcMark_HBQGraphicsScene )
{
HBQT_GC_T_HBQGraphicsScene * p = ( HBQT_GC_T_HBQGraphicsScene * ) Cargo;
if( p )
{
if( p->ph )
{
HBQGraphicsScene * ip = ( HBQGraphicsScene * ) p->ph;
if( ip )
{
if (ip->block)
{
hb_gcMark( ip->block );
}
}
}
}
}
/*
* HBQGraphicsScene ()

View File

@@ -27,25 +27,6 @@ New =
#include "hbqt_hbqplaintextedit.h"
#include "hbqt_hbqsyntaxhighlighter.h"
HBQT_GC_FUNC( hbqt_gcMark_HBQPlainTextEdit )
{
HBQT_GC_T_HBQPlainTextEdit * p = ( HBQT_GC_T_HBQPlainTextEdit * ) Cargo;
if( p )
{
if( p->ph )
{
HBQPlainTextEdit * ip = ( HBQPlainTextEdit * ) p->ph;
if( ip )
{
if( ip->block )
{
hb_gcMark( ip->block );
}
}
}
}
}
/*
* HBQPlainTextEdit ( QWidget * parent = 0 )

View File

@@ -28,26 +28,6 @@ New =
#include <QtGui/QTableView>
#include "hbqt_hbqtableview.h"
HBQT_GC_FUNC( hbqt_gcMark_HBQTableView )
{
HBQT_GC_T_HBQTableView * p = ( HBQT_GC_T_HBQTableView * ) Cargo;
if( p )
{
if( p->ph )
{
HBQTableView * ip = ( HBQTableView * ) p->ph;
if( ip )
{
if( ip->block )
{
hb_gcMark( ip->block );
}
}
}
}
}
/*
* HBQTableView ( QWidget * parent = 0 )

View File

@@ -44,12 +44,7 @@ HB_EXTERN_END
HB_FUNC( QT_QAPPLICATION )
{
//__HB_RETPTRGC__( ( QApplication * ) __hbqtgui_app() );
#ifdef __HBQT_REVAMP__
hb_itemReturn( hbqt_bindGetHbObject( NULL, ( void * ) __hbqtgui_app(), ( "HB_QAPPLICATION" ), hbqt_del_QApplication, 2 ) );
#else
hbqt_itemPushReturn( hbqt_gcAllocate_QApplication( (void *) __hbqtgui_app(), false) , hb_stackSelfItem() );
#endif
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ( void * ) __hbqtgui_app(), "HB_QAPPLICATION", NULL, HBQT_BIT_QOBJECT ) );
}
HB_FUNC( QT_QAPPLICATION_EXECUTE )

View File

@@ -47,11 +47,7 @@ const QMimeData * mimeData ( Mode mode = Clipboard ) const{
QClipboard * p = ( QClipboard * ) hbqt_par_ptr( 0 );
if( p )
{
#ifdef __HBQT_REVAMP__
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ( void* ) p->mimeData( ( QClipboard::Mode ) hb_parni( 1 ) ), ( "HB_QMIMEDATA" ), NULL, 0 ) );
#else
hbqt_create_objectGC( hbqt_gcAllocate_QMimeData( ( void* ) p->mimeData( ( QClipboard::Mode ) hb_parni( 1 ) ), false ), "hb_QMimeData" );
#endif
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ( void* ) p->mimeData( ( QClipboard::Mode ) hb_parni( 1 ) ), "HB_QMIMEDATA", NULL, HBQT_BIT_NONE ) );
}
}
bool ownsClipboard () const

View File

@@ -65,11 +65,7 @@ virtual QMimeData * mimeData ( const QModelIndexList & indexes ) const{
QDirModel * p = ( QDirModel * ) hbqt_par_ptr( 0 );
if( p )
{
#ifdef __HBQT_REVAMP__
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ( void* ) p->mimeData( *hbqt_par_QModelIndexList( 1 ) ), ( "HB_QMIMEDATA" ), NULL, 0 ) );
#else
hbqt_create_objectGC( hbqt_gcAllocate_QMimeData( ( void* ) p->mimeData( *hbqt_par_QModelIndexList( 1 ) ), false ), "hb_QMimeData" );
#endif
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ( void* ) p->mimeData( *hbqt_par_QModelIndexList( 1 ) ), "HB_QMIMEDATA", NULL, HBQT_BIT_NONE ) );
}
}
virtual QStringList mimeTypes () const

View File

@@ -59,11 +59,7 @@ const QMimeData * mimeData () const{
QDropEvent * p = ( QDropEvent * ) hbqt_par_ptr( 0 );
if( p )
{
#ifdef __HBQT_REVAMP__
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ( void* ) p->mimeData(), ( "HB_QMIMEDATA" ), NULL, 0 ) );
#else
hbqt_create_objectGC( hbqt_gcAllocate_QMimeData( ( void* ) p->mimeData(), false ), "hb_QMimeData" );
#endif
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ( void* ) p->mimeData(), "HB_QMIMEDATA", NULL, HBQT_BIT_NONE ) );
}
}
#

View File

@@ -58,11 +58,7 @@ virtual QMimeData * mimeData ( const QModelIndexList & indexes ) const{
QFileSystemModel * p = ( QFileSystemModel * ) hbqt_par_ptr( 0 );
if( p )
{
#ifdef __HBQT_REVAMP__
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ( void* ) p->mimeData( *hbqt_par_QModelIndexList( 1 ) ), ( "HB_QMIMEDATA" ), NULL, 0 ) );
#else
hbqt_create_objectGC( hbqt_gcAllocate_QMimeData( ( void* ) p->mimeData( *hbqt_par_QModelIndexList( 1 ) ), false ), "hb_QMimeData" );
#endif
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ( void* ) p->mimeData( *hbqt_par_QModelIndexList( 1 ) ), "HB_QMIMEDATA", NULL, HBQT_BIT_NONE ) );
}
}
virtual QStringList mimeTypes () const

View File

@@ -48,12 +48,7 @@ const QMimeData * mimeData () const{
QGraphicsSceneDragDropEvent * p = ( QGraphicsSceneDragDropEvent * ) hbqt_par_ptr( 0 );
if( p )
{
#ifdef __HBQT_REVAMP__
//hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ( void* ) p->mimeData(), hb_dynsymGetSymbol( "HB_QMIMEDATA" ), NULL, 0 ) );
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ( void* ) p->mimeData(), ( "HB_QMIMEDATA" ), NULL, 0 ) );
#else
hbqt_create_objectGC( hbqt_gcAllocate_QMimeData( ( void* ) p->mimeData(), false ), "hb_QMimeData" );
#endif
hb_itemReturnRelease( hbqt_bindGetHbObject( NULL, ( void* ) p->mimeData(), "HB_QMIMEDATA", NULL, HBQT_BIT_NONE ) );
}
}
Qt::KeyboardModifiers modifiers () const

View File

@@ -58,6 +58,7 @@
#include "hbqtinit.h"
#include "hbvm.h"
#include "hbapiitm.h"
#include "hbinit.h"
#if QT_VERSION >= 0x040500
@@ -68,11 +69,13 @@
#include <QtNetwork/QNetworkRequest>
HB_EXTERN_BEGIN
extern void * hbqt_gcAllocate_QObject( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QHttpResponseHeader( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QNetworkRequest( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QNetworkProxy( void * pObj, bool bNew );
extern void * hbqt_gcAllocate_QUrlInfo( void * pObj, bool bNew );
extern void hbqt_del_QObject( void * pObj, int iFlags );
extern void hbqt_del_QHttpResponseHeader( void * pObj, int iFlags );
extern void hbqt_del_QNetworkRequest( void * pObj, int iFlags );
extern void hbqt_del_QNetworkProxy( void * pObj, int iFlags );
extern void hbqt_del_QUrlInfo( void * pObj, int iFlags );
HB_EXTERN_END
/*----------------------------------------------------------------------*/
@@ -83,8 +86,10 @@ static void hbqt_SlotsExecQHttpResponseHeader( PHB_ITEM * codeBlock, void ** arg
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QHttpResponseHeader( new QHttpResponseHeader( ( *reinterpret_cast< QHttpResponseHeader( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QHttpResponseHeader" ) );
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QHttpResponseHeader( ( *reinterpret_cast< QHttpResponseHeader( * ) >( arguments[ 1 ] ) ) ), "HB_QHTTPRESPONSEHEADER", hbqt_del_QHttpResponseHeader, HBQT_BIT_OWNER );
hb_vmPush( p0 );
hb_vmSend( 1 );
hb_itemRelease( p0 );
}
static void hbqt_SlotsExecQNetworkProxyPointer( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -93,9 +98,13 @@ static void hbqt_SlotsExecQNetworkProxyPointer( PHB_ITEM * codeBlock, void ** ar
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QNetworkProxy( new QNetworkProxy( ( *reinterpret_cast< QNetworkProxy( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QNetworkProxy" ) );
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QObject( ( *reinterpret_cast< void*( * ) >( arguments[ 2 ] ) ), false ), ( const char * ) pList.at( 1 ).data() ) );
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QNetworkProxy( ( *reinterpret_cast< QNetworkProxy( * ) >( arguments[ 1 ] ) ) ), "HB_QNETWORKPROXY", hbqt_del_QNetworkProxy, HBQT_BIT_OWNER );
PHB_ITEM p1 = hbqt_bindGetHbObject( NULL, *reinterpret_cast< void*( * ) >( arguments[ 2 ] ), ( const char * ) pList.at( 1 ).data(), NULL, HBQT_BIT_QOBJECT );
hb_vmPush( p0 );
hb_vmPush( p1 );
hb_vmSend( 2 );
hb_itemRelease( p0 );
hb_itemRelease( p1 );
}
static void hbqt_SlotsExecQNetworkRequest( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -104,8 +113,10 @@ static void hbqt_SlotsExecQNetworkRequest( PHB_ITEM * codeBlock, void ** argumen
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QNetworkRequest( new QNetworkRequest( ( *reinterpret_cast< QNetworkRequest( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QNetworkRequest" ) );
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QNetworkRequest( ( *reinterpret_cast< QNetworkRequest( * ) >( arguments[ 1 ] ) ) ), "HB_QNETWORKREQUEST", hbqt_del_QNetworkRequest, HBQT_BIT_OWNER );
hb_vmPush( p0 );
hb_vmSend( 1 );
hb_itemRelease( p0 );
}
static void hbqt_SlotsExecQUrlInfo( PHB_ITEM * codeBlock, void ** arguments, QStringList pList )
@@ -114,8 +125,10 @@ static void hbqt_SlotsExecQUrlInfo( PHB_ITEM * codeBlock, void ** arguments, QSt
hb_vmPushEvalSym();
hb_vmPush( codeBlock );
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QUrlInfo( new QUrlInfo( ( *reinterpret_cast< QUrlInfo( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QUrlInfo" ) );
PHB_ITEM p0 = hbqt_bindGetHbObject( NULL, new QUrlInfo( ( *reinterpret_cast< QUrlInfo( * ) >( arguments[ 1 ] ) ) ), "HB_QURLINFO", hbqt_del_QUrlInfo, HBQT_BIT_OWNER );
hb_vmPush( p0 );
hb_vmSend( 1 );
hb_itemRelease( p0 );
}
/*----------------------------------------------------------------------*/

View File

@@ -42,6 +42,12 @@ PROCEDURE Main()
oWid:show()
QApplication():exec()
oWid:disconnect( QEvent_MouseButtonPress , {| oMouseEvent | WinDrag( oMouseEvent, oWid ) } )
oWid:disconnect( QEvent_MouseButtonRelease, {| oMouseEvent | WinDrag( oMouseEvent, oWid ) } )
oWid:disconnect( QEvent_MouseMove, {| oMouseEvent | WinDrag( oMouseEvent, oWid ) } )
oWid:disconnect( QEvent_MouseButtonDblClick, {|| oWid:close() } )
RETURN
PROCEDURE WinDrag( oMouseEvent, oWid )

View File

@@ -971,7 +971,7 @@ METHOD XbpBrowse:manageFrameResized()
/*----------------------------------------------------------------------*/
METHOD XbpBrowse:manageCommitData( qWidget )
LOCAL cTxt := hbqt_promoteWidget( qWidget, "QLineEdit" ):text()
LOCAL cTxt := qWidget:property( "text" ):toString()
LOCAL oCol := ::columns[ ::colPos ]
LOCAL cTyp := valtype( eval( oCol:block ) )