2009-12-19 08:15 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)

* contrib/hbxbp/xbpbrowse.prg
  * contrib/hbxbp/xbprtf.prg
  * contrib/hbxbp/xbpwindow.prg
    ! Removed all QT_PTROF() macro calls.
This commit is contained in:
Pritpal Bedi
2009-12-19 16:56:49 +00:00
parent 04c7d04111
commit 632842e7db
4 changed files with 28 additions and 23 deletions

View File

@@ -17,6 +17,12 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-12-19 08:15 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbxbp/xbpbrowse.prg
* contrib/hbxbp/xbprtf.prg
* contrib/hbxbp/xbpwindow.prg
! Removed all QT_PTROF() macro calls.
2009-12-19 16:52 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/thread.c
* added hb_threadOnceInit() to .prg function list

View File

@@ -514,9 +514,9 @@ METHOD XbpBrowse:buildLeftFreeze()
//
//::oLeftFooterView:hide()
::connect( QT_PTROF( ::oLeftView ) , "mousePressEvent()" , {|o,p| ::exeBlock( 31, p, o ) } )
::connect( QT_PTROF( ::oLeftHeaderView ), "sectionPressed(int)", {|o,i| ::exeBlock( 31, i, o ) } )
::connect( QT_PTROF( ::oLeftFooterView ), "sectionPressed(int)", {|o,i| ::exeBlock( 31, i, o ) } )
::connect( ::oLeftView , "mousePressEvent()" , {|o,p| ::exeBlock( 31, p, o ) } )
::connect( ::oLeftHeaderView, "sectionPressed(int)", {|o,i| ::exeBlock( 31, i, o ) } )
::connect( ::oLeftFooterView, "sectionPressed(int)", {|o,i| ::exeBlock( 31, i, o ) } )
RETURN Self
@@ -560,9 +560,9 @@ METHOD XbpBrowse:buildRightFreeze()
::oRightFooterModel := HBDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 162, p1, p2, p3, p4 ) } )
::oRightFooterView:setModel( ::oRightFooterModel )
::connect( QT_PTROF( ::oRightView ) , "mousePressEvent()" , {|o,p| ::exeBlock( 31, p, o ) } )
::connect( QT_PTROF( ::oRightHeaderView ), "sectionPressed(int)", {|o,i| ::exeBlock( 31, i, o ) } )
::connect( QT_PTROF( ::oRightFooterView ), "sectionPressed(int)", {|o,i| ::exeBlock( 31, i, o ) } )
::connect( ::oRightView , "mousePressEvent()" , {|o,p| ::exeBlock( 31, p, o ) } )
::connect( ::oRightHeaderView, "sectionPressed(int)", {|o,i| ::exeBlock( 31, i, o ) } )
::connect( ::oRightFooterView, "sectionPressed(int)", {|o,i| ::exeBlock( 31, i, o ) } )
RETURN Self
@@ -589,27 +589,27 @@ METHOD XbpBrowse:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oTableView:setSelectionBehavior( IF( ::cursorMode == XBPBRW_CURSOR_ROW, QAbstractItemView_SelectRows, QAbstractItemView_SelectItems ) )
/* Connect Keyboard Events */
::connect( QT_PTROF( ::oTableView ), "keyPressEvent()" , {|o,p | ::exeBlock( 1, p, o ) } )
::connect( QT_PTROF( ::oTableView ), "mousePressEvent()" , {|o,p | ::exeBlock( 2, p, o ) } )
::connect( QT_PTROF( ::oTableView ), "mouseDoubleClickEvent()" , {|o,p | ::exeBlock( 3, p, o ) } )
::connect( QT_PTROF( ::oTableView ), "wheelEvent()" , {|o,p | ::exeBlock( 4, p, o ) } )
::connect( QT_PTROF( ::oTableView ), "scrollContentsBy(int,int)" , {|o,p,p1| ::exeBlock(11, p, p1, o ) } )
::connect( ::oTableView, "keyPressEvent()" , {|o,p | ::exeBlock( 1, p, o ) } )
::connect( ::oTableView, "mousePressEvent()" , {|o,p | ::exeBlock( 2, p, o ) } )
::connect( ::oTableView, "mouseDoubleClickEvent()" , {|o,p | ::exeBlock( 3, p, o ) } )
::connect( ::oTableView, "wheelEvent()" , {|o,p | ::exeBlock( 4, p, o ) } )
::connect( ::oTableView, "scrollContentsBy(int,int)" , {|o,p,p1| ::exeBlock(11, p, p1, o ) } )
/* Finetune Horizontal Scrollbar */
::oTableView:setHorizontalScrollBarPolicy( Qt_ScrollBarAlwaysOff )
//
::oHScrollBar := QScrollBar():new()
::oHScrollBar:setOrientation( Qt_Horizontal )
::connect( QT_PTROF( ::oHScrollBar ), "actionTriggered(int)" , {|o,i| ::exeBlock( 103, i, o ) } )
::connect( QT_PTROF( ::oHScrollBar ), "sliderReleased()" , {|o,i| ::exeBlock( 104, i, o ) } )
::connect( ::oHScrollBar, "actionTriggered(int)" , {|o,i| ::exeBlock( 103, i, o ) } )
::connect( ::oHScrollBar, "sliderReleased()" , {|o,i| ::exeBlock( 104, i, o ) } )
/* Replace Vertical Scrollbar with our own */
::oTableView:setVerticalScrollBarPolicy( Qt_ScrollBarAlwaysOff )
//
::oVScrollBar := QScrollBar():new()
::oVScrollBar:setOrientation( Qt_Vertical )
::connect( QT_PTROF( ::oVScrollBar ), "actionTriggered(int)" , {|o,i| ::exeBlock( 101, i, o ) } )
::connect( QT_PTROF( ::oVScrollBar ), "sliderReleased()" , {|o,i| ::exeBlock( 102, i, o ) } )
::connect( ::oVScrollBar, "actionTriggered(int)" , {|o,i| ::exeBlock( 101, i, o ) } )
::connect( ::oVScrollBar, "sliderReleased()" , {|o,i| ::exeBlock( 102, i, o ) } )
/* Veritical Header because of Performance boost */
::oVHeaderView := QHeaderView()
@@ -621,8 +621,8 @@ METHOD XbpBrowse:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oHeaderView:configure( ::oTableView:horizontalHeader() )
::oHeaderView:setHighlightSections( .F. )
//
::connect( QT_PTROF( ::oHeaderView ), "sectionPressed(int)" , {|o,i | ::exeBlock( 111, i, o ) } )
::connect( QT_PTROF( ::oHeaderView ), "sectionResized(int,int,int)", {|o,i,i1,i2| ::exeBlock( 121, i, i1, i2, o ) } )
::connect( ::oHeaderView, "sectionPressed(int)" , {|o,i | ::exeBlock( 111, i, o ) } )
::connect( ::oHeaderView, "sectionResized(int,int,int)", {|o,i,i1,i2| ::exeBlock( 121, i, i1, i2, o ) } )
/* .DBF Manipulation Model */
::oDbfModel := HBDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 141, p1, p2, p3, p4 ) } )

View File

@@ -484,7 +484,7 @@ METHOD XbpRtf:selColor( ... )
xRet := ::oTextCharFormat:foreground()
nColor := hbxbp_ConvertAFactFromXBP( "COLOR", aP[ 1 ] )
oColor := QColor():new( nColor )
oBrush := QBrush():new( "QColor", QT_PTROF( oColor ) )
oBrush := QBrush():new( "QColor", oColor )
::oTextCharFormat:setForeground( oBrush )
::oCurCursor:setCharFormat( ::oTextCharFormat )
ENDIF

View File

@@ -259,8 +259,8 @@ EXPORTED:
METHOD isDerivedFrom()
DATA oWidget
ACCESS pWidget INLINE IF( empty( ::oWidget ), NIL, QT_PTROF( ::oWidget ) )
ACCESS pParent INLINE IF( empty( ::oParent ), NIL, QT_PTROF( ::oParent:oWidget ) )
ACCESS pWidget INLINE IF( empty( ::oWidget ), NIL, ::oWidget:pPtr )
ACCESS pParent INLINE IF( empty( ::oParent ), NIL, ::oParent:oWidget:pPtr )
DATA oTabWidget
DATA aTabs INIT {}
DATA oPalette
@@ -404,9 +404,8 @@ METHOD XbpWindow:connect( pWidget, cSignal, bBlock )
METHOD XbpWindow:connectEvent( pWidget, nEvent, bBlock )
LOCAL lSuccess
IF ( lSuccess := Qt_Connect_Event( hbqt_ptr( pWidget ), nEvent, bBlock ) )
//hbxbp_debug( "Event Connected", nEvent )
aadd( ::aEConnections, { hbqt_ptr( pWidget ), nEvent } )
IF ( lSuccess := Qt_Connect_Event( pWidget, nEvent, bBlock ) )
aadd( ::aEConnections, { pWidget, nEvent } )
ENDIF
RETURN lSuccess