diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1841a7b2a5..88e4e72b5f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,27 @@ The license applies to all entries newer than 2009-04-28. */ +2012-06-04 14:02 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbide/hbqreportsmanager.prg + * contrib/hbide/hbqtoolbar.prg + * contrib/hbide/ideactions.prg + * contrib/hbide/idebrowse.prg + * contrib/hbide/idechangelog.prg + * contrib/hbide/idedocks.prg + * contrib/hbide/idedocwriter.prg + * contrib/hbide/ideeditor.prg + * contrib/hbide/idefindreplace.prg + * contrib/hbide/ideharbourhelp.prg + * contrib/hbide/idemain.prg + * contrib/hbide/idemisc.prg + * contrib/hbide/ideprojmanager.prg + * contrib/hbide/idesaveload.prg + * contrib/hbide/ideshortcuts.prg + * contrib/hbide/idetools.prg + * contrib/hbide/ideuisrcmanager.prg + ! Changed: QIcon() specific calls respecting latest changes in hbQT. + * Optimized some code to respond to old and __HBQT_REVAMP__ proto. + 2012-06-04 14:00 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/tests/demoqt.prg * contrib/hbqt/tests/signalslots.prg diff --git a/harbour/contrib/hbide/hbqreportsmanager.prg b/harbour/contrib/hbide/hbqreportsmanager.prg index a3bf067cb1..2024b7f69c 100644 --- a/harbour/contrib/hbide/hbqreportsmanager.prg +++ b/harbour/contrib/hbide/hbqreportsmanager.prg @@ -1054,7 +1054,7 @@ METHOD HbqReportsManager:updateObjectsTree( cType, cParent, cName, cSubType ) DO CASE CASE cType == "ReportName" qItem := QTreeWidgetItem() ; qItem:setText( 0, cName ) - qItem:setIcon( 0, app_image( "r-report" ) ) + qItem:setIcon( 0, QIcon( app_image( "r-report" ) ) ) ::qTreeObjects:addTopLevelItem( qItem ) ::hObjTree[ cName ] := qItem qItem:setExpanded( .t. ) @@ -1072,11 +1072,11 @@ METHOD HbqReportsManager:updateObjectsTree( cType, cParent, cName, cSubType ) ::hObjTree[ cName ] := qItem IF cType == "Page" - qItem:setIcon( 0, app_image( "r-page" ) ) + qItem:setIcon( 0, QIcon( app_image( "r-page" ) ) ) ELSEIF cType == "Object" - qItem:setIcon( 0, ::getImageOfType( cSubType ) ) + qItem:setIcon( 0, QIcon( ::getImageOfType( cSubType ) ) ) ELSEIF cType == "Field" - qItem:setIcon( 0, ::getImageOfType( "Field" ) ) + qItem:setIcon( 0, QIcon( ::getImageOfType( "Field" ) ) ) ENDIF qParent:setExpanded( .t. ) diff --git a/harbour/contrib/hbide/hbqtoolbar.prg b/harbour/contrib/hbide/hbqtoolbar.prg index e60e98af4b..98180ae635 100644 --- a/harbour/contrib/hbide/hbqtoolbar.prg +++ b/harbour/contrib/hbide/hbqtoolbar.prg @@ -298,7 +298,7 @@ METHOD HbqToolbar:addToolButton( cName, cDesc, cImage, bAction, lCheckable, lDra oButton := QToolButton() // ::oWidget ) oButton:setObjectName( cName ) oButton:setTooltip( cDesc ) - oButton:setIcon( cImage ) + oButton:setIcon( QIcon( cImage ) ) oButton:setCheckable( lCheckable ) oButton:setFocusPolicy( Qt_NoFocus ) diff --git a/harbour/contrib/hbide/ideactions.prg b/harbour/contrib/hbide/ideactions.prg index 78f263fecc..7427220626 100644 --- a/harbour/contrib/hbide/ideactions.prg +++ b/harbour/contrib/hbide/ideactions.prg @@ -144,7 +144,7 @@ METHOD IdeActions:buildActions() qAction:setCheckable( iif( empty( a_[ ACT_CHECKABLE ] ), .F., upper( a_[ ACT_CHECKABLE ] ) == "YES" ) ) qAction:setText( strtran( a_[ ACT_TEXT ], "~", "&" ) ) IF !empty( a_[ ACT_IMAGE ] ) - qAction:setIcon( hbide_image( a_[ ACT_IMAGE ] ) ) + qAction:setIcon( QIcon( hbide_image( a_[ ACT_IMAGE ] ) ) ) ENDIF #if 0 @@ -384,7 +384,7 @@ METHOD IdeActions:buildMainMenu() oSubMenu2:addItem( { ::getAction( "New" ), {|| oIde:execAction( "New" ) } } ) oSubMenu2:addItem( { ::getAction( "NewProject" ), {|| oIde:execAction( "NewProject" ) } } ) oMenuBar:addItem( { oSubMenu2, _T( "~New" ) } ) - oMenuBar:aMenuItems[ oMenuBar:numItems(), 2 ]:setIcon( oIde:resPath + 'new.png' ) + oMenuBar:aMenuItems[ oMenuBar:numItems(), 2 ]:setIcon( QIcon( oIde:resPath + 'new.png' ) ) oSubMenu:addItem( { ::getAction( "Open" ), {|| oIde:execAction( "Open" ) } } ) oSubMenu:addItem( { ::getAction( "LoadProject" ), {|| oIde:execAction( "LoadProject" ) } } ) diff --git a/harbour/contrib/hbide/idebrowse.prg b/harbour/contrib/hbide/idebrowse.prg index 0bbdbce268..a6f302494f 100644 --- a/harbour/contrib/hbide/idebrowse.prg +++ b/harbour/contrib/hbide/idebrowse.prg @@ -123,8 +123,6 @@ CLASS IdeBrowseManager INHERIT IdeObject DATA aStatusPnls INIT {} DATA aPanels INIT {} - DATA aToolBtns INIT {} - DATA aButtons INIT {} DATA aIndexAct INIT {} DATA aRdds INIT { "DBFCDX", "DBFNTX", "DBFNSX" } DATA aConxns INIT {} @@ -261,7 +259,7 @@ METHOD IdeBrowseManager:create( oIde ) /*----------------------------------------------------------------------*/ METHOD IdeBrowseManager:destroy() - LOCAL oPanel, qDock, qAct, qBtn + LOCAL oPanel, qDock, qAct ::qRddCombo:disconnect( "currentIndexChanged(QString)" ) ::qTablesButton:disconnect( "clicked()" ) @@ -300,11 +298,6 @@ METHOD IdeBrowseManager:destroy() qAct := NIL NEXT - FOR EACH qBtn IN ::aToolBtns - qBtn:disconnect( "clicked()" ) - qBtn := NIL - NEXT - FOR EACH oPanel IN ::aPanels oPanel:destroy() NEXT @@ -323,8 +316,6 @@ METHOD IdeBrowseManager:destroy() ::qTimer := NIL ::aStatusPnls := NIL ::aPanels := NIL - ::aToolBtns := NIL - ::aButtons := NIL ::aIndexAct := NIL ::aRdds := NIL ::aConxns := NIL @@ -536,7 +527,7 @@ METHOD IdeBrowseManager:addPanelsMenu( cPanel ) LOCAL qAct IF hb_isObject( ::qPanelsMenu ) qAct := ::qPanelsMenu:addAction( cPanel ) - qAct:setIcon( hbide_image( "panel_7" ) ) + qAct:setIcon( QIcon( hbide_image( "panel_7" ) ) ) qAct:connect( "triggered(bool)", {|| ::setPanel( cPanel ) } ) aadd( ::aPanelsAct, qAct ) ENDIF @@ -597,10 +588,10 @@ METHOD IdeBrowseManager:execEvent( cEvent, p, p1 ) IF !empty( ::oCurBrw ) IF ::oCurBrw:qScrollArea:isHidden() ::oCurBrw:qScrollArea:show() - ::aToolBtns[ 3 ]:setChecked( .t. ) + ::qToolBar:setItemChecked( "Toggle", .t. ) ELSE ::oCurBrw:qScrollArea:hide() - ::aToolBtns[ 3 ]:setChecked( .f. ) + ::qToolBar:setItemChecked( "Toggle", .f. ) ENDIF ENDIF EXIT @@ -1076,7 +1067,7 @@ METHOD IdeBrowseManager:buildPanelsButton() ::qPanelsButton := QToolButton() ::qPanelsButton:setTooltip( "ideDBU Panels" ) - ::qPanelsButton:setIcon( hbide_image( "panel_8" ) ) + ::qPanelsButton:setIcon( QIcon( hbide_image( "panel_8" ) ) ) ::qPanelsButton:setPopupMode( QToolButton_MenuButtonPopup ) ::qPanelsButton:setMenu( ::qPanelsMenu ) @@ -1125,7 +1116,7 @@ METHOD IdeBrowseManager:buildTablesButton() ::qTablesButton := QToolButton() ::qTablesButton:setTooltip( "Tables" ) - ::qTablesButton:setIcon( hbide_image( "database" ) ) + ::qTablesButton:setIcon( QIcon( hbide_image( "database" ) ) ) ::qTablesButton:setPopupMode( QToolButton_MenuButtonPopup ) ::qTablesButton:setMenu( ::qTablesMenu ) @@ -1144,7 +1135,7 @@ METHOD IdeBrowseManager:buildIndexButton() ::qIndexButton := QToolButton() ::qIndexButton:setTooltip( "Indexes" ) - ::qIndexButton:setIcon( hbide_image( "sort" ) ) + ::qIndexButton:setIcon( QIcon( hbide_image( "sort" ) ) ) ::qIndexButton:setPopupMode( QToolButton_MenuButtonPopup ) ::qIndexButton:setMenu( ::qIndexMenu ) @@ -1932,7 +1923,7 @@ METHOD IdeBrowse:buildMdiWindow() ::qMdi:setWindowTitle( ::cTable ) ::qMdi:setObjectName( hb_ntos( nID ) ) - ::qMdi:setWindowIcon( hbide_image( "dbf_p" + hb_ntos( ::nID ) ) ) + ::qMdi:setWindowIcon( QIcon( hbide_image( "dbf_p" + hb_ntos( ::nID ) ) ) ) IF ! empty( ::aInfo[ TBL_GEOMETRY ] ) qRect := hb_aTokens( ::aInfo[ TBL_GEOMETRY ], " " ) @@ -1993,7 +1984,7 @@ METHOD IdeBrowse:execEvent( cEvent, p, p1 ) ::dispInfo() ::populateForm() ::oManager:oCurBrw := Self - ::oManager:aToolBtns[ 3 ]:setChecked( ! ::qForm:isHidden() ) + ::oManager:qToolbar:setItemChecked( "Toggle", ! ::qForm:isHidden() ) EXIT CASE "browse_keyboard" diff --git a/harbour/contrib/hbide/idechangelog.prg b/harbour/contrib/hbide/idechangelog.prg index 81fcec6940..a057c28c57 100644 --- a/harbour/contrib/hbide/idechangelog.prg +++ b/harbour/contrib/hbide/idechangelog.prg @@ -128,14 +128,14 @@ METHOD IdeChangeLog:show() IF empty( ::oUI ) ::oUI := hbide_getUI( "changelog", ::oDlg:oWidget ) ::oUI:setWindowFlags( Qt_Sheet ) - ::oUI:setWindowIcon( hbide_image( "hbide" ) ) + ::oUI:setWindowIcon( QIcon( hbide_image( "hbide" ) ) ) - ::oUI:q_buttonOpen :setIcon( hbide_image( "dc_folder" ) ) - ::oUI:q_buttonNew :setIcon( hbide_image( "new" ) ) - ::oUI:q_buttonTitle :setIcon( hbide_image( "dc_plus" ) ) - ::oUI:q_buttonSource :setIcon( hbide_image( "dc_plus" ) ) - ::oUI:q_buttonDesc :setIcon( hbide_image( "dc_plus" ) ) - ::oUI:q_buttonSrcDesc :setIcon( hbide_image( "dc_plus" ) ) + ::oUI:q_buttonOpen :setIcon( QIcon( hbide_image( "dc_folder" ) ) ) + ::oUI:q_buttonNew :setIcon( QIcon( hbide_image( "new" ) ) ) + ::oUI:q_buttonTitle :setIcon( QIcon( hbide_image( "dc_plus" ) ) ) + ::oUI:q_buttonSource :setIcon( QIcon( hbide_image( "dc_plus" ) ) ) + ::oUI:q_buttonDesc :setIcon( QIcon( hbide_image( "dc_plus" ) ) ) + ::oUI:q_buttonSrcDesc :setIcon( QIcon( hbide_image( "dc_plus" ) ) ) ::oUI:q_buttonOpen :setToolTip( "Open a ChangeLog" ) ::oUI:q_buttonNew :setToolTip( "Create Empty ChangeLog" ) diff --git a/harbour/contrib/hbide/idedocks.prg b/harbour/contrib/hbide/idedocks.prg index 0e70984a3a..c53faf91e5 100644 --- a/harbour/contrib/hbide/idedocks.prg +++ b/harbour/contrib/hbide/idedocks.prg @@ -1279,7 +1279,7 @@ METHOD IdeDocks:buildViewWidget( cView ) qMdi := QMdiSubWindow() qMdi:setWindowTitle( cView ) qMdi:setObjectName( cView ) - qMdi:setWindowIcon( ::getPanelIcon( cView ) ) + qMdi:setWindowIcon( QIcon( ::getPanelIcon( cView ) ) ) oFrame := XbpWindow():new( ::oStackedWidget ) oFrame:oWidget := QWidget( ::oStackedWidget:oWidget ) @@ -1294,7 +1294,7 @@ METHOD IdeDocks:buildViewWidget( cView ) qTBtnClose := QToolButton() qTBtnClose:setTooltip( "Close Tab" ) qTBtnClose:setAutoRaise( .t. ) - qTBtnClose:setIcon( hbide_image( "closetab" ) ) + qTBtnClose:setIcon( QIcon( hbide_image( "closetab" ) ) ) qTBtnClose:connect( "clicked()", {|| ::oSM:closeSource() } ) oFrame:oTabWidget:qCornerWidget := qTBtnClose oFrame:oTabWidget:oWidget:setCornerWidget( qTBtnClose, Qt_TopRightCorner ) @@ -1402,7 +1402,7 @@ METHOD IdeDocks:buildToolBarPanels() ::qTBarDocks:addSeparator() ELSE qAct := a_[ 1 ]:oWidget:toggleViewAction() - qAct:setIcon( hbide_image( a_[ 2 ] ) ) + qAct:setIcon( QIcon( hbide_image( a_[ 2 ] ) ) ) ::qTBarDocks:addAction( a_[ 2 ], qAct ) ENDIF NEXT @@ -1488,13 +1488,13 @@ METHOD IdeDocks:buildProjectTree() ::oIde:oProjRoot := ::oProjTree:rootItem:addItem( "Projects" ) oItem := ::oProjRoot:addItem( "Executables" ) - oItem:oWidget:setIcon( 0, hbide_image( "fl_exe" ) ) + oItem:oWidget:setIcon( 0, QIcon( hbide_image( "fl_exe" ) ) ) aadd( ::aProjData, { oItem, "Executables", ::oProjRoot, NIL, NIL } ) oItem := ::oProjRoot:addItem( "Libs" ) - oItem:oWidget:setIcon( 0, hbide_image( "fl_lib" ) ) + oItem:oWidget:setIcon( 0, QIcon( hbide_image( "fl_lib" ) ) ) aadd( ::aProjData, { oItem, "Libs" , ::oProjRoot, NIL, NIL } ) oItem := ::oProjRoot:addItem( "Dlls" ) - oItem:oWidget:setIcon( 0, hbide_image( "fl_dll" ) ) + oItem:oWidget:setIcon( 0, QIcon( hbide_image( "fl_dll" ) ) ) aadd( ::aProjData, { oItem, "Dlls" , ::oProjRoot, NIL, NIL } ) ::oProjRoot:expand( .t. ) diff --git a/harbour/contrib/hbide/idedocwriter.prg b/harbour/contrib/hbide/idedocwriter.prg index dc1b882f06..08448c6a7e 100644 --- a/harbour/contrib/hbide/idedocwriter.prg +++ b/harbour/contrib/hbide/idedocwriter.prg @@ -229,23 +229,23 @@ METHOD IdeDocWriter:show() METHOD IdeDocWriter:setImages() - ::oUI:q_buttonLoadFromDocFile :setIcon( hbide_image( "load_3" ) ) - ::oUI:q_buttonLoadFromSource :setIcon( hbide_image( "load_2" ) ) - ::oUI:q_buttonLoadFromCurFunc :setIcon( hbide_image( "load_1" ) ) + ::oUI:q_buttonLoadFromDocFile :setIcon( QIcon( hbide_image( "load_3" ) ) ) + ::oUI:q_buttonLoadFromSource :setIcon( QIcon( hbide_image( "load_2" ) ) ) + ::oUI:q_buttonLoadFromCurFunc :setIcon( QIcon( hbide_image( "load_1" ) ) ) - ::oUI:q_buttonArgs :setIcon( hbide_image( "arguments" ) ) - ::oUI:q_buttonDesc :setIcon( hbide_image( "description" ) ) - ::oUI:q_buttonExamples :setIcon( hbide_image( "example" ) ) - ::oUI:q_buttonTests :setIcon( hbide_image( "tests" ) ) + ::oUI:q_buttonArgs :setIcon( QIcon( hbide_image( "arguments" ) ) ) + ::oUI:q_buttonDesc :setIcon( QIcon( hbide_image( "description" ) ) ) + ::oUI:q_buttonExamples :setIcon( QIcon( hbide_image( "example" ) ) ) + ::oUI:q_buttonTests :setIcon( QIcon( hbide_image( "tests" ) ) ) - ::oUI:q_buttonClear :setIcon( hbide_image( "clean" ) ) - ::oUI:q_buttonSaveInFunc :setIcon( hbide_image( "unload_1" ) ) - ::oUI:q_buttonSave :setIcon( hbide_image( "helpdoc" ) ) + ::oUI:q_buttonClear :setIcon( QIcon( hbide_image( "clean" ) ) ) + ::oUI:q_buttonSaveInFunc :setIcon( QIcon( hbide_image( "unload_1" ) ) ) + ::oUI:q_buttonSave :setIcon( QIcon( hbide_image( "helpdoc" ) ) ) - ::oUI:q_buttonCloseArgs :setIcon( hbide_image( "closetab" ) ) - ::oUI:q_buttonCloseDesc :setIcon( hbide_image( "closetab" ) ) - ::oUI:q_buttonCloseExamples :setIcon( hbide_image( "closetab" ) ) - ::oUI:q_buttonCloseTests :setIcon( hbide_image( "closetab" ) ) + ::oUI:q_buttonCloseArgs :setIcon( QIcon( hbide_image( "closetab" ) ) ) + ::oUI:q_buttonCloseDesc :setIcon( QIcon( hbide_image( "closetab" ) ) ) + ::oUI:q_buttonCloseExamples :setIcon( QIcon( hbide_image( "closetab" ) ) ) + ::oUI:q_buttonCloseTests :setIcon( QIcon( hbide_image( "closetab" ) ) ) RETURN Self diff --git a/harbour/contrib/hbide/ideeditor.prg b/harbour/contrib/hbide/ideeditor.prg index 07fba10c2b..c05df8b8f0 100644 --- a/harbour/contrib/hbide/ideeditor.prg +++ b/harbour/contrib/hbide/ideeditor.prg @@ -408,7 +408,7 @@ METHOD IdeEditsManager:addSourceInTree( cSourceFile, cView ) oItem := oParent:addItem( cFile + cExt ) oItem:tooltipText := cSourceFile - oItem:oWidget:setIcon( 0, ::oDK:getPanelIcon( cView ) ) + oItem:oWidget:setIcon( 0, QIcon( ::oDK:getPanelIcon( cView ) ) ) aadd( ::aProjData, { oItem, "Opened Source", oParent, ; cSourceFile, hbide_pathNormalized( cSourceFile ) } ) @@ -1388,7 +1388,7 @@ METHOD IdeEditor:create( oIde, cSourceFile, nPos, nHPos, nVPos, cTheme, cView, a ::qDocument:setModified( .f. ) ::qTabWidget:setTabIcon( ::qTabWidget:indexOf( ::oTab:oWidget ), ; - hbide_image( iif( ::lReadOnly, "tabreadonly", "tabunmodified" ) ) ) + QIcon( hbide_image( iif( ::lReadOnly, "tabreadonly", "tabunmodified" ) ) ) ) RETURN Self @@ -1643,7 +1643,7 @@ METHOD IdeEditor:setDocumentProperties() ::qEdit:document():setModified( .f. ) ::qTabWidget:setTabIcon( ::qTabWidget:indexOf( ::oTab:oWidget ), ; - hbide_image( iif( ::lReadOnly, "tabreadonly", "tabunmodified" ) ) ) + QIcon( hbide_image( iif( ::lReadOnly, "tabreadonly", "tabunmodified" ) ) ) ) ::lLoaded := .T. IF hb_isObject( ::qHiliter ) @@ -1790,7 +1790,7 @@ METHOD IdeEditor:setTabImage( qEdit ) ENDIF ENDIF - ::qTabWidget:setTabIcon( nIndex, hbide_image( cIcon ) ) + ::qTabWidget:setTabIcon( nIndex, QIcon( hbide_image( cIcon ) ) ) ::oDK:setStatusText( SB_PNL_MODIFIED, iif( lModified, "Modified", iif( lReadOnly, "ReadOnly", " " ) ) ) RETURN Self diff --git a/harbour/contrib/hbide/idefindreplace.prg b/harbour/contrib/hbide/idefindreplace.prg index 5c26bcfe6f..7f1674e5c5 100644 --- a/harbour/contrib/hbide/idefindreplace.prg +++ b/harbour/contrib/hbide/idefindreplace.prg @@ -138,23 +138,23 @@ METHOD IdeUpDown:create( oIde ) ::oUI:setWindowFlags( hb_bitOr( Qt_Tool, Qt_FramelessWindowHint ) ) ::oUI:setFocusPolicy( Qt_NoFocus ) - ::oUI:q_buttonPrev:setIcon( hbide_image( "go-prev" ) ) + ::oUI:q_buttonPrev:setIcon( QIcon( hbide_image( "go-prev" ) ) ) ::oUI:q_buttonPrev:setToolTip( "Find Previous" ) ::oUI:q_buttonPrev:connect( "clicked()", {|| ::execEvent( "buttonPrev_clicked" ) } ) // - ::oUI:q_buttonNext:setIcon( hbide_image( "go-next" ) ) + ::oUI:q_buttonNext:setIcon( QIcon( hbide_image( "go-next" ) ) ) ::oUI:q_buttonNext:setToolTip( "Find Next" ) ::oUI:q_buttonNext:connect( "clicked()", {|| ::execEvent( "buttonNext_clicked" ) } ) // - ::oUI:q_buttonFirst:setIcon( hbide_image( "go-first" ) ) + ::oUI:q_buttonFirst:setIcon( QIcon( hbide_image( "go-first" ) ) ) ::oUI:q_buttonFirst:setToolTip( "Find First" ) ::oUI:q_buttonFirst:connect( "clicked()", {|| ::execEvent( "buttonFirst_clicked" ) } ) // - ::oUI:q_buttonLast:setIcon( hbide_image( "go-last" ) ) + ::oUI:q_buttonLast:setIcon( QIcon( hbide_image( "go-last" ) ) ) ::oUI:q_buttonLast:setToolTip( "Find Last" ) ::oUI:q_buttonLast:connect( "clicked()", {|| ::execEvent( "buttonLast_clicked" ) } ) // - ::oUI:q_buttonAll:setIcon( hbide_image( "hilight-all" ) ) + ::oUI:q_buttonAll:setIcon( QIcon( hbide_image( "hilight-all" ) ) ) ::oUI:q_buttonAll:setToolTip( "Highlight All" ) ::oUI:q_buttonAll:connect( "clicked()", {|| ::execEvent( "buttonAll_clicked" ) } ) @@ -250,15 +250,15 @@ METHOD IdeSearchReplace:create( oIde ) ::oUI:q_frameFind:setStyleSheet( "" ) ::oUI:q_frameReplace:setStyleSheet( "" ) - ::oUI:q_buttonClose:setIcon( hbide_image( "closetab" ) ) + ::oUI:q_buttonClose:setIcon( QIcon( hbide_image( "closetab" ) ) ) ::oUI:q_buttonClose:setToolTip( "Close" ) ::oUI:q_buttonClose:connect( "clicked()", {|| ::oUI:hide() } ) - ::oUI:q_buttonNext:setIcon( hbide_image( "next" ) ) + ::oUI:q_buttonNext:setIcon( QIcon( hbide_image( "next" ) ) ) ::oUI:q_buttonNext:setToolTip( "Find Next" ) ::oUI:q_buttonNext:connect( "clicked()", {|| ::find( ::cFind ), ::oIde:manageFocusInEditor() } ) - ::oUI:q_buttonPrev:setIcon( hbide_image( "previous" ) ) + ::oUI:q_buttonPrev:setIcon( QIcon( hbide_image( "previous" ) ) ) ::oUI:q_buttonPrev:setToolTip( "Find Previous" ) ::oUI:q_buttonPrev:connect( "clicked()", {|| ::find( ::cFind, .t. ), ::oIde:manageFocusInEditor() } ) diff --git a/harbour/contrib/hbide/ideharbourhelp.prg b/harbour/contrib/hbide/ideharbourhelp.prg index 79f6c37dbd..55764bd37c 100644 --- a/harbour/contrib/hbide/ideharbourhelp.prg +++ b/harbour/contrib/hbide/ideharbourhelp.prg @@ -396,19 +396,19 @@ METHOD IdeHarbourHelp:clear() METHOD IdeHarbourHelp:setImages() LOCAL oUI := ::oUI - oUI:q_buttonHome :setIcon( hbide_image( "dc_home" ) ) - oUI:q_buttonBackward:setIcon( hbide_image( "dc_left" ) ) - oUI:q_buttonForward :setIcon( hbide_image( "dc_right" ) ) - oUI:q_buttonUp :setIcon( hbide_image( "dc_up" ) ) - oUI:q_buttonRefresh :setIcon( hbide_image( "dc_refresh" ) ) - oUI:q_buttonPrint :setIcon( hbide_image( "dc_print" ) ) - oUI:q_buttonPdf :setIcon( hbide_image( "dc_pdffile" ) ) - oUI:q_buttonPdfAll :setIcon( hbide_image( "dc_pdffile" ) ) + oUI:q_buttonHome :setIcon( QIcon( hbide_image( "dc_home" ) ) ) + oUI:q_buttonBackward:setIcon( QIcon( hbide_image( "dc_left" ) ) ) + oUI:q_buttonForward :setIcon( QIcon( hbide_image( "dc_right" ) ) ) + oUI:q_buttonUp :setIcon( QIcon( hbide_image( "dc_up" ) ) ) + oUI:q_buttonRefresh :setIcon( QIcon( hbide_image( "dc_refresh" ) ) ) + oUI:q_buttonPrint :setIcon( QIcon( hbide_image( "dc_print" ) ) ) + oUI:q_buttonPdf :setIcon( QIcon( hbide_image( "dc_pdffile" ) ) ) + oUI:q_buttonPdfAll :setIcon( QIcon( hbide_image( "dc_pdffile" ) ) ) - oUI:q_buttonSave :setIcon( hbide_image( "save" ) ) - oUI:q_buttonExit :setIcon( hbide_image( "dc_quit" ) ) + oUI:q_buttonSave :setIcon( QIcon( hbide_image( "save" ) ) ) + oUI:q_buttonExit :setIcon( QIcon( hbide_image( "dc_quit" ) ) ) - oUI:q_buttonInstall :setIcon( hbide_image( "dc_folder" ) ) + oUI:q_buttonInstall :setIcon( QIcon( hbide_image( "dc_folder" ) ) ) //oUI:q_buttonArgPlus:setIcon( hbide_image( "dc_plus" ) ) //oUI:q_buttonArgMinus:setIcon( hbide_image( "dc_delete" ) ) @@ -725,7 +725,7 @@ METHOD IdeHarbourHelp:refreshDocTree() oRoot := QTreeWidgetItem() oRoot:setText( 0, aPaths[ 1 ] ) - oRoot:setIcon( 0, hbide_image( "dc_home" ) ) + oRoot:setIcon( 0, QIcon( hbide_image( "dc_home" ) ) ) oRoot:setToolTip( 0, aPaths[ 1 ] ) oRoot:setExpanded( .t. ) @@ -749,7 +749,7 @@ METHOD IdeHarbourHelp:refreshDocTree() cTextFile := cFolder + a_[ 1 ] oChild := QTreeWidgetItem() oChild:setText( 0, a_[ 1 ] ) - oChild:setIcon( 0, ::resPath + "dc_textdoc.png" ) + oChild:setIcon( 0, QIcon( ::resPath + "dc_textdoc.png" ) ) oChild:setToolTip( 0, cTextFile ) oParent:addChild( oChild ) aadd( ::aNodes, { oChild, "File", oParent, cTextFile, a_[ 1 ] } ) @@ -799,7 +799,7 @@ STATIC FUNCTION hbide_buildFoldersTree( aNodes, aPaths ) oChild := QTreeWidgetItem() oChild:setText( 0, aSubs[ i ] ) - oChild:setIcon( 0, cIcon ) + oChild:setIcon( 0, QIcon( cIcon ) ) oChild:setToolTip( 0, cOSPath ) oParent:addChild( oChild ) @@ -1002,7 +1002,7 @@ METHOD IdeHarbourHelp:parseTextFile( cTextFile, oParent ) FOR EACH oFunc IN aFn oTWItem := QTreeWidgetItem() oTWItem:setText( 0, oFunc:cName ) - oTWItem:setIcon( 0, cIcon ) + oTWItem:setIcon( 0, QIcon( cIcon ) ) oTWItem:setTooltip( 0, oFunc:cName ) oParent:addChild( oTWItem ) aadd( ::aNodes, { oTWItem, "Function", oParent, cTextFile + "<::>" + oFunc:cName, oFunc:cName } ) diff --git a/harbour/contrib/hbide/idemain.prg b/harbour/contrib/hbide/idemain.prg index 0f512bd4f8..49091e95bb 100644 --- a/harbour/contrib/hbide/idemain.prg +++ b/harbour/contrib/hbide/idemain.prg @@ -1345,7 +1345,7 @@ METHOD HbIde:updateProjectTree( aPrj ) oSource := b_[ 3 ] oItem := oP:addItem( oSource:file + oSource:ext ) oItem:tooltipText := oSource:original - oItem:oWidget:setIcon( 0, hbide_image( hbide_imageForFileType( oSource:ext ) ) ) + oItem:oWidget:setIcon( 0, QIcon( hbide_image( hbide_imageForFileType( oSource:ext ) ) ) ) aadd( ::aProjData, { oItem, "Source File", oP, oSource:original, oProject:title } ) NEXT diff --git a/harbour/contrib/hbide/idemisc.prg b/harbour/contrib/hbide/idemisc.prg index 342bc3ec70..524200f979 100644 --- a/harbour/contrib/hbide/idemisc.prg +++ b/harbour/contrib/hbide/idemisc.prg @@ -157,28 +157,30 @@ FUNCTION hbide_execPopup( aPops, aqPos, qParent ) ELSEIF hb_isObject( aqPos ) qPoint := aqPos ENDIF - IF ( qAct := qPop:exec( qPoint ) ):hasValidPointer() - cAct := qAct:text() - FOR EACH a_ IN aPops - IF hb_isObject( a_[ 1 ] ) - IF a_[ 1 ]:text() == cAct - xRet := eval( aPops[ a_:__enumIndex(), 2 ] ) - EXIT - ENDIF - ELSEIF hb_isArray( a_[ 1 ] ) - FOR EACH b_ IN a_[ 1 ] - IF b_[ 1 ] == cAct - xRet := eval( b_[ 2 ], cAct ) + + IF __objGetClsName( qAct := qPop:exec( qPoint ) ) == "QACTION" + IF valtype( cAct := qAct:text() ) == "C" + FOR EACH a_ IN aPops + IF hb_isObject( a_[ 1 ] ) + IF a_[ 1 ]:text() == cAct + xRet := eval( aPops[ a_:__enumIndex(), 2 ] ) + EXIT + ENDIF + ELSEIF hb_isArray( a_[ 1 ] ) + FOR EACH b_ IN a_[ 1 ] + IF b_[ 1 ] == cAct + xRet := eval( b_[ 2 ], cAct ) + EXIT + ENDIF + NEXT + ELSE + IF a_[ 1 ] == cAct + xRet := eval( aPops[ a_:__enumIndex(), 2 ], cAct ) EXIT ENDIF - NEXT - ELSE - IF a_[ 1 ] == cAct - xRet := eval( aPops[ a_:__enumIndex(), 2 ], cAct ) - EXIT ENDIF - ENDIF - NEXT + NEXT + ENDIF ENDIF qPop := NIL HB_SYMBOL_UNUSED( xRet ) diff --git a/harbour/contrib/hbide/ideprojmanager.prg b/harbour/contrib/hbide/ideprojmanager.prg index d164e38b13..4537940360 100644 --- a/harbour/contrib/hbide/ideprojmanager.prg +++ b/harbour/contrib/hbide/ideprojmanager.prg @@ -824,18 +824,18 @@ METHOD IdeProjManager:buildInterface() cLukupPng := hbide_image( "folder" ) // - ::oUI:q_buttonChoosePrjLoc:setIcon( cLukupPng ) - ::oUI:q_buttonChooseWd :setIcon( cLukupPng ) - ::oUI:q_buttonChooseDest :setIcon( cLukupPng ) - ::oUI:q_buttonBackup :setIcon( cLukupPng ) + ::oUI:q_buttonChoosePrjLoc:setIcon( QIcon( cLukupPng ) ) + ::oUI:q_buttonChooseWd :setIcon( QIcon( cLukupPng ) ) + ::oUI:q_buttonChooseDest :setIcon( QIcon( cLukupPng ) ) + ::oUI:q_buttonBackup :setIcon( QIcon( cLukupPng ) ) - ::oUI:q_buttonSelect :setIcon( hbide_image( "open" ) ) - ::oUI:q_buttonUp :setIcon( hbide_image( "dc_up" ) ) - ::oUI:q_buttonDown :setIcon( hbide_image( "dc_down" ) ) + ::oUI:q_buttonSelect :setIcon( QIcon( hbide_image( "open" ) ) ) + ::oUI:q_buttonUp :setIcon( QIcon( hbide_image( "dc_up" ) ) ) + ::oUI:q_buttonDown :setIcon( QIcon( hbide_image( "dc_down" ) ) ) - ::oUI:q_buttonSort :setIcon( hbide_image( "sort" ) ) - ::oUI:q_buttonSortZA :setIcon( hbide_image( "sortdescend" ) ) - ::oUI:q_buttonSortOrg:setIcon( hbide_image( "invertcase" ) ) + ::oUI:q_buttonSort :setIcon( QIcon( hbide_image( "sort" ) ) ) + ::oUI:q_buttonSortZA :setIcon( QIcon( hbide_image( "sortdescend" ) ) ) + ::oUI:q_buttonSortOrg:setIcon( QIcon( hbide_image( "invertcase" ) ) ) ::oUI:q_buttonSort :hide() ::oUI:q_buttonSortZA :hide() diff --git a/harbour/contrib/hbide/idesaveload.prg b/harbour/contrib/hbide/idesaveload.prg index 0da354ee78..a8fa04288e 100644 --- a/harbour/contrib/hbide/idesaveload.prg +++ b/harbour/contrib/hbide/idesaveload.prg @@ -1163,42 +1163,42 @@ METHOD IdeSetup:eol() METHOD IdeSetup:setIcons() - ::oUI:q_buttonAddTextExt : setIcon( hbide_image( "dc_plus" ) ) - ::oUI:q_buttonDelTextExt : setIcon( hbide_image( "dc_delete" ) ) + ::oUI:q_buttonAddTextExt : setIcon( QIcon( hbide_image( "dc_plus" ) ) ) + ::oUI:q_buttonDelTextExt : setIcon( QIcon( hbide_image( "dc_delete" ) ) ) - ::oUI:q_buttonKeyAdd : setIcon( hbide_image( "dc_plus" ) ) - ::oUI:q_buttonKeyDel : setIcon( hbide_image( "dc_delete" ) ) - ::oUI:q_buttonKeyUp : setIcon( hbide_image( "dc_up" ) ) - ::oUI:q_buttonKeyDown : setIcon( hbide_image( "dc_down" ) ) + ::oUI:q_buttonKeyAdd : setIcon( QIcon( hbide_image( "dc_plus" ) ) ) + ::oUI:q_buttonKeyDel : setIcon( QIcon( hbide_image( "dc_delete" ) ) ) + ::oUI:q_buttonKeyUp : setIcon( QIcon( hbide_image( "dc_up" ) ) ) + ::oUI:q_buttonKeyDown : setIcon( QIcon( hbide_image( "dc_down" ) ) ) - /* Paths */ - ::oUI:q_buttonPathHrbRoot : setIcon( hbide_image( "open" ) ) - ::oUI:q_buttonPathHbmk2 : setIcon( hbide_image( "open" ) ) - ::oUI:q_buttonPathEnv : setIcon( hbide_image( "open" ) ) - ::oUI:q_buttonPathResources : setIcon( hbide_image( "open" ) ) - ::oUI:q_buttonPathTemp : setIcon( hbide_image( "open" ) ) - ::oUI:q_buttonPathShortcuts : setIcon( hbide_image( "open" ) ) - ::oUI:q_buttonPathSnippets : setIcon( hbide_image( "open" ) ) - ::oUI:q_buttonPathThemes : setIcon( hbide_image( "open" ) ) + /* Paths */ + ::oUI:q_buttonPathHrbRoot : setIcon( QIcon( hbide_image( "open" ) ) ) + ::oUI:q_buttonPathHbmk2 : setIcon( QIcon( hbide_image( "open" ) ) ) + ::oUI:q_buttonPathEnv : setIcon( QIcon( hbide_image( "open" ) ) ) + ::oUI:q_buttonPathResources : setIcon( QIcon( hbide_image( "open" ) ) ) + ::oUI:q_buttonPathTemp : setIcon( QIcon( hbide_image( "open" ) ) ) + ::oUI:q_buttonPathShortcuts : setIcon( QIcon( hbide_image( "open" ) ) ) + ::oUI:q_buttonPathSnippets : setIcon( QIcon( hbide_image( "open" ) ) ) + ::oUI:q_buttonPathThemes : setIcon( QIcon( hbide_image( "open" ) ) ) - ::oUI:q_buttonViewIni : setIcon( hbide_image( "file-open" ) ) - ::oUI:q_buttonViewEnv : setIcon( hbide_image( "file-open" ) ) - ::oUI:q_buttonViewSnippets : setIcon( hbide_image( "file-open" ) ) - ::oUI:q_buttonViewThemes : setIcon( hbide_image( "file-open" ) ) + ::oUI:q_buttonViewIni : setIcon( QIcon( hbide_image( "file-open" ) ) ) + ::oUI:q_buttonViewEnv : setIcon( QIcon( hbide_image( "file-open" ) ) ) + ::oUI:q_buttonViewSnippets : setIcon( QIcon( hbide_image( "file-open" ) ) ) + ::oUI:q_buttonViewThemes : setIcon( QIcon( hbide_image( "file-open" ) ) ) - ::oUI:q_buttonSelFont : setIcon( hbide_image( "font" ) ) + ::oUI:q_buttonSelFont : setIcon( QIcon( hbide_image( "font" ) ) ) - ::oUI:q_buttonThmAdd : setIcon( hbide_image( "dc_plus" ) ) - ::oUI:q_buttonThmDel : setIcon( hbide_image( "dc_delete" ) ) - ::oUI:q_buttonThmApp : setIcon( hbide_image( "copy" ) ) - ::oUI:q_buttonThmSav : setIcon( hbide_image( "save" ) ) + ::oUI:q_buttonThmAdd : setIcon( QIcon( hbide_image( "dc_plus" ) ) ) + ::oUI:q_buttonThmDel : setIcon( QIcon( hbide_image( "dc_delete" ) ) ) + ::oUI:q_buttonThmApp : setIcon( QIcon( hbide_image( "copy" ) ) ) + ::oUI:q_buttonThmSav : setIcon( QIcon( hbide_image( "save" ) ) ) - /* Dictionaries */ - ::oUI:q_buttonDictPath : setIcon( hbide_image( "open" ) ) + /* Dictionaries */ + ::oUI:q_buttonDictPath : setIcon( QIcon( hbide_image( "open" ) ) ) - /* VSS */ - ::oUI:q_buttonVSSExe : setIcon( hbide_image( "open" ) ) - ::oUI:q_buttonVSSDatabase : setIcon( hbide_image( "open" ) ) + /* VSS */ + ::oUI:q_buttonVSSExe : setIcon( QIcon( hbide_image( "open" ) ) ) + ::oUI:q_buttonVSSDatabase : setIcon( QIcon( hbide_image( "open" ) ) ) RETURN Self diff --git a/harbour/contrib/hbide/ideshortcuts.prg b/harbour/contrib/hbide/ideshortcuts.prg index 4ae22cf6a6..39477a0109 100644 --- a/harbour/contrib/hbide/ideshortcuts.prg +++ b/harbour/contrib/hbide/ideshortcuts.prg @@ -483,7 +483,7 @@ METHOD IdeShortcuts:array2table( nRow, a_ ) LOCAL n := nRow - 1 q0 := QTableWidgetItem() - q0:setIcon( hbide_image( a_[ 8 ] ) ) + q0:setIcon( QIcon( hbide_image( a_[ 8 ] ) ) ) oTbl:setItem( n, 0, q0 ) q1 := QTableWidgetItem() @@ -495,15 +495,15 @@ METHOD IdeShortcuts:array2table( nRow, a_ ) oTbl:setItem( n, 2, q2 ) q3 := QTableWidgetItem() - q3:setIcon( iif( a_[ 3 ] == "YES", hbide_image( "check" ), "" ) ) + q3:setIcon( QIcon( iif( a_[ 3 ] == "YES", hbide_image( "check" ), "" ) ) ) oTbl:setItem( n, 3, q3 ) q4 := QTableWidgetItem() - q4:setIcon( iif( a_[ 4 ] == "YES", hbide_image( "check" ), "" ) ) + q4:setIcon( QIcon( iif( a_[ 4 ] == "YES", hbide_image( "check" ), "" ) ) ) oTbl:setItem( n, 4, q4 ) q5 := QTableWidgetItem() - q5:setIcon( iif( a_[ 5 ] == "YES", hbide_image( "check" ), "" ) ) + q5:setIcon( QIcon( iif( a_[ 5 ] == "YES", hbide_image( "check" ), "" ) ) ) oTbl:setItem( n, 5, q5 ) oTbl:setRowHeight( n, 16 ) @@ -563,7 +563,7 @@ METHOD IdeShortcuts:buildUI() LOCAL hdr_:= { { "Img", 30 }, { "Name", 190 }, { "Key", 50 }, { "Alt", 30 }, { "Ctrl", 30 }, { "Shift", 30 } } ::oUI := hbide_getUI( "shortcuts" ) - ::oUI:setWindowIcon( hbide_image( "hbide" ) ) + ::oUI:setWindowIcon( QIcon( hbide_image( "hbide" ) ) ) ::oUI:setParent( ::oDlg:oWidget ) ::oUI:setWindowFlags( Qt_Sheet ) diff --git a/harbour/contrib/hbide/idetools.prg b/harbour/contrib/hbide/idetools.prg index 0ce53dcc0b..144803f823 100644 --- a/harbour/contrib/hbide/idetools.prg +++ b/harbour/contrib/hbide/idetools.prg @@ -223,7 +223,7 @@ METHOD IdeToolsManager:show() ::oUI:setWindowFlags( Qt_Sheet ) - ::oUI:setWindowIcon( hbide_image( "hbide" ) ) + ::oUI:setWindowIcon( QIcon( hbide_image( "hbide" ) ) ) ::oUI:setMaximumWidth( ::oUI:width() ) ::oUI:setMinimumWidth( ::oUI:width() ) ::oUI:setMaximumHeight( ::oUI:height() ) @@ -240,10 +240,10 @@ METHOD IdeToolsManager:show() ::oUI:q_listNames :connect( "itemSelectionChanged()", {|| ::execEvent( "listNames_itemSelectionChanged" ) } ) - ::oUI:q_buttonBtnDown :setIcon( hbide_image( "dc_down" ) ) - ::oUI:q_buttonBtnUp :setIcon( hbide_image( "dc_up" ) ) + ::oUI:q_buttonBtnDown :setIcon( QIcon( hbide_image( "dc_down" ) ) ) + ::oUI:q_buttonBtnUp :setIcon( QIcon( hbide_image( "dc_up" ) ) ) - ::oUI:q_buttonSetImage:setIcon( hbide_image( "open" ) ) + ::oUI:q_buttonSetImage:setIcon( QIcon( hbide_image( "open" ) ) ) ::oUI:q_buttonSetImage:connect( "clicked()", {|| ::execEvent( "buttonSetImage_clicked" ) } ) ::oUI:q_buttonUserToolbarUpd:connect( "clicked()", {|| ::execEvent( "buttonUserToolbarUpd_clicked" ) } ) @@ -675,7 +675,7 @@ METHOD IdeToolsManager:buildToolsButton() NEXT ::qToolsButton := QToolButton() ::qToolsButton:setTooltip( "Tools & Utilities" ) - ::qToolsButton:setIcon( hbide_image( "tools" ) ) + ::qToolsButton:setIcon( QIcon( hbide_image( "tools" ) ) ) ::qToolsButton:setPopupMode( QToolButton_MenuButtonPopup ) ::qToolsButton:setMenu( ::qToolsMenu ) @@ -696,7 +696,7 @@ METHOD IdeToolsManager:buildPanelsButton() NEXT ::qPanelsButton := QToolButton() ::qPanelsButton:setTooltip( "Panels" ) - ::qPanelsButton:setIcon( hbide_image( "panel_8" ) ) + ::qPanelsButton:setIcon( QIcon( hbide_image( "panel_8" ) ) ) ::qPanelsButton:setPopupMode( QToolButton_MenuButtonPopup ) ::qPanelsButton:setMenu( ::qPanelsMenu ) @@ -710,7 +710,7 @@ METHOD IdeToolsManager:addPanelsMenu( cPrompt ) LOCAL qAct qAct := ::qPanelsMenu:addAction( cPrompt ) - qAct:setIcon( ::oDK:getPanelIcon( cPrompt ) ) + qAct:setIcon( QIcon( ::oDK:getPanelIcon( cPrompt ) ) ) qAct:connect( "triggered(bool)", {|| ::oDK:setView( cPrompt ) } ) aadd( ::aPanelsAct, qAct ) diff --git a/harbour/contrib/hbide/ideuisrcmanager.prg b/harbour/contrib/hbide/ideuisrcmanager.prg index 770ab06095..02eeb555a3 100644 --- a/harbour/contrib/hbide/ideuisrcmanager.prg +++ b/harbour/contrib/hbide/ideuisrcmanager.prg @@ -862,7 +862,7 @@ METHOD IdeUISrcManager:buildToolButton( qToolbar, aBtn ) qBtn := QToolButton() qBtn:setTooltip( aBtn[ 1 ] ) qBtn:setAutoRaise( .t. ) - qBtn:setIcon( hbide_image( aBtn[ 2 ] ) ) + qBtn:setIcon( QIcon( hbide_image( aBtn[ 2 ] ) ) ) IF aBtn[ 4 ] qBtn:setCheckable( .t. ) ENDIF