2009-12-18 16:01 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)

* contrib/hbqt/generator/hbqtgen.prg
  * contrib/hbide/hbide.prg
  * contrib/hbqt/tests/demoqt.prg
  * contrib/hbxbp/xbpstatic.prg
  * contrib/hbxbp/xbpwindow.prg
    + Implemented passing HBQT objects to METHOD QSomeObj:new(...).
      Now there is seldome a need to use QT_PTROF() macro.
      demoxbp/demoqt/hbide are working perfectly.

    [ Regenerated sources follow ]
This commit is contained in:
Pritpal Bedi
2009-12-19 00:05:16 +00:00
parent 1962de2f28
commit 7c0a62ab17
6 changed files with 33 additions and 13 deletions

View File

@@ -17,6 +17,18 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-12-18 16:01 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbqt/generator/hbqtgen.prg
* contrib/hbide/hbide.prg
* contrib/hbqt/tests/demoqt.prg
* contrib/hbxbp/xbpstatic.prg
* contrib/hbxbp/xbpwindow.prg
+ Implemented passing HBQT objects to METHOD QSomeObj:new(...).
Now there is seldome a need to use QT_PTROF() macro.
demoxbp/demoqt/hbide are working perfectly.
[ Regenerated sources follow ]
2009-12-18 13:04 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbxbp/xbpwindow.prg
! Fixed "lSuccess" issue.

View File

@@ -360,15 +360,15 @@ METHOD HbIde:create( cProjIni )
ENDDO
/* Very important - destroy resources */
HBXBP_DEBUG( "------------------------------------------------------" )
HBXBP_DEBUG( "======================================================" )
HBXBP_DEBUG( "Before ::oDlg:destroy()", memory( 1001 ), hbqt_getMemUsed() )
HBXBP_DEBUG( "------------------------------------------------------" )
HBXBP_DEBUG( " " )
::oDlg:destroy()
HBXBP_DEBUG( "------------------------------------------------------" )
HBXBP_DEBUG( " " )
HBXBP_DEBUG( "After ::oDlg:destroy()", memory( 1001 ), hbqt_getMemUsed() )
HBXBP_DEBUG( "------------------------------------------------------" )
HBXBP_DEBUG( "======================================================" )
::qCursor:pPtr := 0
::oFont := NIL

View File

@@ -1609,8 +1609,16 @@ STATIC FUNCTION Build_Class( cWidget, cls_, doc_, cPathOut, subCls_ )
DO CASE
CASE cClassType == "PLAINOBJECT"
aadd( txt_, 'METHOD ' + cWidget + ':new( ... )' )
aadd( txt_, '' )
aadd( txt_, ' ::pPtr := Qt_' + cWidget + '( ... )' )
aadd( txt_, ' LOCAL p, aP := hb_aParams()' )
aadd( txt_, ' ' )
aadd( txt_, ' IF len( aP ) > 0' )
aadd( txt_, ' FOR EACH p IN aP' )
aadd( txt_, ' p := hbqt_ptr( p )' )
aadd( txt_, ' NEXT' )
aadd( txt_, ' ENDIF' )
aadd( txt_, ' ' )
aadd( txt_, ' ::pPtr := hb_ExecFromArray( @Qt_' + cWidget + '(), aP )' )
//aadd( txt_, ' ::pPtr := Qt_' + cWidget + '( ... )' )
aadd( txt_, '' )
aadd( txt_, ' RETURN Self' )
aadd( txt_, '' )

View File

@@ -469,7 +469,7 @@ STATIC FUNCTION Build_TreeView( oWnd )
oTV := QTreeView():new( oWnd )
oTV:setMouseTracking( .t. )
//Qt_Connect_Signal( QT_PTROF( oTV ), QT_EVE_HOVERED, {|o,i| HBQT_DEBUG( "oTV:hovered" ) } )
//Qt_Connect_Signal( oTV, QT_EVE_HOVERED, {|o,i| HBQT_DEBUG( "oTV:hovered" ) } )
oDirModel := QDirModel():new()
oTV:setModel( oDirModel )
oTV:move( 5, 7 )
@@ -485,7 +485,7 @@ STATIC FUNCTION Build_ListBox( oWnd, aPos, aSize )
oListBox := QListView():New( oWnd )
oListBox:setMouseTracking( .t. )
//Qt_Connect_Signal( QT_PTROF( oListBox ), QT_EVE_HOVERED, {|o,i| HBQT_DEBUG( "oListBox:hovered" ) } )
//Qt_Connect_Signal( oListBox, QT_EVE_HOVERED, {|o,i| HBQT_DEBUG( "oListBox:hovered" ) } )
oStrList := QStringList():new()
@@ -540,7 +540,7 @@ STATIC FUNCTION Build_Controls( oWnd )
oComboBox:addItem( "First" )
oComboBox:addItem( "Second" )
oComboBox:addItem( "Third" )
//Qt_Connect_Signal( QT_PTROF( oComboBox ), QT_EVE_HIGHLIGHTED_I , {|o,i| HBQT_DEBUG( oComboBox:itemText( i ) ) } )
//Qt_Connect_Signal( oComboBox, QT_EVE_HIGHLIGHTED_I , {|o,i| HBQT_DEBUG( oComboBox:itemText( i ) ) } )
Qt_Connect_Signal( oComboBox, QT_EVE_CURRENTINDEXCHANGED_I, {|o,i| o := o, i := i, MsgInfo( oComboBox:itemText( i ) ) } )
oComboBox:move( 5, 60 )
oComboBox:resize( 345, 30 )
@@ -924,7 +924,7 @@ FUNCTION ShowInSystemTray( oWnd )
oMenu:addSeparator()
Qt_Connect_Signal( oMenu:addAction_1( "save.png", "&Hide" ), QT_EVE_TRIGGERED_B, {|| oWnd:hide() } )
oSys := QSystemTrayIcon():new( QT_PTROF( oWnd ) )
oSys := QSystemTrayIcon():new( oWnd )
oSys:setIcon( 'new.png' )
oSys:setContextMenu( oMenu )
oSys:showMessage( "Harbour-QT", "This is Harbour-QT System Tray" )

View File

@@ -365,7 +365,7 @@ METHOD XbpStatic:setCaption( xCaption, cDll )
IF ::options == XBPSTATIC_BITMAP_SCALED
::oWidget:setScaledContents( .t. )
ENDIF
::oWidget:setPixmap( QPixmap():fromImage( QT_PTROF( ::caption:oWidget ) ) )
::oWidget:setPixmap( QPixmap():fromImage( ::caption:oWidget ) )
ELSEIF hb_isChar( ::caption ) /* $HARBOUR$ */
IF ::options == XBPSTATIC_BITMAP_SCALED

View File

@@ -753,7 +753,7 @@ METHOD XbpWindow:destroy()
IF len( ::aEConnections ) > 0
FOR EACH e_ IN ::aEConnections
::xDummy := Qt_DisConnect_Event( e_[ 1 ], e_[ 2 ] )
hbxbp_debug( "Event Disconnect:", iif( ::xDummy, "SUCCEEDED", "FAILED " ), e_[ 1 ], e_[ 2 ] )
// HBXBP_DEBUG( "Event Disconnect:", iif( ::xDummy, "SUCCEEDED", "FAILED " ), e_[ 1 ], e_[ 2 ] )
NEXT
::aEConnections := {}
::oWidget:removeEventFilter( QT_GetEventFilter() )
@@ -788,7 +788,7 @@ METHOD XbpWindow:disconnect()
IF len( ::aConnections ) > 0
FOR EACH e_ IN ::aConnections
::xDummy := Qt_DisConnect_Signal( e_[ 1 ], e_[ 2 ] )
hbxbp_debug( " Signal Disconnect:", iif( ::xDummy, "SUCCEEDED", "FAILED " ), e_[ 1 ], e_[ 2 ] )
// HBXBP_DEBUG( " Signal Disconnect:", iif( ::xDummy, "SUCCEEDED", "FAILED " ), e_[ 1 ], e_[ 2 ] )
NEXT
::aConnections := {}
ENDIF