diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 6cff9adf53..6e3fba5e86 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,25 @@ The license applies to all entries newer than 2009-04-28. */ +2012-08-26 23:22 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbxbp/listbox.prg + + Extended: method :addItem( cText, qImage ) in XbpListBox() class. + This is Harbour extension, Xbase++ does not accepts . + + + contrib/hbide/resources/dc_class.png + + contrib/hbide/resources/dc_method.png + + contrib/hbide/resources/dc_procedure.png + * contrib/hbide/docks.prg + * contrib/hbide/editor.prg + * contrib/hbide/hbide.qrc + * contrib/hbide/main.prg + * contrib/hbide/misc.prg + * contrib/hbide/tags.prg + + Added: icons to represent the type of identifier in . + The following four types are considered: + 1. Class 2. Method 3. Procedure 4. Function + STATIC FUNCTION/PROCEDURE is considered normal FUNCTION/PROCEDURE. + 2012-08-26 17:46 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbide/edit.prg * Fixed: a small glich in building the aligned line. diff --git a/harbour/contrib/hbide/docks.prg b/harbour/contrib/hbide/docks.prg index d0a9bccd76..f00c41dd4f 100644 --- a/harbour/contrib/hbide/docks.prg +++ b/harbour/contrib/hbide/docks.prg @@ -379,16 +379,16 @@ METHOD IdeDocks:destroy() ::qMdiToolBarL:destroy() ::qMdiToolBarL := NIL ENDIF - ::nPass := NIL - ::aPanels := NIL - ::aMdiBtns := NIL - ::aBtnLines := NIL - ::aBtnDocks := NIL - ::oBtnTabClose := NIL - ::aViewsInfo := NIL - ::qTBtnClose := NIL - ::qTimer := NIL - ::nPrevWindowState := NIL + ::nPass := NIL + ::aPanels := NIL + ::aMdiBtns := NIL + ::aBtnLines := NIL + ::aBtnDocks := NIL + ::oBtnTabClose := NIL + ::aViewsInfo := NIL + ::qTBtnClose := NIL + ::qTimer := NIL + ::nPrevWindowState := NIL RETURN Self diff --git a/harbour/contrib/hbide/editor.prg b/harbour/contrib/hbide/editor.prg index 7871c9d514..70ea240e2d 100644 --- a/harbour/contrib/hbide/editor.prg +++ b/harbour/contrib/hbide/editor.prg @@ -262,7 +262,7 @@ METHOD IdeEditsManager:create( oIde ) aadd( ::aActions, { "TB_Compile" , ::qContextMenu:addAction( ::oAC:getAction( "TB_Compile" ) ) } ) aadd( ::aActions, { "TB_CompilePPO", ::qContextMenu:addAction( ::oAC:getAction( "TB_CompilePPO" ) ) } ) aadd( ::aActions, { "" , ::qContextMenu:addSeparator() } ) - aadd( ::aActions, { "Apply Theme" , ::qContextMenu:addAction( "Apply Theme" ) } ) + aadd( ::aActions, { "Apply Theme" , ::qContextMenu:addAction( QIcon( hbide_image( "syntaxhiliter" ) ), "Apply Theme" ) } ) aadd( ::aActions, { "Save as Skltn", ::qContextMenu:addAction( "Save as Skeleton..." ) } ) ::qContextSub := ::qContextMenu:addMenu( QIcon( hbide_image( "split" ) ), "Split" ) // @@ -1442,8 +1442,8 @@ METHOD IdeEditor:create( oIde, cSourceFile, nPos, nHPos, nVPos, cTheme, cView, a ::qEdit:setTextInteractionFlags( Qt_TextSelectableByMouse + Qt_TextSelectableByKeyboard ) ENDIF - ::qDocument:connect( "modificationChanged(bool)" , {|p| ::execEvent( __qDocModificationChanged__, p ) } ) - ::qDocument:connect( "contentsChange(int,int,int)", {|p,p1,p2| ::execEvent( __qDocContentsChange__, p, p1, p2 ) } ) + ::qDocument:connect( "modificationChanged(bool)" , {|p | ::execEvent( __qDocModificationChanged__, p ) } ) + ::qDocument:connect( "contentsChange(int,int,int)", {|p,p1,p2| ::execEvent( __qDocContentsChange__ , p, p1, p2 ) } ) ::qDocument:setModified( .f. ) diff --git a/harbour/contrib/hbide/hbide.qrc b/harbour/contrib/hbide/hbide.qrc index c8dfceb059..29a7002689 100644 --- a/harbour/contrib/hbide/hbide.qrc +++ b/harbour/contrib/hbide/hbide.qrc @@ -321,6 +321,9 @@ resources/split_h.png resources/split_v.png resources/align_at.png + resources/dc_method.png + resources/dc_class.png + resources/dc_procedure.png docs/faq.htm diff --git a/harbour/contrib/hbide/main.prg b/harbour/contrib/hbide/main.prg index 9c35a795e4..279b70df58 100644 --- a/harbour/contrib/hbide/main.prg +++ b/harbour/contrib/hbide/main.prg @@ -1488,7 +1488,7 @@ METHOD HbIde:manageProjectContext( mp1, mp2, oXbpTreeItem ) /*----------------------------------------------------------------------*/ METHOD HbIde:updateFuncList( lSorted ) - LOCAL a_:={} + LOCAL aFunc :={}, a_ DEFAULT lSorted TO ::lSortedFuncList @@ -1497,11 +1497,15 @@ METHOD HbIde:updateFuncList( lSorted ) ::oFuncList:clear() IF !empty( ::aTags ) IF lSorted - aeval( ::aTags, {|e_| aadd( a_, e_[ 7 ] ) } ) - asort( a_, , , {|e,f| lower( e ) < lower( f ) } ) - aeval( a_, {|e| ::oFuncList:addItem( e ) } ) + aeval( ::aTags, {|e_| aadd( aFunc, { e_[ 6 ], e_[ 7 ] } ) } ) + asort( aFunc, , , {|e,f| lower( e[ 2 ] ) < lower( f[ 2 ] ) } ) + FOR EACH a_ IN aFunc + ::oFuncList:addItem( a_[ 2 ], QIcon( hbide_identifierImage( a_[ 1 ] ) ) ) + NEXT ELSE - aeval( ::aTags, {|e_| ::oFuncList:addItem( e_[ 7 ] ) } ) + FOR EACH a_ IN ::aTags + ::oFuncList:addItem( a_[ 7 ], QIcon( hbide_identifierImage( a_[ 6 ] ) ) ) + NEXT ENDIF ENDIF diff --git a/harbour/contrib/hbide/misc.prg b/harbour/contrib/hbide/misc.prg index 617f1e7cca..df4e0b17ce 100644 --- a/harbour/contrib/hbide/misc.prg +++ b/harbour/contrib/hbide/misc.prg @@ -2043,3 +2043,13 @@ FUNCTION hbide_getHbxFunctions( cBuffer ) /*----------------------------------------------------------------------*/ +FUNCTION hbide_identifierImage( cIdentifier ) + LOCAL cImage + + cIdentifier := Upper( cIdentifier ) + cImage := iif( "CLAS" $ cIdentifier, "dc_class", iif( "METH" $ cIdentifier, "dc_method", iif( "PROC" $ cIdentifier, "dc_procedure", "dc_function" ) ) ) + + RETURN hbide_image( cImage ) + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbide/resources/dc_class.png b/harbour/contrib/hbide/resources/dc_class.png new file mode 100644 index 0000000000..fe97786a41 Binary files /dev/null and b/harbour/contrib/hbide/resources/dc_class.png differ diff --git a/harbour/contrib/hbide/resources/dc_method.png b/harbour/contrib/hbide/resources/dc_method.png new file mode 100644 index 0000000000..d47433f68a Binary files /dev/null and b/harbour/contrib/hbide/resources/dc_method.png differ diff --git a/harbour/contrib/hbide/resources/dc_procedure.png b/harbour/contrib/hbide/resources/dc_procedure.png new file mode 100644 index 0000000000..f490ec06c1 Binary files /dev/null and b/harbour/contrib/hbide/resources/dc_procedure.png differ diff --git a/harbour/contrib/hbide/tags.prg b/harbour/contrib/hbide/tags.prg index b66251dfbd..4fd931da5f 100644 --- a/harbour/contrib/hbide/tags.prg +++ b/harbour/contrib/hbide/tags.prg @@ -176,13 +176,13 @@ FUNCTION UpdateTags( cModule, aSummary, aSumData, aFuncList, aLines, aText ) cModule ,; cSyntax ,; cType ,; - iif( LEFTEQUAL( cType, "METH" ), ":", "" ) + cSyntax, ; + iif( LEFTEQUAL( cType, "METH" ), "", "" ) + cSyntax, ; aText[ aSumData[ i,2 ] ] ; }; ) ENDIF - AAdd( aFuncList, { iif( LEFTEQUAL( cType, "METH" ), ":", "" ) + cSyntax, aSumData[ i, 2 ], aSumData[ i, 1 ] } ) + AAdd( aFuncList, { iif( LEFTEQUAL( cType, "METH" ), "", "" ) + cSyntax, aSumData[ i, 2 ], aSumData[ i, 1 ] } ) AAdd( aLines, i ) NEXT diff --git a/harbour/contrib/hbxbp/listbox.prg b/harbour/contrib/hbxbp/listbox.prg index e6ee265117..5772791947 100644 --- a/harbour/contrib/hbxbp/listbox.prg +++ b/harbour/contrib/hbxbp/listbox.prg @@ -104,7 +104,7 @@ CLASS XbpListBox INHERIT XbpWindow, DataRef METHOD setTopItem( nIndex ) VIRTUAL METHOD numItems() INLINE len( ::aItems ) - METHOD addItem( cItem ) + METHOD addItem( cItem, qIcon ) METHOD clear( lConnect ) METHOD delItem( nIndex ) METHOD getItem( nIndex ) @@ -364,10 +364,13 @@ METHOD XbpListBox:clear( lConnect ) /*----------------------------------------------------------------------*/ -METHOD XbpListBox:addItem( cItem ) +METHOD XbpListBox:addItem( cItem, qIcon ) LOCAL qItm := QListWidgetItem() qItm:setText( cItem ) + IF HB_ISOBJECT( qIcon ) + qItm:setIcon( qIcon ) + ENDIF ::oWidget:addItem( qItm ) aadd( ::aItems, qItm )