2010-09-14 15:00 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbxbp/hbpprocess.prg
  * contrib/hbxbp/xbp3state.prg
  * contrib/hbxbp/xbpbitmap.prg
  * contrib/hbxbp/xbpbrowse.prg
  * contrib/hbxbp/xbpcheckbox.prg
  * contrib/hbxbp/xbpclipboard.prg
  * contrib/hbxbp/xbpcombobox.prg
  * contrib/hbxbp/xbpdialog.prg
  * contrib/hbxbp/xbpfiledialog.prg
  * contrib/hbxbp/xbpfontdialog.prg
  * contrib/hbxbp/xbpgeneric.prg
  * contrib/hbxbp/xbphtmlviewer.prg
  * contrib/hbxbp/xbplistbox.prg
  * contrib/hbxbp/xbpmenubar.prg
  * contrib/hbxbp/xbpmle.prg
  * contrib/hbxbp/xbpprintdialog.prg
  * contrib/hbxbp/xbpprinter.prg
  * contrib/hbxbp/xbppushbutton.prg
  * contrib/hbxbp/xbpradiobutton.prg
  * contrib/hbxbp/xbprtf.prg
  * contrib/hbxbp/xbpscrollbar.prg
  * contrib/hbxbp/xbpsle.prg
  * contrib/hbxbp/xbpspinbutton.prg
  * contrib/hbxbp/xbpstatic.prg
  * contrib/hbxbp/xbpstatusbar.prg
  * contrib/hbxbp/xbptabpage.prg
  * contrib/hbxbp/xbptoolbar.prg
  * contrib/hbxbp/xbptreeview.prg
  * contrib/hbxbp/xbpwindow.prg
    ! Adopted to new hbQT syntax.
      Q*Class():new( ... ) => Q*Class( ... )
This commit is contained in:
Pritpal Bedi
2010-09-14 22:06:46 +00:00
parent 6dfd6dd430
commit 52a4905f88
30 changed files with 178 additions and 135 deletions

View File

@@ -16,6 +16,39 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-09-14 15:00 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbxbp/hbpprocess.prg
* contrib/hbxbp/xbp3state.prg
* contrib/hbxbp/xbpbitmap.prg
* contrib/hbxbp/xbpbrowse.prg
* contrib/hbxbp/xbpcheckbox.prg
* contrib/hbxbp/xbpclipboard.prg
* contrib/hbxbp/xbpcombobox.prg
* contrib/hbxbp/xbpdialog.prg
* contrib/hbxbp/xbpfiledialog.prg
* contrib/hbxbp/xbpfontdialog.prg
* contrib/hbxbp/xbpgeneric.prg
* contrib/hbxbp/xbphtmlviewer.prg
* contrib/hbxbp/xbplistbox.prg
* contrib/hbxbp/xbpmenubar.prg
* contrib/hbxbp/xbpmle.prg
* contrib/hbxbp/xbpprintdialog.prg
* contrib/hbxbp/xbpprinter.prg
* contrib/hbxbp/xbppushbutton.prg
* contrib/hbxbp/xbpradiobutton.prg
* contrib/hbxbp/xbprtf.prg
* contrib/hbxbp/xbpscrollbar.prg
* contrib/hbxbp/xbpsle.prg
* contrib/hbxbp/xbpspinbutton.prg
* contrib/hbxbp/xbpstatic.prg
* contrib/hbxbp/xbpstatusbar.prg
* contrib/hbxbp/xbptabpage.prg
* contrib/hbxbp/xbptoolbar.prg
* contrib/hbxbp/xbptreeview.prg
* contrib/hbxbp/xbpwindow.prg
! Adopted to new hbQT syntax.
Q*Class():new( ... ) => Q*Class( ... )
2010-09-14 14:47 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/tests/demoqt.prg
! Adopted to new syntax.

View File

@@ -179,7 +179,7 @@ METHOD HbpProcess:output( bBlock )
METHOD HbpProcess:addArg( cArg )
IF empty( ::qStrList )
::qStrList := QStringList():new()
::qStrList := QStringList()
ENDIF
::qStrList:append( cArg )
@@ -193,7 +193,7 @@ METHOD HbpProcess:start( cShellCmd )
::cShellCmd := cShellCmd
::qProcess := QProcess():new()
::qProcess := QProcess()
::qProcess:setReadChannel( 1 )
#if 0

View File

@@ -107,7 +107,7 @@ METHOD Xbp3State:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oWidget := QCheckBox():New( ::oParent:oWidget )
::oWidget := QCheckBox( ::oParent:oWidget )
::oWidget:connect( "stateChanged(int)", {|i| ::execSlot( "stateChanged(int)", i ) } )

View File

@@ -87,7 +87,7 @@ CLASS XbpBitmap
ACCESS planes INLINE 0
ACCESS xSize INLINE ::oWidget:width()
ACCESS ySize INLINE ::oWidget:height()
METHOD new() INLINE Self
METHOD create( oPS )
METHOD configure() VIRTUAL
@@ -114,7 +114,7 @@ METHOD XbpBitmap:create( oPS )
DEFAULT oPS TO ::oPS
::oPS := oPS
::oWidget := QImage():new()
::oWidget := QImage()
RETURN Self

View File

@@ -544,7 +544,7 @@ METHOD new( nTop, nLeft, nBottom, nRight ) CLASS XbpBrowse
::colorSpec := SetColor()
::oDefaultCellSize := QSize():New(20,::nCellHeight)
::oDefaultCellSize := QSize(20,::nCellHeight)
RETURN Self
@@ -561,7 +561,7 @@ METHOD XbpBrowse:openPersistentEditor()
METHOD XbpBrowse:buildLeftFreeze()
/* Left Freeze */
::oLeftView := HBQTableView():new()
::oLeftView := HBQTableView()
//
::oLeftView:setHorizontalScrollBarPolicy( Qt_ScrollBarAlwaysOff )
::oLeftView:setVerticalScrollBarPolicy( Qt_ScrollBarAlwaysOff )
@@ -580,14 +580,14 @@ METHOD XbpBrowse:buildLeftFreeze()
::oLeftHeaderView:configure( ::oLeftView:horizontalHeader() )
::oLeftHeaderView:setHighlightSections( .F. )
::oLeftDbfModel := HBQAbstractItemModel():new( {|t,role,x,y| ::supplyInfo( 151, t, role, x, y ) } )
::oLeftDbfModel := HBQAbstractItemModel( {|t,role,x,y| ::supplyInfo( 151, t, role, x, y ) } )
::oLeftView:setModel( ::oLeftDbfModel )
//
//::oLeftView:hide()
/* Horizontal Footer */
::oLeftFooterView := QHeaderView():new( Qt_Horizontal )
::oLeftFooterView := QHeaderView( Qt_Horizontal )
//
::oLeftFooterView:setHighlightSections( .F. )
::oLeftFooterView:setMinimumHeight( 20 )
@@ -595,7 +595,7 @@ METHOD XbpBrowse:buildLeftFreeze()
::oLeftFooterView:setResizeMode( QHeaderView_Fixed )
::oLeftFooterView:setFocusPolicy( Qt_NoFocus )
//
::oLeftFooterModel := HBQAbstractItemModel():new( {|t,role,x,y| ::supplyInfo( 152, t, role, x, y ) } )
::oLeftFooterModel := HBQAbstractItemModel( {|t,role,x,y| ::supplyInfo( 152, t, role, x, y ) } )
::oLeftFooterView:setModel( ::oLeftFooterModel )
//
@@ -613,7 +613,7 @@ METHOD XbpBrowse:buildRightFreeze()
LOCAL oVHdr
/* Left Freeze */
::oRightView := HBQTableView():new()
::oRightView := HBQTableView()
//
::oRightView:setHorizontalScrollBarPolicy( Qt_ScrollBarAlwaysOff )
::oRightView:setVerticalScrollBarPolicy( Qt_ScrollBarAlwaysOff )
@@ -632,12 +632,12 @@ METHOD XbpBrowse:buildRightFreeze()
::oRightHeaderView:configure( ::oRightView:horizontalHeader() )
::oRightHeaderView:setHighlightSections( .F. )
::oRightDbfModel := HBQAbstractItemModel():new( {|t,role,x,y| ::supplyInfo( 161, t, role, x, y ) } )
::oRightDbfModel := HBQAbstractItemModel( {|t,role,x,y| ::supplyInfo( 161, t, role, x, y ) } )
::oRightView:setModel( ::oRightDbfModel )
/* Horizontal Footer */
::oRightFooterView := QHeaderView():new( Qt_Horizontal )
::oRightFooterView := QHeaderView( Qt_Horizontal )
//
::oRightFooterView:setHighlightSections( .F. )
::oRightFooterView:setMinimumHeight( 20 )
@@ -645,7 +645,7 @@ METHOD XbpBrowse:buildRightFreeze()
::oRightFooterView:setResizeMode( QHeaderView_Fixed )
::oRightFooterView:setFocusPolicy( Qt_NoFocus )
//
::oRightFooterModel := HBQAbstractItemModel():new( {|t,role,x,y| ::supplyInfo( 162, t, role, x, y ) } )
::oRightFooterModel := HBQAbstractItemModel( {|t,role,x,y| ::supplyInfo( 162, t, role, x, y ) } )
::oRightFooterView:setModel( ::oRightFooterModel )
@@ -662,14 +662,14 @@ METHOD XbpBrowse:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oWidget := QFrame():new( ::pParent )
::oWidget := QFrame( ::pParent )
::oWidget:setFrameStyle( QFrame_Panel + QFrame_Plain )
/* Important here as other parts will be based on it*/
::setPosAndSize()
/* Subclass of QTableView */
::oTableView := HBQTableView():new()
::oTableView := HBQTableView()
/* Some parameters */
::oTableView:setTabKeyNavigation( .t. )
@@ -691,7 +691,7 @@ METHOD XbpBrowse:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
/* Finetune Horizontal Scrollbar */
::oTableView:setHorizontalScrollBarPolicy( Qt_ScrollBarAlwaysOff )
//
::oHScrollBar := QScrollBar():new()
::oHScrollBar := QScrollBar()
::oHScrollBar:setOrientation( Qt_Horizontal )
::oHScrollBar:connect( "actionTriggered(int)" , {|i| ::execSlot( __ev_horzscroll_slidermoved__ , i ) } )
::oHScrollBar:connect( "sliderReleased()" , {|i| ::execSlot( __ev_horzscroll_sliderreleased__, i ) } )
@@ -699,7 +699,7 @@ METHOD XbpBrowse:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
/* Replace Vertical Scrollbar with our own */
::oTableView:setVerticalScrollBarPolicy( Qt_ScrollBarAlwaysOff )
//
::oVScrollBar := QScrollBar():new()
::oVScrollBar := QScrollBar()
::oVScrollBar:setOrientation( Qt_Vertical )
::oVScrollBar:connect( "actionTriggered(int)" , {|i| ::execSlot( __ev_vertscroll_via_user__ , i ) } )
::oVScrollBar:connect( "sliderReleased()" , {|i| ::execSlot( __ev_vertscroll_sliderreleased__, i ) } )
@@ -718,13 +718,13 @@ METHOD XbpBrowse:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oHeaderView:connect( "sectionResized(int,int,int)" , {|i,i1,i2| ::execSlot( __ev_headersec_resized__ , i, i1, i2 ) } )
/* .DBF Manipulation Model */
::oDbfModel := HBQAbstractItemModel():new( {|t,role,x,y| ::supplyInfo( 141, t, role, x, y ) } )
::oDbfModel := HBQAbstractItemModel( {|t,role,x,y| ::supplyInfo( 141, t, role, x, y ) } )
/* Attach Model with the View */
::oTableView:setModel( ::oDbfModel )
/* Horizontal Footer */
::oFooterView := QHeaderView():new( Qt_Horizontal )
::oFooterView := QHeaderView( Qt_Horizontal )
//
::oFooterView:setHighlightSections( .F. )
@@ -733,7 +733,7 @@ METHOD XbpBrowse:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oFooterView:setResizeMode( QHeaderView_Fixed )
::oFooterView:setFocusPolicy( Qt_NoFocus )
//
::oFooterModel := HBQAbstractItemModel():new( {|t,role,x,y| ::supplyInfo( 142, t, role, x, y ) } )
::oFooterModel := HBQAbstractItemModel( {|t,role,x,y| ::supplyInfo( 142, t, role, x, y ) } )
::oFooterView:setModel( ::oFooterModel )
::oFooterView:setFocusPolicy( Qt_NoFocus )
@@ -744,7 +744,7 @@ METHOD XbpBrowse:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::buildRightFreeze()
/* Place all widgets in a Grid Layout */
::oGridLayout := QGridLayout():new( ::pWidget )
::oGridLayout := QGridLayout( ::pWidget )
::oGridLayout:setContentsMargins( 0,0,0,0 )
::oGridLayout:setHorizontalSpacing( 0 )
::oGridLayout:setVerticalSpacing( 0 )
@@ -778,7 +778,7 @@ METHOD XbpBrowse:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oWidget:setGeometry( qRect )
/* Handle the delegate */
::qDelegate := QItemDelegate():new()
::qDelegate := QItemDelegate()
::oTableView:setItemDelegate( ::qDelegate )
::qDelegate:connect( "closeEditor(QWidget,int)", {|p,p1| ::execSlot( __editor_closeEditor__, p, p1 ) } )
@@ -856,7 +856,7 @@ METHOD XbpBrowse:execSlot( nEvent, p1, p2, p3 )
CASE nEvent == __ev_mousepress__
oMouseEvent := QMouseEvent():configure( p1 )
oPoint := QPoint():new( oMouseEvent:x(), oMouseEvent:y() )
oPoint := QPoint( oMouseEvent:x(), oMouseEvent:y() )
::oModelIndex:configure( ::oTableView:indexAt( oPoint ) )
IF ::oModelIndex:isValid() /* Reposition the record pointer */
SetAppEvent( xbeBRW_Navigate, XBPBRW_Navigate_Skip, ( ::oModelIndex:row() + 1 ) - ::rowPos, Self )
@@ -1342,12 +1342,12 @@ METHOD fetchColumnInfo( nCall, nRole, nArea, nRow, nCol ) CLASS XbpBrowse
// Implementation choice will depend on planned HBQt evolution of pseudo casts and bypass functions (non GC QColor, QIcon, etc)
METHOD compatColor( nColor )
RETURN QColor():new( nColor )
RETURN QColor( nColor )
/*----------------------------------------------------------------------*/
METHOD compatIcon( cIcon )
RETURN QIcon():new( QPixmap():new( Trim( cIcon ) ) )
RETURN QIcon( QPixmap( Trim( cIcon ) ) )
/*----------------------------------------------------------------------*/
@@ -1728,7 +1728,7 @@ METHOD doConfigure() CLASS XbpBrowse
::oRightFooterView:setResizeMode( QHeaderView_Fixed )
/* Set column widths */
oFontMetrics := QFontMetrics():new( "QFont", ::oTableView:font() )
oFontMetrics := QFontMetrics( "QFont", ::oTableView:font() )
//
FOR i := 1 TO len( ::columns )
IF ::columns[ i ]:nColWidth != NIL

View File

@@ -107,7 +107,7 @@ METHOD XbpCheckBox:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oWidget := QCheckBox():New( ::oParent:oWidget )
::oWidget := QCheckBox( ::oParent:oWidget )
::oWidget:connect( "stateChanged(int)", {|i| ::execSlot( "stateChanged(int)", i ) } )
::setPosAndSize()

View File

@@ -104,7 +104,7 @@ METHOD XbpClipBoard:new()
METHOD XbpClipBoard:create()
::oWidget := QClipBoard():new()
::oWidget := QClipBoard()
RETURN Self

View File

@@ -137,7 +137,7 @@ METHOD XbpComboBox:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oSLE := XbpSLE():new():create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oLB := XbpListBox():new():create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oWidget := QComboBox():New( ::pParent )
::oWidget := QComboBox( ::pParent )
::oWidget:setLineEdit( ::XbpSLE:oWidget:pPtr )
::oWidget:setEditable( ::XbpSLE:editable )
@@ -169,7 +169,7 @@ METHOD XbpComboBox:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams,
::oSLE := XbpSLE():new():create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oLB := XbpListBox():new():create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oWidget := QComboBox():New( ::pParent )
::oWidget := QComboBox( ::pParent )
::setPosAndSize()
IF ::visible
::show()

View File

@@ -156,7 +156,7 @@ METHOD XbpDialog:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
ENDIF
::oWidget:setMouseTracking( .t. )
ELSE
::oWidget := QMainWindow():new()
::oWidget := QMainWindow()
::oWidget:setMouseTracking( .t. )
::oWidget:setObjectName( "mainWindow" )
ENDIF
@@ -208,7 +208,7 @@ METHOD XbpDialog:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
ENDIF
/* Install Event Loop per Dialog Basis */
::oEventLoop := QEventLoop():new( ::pWidget )
::oEventLoop := QEventLoop( ::pWidget )
hbxbp_SetEventLoop( ::oEventLoop )
/* Instal Event Filter */
@@ -420,7 +420,7 @@ METHOD XbpDrawingArea:create( oParent, oOwner, aPos, aSize, aPresParams, lVisibl
::oWidget := QWidget()
::oWidget:pPtr := hbqt_ptr( ::qtObject )
ELSE
::oWidget := QWidget():new()// ::oParent:oWidget )
::oWidget := QWidget()
ENDIF
::oWidget:setMouseTracking( .T. )

View File

@@ -110,7 +110,7 @@ METHOD XbpFileDialog:create( oParent, oOwner, aPos )
::xbpWindow:create( oParent, oOwner, aPos )
::oWidget := QFileDialog():new( ::pParent )
::oWidget := QFileDialog( ::pParent )
//::oWidget:setStyle( AppDesktop():style() )
//::setStyle()
//::setColorBG( GraMakeRGBColor( { 255,255,255 } ) )
@@ -203,7 +203,7 @@ METHOD XbpFileDialog:open( cDefaultFile, lCenter, lAllowMultiple, lCreateNewFile
IF len( ::fileFilters ) == 1
::oWidget:setNameFilter( Xbp_ArrayToFileFilter( ::fileFilters[ 1 ] ) )
ELSE
oList := QStringList():new()
oList := QStringList()
FOR i := 1 TO len( ::fileFilters )
oList:append( Xbp_ArrayToFileFilter( ::fileFilters[ i ] ) )
NEXT
@@ -254,7 +254,7 @@ METHOD XbpFileDialog:saveAs( cDefaultFile, lFileList, lCenter )
IF len( ::fileFilters ) == 1
::oWidget:setNameFilter( Xbp_ArrayToFileFilter( ::fileFilters[ 1 ] ) )
ELSE
oList := QStringList():new()
oList := QStringList()
FOR i := 1 TO len( ::fileFilters )
oList:append( Xbp_ArrayToFileFilter( ::fileFilters[ i ] ) )
NEXT

View File

@@ -187,7 +187,7 @@ METHOD XbpFontDialog:create( oParent, oOwner, oScreenPS, oPrinterPS, aPos )
::xbpWindow:create( oParent, oOwner )
::oWidget := QFontDialog():new()
::oWidget := QFontDialog()
if !empty( ::title )
::oWidget:setWindowTitle( ::title )
@@ -241,7 +241,7 @@ METHOD XbpFontDialog:display( nMode )
/* Before Display Initialize the Variables
*/
::oFont := QFont():new()
::oFont := QFont()
::oFont:setFamily( ::familyName )
IF ::nominalPointSize > 0
@@ -393,10 +393,11 @@ CLASS XbpFont
METHOD new( oPS )
METHOD create( cFontName )
METHOD configure( cFontName )
METHOD destroy()
METHOD list()
METHOD createFont()
DESTRUCTOR destroy()
DESTRUCTOR _destroy()
ENDCLASS
@@ -430,7 +431,7 @@ METHOD XbpFont:create( cFontName )
nPtSize := 12
ENDIF
::oWidget := QFont():new( cFont, nPtSize )
::oWidget := QFont( cFont, nPtSize )
::oWidget:setBold( ::bold )
::oWidget:setItalic( ::italic )
@@ -463,7 +464,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( ::oWidget )
::oFontInfo := QFontInfo( ::oWidget )
/* Reassign actual properties */
::bold := ::oFontInfo:bold()
@@ -502,6 +503,15 @@ METHOD XbpFont:destroy()
/*----------------------------------------------------------------------*/
METHOD XbpFont:_destroy()
::oFontInfo:pPtr := NIL
::oWidget:pPtr := 0
RETURN NIL
/*----------------------------------------------------------------------*/
METHOD XbpFont:list()
LOCAL aList := {}

View File

@@ -162,9 +162,9 @@ FUNCTION PostAppEvent( nEvent, mp1, mp2, oXbp )
IF nEvent == xbeP_Keyboard
IF mp1 == xbeK_TAB
qEvent := QEvent():new( QEvent_KeyPress )
qEvent := QEvent( QEvent_KeyPress )
//s_oApp:postEvent( oXbp:oWidget, qEvent )
QApplication():new():postEvent( oXbp:oWidget, qEvent )
QApplication():postEvent( oXbp:oWidget, qEvent )
ENDIF
ENDIF
@@ -292,7 +292,7 @@ FUNCTION AppDesktop()
IF s_oDeskTop == NIL
s_oDeskTop := XbpWindow():new()
s_oDeskTop:oWidget := QDesktopWidget():new()
s_oDeskTop:oWidget := QDesktopWidget()
ENDIF
RETURN s_oDeskTop
@@ -308,7 +308,7 @@ FUNCTION MsgBox( cMsg, cTitle )
cMsg := strtran( cMsg, chr( 13 ), "<br />" )
cMsg := strtran( cMsg, chr( 10 ), "<br />" )
oMB := QMessageBox():new()
oMB := QMessageBox()
oMB:setText( /* "<b>" + */ cMsg /* + "</b>" */ )
oMB:setIcon( QMessageBox_Information )
IF hb_isObject( SetAppWindow() )

View File

@@ -155,7 +155,7 @@ METHOD XbpHTMLViewer:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
#if 0 /* Discontinued till QWebKit is integrated separately - Pritpal */
::oWidget := QWebView():new( ::pParent )
::oWidget := QWebView( ::pParent )
::oWidget:connect( "iconChanged()" , {|p| ::execSlot( "iconChanged()" , p ) } )
::oWidget:connect( "linkClicked(QUrl)" , {|p| ::execSlot( "linkClicked(QUrl)" , p ) } )
@@ -241,7 +241,7 @@ HB_TRACE( HB_TR_DEBUG, ::cSelectedText )
METHOD XbpHTMLViewer:navigate( cURL )
IF empty( ::oURL )
::oURL := QUrl():new()
::oURL := QUrl()
ENDIF
::oURL:setURL( cURL )

View File

@@ -163,7 +163,7 @@ METHOD XbpListBox:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
ENDIF
#endif
::oWidget := QListWidget():New( ::pParent )
::oWidget := QListWidget( ::pParent )
::oWidget:setMouseTracking( .t. )
IF ::markMode == XBPLISTBOX_MM_MULTIPLE
::oWidget:setSelectionMode( QAbstractItemView_MultiSelection )
@@ -336,7 +336,7 @@ METHOD XbpListBox:destroy()
/*----------------------------------------------------------------------*/
METHOD XbpListBox:addItem( cItem )
LOCAL qItm := QListWidgetItem():new()
LOCAL qItm := QListWidgetItem()
qItm:setText( cItem ) ; ::oWidget:addItem_1( qItm )
aadd( ::aItems, qItm )
@@ -384,7 +384,7 @@ METHOD XbpListBox:getItem( nIndex )
/*----------------------------------------------------------------------*/
METHOD XbpListBox:insItem( nIndex, cItem )
LOCAL qItm := QListWidgetItem():new()
LOCAL qItm := QListWidgetItem()
qItm:setText( cItem )
@@ -427,17 +427,17 @@ METHOD XbpListBox:setItemColorFG( nIndex, aRGB )
IF hb_isNumeric( nIndex ) .AND. nIndex > 0 .AND. nIndex <= len( ::aItems )
IF ::nOldIndex > 0 .AND. ::nOldIndex <= len( ::aItems )
::aItems[ ::nOldIndex ]:setForeGround( QBrush():new( "QColor", QColor():new( 0,0,0 ) ) )
::aItems[ ::nOldIndex ]:setForeGround( QBrush( "QColor", QColor( 0,0,0 ) ) )
ENDIF
::aItems[ nIndex ]:setForeGround( QBrush():new( "QColor", QColor():new( aRGB[ 1 ], aRGB[ 2 ], aRGB[ 3 ] ) ) )
::aItems[ nIndex ]:setForeGround( QBrush( "QColor", QColor( aRGB[ 1 ], aRGB[ 2 ], aRGB[ 3 ] ) ) )
::nOldIndex := nIndex
ELSEIF hb_isChar( nIndex )
IF ( nIndex := ascan( ::aItems, {|o| o:text() == nIndex } ) ) > 0
IF ::nOldIndex > 0 .AND. ::nOldIndex <= len( ::aItems )
::aItems[ ::nOldIndex ]:setForeGround( QBrush():new( "QColor", QColor():new( 0,0,0 ) ) )
::aItems[ ::nOldIndex ]:setForeGround( QBrush( "QColor", QColor( 0,0,0 ) ) )
ENDIF
::aItems[ nIndex ]:setForeGround( QBrush():new( "QColor", QColor():new( aRGB[ 1 ], aRGB[ 2 ], aRGB[ 3 ] ) ) )
::aItems[ nIndex ]:setForeGround( QBrush( "QColor", QColor( aRGB[ 1 ], aRGB[ 2 ], aRGB[ 3 ] ) ) )
::nOldIndex := nIndex
ENDIF
ENDIF

View File

@@ -182,7 +182,7 @@ METHOD xbpMenuBar:create( oParent, aPresParams, lVisible )
::xbpWindow:create( ::oParent, , , , ::aPresParams, ::visible )
::oWidget := QMenuBar():new()
::oWidget := QMenuBar()
::oParent:oWidget:setMenuBar( ::oWidget )
if !empty( ::oWidget )
@@ -286,7 +286,7 @@ METHOD xbpMenuBar:placeItem( xCaption, bAction, nStyle, nAttrb, nMode, nPos )
aItem := { QMF_SEPARATOR, 0, 0, NIL, oAction }
CASE cType == "C"
oAction := QAction():new( ::oWidget )
oAction := QAction( ::oWidget )
cCaption := strtran( xCaption, '~', '&' )
IF ( n := at( '|', cCaption ) ) > 0
cIcon := substr( cCaption, 1, n-1 )
@@ -301,7 +301,7 @@ METHOD xbpMenuBar:placeItem( xCaption, bAction, nStyle, nAttrb, nMode, nPos )
oAction:setIcon( cIcon )
ENDIF
IF !empty( cKey )
oKey := QKeySequence():new( cKey )
oKey := QKeySequence( cKey )
oAction:setShortcut( oKey )
ENDIF
@@ -742,7 +742,7 @@ METHOD xbpMenu:create( oParent, aPresParams, lVisible )
::xbpWindow:create( ::oParent, , , , ::aPresParams, ::visible )
::oWidget := QMenu():new()
::oWidget := QMenu()
::oParent:oWidget:addMenu( ::oWidget )
::oParent:addChild( self )

View File

@@ -135,7 +135,7 @@ METHOD XbpMLE:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oWidget := QPlainTextEdit():new( ::pParent )
::oWidget := QPlainTextEdit( ::pParent )
IF !( ::editable )
::oWidget:setReadOnly( .t. )

View File

@@ -110,7 +110,7 @@ METHOD XbpPrintDialog:create( oParent, oOwner )
::xbpWindow:create( oParent, oOwner )
::oWidget := QPrintDialog():new()
::oWidget := QPrintDialog()
::oWidget:connect( "accepted(QPrinter)", {|p| ::pPrinter := p } )

View File

@@ -148,7 +148,7 @@ METHOD XbpPrinter:create( cDeviceName, nSpoolFormat, cDeviceParams )
HB_SYMBOL_UNUSED( nSpoolFormat )
HB_SYMBOL_UNUSED( cDeviceParams )
::oWidget := QPrinter():new()
::oWidget := QPrinter()
IF hb_isChar( cDeviceName )
::oWidget:setPrinterName( cDeviceName )

View File

@@ -119,7 +119,7 @@ METHOD XbpPushButton:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oWidget := QPushButton():new( ::oParent:oWidget )
::oWidget := QPushButton( ::oParent:oWidget )
::oWidget:setFocusPolicy( Qt_StrongFocus )
::setPosAndSize()
@@ -150,7 +150,7 @@ METHOD XbpPushButton:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParam
::oWidget:pPtr := pQtObject
ELSE
::oWidget := QPushButton():new( ::oParent:oWidget )
::oWidget := QPushButton( ::oParent:oWidget )
::setPosAndSize()
IF ::visible
::oWidget:show()

View File

@@ -107,7 +107,7 @@ METHOD XbpRadioButton:create( oParent, oOwner, aPos, aSize, aPresParams, lVisibl
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oWidget := QRadioButton():New( ::oParent:oWidget )
::oWidget := QRadioButton( ::oParent:oWidget )
::oWidget:connect( "clicked()", {|| ::execSlot( "clicked()" ) } )

View File

@@ -169,7 +169,7 @@ METHOD XbpRtf:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oWidget := QTextEdit():new( ::pParent )
::oWidget := QTextEdit( ::pParent )
* ::oWidget:connect( "copyAvailable(bool)" , {|p| ::execSlot( "copyAvailable(bool)" , p ) } )
::oWidget:connect( "currentCharFormatChanged(QTextCharFormat)", {|p| ::execSlot( "currentCharFormatChanged(QTextCharFormat)", p ) } )
@@ -490,8 +490,8 @@ METHOD XbpRtf:selColor( ... )
IF ::oTextCharFormat:isValid()
xRet := ::oTextCharFormat:foreground()
nColor := hbxbp_ConvertAFactFromXBP( "COLOR", aP[ 1 ] )
oColor := QColor():new( nColor )
oBrush := QBrush():new( "QColor", oColor )
oColor := QColor( nColor )
oBrush := QBrush( "QColor", oColor )
::oTextCharFormat:setForeground( oBrush )
::oCurCursor:setCharFormat( ::oTextCharFormat )
ENDIF

View File

@@ -113,7 +113,7 @@ METHOD XbpScrollBar:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oWidget := QScrollBar():new( ::pParent )
::oWidget := QScrollBar( ::pParent )
::oWidget:setOrientation( IF( ::type == XBPSCROLL_VERTICAL, 2, 1 ) )
::oWidget:setTracking( ::autoTrack )

View File

@@ -145,7 +145,7 @@ METHOD XbpSLE:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oWidget := QLineEdit():new( ::pParent )
::oWidget := QLineEdit( ::pParent )
::oWidget:setFocusPolicy( Qt_StrongFocus )
::oWidget:setAlignment( es_[ ::align ] )

View File

@@ -138,7 +138,7 @@ METHOD XbpSpinButton:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oWidget := QSpinBox():new( ::pParent )
::oWidget := QSpinBox( ::pParent )
::oWidget:setKeyboardTracking( .t. )
IF ::fastSpin
::oWidget:setAccelerated( .t. )

View File

@@ -112,7 +112,7 @@ METHOD XbpStatic:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
DO CASE
// OK
CASE ::type == XBPSTATIC_TYPE_TEXT
::oWidget := QLabel():new( ::pParent )
::oWidget := QLabel( ::pParent )
IF ( hb_bitAnd( ::options, XBPSTATIC_TEXT_LEFT ) == XBPSTATIC_TEXT_LEFT )
::oWidget:setAlignment( Qt_AlignLeft )
@@ -137,11 +137,11 @@ METHOD XbpStatic:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
ENDIF
// OK
CASE ::type == XBPSTATIC_TYPE_GROUPBOX
::oWidget := QGroupBox():new( ::pParent )
::oWidget := QGroupBox( ::pParent )
// OK
CASE ::type == XBPSTATIC_TYPE_RAISEDBOX
::oWidget := QFrame():new( ::pParent )
::oWidget := QFrame( ::pParent )
::oWidget:setFrameStyle( QFrame_Panel + QFrame_Raised )
::setColorBG( GraMakeRGBColor( { 198, 198, 198 } ) )
IF lThick
@@ -149,7 +149,7 @@ METHOD XbpStatic:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
ENDIF
// OK
CASE ::type == XBPSTATIC_TYPE_RECESSEDBOX
::oWidget := QFrame():new( ::pParent )
::oWidget := QFrame( ::pParent )
::oWidget:setFrameStyle( QFrame_Panel + QFrame_Sunken )
::setColorBG( GraMakeRGBColor( { 198, 198, 198 } ) )
IF lThick
@@ -157,48 +157,48 @@ METHOD XbpStatic:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
ENDIF
// OK
CASE ::type == XBPSTATIC_TYPE_RAISEDRECT
::oWidget := QFrame():new( ::pParent )
::oWidget := QFrame( ::pParent )
::oWidget:setFrameStyle( QFrame_Panel + QFrame_Raised )
IF lThick
::oWidget:setLineWidth( 2 )
ENDIF
// OK
CASE ::type == XBPSTATIC_TYPE_RECESSEDRECT
::oWidget := QFrame():new( ::pParent )
::oWidget := QFrame( ::pParent )
::oWidget:setFrameStyle( QFrame_Panel + QFrame_Sunken )
IF lThick
::oWidget:setLineWidth( 2 )
ENDIF
// OK
CASE ::type == XBPSTATIC_TYPE_FGNDFRAME // rectangle in foreground color, not filled
::oWidget := QFrame():new( ::pParent )
::oWidget := QFrame( ::pParent )
::oWidget:setFrameStyle( QFrame_Panel + QFrame_Plain )
::setColorFG( GraMakeRGBColor( { 0, 0, 0 } ) )
// OK
CASE ::type == XBPSTATIC_TYPE_BGNDFRAME
::oWidget := QFrame():new( ::pParent )
::oWidget := QFrame( ::pParent )
::oWidget:setFrameStyle( QFrame_Box + QFrame_Plain )
::setColorFG( GraMakeRGBColor( { 127, 127, 127 } ) )
// OK
CASE ::type == XBPSTATIC_TYPE_FGNDRECT
::oWidget := QFrame():new( ::pParent )
::oWidget := QFrame( ::pParent )
::setColorBG( GraMakeRGBColor( { 0, 0, 0 } ) )
// OK
CASE ::type == XBPSTATIC_TYPE_BGNDRECT
::oWidget := QFrame():new( ::pParent )
::oWidget := QFrame( ::pParent )
::setColorBG( GraMakeRGBColor( { 127, 127, 127 } ) )
// OK
CASE ::type == XBPSTATIC_TYPE_HALFTONERECT
::oWidget := QFrame():new( ::pParent )
::oWidget := QFrame( ::pParent )
::setColorBG( GraMakeRGBColor( { 255, 255, 255 } ) )
// OK
CASE ::type == XBPSTATIC_TYPE_HALFTONEFRAME
::oWidget := QFrame():new( ::pParent )
::oWidget := QFrame( ::pParent )
::oWidget:setFrameStyle( QFrame_Box + QFrame_Plain )
::setColorFG( GraMakeRGBColor( { 255, 255, 255 } ) )
// OK
CASE ::type == XBPSTATIC_TYPE_RAISEDLINE
::oWidget := QFrame():new( ::pParent )
::oWidget := QFrame( ::pParent )
//IF ::aPos[ 1 ] + ::aSize[ 1 ] >= ::aPos[ 2 ] + ::aSize[ 2 ]
IF ::aSize[ 1 ] >= ::aSize[ 2 ]
::oWidget:setFrameStyle( QFrame_HLine + QFrame_Raised )
@@ -210,7 +210,7 @@ METHOD XbpStatic:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
ENDIF
// OK
CASE ::type == XBPSTATIC_TYPE_RECESSEDLINE
::oWidget := QFrame():new( ::pParent )
::oWidget := QFrame( ::pParent )
//IF ::aPos[ 1 ] + ::aSize[ 1 ] >= ::aPos[ 2 ] + ::aSize[ 2 ]
IF ::aSize[ 1 ] >= ::aSize[ 2 ]
::oWidget:setFrameStyle( QFrame_HLine + QFrame_Sunken )
@@ -222,17 +222,17 @@ METHOD XbpStatic:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
ENDIF
CASE ::type == XBPSTATIC_TYPE_ICON
::oWidget := QLabel():new( ::pParent )
::oWidget := QLabel( ::pParent )
CASE ::type == XBPSTATIC_TYPE_SYSICON
::oWidget := QLabel():new( ::pParent )
::oWidget := QLabel( ::pParent )
CASE ::type == XBPSTATIC_TYPE_BITMAP
//::oWidget := QFrame():new( ::pParent )
::oWidget := QLabel():new( ::pParent )
//::oWidget := QFrame( ::pParent )
::oWidget := QLabel( ::pParent )
OTHERWISE
::oWidget := QFrame():new( ::pParent )
::oWidget := QFrame( ::pParent )
ENDCASE
@@ -365,7 +365,7 @@ METHOD XbpStatic:setCaption( xCaption, cDll )
IF ::options == XBPSTATIC_BITMAP_SCALED
::oWidget:setScaledContents( .t. )
ENDIF
::oWidget:setPixmap( QPixmap():new():fromImage( ::caption:oWidget ) )
::oWidget:setPixmap( QPixmap():fromImage( ::caption:oWidget ) )
ELSEIF hb_isChar( ::caption ) /* $HARBOUR$ */
IF ::options == XBPSTATIC_BITMAP_SCALED
@@ -376,13 +376,13 @@ METHOD XbpStatic:setCaption( xCaption, cDll )
ENDIF
CASE ::type == XBPSTATIC_TYPE_ICON
::oWidget:setPixmap( QPixmap():new( ::caption ):scaled( ::aSize[ 1 ], ::aSize[ 2 ] ) )
::oWidget:setPixmap( QPixmap( ::caption ):scaled( ::aSize[ 1 ], ::aSize[ 2 ] ) )
CASE ::type == XBPSTATIC_TYPE_SYSICON
oPixmap := QPixmap()
oIcon := QIcon()
oStyle := QStyle()
oStyle:pPtr := QApplication():new():style()
oStyle:pPtr := QApplication():style()
DO CASE
CASE ::caption == XBPSTATIC_SYSICON_ICONINFORMATION

View File

@@ -123,7 +123,7 @@ METHOD XbpStatusBar:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible
ENDIF
::oParent := oPar
::oWidget := QStatusBar():new()
::oWidget := QStatusBar()
::oParent:oWidget:setStatusBar( ::oWidget )
::oWidget:setSizeGripEnabled( ::sizeGrip )
@@ -359,7 +359,7 @@ METHOD XbpStatusBarPanel:create( cCaption, nStyle, cKey )
::key := cKey
// take care of nStyle - later - label right now
::oWidget := QLabel():new()
::oWidget := QLabel()
RETURN Self

View File

@@ -135,7 +135,7 @@ METHOD XbpTabPage:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
oPar := ::oParent:oTabWidget
::oWidget := QWidget():new()
::oWidget := QWidget()
::oWidget:setContextMenuPolicy( Qt_CustomContextMenu )
::oWidget:setObjectName( "Tab_Page" )
@@ -281,7 +281,7 @@ METHOD XbpTabWidget:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oWidget := QTabWidget():new( ::pParent )
::oWidget := QTabWidget( ::pParent )
::oWidget:setContextMenuPolicy( Qt_CustomContextMenu )
::oWidget:setObjectName( "Tab_Widget" )
@@ -320,7 +320,7 @@ METHOD XbpTabWidget:execSlot( cSlot, p )
IF hb_isPointer( p )
qPoint := QPoint():from( ::oWidget:mapToGlobal( p ) )
qApp := QApplication():new()
qApp := QApplication()
pWidget := QWidget():from( qApp:widgetAt( qPoint ) )
iIndex := ascan( ::aChildren, {|o| hbqt_IsEqualGcQtPointer( o:oWidget:pPtr, pWidget:pPtr ) } ) - 1
HB_TRACE( HB_TR_DEBUG, "iIndex", iIndex, pWidget:objectName() )

View File

@@ -152,13 +152,13 @@ METHOD XbpToolbar:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
ENDIF
::oParent := oPar
::oWidget := QToolBar():new( ::oParent:oWidget )
::oWidget := QToolBar( ::oParent:oWidget )
::oWidget:setObjectName( "XBPTOOLBARMAIN" )
::oWidget:setWindowTitle( "Toolbar: Main" )
::oParent:oWidget:addToolBar_1( ::oWidget )
IF ::imageWidth > 0 .and. ::imageHeight > 0
::oWidget:setIconSize( QSize():new( ::imageWidth, ::imageHeight ) )
::oWidget:setIconSize( QSize( ::imageWidth, ::imageHeight ) )
ENDIF
#if 0
@@ -269,7 +269,7 @@ METHOD XbpToolbar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS
ELSE
/* Create an action */
oBtn:oAction := QAction():new( ::oWidget )
oBtn:oAction := QAction( ::oWidget )
oBtn:oAction:setText( cCaption )
IF valtype( xImage ) == "C" .and. hb_FileExists( xImage )

View File

@@ -135,7 +135,7 @@ METHOD XbpTreeView:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oWidget := QTreeWidget():new( ::pParent )
::oWidget := QTreeWidget( ::pParent )
::oWidget:setMouseTracking( .t. )
::oWidget:setColumnCount( 1 )
::oWidget:setHeaderHidden( .t. )
@@ -390,7 +390,7 @@ METHOD XbpTreeViewItem:addItem( xItem, xNormalImage, xMarkedImage, xExpandedImag
IF valtype( xItem ) == 'C'
oItem := XbpTreeViewItem():New()
oItem:caption := xItem
oItem:oWidget := QTreeWidgetItem():new()
oItem:oWidget := QTreeWidgetItem()
oItem:oWidget:setText( 0, oItem:caption )
ELSE
oItem := xItem // aNode
@@ -430,7 +430,7 @@ METHOD XbpTreeViewItem:new()
METHOD XbpTreeViewItem:create()
::oWidget := QTreeWidgetItem():new()
::oWidget := QTreeWidgetItem()
::oWidget:setText( 0,::caption )
RETURN Self

View File

@@ -857,7 +857,7 @@ METHOD XbpWindow:lockUpdate()
/*----------------------------------------------------------------------*/
STATIC FUNCTION Xbp_RgbToName( nRgb )
LOCAL oColor := QColor():new( nRGB )
LOCAL oColor := QColor( nRGB )
LOCAL cName := oColor:name
RETURN '#'+substr( cName,6 ) + substr( cName,4,2 ) + substr( cName,2,2 )
@@ -911,16 +911,16 @@ METHOD XbpWindow:setColorFG( nRGB )
DO CASE
CASE cClass $ 'XBPPUSHBUTTON,XBPMENUBAR,XBPMENU,XBPTOOLBAR,XBPTABPAGE'
::oPalette:setColor( QPalette_ButtonText, QColor():new( nRGB ) )
::oPalette:setColor( QPalette_ButtonText, QColor( nRGB ) )
OTHERWISE
::oPalette:setColor( QPalette_Foreground, QColor():new( nRGB ) )
::oPalette:setColor( QPalette_Text , QColor():new( nRGB ) )
::oPalette:setColor( QPalette_Foreground, QColor( nRGB ) )
::oPalette:setColor( QPalette_Text , QColor( nRGB ) )
ENDCASE
::oWidget:setPalette( ::oPalette )
ENDIF
LOCAL oColor := QColor():new( nRGB )
LOCAL oColor := QColor( nRGB )
Xbp_SetPresParam( ::aPresParams, XBP_PP_FGCLR, nRGB )
::setStyleSheet( "color: "+ oColor:name +";" )
RETURN Self
@@ -1027,66 +1027,66 @@ METHOD XbpWindow:setPointer( cDllName, xResID, nType )
CASE xResID == XBPSTATIC_SYSICON_DEFAULT // Default mouse pointer
CASE xResID == XBPSTATIC_SYSICON_ARROW // Normal arrow
::oWidget:setCursor( QCursor():new( Qt_ArrowCursor ) )
::oWidget:setCursor( QCursor( Qt_ArrowCursor ) )
CASE xResID == XBPSTATIC_SYSICON_WAIT // Hour glass or clock
::oWidget:setCursor( QCursor():new( Qt_WaitCursor ) )
::oWidget:setCursor( QCursor( Qt_WaitCursor ) )
CASE xResID == XBPSTATIC_SYSICON_MOVE // Move the window
::oWidget:setCursor( QCursor():new( Qt_OpenHandCursor ) )
::oWidget:setCursor( QCursor( Qt_OpenHandCursor ) )
CASE xResID == XBPSTATIC_SYSICON_SIZE // Change size (all directions)
::oWidget:setCursor( QCursor():new( Qt_SizeAllCursor ) )
::oWidget:setCursor( QCursor( Qt_SizeAllCursor ) )
CASE xResID == XBPSTATIC_SYSICON_SIZENWSE // Change size (North west-South east)
::oWidget:setCursor( QCursor():new( Qt_SizeFDiagCursor ) )
::oWidget:setCursor( QCursor( Qt_SizeFDiagCursor ) )
CASE xResID == XBPSTATIC_SYSICON_SIZENESW // Change size (North east-South west)
::oWidget:setCursor( QCursor():new( Qt_SizeBDiagCursor ) )
::oWidget:setCursor( QCursor( Qt_SizeBDiagCursor ) )
CASE xResID == XBPSTATIC_SYSICON_SIZEWE // Change size (West-East)
::oWidget:setCursor( QCursor():new( Qt_SizeHorCursor ) )
::oWidget:setCursor( QCursor( Qt_SizeHorCursor ) )
CASE xResID == XBPSTATIC_SYSICON_SIZENS // Change size (North-South)
::oWidget:setCursor( QCursor():new( Qt_SizeVerCursor ) )
::oWidget:setCursor( QCursor( Qt_SizeVerCursor ) )
/* Possible Harbour-QT extensions - #deines yet to be finalized */
CASE xResID == Qt_UpArrowCursor
::oWidget:setCursor( QCursor():new( Qt_UpArrowCursor ) )
::oWidget:setCursor( QCursor( Qt_UpArrowCursor ) )
CASE xResID == Qt_CrossCursor
::oWidget:setCursor( QCursor():new( Qt_CrossCursor ) )
::oWidget:setCursor( QCursor( Qt_CrossCursor ) )
CASE xResID == Qt_IBeamCursor
::oWidget:setCursor( QCursor():new( Qt_IBeamCursor ) )
::oWidget:setCursor( QCursor( Qt_IBeamCursor ) )
CASE xResID == Qt_BlankCursor
::oWidget:setCursor( QCursor():new( Qt_BlankCursor ) )
::oWidget:setCursor( QCursor( Qt_BlankCursor ) )
CASE xResID == Qt_SplitVCursor
::oWidget:setCursor( QCursor():new( Qt_SplitVCursor ) )
::oWidget:setCursor( QCursor( Qt_SplitVCursor ) )
CASE xResID == Qt_SplitHCursor
::oWidget:setCursor( QCursor():new( Qt_SplitHCursor ) )
::oWidget:setCursor( QCursor( Qt_SplitHCursor ) )
CASE xResID == Qt_PointingHandCursor
::oWidget:setCursor( QCursor():new( Qt_PointingHandCursor ) )
::oWidget:setCursor( QCursor( Qt_PointingHandCursor ) )
CASE xResID == Qt_ForbiddenCursor
::oWidget:setCursor( QCursor():new( Qt_ForbiddenCursor ) )
::oWidget:setCursor( QCursor( Qt_ForbiddenCursor ) )
CASE xResID == Qt_ClosedHandCursor
::oWidget:setCursor( QCursor():new( Qt_ClosedHandCursor ) )
::oWidget:setCursor( QCursor( Qt_ClosedHandCursor ) )
CASE xResID == Qt_WhatsThisCursor
::oWidget:setCursor( QCursor():new( Qt_WhatsThisCursor ) )
::oWidget:setCursor( QCursor( Qt_WhatsThisCursor ) )
CASE xResID == Qt_BusyCursor
::oWidget:setCursor( QCursor():new( Qt_BusyCursor ) )
::oWidget:setCursor( QCursor( Qt_BusyCursor ) )
CASE xResID == Qt_BitmapCursor
::oWidget:setCursor( QCursor():new( Qt_BitmapCursor ) )
::oWidget:setCursor( QCursor( Qt_BitmapCursor ) )
ENDCASE
@@ -1094,9 +1094,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( QCursor():new( "QPixmap", QPixmap():new( xResID ) ) )
::oWidget:setCursor( QCursor( "QPixmap", QPixmap( xResID ) ) )
#else
::oWidget:setCursor( QCursor():new( "QPixmap", QPixmap():new( xResID ):scaled( 24,24 ) ) )
::oWidget:setCursor( QCursor( "QPixmap", QPixmap( xResID ):scaled( 24,24 ) ) )
#endif
ENDIF
ENDIF
@@ -1693,13 +1693,13 @@ METHOD XbpWindow:hbLayout( nTypeLayout )
ENDIF
DO CASE
CASE ::nLayout == HBPLAYOUT_TYPE_HORZBOX
::qLayout := QHBoxLayout():new()
::qLayout := QHBoxLayout()
CASE ::nLayout == HBPLAYOUT_TYPE_VERTBOX
::qLayout := QVBoxLayout():new()
::qLayout := QVBoxLayout()
CASE ::nLayout == HBPLAYOUT_TYPE_GRID
::qLayout := QGridLayout():new()
::qLayout := QGridLayout()
CASE ::nLayout == HBPLAYOUT_TYPE_FORM
::qLayout := QFormLayout():new()
::qLayout := QFormLayout()
ENDCASE
::oWidget:setLayout( ::qLayout )
FOR EACH oXbp IN ::aChildren