From 07c77f5619921f2352b3ab5358fd4c2cfb99b506 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Sun, 3 Apr 2011 19:54:13 +0000 Subject: [PATCH] 2011-04-03 12:47 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/qtgui/qth/HBQGraphicsItem.qth * contrib/hbqt/qtgui/qth/HBQGraphicsScene.qth * contrib/hbqt/qtgui/qth/HBQPlainTextEdit.qth * contrib/hbqt/qtgui/qth/HBQTableView.qth ! Formatting. * contrib/hbxbp/xbpbrowse.prg ! Made constructor Xbase++ compatible. [Shum]. --- harbour/ChangeLog | 10 ++++++++++ .../hbqt/qtgui/qth/HBQGraphicsItem.qth | 16 ++++++++------- .../hbqt/qtgui/qth/HBQGraphicsScene.qth | 16 ++++++++------- .../hbqt/qtgui/qth/HBQPlainTextEdit.qth | 20 +++++++++++-------- .../contrib/hbqt/qtgui/qth/HBQTableView.qth | 18 +++++++++-------- harbour/contrib/hbxbp/xbpbrowse.prg | 19 +++++++++--------- 6 files changed, 59 insertions(+), 40 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d0257cb17e..aa1b4c2b31 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,16 @@ The license applies to all entries newer than 2009-04-28. */ +2011-04-03 12:47 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbqt/qtgui/qth/HBQGraphicsItem.qth + * contrib/hbqt/qtgui/qth/HBQGraphicsScene.qth + * contrib/hbqt/qtgui/qth/HBQPlainTextEdit.qth + * contrib/hbqt/qtgui/qth/HBQTableView.qth + ! Formatting. + + * contrib/hbxbp/xbpbrowse.prg + ! Made constructor Xbase++ compatible. [Shum]. + 2011-04-03 08:33 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/qtgui/hbqtgui.ch + Added: QFormLayout_* constants. diff --git a/harbour/contrib/hbqt/qtgui/qth/HBQGraphicsItem.qth b/harbour/contrib/hbqt/qtgui/qth/HBQGraphicsItem.qth index b4d65d6b19..556f0dd33d 100644 --- a/harbour/contrib/hbqt/qtgui/qth/HBQGraphicsItem.qth +++ b/harbour/contrib/hbqt/qtgui/qth/HBQGraphicsItem.qth @@ -28,17 +28,19 @@ HBQT_GC_FUNC( hbqt_gcMark_HBQGraphicsItem ) HB_TRACE( HB_TR_DEBUG, ( "gcMark_HBQGraphicsItem" ) ); if( p ) - if( p->ph ) - { - HBQGraphicsItem * ip = ( HBQGraphicsItem * ) p->ph; - if( ip ) - { + { + if( p->ph ) + { + HBQGraphicsItem * ip = ( HBQGraphicsItem * ) p->ph; + if( ip ) + { if (ip->block) { hb_gcMark( ip->block ); } - } - } + } + } + } } /* diff --git a/harbour/contrib/hbqt/qtgui/qth/HBQGraphicsScene.qth b/harbour/contrib/hbqt/qtgui/qth/HBQGraphicsScene.qth index facfdb2be4..c46fe41fae 100644 --- a/harbour/contrib/hbqt/qtgui/qth/HBQGraphicsScene.qth +++ b/harbour/contrib/hbqt/qtgui/qth/HBQGraphicsScene.qth @@ -27,17 +27,19 @@ 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( p->ph ) + { + HBQGraphicsScene * ip = ( HBQGraphicsScene * ) p->ph; + if( ip ) + { if (ip->block) { hb_gcMark( ip->block ); } - } - } + } + } + } } /* diff --git a/harbour/contrib/hbqt/qtgui/qth/HBQPlainTextEdit.qth b/harbour/contrib/hbqt/qtgui/qth/HBQPlainTextEdit.qth index 913d14361b..c33b2f4fdf 100644 --- a/harbour/contrib/hbqt/qtgui/qth/HBQPlainTextEdit.qth +++ b/harbour/contrib/hbqt/qtgui/qth/HBQPlainTextEdit.qth @@ -31,15 +31,19 @@ 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) + { + if( p->ph ) + { + HBQPlainTextEdit * ip = ( HBQPlainTextEdit * ) p->ph; + if( ip ) + { + if( ip->block ) + { hb_gcMark( ip->block ); - } - } + } + } + } + } } /* diff --git a/harbour/contrib/hbqt/qtgui/qth/HBQTableView.qth b/harbour/contrib/hbqt/qtgui/qth/HBQTableView.qth index f9555c901e..f3d1b0925e 100644 --- a/harbour/contrib/hbqt/qtgui/qth/HBQTableView.qth +++ b/harbour/contrib/hbqt/qtgui/qth/HBQTableView.qth @@ -33,17 +33,19 @@ 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) + { + if( p->ph ) + { + HBQTableView * ip = ( HBQTableView * ) p->ph; + if( ip ) + { + if( ip->block ) { hb_gcMark( ip->block ); } - } - } + } + } + } } diff --git a/harbour/contrib/hbxbp/xbpbrowse.prg b/harbour/contrib/hbxbp/xbpbrowse.prg index 7549185e53..9ea45af72a 100644 --- a/harbour/contrib/hbxbp/xbpbrowse.prg +++ b/harbour/contrib/hbxbp/xbpbrowse.prg @@ -300,7 +300,8 @@ EXPORTED: MESSAGE _right() METHOD Right() MESSAGE _end() METHOD End() - METHOD init( nTop, nLeft, nBottom, nRight ) // constructor, NOTE: This method is a Harbour extension [vszakats] + //METHOD init( nTop, nLeft, nBottom, nRight ) // constructor, NOTE: This method is a Harbour extension [vszakats] + METHOD init( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) // constructor, NOTE: This method is a Harbour extension [vszakats] METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) // constructor, NOTE: This method is a Harbour extension [vszakats] METHOD execSlot( nEvent, p1, p2, p3 ) // executes view events METHOD supplyInfo( nMode, nCall, nRole, nX, nY ) // supplies cell parameters to Qt engine @@ -603,17 +604,15 @@ METHOD XbpBrowse:disconnect() /*----------------------------------------------------------------------*/ /* Just to retain TBrowse functionality: in the future */ -METHOD XbpBrowse:init( nTop, nLeft, nBottom, nRight ) +//METHOD XbpBrowse:init( nTop, nLeft, nBottom, nRight ) +METHOD XbpBrowse:init( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) - DEFAULT nTop TO 0 - DEFAULT nLeft TO 0 - DEFAULT nBottom TO MaxRow() - DEFAULT nRight TO MaxCol() + ::xbpWindow:init( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) - ::nTop := nTop - ::nLeft := nLeft - ::nBottom := nBottom - ::nRight := nRight + ::nTop := iif( empty( ::aPos ), 0, ::aPos[ 1 ] ) + ::nLeft := iif( empty( ::aPos ), 0, ::aPos[ 2 ] ) + ::nBottom := iif( empty( ::aSize ), MaxRow(), ::aSize[ 1 ] ) + ::nRight := iif( empty( ::aSize ), MaxCol(), ::aSize[ 2 ] ) ::colorSpec := SetColor()