2009-12-17 18:57 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbxbp/xbp3state.prg
* contrib/hbxbp/xbpbrowse.prg
* contrib/hbxbp/xbpcheckbox.prg
* contrib/hbxbp/xbpcombobox.prg
* contrib/hbxbp/xbpdialog.prg
* contrib/hbxbp/xbpfiledialog.prg
* contrib/hbxbp/xbpfontdialog.prg
* contrib/hbxbp/xbplistbox.prg
* contrib/hbxbp/xbpmenubar.prg
* contrib/hbxbp/xbppushbutton.prg
* contrib/hbxbp/xbpradiobutton.prg
* contrib/hbxbp/xbpstatusbar.prg
* contrib/hbxbp/xbptoolbar.prg
* contrib/hbxbp/xbpwindow.prg
! Cleaned QT_PTROF() macro, first phase.
This commit is contained in:
@@ -17,6 +17,23 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-12-17 18:57 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbxbp/xbp3state.prg
|
||||
* contrib/hbxbp/xbpbrowse.prg
|
||||
* contrib/hbxbp/xbpcheckbox.prg
|
||||
* contrib/hbxbp/xbpcombobox.prg
|
||||
* contrib/hbxbp/xbpdialog.prg
|
||||
* contrib/hbxbp/xbpfiledialog.prg
|
||||
* contrib/hbxbp/xbpfontdialog.prg
|
||||
* contrib/hbxbp/xbplistbox.prg
|
||||
* contrib/hbxbp/xbpmenubar.prg
|
||||
* contrib/hbxbp/xbppushbutton.prg
|
||||
* contrib/hbxbp/xbpradiobutton.prg
|
||||
* contrib/hbxbp/xbpstatusbar.prg
|
||||
* contrib/hbxbp/xbptoolbar.prg
|
||||
* contrib/hbxbp/xbpwindow.prg
|
||||
! Cleaned QT_PTROF() macro, first phase.
|
||||
|
||||
2009-12-17 18:31 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbqt/tests/demoqt.prg
|
||||
* contrib/hbxbp/tests/demoxbp.prg
|
||||
|
||||
@@ -110,7 +110,7 @@ METHOD Xbp3State:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
|
||||
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
|
||||
::oWidget := QCheckBox():New( QT_PTROF( ::oParent:oWidget ) )
|
||||
::oWidget := QCheckBox():New( ::oParent:oWidget )
|
||||
|
||||
::Connect( ::pWidget, "stateChanged(int)", {|o,i| ::exeBlock( i,o ) } )
|
||||
|
||||
|
||||
@@ -496,7 +496,7 @@ METHOD XbpBrowse:buildLeftFreeze()
|
||||
::oLeftHeaderView:setHighlightSections( .F. )
|
||||
|
||||
::oLeftDbfModel := HBDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 151, p1, p2, p3, p4 ) } )
|
||||
::oLeftView:setModel( QT_PTROF( ::oLeftDbfModel ) )
|
||||
::oLeftView:setModel( ::oLeftDbfModel )
|
||||
//
|
||||
//::oLeftView:hide()
|
||||
|
||||
@@ -510,7 +510,7 @@ METHOD XbpBrowse:buildLeftFreeze()
|
||||
::oLeftFooterView:setFocusPolicy( Qt_NoFocus )
|
||||
//
|
||||
::oLeftFooterModel := HBDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 152, p1, p2, p3, p4 ) } )
|
||||
::oLeftFooterView:setModel( QT_PTROF( ::oLeftFooterModel ) )
|
||||
::oLeftFooterView:setModel( ::oLeftFooterModel )
|
||||
//
|
||||
//::oLeftFooterView:hide()
|
||||
|
||||
@@ -546,7 +546,7 @@ METHOD XbpBrowse:buildRightFreeze()
|
||||
::oRightHeaderView:setHighlightSections( .F. )
|
||||
|
||||
::oRightDbfModel := HBDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 161, p1, p2, p3, p4 ) } )
|
||||
::oRightView:setModel( QT_PTROF( ::oRightDbfModel ) )
|
||||
::oRightView:setModel( ::oRightDbfModel )
|
||||
|
||||
/* Horizontal Footer */
|
||||
::oRightFooterView := QHeaderView():new( Qt_Horizontal )
|
||||
@@ -558,7 +558,7 @@ METHOD XbpBrowse:buildRightFreeze()
|
||||
::oRightFooterView:setFocusPolicy( Qt_NoFocus )
|
||||
//
|
||||
::oRightFooterModel := HBDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 162, p1, p2, p3, p4 ) } )
|
||||
::oRightFooterView:setModel( QT_PTROF( ::oRightFooterModel ) )
|
||||
::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 ) } )
|
||||
@@ -627,7 +627,7 @@ METHOD XbpBrowse:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
/* .DBF Manipulation Model */
|
||||
::oDbfModel := HBDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 141, p1, p2, p3, p4 ) } )
|
||||
/* Attach Model with the View */
|
||||
::oTableView:setModel( QT_PTROF( ::oDbfModel ) )
|
||||
::oTableView:setModel( ::oDbfModel )
|
||||
|
||||
/* Horizontal Footer */
|
||||
::oFooterView := QHeaderView():new( Qt_Horizontal )
|
||||
@@ -641,7 +641,7 @@ METHOD XbpBrowse:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
//
|
||||
::oFooterModel := HBDbfModel():new( {|p1,p2,p3,p4| ::supplyInfo( 142, p1, p2, p3, p4 ) } )
|
||||
|
||||
::oFooterView:setModel( QT_PTROF( ::oFooterModel ) )
|
||||
::oFooterView:setModel( ::oFooterModel )
|
||||
::oFooterView:setFocusPolicy( Qt_NoFocus )
|
||||
|
||||
/* Widget for ::setLeftFrozen( aColumns ) */
|
||||
@@ -655,18 +655,18 @@ METHOD XbpBrowse:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
::oGridLayout:setHorizontalSpacing( 0 )
|
||||
::oGridLayout:setVerticalSpacing( 0 )
|
||||
/* Rows */
|
||||
::oGridLayout:addWidget_1( QT_PTROF( ::oLeftView ), 0, 0, 1, 1 )
|
||||
::oGridLayout:addWidget_1( QT_PTROF( ::oLeftFooterView ), 1, 0, 1, 1 )
|
||||
::oGridLayout:addWidget_1( ::oLeftView , 0, 0, 1, 1 )
|
||||
::oGridLayout:addWidget_1( ::oLeftFooterView , 1, 0, 1, 1 )
|
||||
//
|
||||
::oGridLayout:addWidget_1( QT_PTROF( ::oTableView ), 0, 1, 1, 1 )
|
||||
::oGridLayout:addWidget_1( QT_PTROF( ::oFooterView ), 1, 1, 1, 1 )
|
||||
::oGridLayout:addWidget_1( ::oTableView , 0, 1, 1, 1 )
|
||||
::oGridLayout:addWidget_1( ::oFooterView , 1, 1, 1, 1 )
|
||||
//
|
||||
::oGridLayout:addWidget_1( QT_PTROF( ::oRightView ), 0, 2, 1, 1 )
|
||||
::oGridLayout:addWidget_1( QT_PTROF( ::oRightFooterView ), 1, 2, 1, 1 )
|
||||
::oGridLayout:addWidget_1( ::oRightView , 0, 2, 1, 1 )
|
||||
::oGridLayout:addWidget_1( ::oRightFooterView, 1, 2, 1, 1 )
|
||||
//
|
||||
::oGridLayout:addWidget_1( QT_PTROF( ::oHScrollBar ), 2, 0, 1, 3 )
|
||||
::oGridLayout:addWidget_1( ::oHScrollBar , 2, 0, 1, 3 )
|
||||
/* Columns */
|
||||
::oGridLayout:addWidget_1( QT_PTROF( ::oVScrollBar ), 0, 3, 2, 1 )
|
||||
::oGridLayout:addWidget_1( ::oVScrollBar , 0, 3, 2, 1 )
|
||||
|
||||
IF ::visible
|
||||
::show()
|
||||
@@ -775,7 +775,7 @@ METHOD XbpBrowse:exeBlock( nEvent, p1, p2, p3 )
|
||||
oMouseEvent := QMouseEvent():configure( p1 )
|
||||
|
||||
oPoint := QPoint():new( oMouseEvent:x(), oMouseEvent:y() )
|
||||
::oModelIndex:configure( ::oTableView:indexAt( QT_PTROF( oPoint ) ) )
|
||||
::oModelIndex:configure( ::oTableView:indexAt( oPoint ) )
|
||||
|
||||
/* Reposition the record pointer */
|
||||
IF ::oModelIndex:isValid()
|
||||
|
||||
@@ -110,7 +110,7 @@ METHOD XbpCheckBox:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
|
||||
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
|
||||
::oWidget := QCheckBox():New( QT_PTROF( ::oParent:oWidget ) )
|
||||
::oWidget := QCheckBox():New( ::oParent:oWidget )
|
||||
::Connect( ::pWidget, "stateChanged(int)", {|o,i| ::exeBlock( i,o ) } )
|
||||
|
||||
::setPosAndSize()
|
||||
|
||||
@@ -94,14 +94,14 @@ CLASS XbpComboBox INHERIT XbpWindow
|
||||
|
||||
#if 0
|
||||
METHOD clear() INLINE ::oStrList:clear(),;
|
||||
::oStrModel:setStringList( QT_PTROF( ::oStrList ) )
|
||||
::oStrModel:setStringList( ::oStrList )
|
||||
METHOD delItem( nIndex ) INLINE ::oStrList:removeAt( nIndex-1 ),;
|
||||
::oStrModel:setStringList( QT_PTROF( ::oStrList ) )
|
||||
::oStrModel:setStringList( ::oStrList )
|
||||
METHOD getItem( nIndex ) INLINE ::oStrList:at( nIndex-1 )
|
||||
METHOD insItem( nIndex, cItem ) INLINE ::oStrList:insert( nIndex-1, cItem ),;
|
||||
::oStrModel:setStringList( QT_PTROF( ::oStrList ) )
|
||||
::oStrModel:setStringList( ::oStrList )
|
||||
METHOD setItem( nIndex, cItem ) INLINE ::oStrModel:replace( nIndex-1, cItem ),;
|
||||
::oStrModel:setStringList( QT_PTROF( ::oStrList ) )
|
||||
::oStrModel:setStringList( ::oStrList )
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ METHOD XbpDialog:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
ENDIF
|
||||
|
||||
::drawingArea := XbpDrawingArea():new( self, , {0,0}, ::aSize, , .t. ):create()
|
||||
::oWidget:setCentralWidget( QT_PTROF( ::drawingArea:oWidget ) )
|
||||
::oWidget:setCentralWidget( ::drawingArea:oWidget )
|
||||
|
||||
//::setQtProperty()
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ METHOD XbpFileDialog:open( cDefaultFile, lCenter, lAllowMultiple, lCreateNewFile
|
||||
FOR i := 1 TO len( ::fileFilters )
|
||||
oList:append( Xbp_ArrayToFileFilter( ::fileFilters[ i ] ) )
|
||||
NEXT
|
||||
::oWidget:setNameFilters( QT_PTROF( oList ) )
|
||||
::oWidget:setNameFilters( oList )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -258,8 +258,7 @@ METHOD XbpFontDialog:display( nMode )
|
||||
::oFont:setPointSize( ::nominalPointSize )
|
||||
ENDIF
|
||||
|
||||
::oWidget:setCurrentFont( QT_PTROF( ::oFont ) )
|
||||
|
||||
::oWidget:setCurrentFont( ::oFont )
|
||||
IF ::aPos[ 1 ] + ::aPos[ 2 ] != 0
|
||||
::setPos()
|
||||
ENDIF
|
||||
@@ -430,7 +429,7 @@ METHOD XbpFont:create( cFontName )
|
||||
//::oWidget:initialize()
|
||||
|
||||
/* Call the final step - beyond that any changes to properties above will have NO effect */
|
||||
::oFontInfo := QFontInfo():new( QT_PTROF( ::oWidget ) )
|
||||
::oFontInfo := QFontInfo():new( ::oWidget )
|
||||
|
||||
/* Reassign actual properties */
|
||||
::bold := ::oFontInfo:bold()
|
||||
|
||||
@@ -103,16 +103,16 @@ CLASS XbpListBox INHERIT XbpWindow, XbpDataRef
|
||||
METHOD setTopItem( nIndex ) VIRTUAL
|
||||
|
||||
METHOD addItem( cItem ) INLINE ::oStrList:append( cItem ),;
|
||||
::oStrModel:setStringList( QT_PTROF( ::oStrList ) )
|
||||
::oStrModel:setStringList( ::oStrList )
|
||||
METHOD clear() INLINE ::oStrList:clear(),;
|
||||
::oStrModel:setStringList( QT_PTROF( ::oStrList ) )
|
||||
::oStrModel:setStringList( ::oStrList )
|
||||
METHOD delItem( nIndex ) INLINE ::oStrList:removeAt( nIndex-1 ),;
|
||||
::oStrModel:setStringList( QT_PTROF( ::oStrList ) )
|
||||
::oStrModel:setStringList( ::oStrList )
|
||||
METHOD getItem( nIndex ) INLINE ::oStrList:at( nIndex-1 )
|
||||
METHOD insItem( nIndex, cItem ) INLINE ::oStrList:insert( nIndex-1, cItem ),;
|
||||
::oStrModel:setStringList( QT_PTROF( ::oStrList ) )
|
||||
::oStrModel:setStringList( ::oStrList )
|
||||
METHOD setItem( nIndex, cItem ) INLINE ::oStrModel:replace( nIndex-1, cItem ),;
|
||||
::oStrModel:setStringList( QT_PTROF( ::oStrList ) )
|
||||
::oStrModel:setStringList( ::oStrList )
|
||||
|
||||
METHOD getTabstops() VIRTUAL
|
||||
METHOD setColumnWidth() VIRTUAL
|
||||
@@ -189,8 +189,8 @@ METHOD XbpListBox:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
|
||||
::oStrList := QStringList():new( ::pWidget )
|
||||
::oStrModel := QStringListModel():new( ::pWidget )
|
||||
::oStrModel:setStringList( QT_PTROF( ::oStrList ) )
|
||||
::oWidget:setModel( QT_PTROF( ::oStrModel ) )
|
||||
::oStrModel:setStringList( ::oStrList )
|
||||
::oWidget:setModel( ::oStrModel )
|
||||
|
||||
::setPosAndSize()
|
||||
IF ::visible
|
||||
|
||||
@@ -333,7 +333,7 @@ METHOD xbpMenuBar:placeItem( xCaption, bAction, nStyle, nAttrb, nMode, nPos )
|
||||
ENDIF
|
||||
IF !empty( cKey )
|
||||
oKey := QKeySequence():new( cKey )
|
||||
oAction:setShortcut( QT_PTROF( oKey ) )
|
||||
oAction:setShortcut( oKey )
|
||||
ENDIF
|
||||
|
||||
::Connect( QT_PTROF( oAction ), "triggered(bool)", {|| ::exeBlock( nMenuItemID ) } )
|
||||
@@ -348,10 +348,10 @@ METHOD xbpMenuBar:placeItem( xCaption, bAction, nStyle, nAttrb, nMode, nPos )
|
||||
oAction:setDisabled( .t. )
|
||||
|
||||
CASE nAttrb == XBPMENUBAR_MIA_HILITED
|
||||
::oWidget:setActiveAction( QT_PTROF( oAction ) )
|
||||
::oWidget:setActiveAction( oAction )
|
||||
|
||||
CASE nAttrb == XBPMENUBAR_MIA_DEFAULT
|
||||
::oWidget:setDefaultAction( QT_PTROF( oAction ) )
|
||||
::oWidget:setDefaultAction( oAction )
|
||||
|
||||
CASE nAttrb == XBPMENUBAR_MIA_FRAMED
|
||||
|
||||
@@ -366,9 +366,9 @@ METHOD xbpMenuBar:placeItem( xCaption, bAction, nStyle, nAttrb, nMode, nPos )
|
||||
ENDIF
|
||||
|
||||
IF nMode == QTC_MENUITEM_ADD
|
||||
::oWidget:addAction_4( QT_PTROF( oAction ) )
|
||||
::oWidget:addAction_4( oAction )
|
||||
ELSE
|
||||
::oWidget:insertAction( QT_PTROF( pOldAct ), QT_PTROF( oAction ) )
|
||||
::oWidget:insertAction( pOldAct, oAction )
|
||||
ENDIF
|
||||
|
||||
aItem := { QMF_STRING, nMenuItemID, xCaption, bAction, oAction }
|
||||
|
||||
@@ -116,7 +116,7 @@ METHOD XbpPushButton:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible
|
||||
|
||||
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
|
||||
::oWidget := QPushButton():new( QT_PTROF( ::oParent:oWidget ) )
|
||||
::oWidget := QPushButton():new( ::oParent:oWidget )
|
||||
|
||||
::setPosAndSize()
|
||||
IF ::visible
|
||||
@@ -145,7 +145,7 @@ METHOD XbpPushButton:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParam
|
||||
::oWidget:pPtr := pQtObject
|
||||
|
||||
ELSE
|
||||
::oWidget := QPushButton():new( QT_PTROF( ::oParent:oWidget ) )
|
||||
::oWidget := QPushButton():new( ::oParent:oWidget )
|
||||
::setPosAndSize()
|
||||
IF ::visible
|
||||
::oWidget:show()
|
||||
|
||||
@@ -109,7 +109,7 @@ METHOD XbpRadioButton:create( oParent, oOwner, aPos, aSize, aPresParams, lVisibl
|
||||
|
||||
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
|
||||
::oWidget := QRadioButton():New( QT_PTROF( ::oParent:oWidget ) )
|
||||
::oWidget := QRadioButton():New( ::oParent:oWidget )
|
||||
|
||||
::connect( ::pWidget, "clicked()", {|| ::exeBlock() } )
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ METHOD XbpStatusBar:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible
|
||||
RETURN Self
|
||||
ENDIF
|
||||
|
||||
::oWidget := QStatusBar():new( QT_PTROF( oPar:oWidget ) )
|
||||
::oWidget := QStatusBar():new( oPar:oWidget )
|
||||
oPar:oWidget:setStatusBar( ::pWidget )
|
||||
|
||||
::oWidget:setSizeGripEnabled( ::sizeGrip )
|
||||
|
||||
@@ -150,7 +150,7 @@ METHOD XbpToolbar:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
RETURN Self
|
||||
ENDIF
|
||||
|
||||
::oWidget := QToolBar():new( QT_PTROF( oPar:oWidget ) )
|
||||
::oWidget := QToolBar():new( oPar:oWidget )
|
||||
oPar:oWidget:addToolBar_1( ::pWidget )
|
||||
|
||||
#if 0
|
||||
@@ -272,7 +272,7 @@ METHOD XbpToolbar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS
|
||||
::Connect( QT_PTROF( oBtn:oAction ), "triggered(bool)", {|| ::exeBlock( oBtn ) } )
|
||||
|
||||
/* Attach Action with Toolbar */
|
||||
::oWidget:addAction( QT_PTROF( oBtn:oAction ) )
|
||||
::oWidget:addAction( oBtn:oAction )
|
||||
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -384,7 +384,7 @@ METHOD XbpWindow:setQtProperty( cProperty )
|
||||
|
||||
oVariant:setValue( cProperty )
|
||||
|
||||
::oWidget:setProperty( ::qtProperty, QT_PTROF( oVariant ) )
|
||||
::oWidget:setProperty( ::qtProperty, oVariant )
|
||||
|
||||
RETURN Self
|
||||
|
||||
@@ -974,13 +974,13 @@ METHOD XbpWindow:setColorFG( nRGB )
|
||||
|
||||
DO CASE
|
||||
CASE cClass $ 'XBPPUSHBUTTON,XBPMENUBAR,XBPMENU,XBPTOOLBAR,XBPTABPAGE'
|
||||
::oPalette:setColor( QPalette_ButtonText, QT_PTROF( QColor():new( nRGB ) ) )
|
||||
::oPalette:setColor( QPalette_ButtonText, QColor():new( nRGB ) )
|
||||
OTHERWISE
|
||||
::oPalette:setColor( QPalette_Foreground, QT_PTROF( QColor():new( nRGB ) ) )
|
||||
::oPalette:setColor( QPalette_Text , QT_PTROF( QColor():new( nRGB ) ) )
|
||||
::oPalette:setColor( QPalette_Foreground, QColor():new( nRGB ) )
|
||||
::oPalette:setColor( QPalette_Text , QColor():new( nRGB ) )
|
||||
ENDCASE
|
||||
|
||||
::oWidget:setPalette( QT_PTROF( ::oPalette ) )
|
||||
::oWidget:setPalette( ::oPalette )
|
||||
ENDIF
|
||||
|
||||
LOCAL oColor := QColor():new( nRGB )
|
||||
@@ -995,7 +995,7 @@ METHOD XbpWindow:setFont( oFont )
|
||||
LOCAL cAttr := ""
|
||||
|
||||
// TODO:
|
||||
//::oWidget:setFont( QT_PTROF( oFont:oWidget ) ) /* Works but need to be refined */
|
||||
//::oWidget:setFont( oFont:oWidget ) /* Works but need to be refined */
|
||||
|
||||
IF oFont:bold .and. oFont:italic
|
||||
cAttr := "bolditalic"
|
||||
@@ -1090,66 +1090,66 @@ METHOD XbpWindow:setPointer( cDllName, xResID, nType )
|
||||
CASE xResID == XBPSTATIC_SYSICON_DEFAULT // Default mouse pointer
|
||||
|
||||
CASE xResID == XBPSTATIC_SYSICON_ARROW // Normal arrow
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_ArrowCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_ArrowCursor ) )
|
||||
|
||||
CASE xResID == XBPSTATIC_SYSICON_WAIT // Hour glass or clock
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_WaitCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_WaitCursor ) )
|
||||
|
||||
CASE xResID == XBPSTATIC_SYSICON_MOVE // Move the window
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_OpenHandCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_OpenHandCursor ) )
|
||||
|
||||
CASE xResID == XBPSTATIC_SYSICON_SIZE // Change size (all directions)
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_SizeAllCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_SizeAllCursor ) )
|
||||
|
||||
CASE xResID == XBPSTATIC_SYSICON_SIZENWSE // Change size (North west-South east)
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_SizeFDiagCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_SizeFDiagCursor ) )
|
||||
|
||||
CASE xResID == XBPSTATIC_SYSICON_SIZENESW // Change size (North east-South west)
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_SizeBDiagCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_SizeBDiagCursor ) )
|
||||
|
||||
CASE xResID == XBPSTATIC_SYSICON_SIZEWE // Change size (West-East)
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_SizeHorCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_SizeHorCursor ) )
|
||||
|
||||
CASE xResID == XBPSTATIC_SYSICON_SIZENS // Change size (North-South)
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_SizeVerCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_SizeVerCursor ) )
|
||||
|
||||
/* Possible Harbour-QT extensions - #deines yet to be finalized */
|
||||
|
||||
CASE xResID == Qt_UpArrowCursor
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_UpArrowCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_UpArrowCursor ) )
|
||||
|
||||
CASE xResID == Qt_CrossCursor
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_CrossCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_CrossCursor ) )
|
||||
|
||||
CASE xResID == Qt_IBeamCursor
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_IBeamCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_IBeamCursor ) )
|
||||
|
||||
CASE xResID == Qt_BlankCursor
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_BlankCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_BlankCursor ) )
|
||||
|
||||
CASE xResID == Qt_SplitVCursor
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_SplitVCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_SplitVCursor ) )
|
||||
|
||||
CASE xResID == Qt_SplitHCursor
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_SplitHCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_SplitHCursor ) )
|
||||
|
||||
CASE xResID == Qt_PointingHandCursor
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_PointingHandCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_PointingHandCursor ) )
|
||||
|
||||
CASE xResID == Qt_ForbiddenCursor
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_ForbiddenCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_ForbiddenCursor ) )
|
||||
|
||||
CASE xResID == Qt_ClosedHandCursor
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_ClosedHandCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_ClosedHandCursor ) )
|
||||
|
||||
CASE xResID == Qt_WhatsThisCursor
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_WhatsThisCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_WhatsThisCursor ) )
|
||||
|
||||
CASE xResID == Qt_BusyCursor
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_BusyCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_BusyCursor ) )
|
||||
|
||||
CASE xResID == Qt_BitmapCursor
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( Qt_BitmapCursor ) ) )
|
||||
::oWidget:setCursor( QCursor():new( Qt_BitmapCursor ) )
|
||||
|
||||
ENDCASE
|
||||
|
||||
@@ -1157,9 +1157,9 @@ METHOD XbpWindow:setPointer( cDllName, xResID, nType )
|
||||
IF valtype( xResID ) == "C" // Harbour compatibility
|
||||
IF file( xResID )
|
||||
#if 0 /* The original image size - but in practice pointer should be proper sized */
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( "QPixmap", QT_PTROF( QPixmap():new( xResID ) ) ) ) )
|
||||
::oWidget:setCursor( QCursor():new( "QPixmap", QPixmap():new( xResID ) ) )
|
||||
#else
|
||||
::oWidget:setCursor( QT_PTROF( QCursor():new( "QPixmap", QPixmap():new( xResID ):scaled( 24,24 ) ) ) )
|
||||
::oWidget:setCursor( QCursor():new( "QPixmap", QPixmap():new( xResID ):scaled( 24,24 ) ) )
|
||||
#endif
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
Reference in New Issue
Block a user