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:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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_, '' )
|
||||
|
||||
@@ -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" )
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user