2012-06-04 13:57 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbxbp/xbpbrowse.prg
  * contrib/hbxbp/xbpcombobox.prg
  * contrib/hbxbp/xbpcrt.prg
  * contrib/hbxbp/xbpdialog.prg
  * contrib/hbxbp/xbpfiledialog.prg
  * contrib/hbxbp/xbpmenubar.prg
  * contrib/hbxbp/xbppushbutton.prg
  * contrib/hbxbp/xbptoolbar.prg
  * contrib/hbxbp/xbptreeview.prg
  * contrib/hbxbp/xbpwindow.prg
    ! Changed: QIcon() specific calls respecting latest changes in hbQT.
This commit is contained in:
Pritpal Bedi
2012-06-04 21:00:11 +00:00
parent e350128439
commit e597bb84b4
11 changed files with 36 additions and 19 deletions

View File

@@ -16,6 +16,19 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-06-04 13:57 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbxbp/xbpbrowse.prg
* contrib/hbxbp/xbpcombobox.prg
* contrib/hbxbp/xbpcrt.prg
* contrib/hbxbp/xbpdialog.prg
* contrib/hbxbp/xbpfiledialog.prg
* contrib/hbxbp/xbpmenubar.prg
* contrib/hbxbp/xbppushbutton.prg
* contrib/hbxbp/xbptoolbar.prg
* contrib/hbxbp/xbptreeview.prg
* contrib/hbxbp/xbpwindow.prg
! Changed: QIcon() specific calls respecting latest changes in hbQT.
2012-06-04 13:34 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/hbmk2_qt.hb
! Guarded: qth_is_QObject() function under __HBQT_REVAMP__.

View File

@@ -365,7 +365,7 @@ PROTECTED:
DATA oDbfModel
DATA oModelIndex INIT QModelIndex()
DATA oVHeaderView
DATA oHeaderView INIT QHeaderView()
DATA oHeaderView
DATA oVScrollBar INIT QScrollBar()
DATA oHScrollBar INIT QScrollBar()
DATA oViewport INIT QWidget()
@@ -1062,7 +1062,8 @@ METHOD XbpBrowse:manageMouseWheel( oWheelEvent )
/*----------------------------------------------------------------------*/
METHOD XbpBrowse:manageMousePress( oMouseEvent )
HB_TRACE( HB_TR_DEBUG, __objGetClsName( oMouseEvent ), valtype( oMouseEvent:pos() ), ProcName( 1 ), procName( 2 ), ProcName( 3 ) )
::oModelIndex := ::oTableView:indexAt( oMouseEvent:pos() )
IF ::oModelIndex:isValid() /* Reposition the record pointer */
SetAppEvent( xbeBRW_Navigate, XBPBRW_Navigate_Skip, ( ::oModelIndex:row() + 1 ) - ::rowPos, Self )
@@ -1842,6 +1843,8 @@ METHOD XbpBrowse:doConfigure()
nwVal := oFontMetrics:width( xVal, -1 )
nwHead := oFontMetrics:width( ::columns[ i ]:heading(), -1 )
::columns[ i ]:nColWidth := max( nwVal, nwHead ) + 8
::oHeaderView:resizeSection( i-1, max( nwVal, nwHead ) + 8 )
::oFooterView:resizeSection( i-1, max( nwVal, nwHead ) + 8 )

View File

@@ -91,7 +91,7 @@ CLASS XbpComboBox INHERIT XbpWindow
METHOD sleSize() VIRTUAL // -> aOldSize
METHOD addItem( cItem ) INLINE ::oWidget:addItem( cItem )
METHOD setIcon( nItem,cIcon ) INLINE ::oWidget:setItemIcon( nItem-1,cIcon )
METHOD setIcon( nItem,cIcon ) INLINE ::oWidget:setItemIcon( nItem-1, QIcon( cIcon ) )
#if 0
METHOD clear() INLINE ::oStrList:clear(),;

View File

@@ -307,7 +307,7 @@ METHOD XbpCrt:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oWidget:setTooltip( ::toolTipText )
ENDIF
IF hb_isChar( ::icon )
::oWidget:setWindowIcon( ::icon )
::oWidget:setWindowIcon( QIcon( ::icon ) )
ENDIF
IF ::lModal

View File

@@ -210,7 +210,7 @@ METHOD XbpDialog:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oWidget:setWindowTitle( ::title )
ENDIF
IF hb_isChar( ::icon )
::oWidget:setWindowIcon( ::icon )
::oWidget:setWindowIcon( QIcon( ::icon ) )
ENDIF
::setPosAndSize()
@@ -274,9 +274,9 @@ METHOD XbpDialog:destroy()
::oWidget:disconnect( QEvent_WindowActivate )
::oWidget:disconnect( QEvent_WindowDeactivate )
IF !empty( ::oEventLoop )
hbxbp_SetEventLoop( NIL )
IF ! empty( ::oEventLoop )
::oEventLoop:exit( 0 )
hbxbp_SetEventLoop( NIL )
::oEventLoop := NIL
ENDIF
::oMenu := NIL
@@ -288,7 +288,7 @@ METHOD XbpDialog:destroy()
::oMdi := NIL
ENDIF
RETURN Self
RETURN NIL
/*----------------------------------------------------------------------*/

View File

@@ -133,7 +133,7 @@ METHOD XbpFileDialog:create( oParent, oOwner, aPos )
METHOD XbpFileDialog:_destroy()
HB_TRACE( HB_TR_DEBUG, "XbpFileDialog:_destroy()" )
//__hbqt_destroy( ::oWidget )
__hbqt_destroy( ::oWidget )
RETURN ::destroy()
/*----------------------------------------------------------------------*/

View File

@@ -276,7 +276,7 @@ METHOD xbpMenuBar:placeItem( xCaption, bAction, nStyle, nAttrb, nMode, nPos )
ENDIF
oAction:setText( cCaption )
IF hb_FileExists( cIcon )
oAction:setIcon( cIcon )
oAction:setIcon( QIcon( cIcon ) )
ENDIF
IF !empty( cKey )
oKey := QKeySequence( cKey )

View File

@@ -227,7 +227,7 @@ METHOD XbpPushButton:setCaption( xCaption, cDll )
::caption := xCaption
IF hb_FileExists( xCaption )
::oWidget:setIcon( xCaption )
::oWidget:setIcon( QIcon( xCaption ) )
ELSE
::oWidget:setText( xCaption )
ENDIF

View File

@@ -258,7 +258,7 @@ METHOD XbpToolbar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS
oBtn:oAction:setText( cCaption )
IF valtype( xImage ) == "C"
oBtn:oAction:setIcon( xImage )
oBtn:oAction:setIcon( QIcon( xImage ) )
ENDIF
ENDIF

View File

@@ -164,7 +164,7 @@ METHOD XbpTreeView:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF ::visible
::show()
ENDIF
::oParent:AddChild( SELF )
::oParent:AddChild( Self )
::postCreate()
RETURN Self
@@ -172,7 +172,7 @@ METHOD XbpTreeView:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
/*----------------------------------------------------------------------*/
METHOD XbpTreeView:execSlot( cSlot, p )
LOCAL n, qPt, qItem, oItem, qPos
LOCAL n, qPt, qItem, oItem
IF ( n := ascan( ::aItems, {|o| iif( empty( o ), .f., hbqt_IsEqual( o:oWidget, p ) ) } ) ) > 0
oItem := ::aItems[ n ]
@@ -191,10 +191,9 @@ METHOD XbpTreeView:execSlot( cSlot, p )
::oWidget:setToolTip( iif( empty( oItem:tooltipText ), oItem:caption, oItem:tooltipText ) )
CASE cSlot == "customContextMenuRequested(QPoint)"
IF HB_ISBLOCK( ::hb_contextMenu )
qPos := QPoint( p )
IF ( qItem := ::oWidget:itemAt( qPos ) ):hasValidPointer()
IF ! empty( qItem := ::oWidget:itemAt( p ) )
IF ( n := ascan( ::aItems, {|o| hbqt_IsEqual( o:oWidget, qItem ) } ) ) > 0
qPt := ::oWidget:mapToGlobal( QPoint( p ) )
qPt := ::oWidget:mapToGlobal( p )
eval( ::hb_contextMenu, { qPt:x(), qPt:y() }, NIL, ::aItems[ n ] )
ENDIF
ENDIF
@@ -472,7 +471,7 @@ METHOD XbpTreeViewItem:setExpandedImage( nResIdoBitmap )
METHOD XbpTreeViewItem:setImage( xIcon )
::oWidget:setIcon( 0, xIcon )
::oWidget:setIcon( 0, iif( hb_isChar( xIcon ), QIcon( xIcon ), xIcon ) )
RETURN self

View File

@@ -506,7 +506,7 @@ METHOD XbpWindow:destroy()
ENDIF
::oWidget := NIL
HB_TRACE( HB_TR_DEBUG, "DESTROYED", __objGetClsName( Self ) )
RETURN NIL
/*----------------------------------------------------------------------*/
@@ -565,6 +565,8 @@ METHOD XbpWindow:clearSlots()
METHOD XbpWindow:grabEvent( nEvent, oEvent )
LOCAL nXbpKey, oP0, oP1, oObj_O, oObj_N
HB_TRACE( HB_TR_DEBUG, nEvent, valtype( oEvent ), __objGetClsName( oEvent ) )
SWITCH ( nEvent )
CASE QEvent_MouseMove // :motion()