From 2a225512dca0fd5d7c8489ef3ff10b7be2632d63 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Sat, 27 Feb 2010 01:02:40 +0000 Subject: [PATCH] 2010-02-26 16:54 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbide/resources/docviewgenerator.ui * contrib/hbide/resources/docviewgenerator.uic ! Enabled: left-right tab-widgets to share space as per user wish. You can resize the indivisual tab-widgets, move cursor in-between horizontal divider. * doc/hdr_tpl.txt ! Little correction in exact number of spaces and little more awareness tip for writer. * contrib/hbide/ideharbourhelp.prg * contrib/hbide/idemisc.prg ! More refinements the way Harbour document is displayed. Please forward your suggessions. ! Presentation: documents tree is now exact syncronization with Harbour's folder structure but depicting only those folders with /doc and /doc/en endingings. + Enabled: to reload the tree on the fly. Marco, check it. --- harbour/contrib/hbide/ideharbourhelp.prg | 278 ++++--- harbour/contrib/hbide/idemisc.prg | 32 +- .../hbide/resources/docviewgenerator.ui | 711 +++++++++--------- .../hbide/resources/docviewgenerator.uic | 189 ++--- harbour/doc/hdr_tpl.txt | 4 +- 5 files changed, 657 insertions(+), 557 deletions(-) diff --git a/harbour/contrib/hbide/ideharbourhelp.prg b/harbour/contrib/hbide/ideharbourhelp.prg index ba02375a77..8807cc8a1c 100644 --- a/harbour/contrib/hbide/ideharbourhelp.prg +++ b/harbour/contrib/hbide/ideharbourhelp.prg @@ -170,6 +170,7 @@ CLASS IdeHarbourHelp INHERIT IdeObject METHOD create( oIde ) METHOD show() METHOD destroy() + METHOD destroyTrees() METHOD execEvent( nMode, p, p1 ) @@ -235,17 +236,27 @@ METHOD IdeHarbourHelp:show() /*----------------------------------------------------------------------*/ METHOD IdeHarbourHelp:destroy() - LOCAL a_ IF empty( ::oUI ) RETURN Self ENDIF + ::destroyTrees() + + ::oUI:destroy() + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeHarbourHelp:destroyTrees() + LOCAL a_ + ::disconnect( ::oUI:q_treeDoc, "itemSelectionChanged()" ) ::disconnect( ::oUI:q_treeCategory, "itemSelectionChanged()" ) - ::aHistory := NIL - ::aFuncByFile := NIL + ::aHistory := {} + ::aFuncByFile := {} FOR EACH a_ IN ::aCategory a_[ 4 ] := NIL // Reference to Contents node @@ -276,13 +287,13 @@ METHOD IdeHarbourHelp:destroy() IF !empty( ::aNodes ) ::aNodes[ 1, 1 ] := NIL ENDIF - ::aNodes := NIL + ::aNodes := {} /* Index Tab */ FOR EACH a_ IN ::aFunctions a_[ 5 ] := NIL NEXT - ::aFunctions := NIL + ::aFunctions := {} /* Category Tab */ FOR EACH a_ IN ::aCategory @@ -296,9 +307,7 @@ METHOD IdeHarbourHelp:destroy() a_[ 5 ] := NIL ENDIF NEXT - ::aCategory := NIL - - ::oUI:destroy() + ::aCategory := {} RETURN Self @@ -399,9 +408,6 @@ METHOD IdeHarbourHelp:installSignals() ::oUI:signal( "browserView" , "anchorClicked(QUrl)" , {|p| ::execEvent( browserView_anchorClicked, p ) } ) ::oUI:signal( "tabWidgetContents", "currentChanged(int)" , {|p| ::execEvent( tabWidgetContents_currentChanged, p ) } ) - ::connect( ::oUI:q_treeDoc , "itemSelectionChanged()" , {| | ::execEvent( treeDoc_itemSelectionChanged ) } ) - ::connect( ::oUI:q_treeCategory , "itemSelectionChanged()" , {| | ::execEvent( treeCategory_itemSelectionChanged ) } ) - RETURN Self /*----------------------------------------------------------------------*/ @@ -562,21 +568,20 @@ METHOD IdeHarbourHelp:populateIndexedSelection() /*----------------------------------------------------------------------*/ METHOD IdeHarbourHelp:refreshDocTree() - LOCAL aPaths, cFolder, cNFolder, aDocs, oTWItem, oParent, oParentF, cIcon - LOCAL aDir, a_, cTextFile, cStripped + LOCAL aPaths, cFolder, cNFolder, aDocs, oChild, oParent, oRoot, cRoot + LOCAL aDir, a_, cTextFile, n IF empty( ::cPathInstall ) .OR. ! hb_dirExists( ::cPathInstall ) RETURN Self ENDIF - IF !empty( ::aNodes ) - RETURN Self - ENDIF - - cIcon := ::resPath + "dc_folder.png" /* Clean Environment */ + ::destroyTrees() ::oUI:q_treeDoc:clear() // + ::connect( ::oUI:q_treeDoc , "itemSelectionChanged()" , {| | ::execEvent( treeDoc_itemSelectionChanged ) } ) + ::connect( ::oUI:q_treeCategory, "itemSelectionChanged()" , {| | ::execEvent( treeCategory_itemSelectionChanged ) } ) + // ::aNodes := {} ::aFuncByFile := {} ::aHistory := {} @@ -587,6 +592,7 @@ METHOD IdeHarbourHelp:refreshDocTree() aPaths := {} aDocs := {} hbide_fetchSubPaths( @aPaths, ::cPathInstall, .t. ) + cRoot := aPaths[ 1 ] FOR EACH cFolder IN aPaths cNFolder := hbide_pathNormalized( cFolder, .t. ) @@ -595,48 +601,115 @@ METHOD IdeHarbourHelp:refreshDocTree() ENDIF NEXT - oTWItem := QTreeWidgetItem():new() - oTWItem:setText( 0, ::cPathInstall ) - oTWItem:setIcon( 0, ::resPath + "dc_home.png" ) - oTWItem:setToolTip( 0, ::cPathInstall ) - oTWItem:setExpanded( .t. ) + oRoot := QTreeWidgetItem():new() + oRoot:setText( 0, aPaths[ 1 ] ) + oRoot:setIcon( 0, hbide_image( "dc_home" ) ) + oRoot:setToolTip( 0, aPaths[ 1 ] ) + oRoot:setExpanded( .t. ) - ::oUI:q_treeDoc:addTopLevelItem( oTWItem ) - aadd( ::aNodes, { oTWItem, "Root", NIL /*oParent*/, ::cPathInstall, ::cPathInstall } ) - oParent := oTWItem + ::oUI:q_treeDoc:addTopLevelItem( oRoot ) + + aadd( ::aNodes, { oRoot, "Path", NIL, cRoot, cRoot } ) + hbide_buildFoldersTree( ::aNodes, aDocs ) + ::aNodes[ 1,2 ] := "Root" FOR EACH cFolder IN aDocs - oTWItem := QTreeWidgetItem():new() - oTWItem:setText( 0, ( cStripped := hbide_stripRoot( ::cPathInstall, cFolder ) ) ) - oTWItem:setIcon( 0, cIcon ) - oTWItem:setToolTip( 0, cFolder ) - oParent:addChild( oTWItem ) - aadd( ::aNodes, { oTWItem, "Path", oParent, cFolder, cStripped } ) + IF ( n := ascan( ::aNodes, {|e_| e_[ 2 ] == "Path" .AND. lower( e_[ 4 ] ) == lower( cFolder ) } ) ) > 0 + oParent := ::aNodes[ n, 1 ] - oParentF := oTWItem - aDir := directory( cFolder + "*.txt" ) - FOR EACH a_ IN aDir - IF a_[ 5 ] != "D" - cTextFile := cFolder + a_[ 1 ] - oTWItem := QTreeWidgetItem():new() - oTWItem:setText( 0, a_[ 1 ] ) - oTWItem:setIcon( 0, ::resPath + "dc_textdoc.png" ) - oTWItem:setToolTip( 0, cTextFile ) - oParentF:addChild( oTWItem ) - aadd( ::aNodes, { oTWItem, "File", oParentF, cTextFile, a_[ 1 ] } ) - ::parseTextFile( cTextFile, oTWItem ) - ENDIF - NEXT + aDir := directory( cFolder + "*.txt" ) + FOR EACH a_ IN aDir + IF a_[ 5 ] != "D" + cTextFile := cFolder + a_[ 1 ] + oChild := QTreeWidgetItem():new() + oChild:setText( 0, a_[ 1 ] ) + oChild:setIcon( 0, ::resPath + "dc_textdoc.png" ) + oChild:setToolTip( 0, cTextFile ) + oParent:addChild( oChild ) + aadd( ::aNodes, { oChild, "File", oParent, cTextFile, a_[ 1 ] } ) + ::parseTextFile( cTextFile, oChild ) + ENDIF + NEXT + ENDIF NEXT ::populateIndex() - ::oUI:q_treeDoc:expandItem( oParent ) + ::oUI:q_treeDoc:expandItem( oRoot ) RETURN Self /*----------------------------------------------------------------------*/ +STATIC FUNCTION hbide_buildFoldersTree( aNodes, aPaths ) + LOCAL cRoot, cPath, s, aSubs, i, n, cCPath, cPPath, nP, cOSPath, oParent, oChild + LOCAL cIcon := hbide_image( "dc_folder" ) + + cRoot := aNodes[ 1, 4 ] + + FOR EACH s IN aPaths + cPath := s + cPath := hbide_stripRoot( cRoot, cPath ) + cPath := hbide_pathNormalized( cPath, .t. ) + + aSubs := hb_aTokens( cPath, "/" ) + + FOR i := 1 TO len( aSubs ) + IF !empty( aSubs[ i ] ) + cCPath := hbide_buildPathFromSubs( aSubs, i ) + n := ascan( aNodes, {|e_| hbide_pathNormalized( e_[ 4 ], .t. ) == hbide_pathNormalized( cRoot + cCPath, .t. ) } ) + + IF n == 0 + cPPath := hbide_buildPathFromSubs( aSubs, i - 1 ) + nP := ascan( aNodes, {|e_| hbide_pathNormalized( e_[ 4 ], .t. ) == hbide_pathNormalized( cRoot + cPPath, .t. ) } ) + + oParent := aNodes[ nP, 1 ] + + cOSPath := hbide_pathToOSPath( cRoot + cCPath ) + + oChild := QTreeWidgetItem():new() + oChild:setText( 0, aSubs[ i ] ) + oChild:setIcon( 0, cIcon ) + oChild:setToolTip( 0, cOSPath ) + + oParent:addChild( oChild ) + + aadd( aNodes, { oChild, "Path", oParent, cOSPath, aSubs[ i ] } ) + ENDIF + ENDIF + NEXT + NEXT + + RETURN NIL + +/*----------------------------------------------------------------------*/ + +STATIC FUNCTION hbide_buildPathFromSubs( aSubs, nUpto ) + LOCAL i, cPath := "" + + IF nUpto > 0 + FOR i := 1 TO nUpto + cPath += aSubs[ i ] + "/" + NEXT + ENDIF + RETURN cPath + +/*----------------------------------------------------------------------*/ + +STATIC FUNCTION hbide_stripRoot( cRoot, cPath ) + LOCAL cLRoot, cLPath, cP + + cLRoot := hbide_pathNormalized( cRoot, .t. ) + cLPath := hbide_pathNormalized( cPath, .t. ) + IF left( cLPath, len( cLRoot ) ) == cLRoot + cP := substr( cLPath, len( cRoot ) + 1 ) + RETURN cP + ENDIF + + RETURN cPath + +/*----------------------------------------------------------------------*/ + METHOD IdeHarbourHelp:populateIndex() LOCAL a_, qItem, oFunc, oParent, n LOCAL aUnq := {} @@ -945,7 +1018,7 @@ METHOD IdeHarbourHelp:populateFuncDetails( n ) /*----------------------------------------------------------------------*/ METHOD IdeHarbourHelp:buildView( oFunc ) - LOCAL s, x, y, v, w, z, n, s1, a_ + LOCAL s, x, y, v, w, z, n, s1, a_, cTxt LOCAL aHtm := {} aadd( aHtm, "" ) @@ -992,8 +1065,22 @@ METHOD IdeHarbourHelp:buildView( oFunc ) aadd( aHtm, s ) aadd( aHtm, '' + oFunc:cName + '' ) - - aadd( aHtm, "" + oFunc:cOneLiner + "" ) + aadd( aHtm, '
' + oFunc:cOneLiner + '
' ) + cTxt := " " + IF !empty( oFunc:cCategory ) + cTxt += "Category: " + oFunc:cCategory + " " + ENDIF + IF !empty( oFunc:cSubCategory ) + cTxt += "Sub: " + oFunc:cSubCategory + " " + ENDIF + IF !empty( oFunc:cVersion ) + cTxt += "Version: " + oFunc:cVersion + " " + ENDIF + IF !empty( cTxt ) + aadd( aHtm, "
" + "[" + cTxt + "]" + "
" ) + ENDIF + //aadd( aHtm, '
' ) + aadd( aHtm, '
' ) x := '' ; y := "" v := '
'                    ; w := "
" @@ -1004,42 +1091,59 @@ METHOD IdeHarbourHelp:buildView( oFunc ) aadd( aHtm, v + oFunc:cInherits + w ) aadd( aHtm, z ) ENDIF - aadd( aHtm, x + "Categoty" + y ) + #if 0 + aadd( aHtm, x + "Category" + y ) aadd( aHtm, v + oFunc:cCategory + w ) aadd( aHtm, z ) - aadd( aHtm, x + "SubCategoty" + y ) + aadd( aHtm, x + "SubCategory" + y ) aadd( aHtm, v + oFunc:cSubCategory+ w ) aadd( aHtm, z ) - aadd( aHtm, x + "Syntax" + y ) - aadd( aHtm, v + hbide_arrayToMemoHtml( oFunc:aSyntax ) + w ) - aadd( aHtm, z ) - aadd( aHtm, x + "Arguments" + y ) - aadd( aHtm, v + hbide_arrayToMemoHtml( oFunc:aArguments ) + w ) - aadd( aHtm, z ) - aadd( aHtm, x + "Returns" + y ) - aadd( aHtm, v + hbide_arrayToMemoHtml( oFunc:aReturns ) + w ) - aadd( aHtm, z ) - IF !empty( oFunc:aMethods ) - aadd( aHtm, x + "Methods" + y ) - aadd( aHtm, v + hbide_arrayToMemoHtml( oFunc:aMethods ) + w ) + #endif + IF !empty( s := hbide_arrayToMemoHtml( oFunc:aSyntax ) ) + aadd( aHtm, x + "Syntax" + y ) + aadd( aHtm, v + s + w ) aadd( aHtm, z ) ENDIF - aadd( aHtm, x + "Description" + y ) - aadd( aHtm, v + hbide_arrayToMemoHtml( oFunc:aDescription ) + w ) - aadd( aHtm, z ) - aadd( aHtm, x + "Examples" + y ) - aadd( aHtm, v + hbide_arrayToMemoHtml( oFunc:aExamples ) + w ) - aadd( aHtm, z ) + IF !empty( s := hbide_arrayToMemoHtml( oFunc:aArguments ) ) + aadd( aHtm, x + "Arguments" + y ) + aadd( aHtm, v + s + w ) + aadd( aHtm, z ) + ENDIF + IF !empty( s := hbide_arrayToMemoHtml( oFunc:aReturns ) ) + aadd( aHtm, x + "Returns" + y ) + aadd( aHtm, v + s + w ) + aadd( aHtm, z ) + ENDIF + IF !empty( s := hbide_arrayToMemoHtml( oFunc:aMethods ) ) + aadd( aHtm, x + "Methods" + y ) + aadd( aHtm, v + s + w ) + aadd( aHtm, z ) + ENDIF + IF !empty( s := hbide_arrayToMemoHtml( oFunc:aDescription ) ) + aadd( aHtm, x + "Description" + y ) + aadd( aHtm, v + s + w ) + aadd( aHtm, z ) + ENDIF + IF !empty( s := hbide_arrayToMemoHtml( oFunc:aExamples ) ) + aadd( aHtm, x + "Examples" + y ) + aadd( aHtm, v + s + w ) + aadd( aHtm, z ) + ENDIF + #if 0 aadd( aHtm, x + "Vesrion" + y ) aadd( aHtm, v + oFunc:cVersion + w ) aadd( aHtm, z ) - aadd( aHtm, x + "Files" + y ) - aadd( aHtm, v + hbide_arrayToMemoHtml( oFunc:aFiles ) + w ) - aadd( aHtm, z ) - aadd( aHtm, x + "SeeAlso" + y ) - aadd( aHtm, "" ) + #endif + IF !empty( s := hbide_arrayToMemoHtml( oFunc:aFiles ) ) + aadd( aHtm, x + "Files" + y ) + aadd( aHtm, v + s + w ) + aadd( aHtm, z ) + ENDIF a_:= hb_atokens( oFunc:cSeaAlso, "," ) IF !empty( a_ ) + aadd( aHtm, x + "SeeAlso" + y ) + aadd( aHtm, "" ) + FOR EACH s IN a_ s := alltrim( s ) IF ( n := at( "(", s ) ) > 0 @@ -1047,20 +1151,22 @@ METHOD IdeHarbourHelp:buildView( oFunc ) ELSE s1 := s ENDIF - aadd( aHtm, '' + s + "" + ; + aadd( aHtm, '' + s + "" + ; iif( s:__enumIndex() == len( a_ ), "", ", " ) ) NEXT - ELSE - aadd( aHtm, " " ) + aadd( aHtm, "" ) + aadd( aHtm, z ) + ENDIF + IF !empty( oFunc:cPlatforms ) + aadd( aHtm, x + "Platforms" + y ) + aadd( aHtm, v + oFunc:cPlatforms + w ) + aadd( aHtm, z ) + ENDIF + IF !empty( oFunc:cStatus ) + aadd( aHtm, x + "Status" + y ) + aadd( aHtm, v + oFunc:cStatus + w ) + aadd( aHtm, z ) ENDIF - aadd( aHtm, "" ) - aadd( aHtm, z ) - aadd( aHtm, x + "Platforms" + y ) - aadd( aHtm, v + oFunc:cPlatforms + w ) - aadd( aHtm, z ) - aadd( aHtm, x + "Status" + y ) - aadd( aHtm, v + oFunc:cStatus + w ) - aadd( aHtm, z ) aadd( aHtm, " " ) aadd( aHtm, " " ) diff --git a/harbour/contrib/hbide/idemisc.prg b/harbour/contrib/hbide/idemisc.prg index 592838a850..41b25434ce 100644 --- a/harbour/contrib/hbide/idemisc.prg +++ b/harbour/contrib/hbide/idemisc.prg @@ -1585,7 +1585,7 @@ FUNCTION hbide_fetchSubPaths( aPaths, cRootPath, lSubs ) aadd( aPaths, cRootPath ) IF lSubs - aDir := directory( cRootPath + "*.", "D" ) + aDir := directory( cRootPath + "*", "D" ) FOR EACH a_ IN aDir IF a_[ 5 ] == "D" .AND. left( a_[ 1 ], 1 ) != "." hbide_fetchSubPaths( @aPaths, cRootPath + a_[ 1 ] ) @@ -1597,21 +1597,6 @@ FUNCTION hbide_fetchSubPaths( aPaths, cRootPath, lSubs ) /*----------------------------------------------------------------------*/ -FUNCTION hbide_stripRoot( cRoot, cPath ) - LOCAL cLRoot, cLPath, cP - - cLRoot := hbide_pathNormalized( cRoot, .t. ) - cLPath := hbide_pathNormalized( cPath, .t. ) - - IF left( cLPath, len( cLRoot ) ) == cLRoot - cP := substr( cLPath, len( cRoot ) + 2 ) - RETURN cP - ENDIF - - RETURN cPath - -/*----------------------------------------------------------------------*/ - FUNCTION hbide_image( cName ) RETURN hbide_pathToOsPath( hb_DirBase() + "resources" + "/" + cName + ".png" ) @@ -1621,3 +1606,18 @@ FUNCTION hbide_uic( cName ) RETURN hbide_pathToOsPath( hb_DirBase() + "resources" + "/" + cName + ".uic" ) /*----------------------------------------------------------------------*/ + +FUNCTION hbide_isPrevParent( cRoot, cPath ) + LOCAL cLRoot, cLPath + + cLRoot := hbide_pathNormalized( cRoot, .t. ) + cLPath := hbide_pathNormalized( cPath, .t. ) + + IF left( cLPath, len( cLRoot ) ) == cLRoot + RETURN .t. + ENDIF + + RETURN .f. + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbide/resources/docviewgenerator.ui b/harbour/contrib/hbide/resources/docviewgenerator.ui index 25b565c622..73dcf0963e 100644 --- a/harbour/contrib/hbide/resources/docviewgenerator.ui +++ b/harbour/contrib/hbide/resources/docviewgenerator.ui @@ -6,372 +6,15 @@ 0 0 - 640 - 563 + 645 + 557 Form - - 2 - - - 4 - - - 2 - - - 2 - - - - - - - Harbour Installation Root: - - - - - - - - - - - - - false - - - - - - - Doc folder prefix: - - - - - - - - 70 - 16777215 - - - - - - - - - - - 200 - 16777215 - - - - 0 - - - false - - - - Topics - - - - - - - 1 - - - - - - - - - Index - - - - - - - - - - - - - Category - - - - - - - 1 - - - - - - - - - - - - 0 - - - - View - - - - - - - - - - General - - - - - - Template: - - - - - - - - - - Name - - - - - - - - - - Category: - - - - - - - - - - Sub-Category: - - - - - - - - - - One-Liner - - - - - - - - - - Syntax: - - - - - - - - - - Returns: - - - - - - - - - - Status: - - - - - - - - - - Platforms: - - - - - - - - - - Files: - - - - - - - - - - See Also: - - - - - - - - - - .txt path: - - - - - - - - - - - Args - - - - - - Name: - - - - - - - Description: - - - - - - - - 150 - 16777215 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - - - - - - Desc - - - - - - - - - - Examples - - - - - - - - - - Tests - - - - - - - - - - + @@ -475,6 +118,354 @@ + + + + + + Harbour Installation Root: + + + + + + + + + + + + + false + + + + + + + Doc folder prefix: + + + + + + + + 70 + 16777215 + + + + + + + + + + Qt::Horizontal + + + + + 16777215 + 16777215 + + + + 0 + + + false + + + + Topics + + + + + + + 1 + + + + + + + + + Index + + + + + + + + + + + + + Category + + + + + + + 1 + + + + + + + + + + 0 + + + + View + + + + + + + + + + General + + + + + + Template: + + + + + + + + + + Name + + + + + + + + + + Category: + + + + + + + + + + Sub-Category: + + + + + + + + + + One-Liner + + + + + + + + + + Syntax: + + + + + + + + + + Returns: + + + + + + + + + + Status: + + + + + + + + + + Platforms: + + + + + + + + + + Files: + + + + + + + + + + See Also: + + + + + + + + + + .txt path: + + + + + + + + + + + Args + + + + + + Name: + + + + + + + Description: + + + + + + + + 150 + 16777215 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + Desc + + + + + + + + + + Examples + + + + + + + + + + Tests + + + + + + + + + + diff --git a/harbour/contrib/hbide/resources/docviewgenerator.uic b/harbour/contrib/hbide/resources/docviewgenerator.uic index 3504a94544..b08281ff41 100644 --- a/harbour/contrib/hbide/resources/docviewgenerator.uic +++ b/harbour/contrib/hbide/resources/docviewgenerator.uic @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading ui file 'docviewgenerator.ui' ** -** Created: Wed Feb 24 16:25:24 2010 +** Created: Fri Feb 26 00:25:50 2010 ** by: Qt User Interface Compiler version 4.5.2 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -35,12 +36,24 @@ class Ui_FormDocViewer { public: QGridLayout *gridLayout; + QHBoxLayout *horizontalLayout_3; + QToolButton *buttonHome; + QToolButton *buttonBackward; + QToolButton *buttonForward; + QToolButton *buttonUp; + QToolButton *buttonRefresh; + QToolButton *buttonPrint; + QToolButton *buttonPdf; + QSpacerItem *horizontalSpacer_2; + QToolButton *buttonSave; + QToolButton *buttonExit; QHBoxLayout *horizontalLayout; QLabel *labelInstall; QLineEdit *editInstall; QToolButton *buttonInstall; QLabel *labelDocPrefix; QLineEdit *editDocPrefix; + QSplitter *splitter; QTabWidget *tabWidgetContents; QWidget *tabContents; QVBoxLayout *verticalLayout; @@ -102,26 +115,76 @@ public: QWidget *tabTests; QGridLayout *gridLayout_6; QPlainTextEdit *plainTests; - QHBoxLayout *horizontalLayout_3; - QToolButton *buttonHome; - QToolButton *buttonBackward; - QToolButton *buttonForward; - QToolButton *buttonUp; - QToolButton *buttonRefresh; - QToolButton *buttonPrint; - QToolButton *buttonPdf; - QSpacerItem *horizontalSpacer_2; - QToolButton *buttonSave; - QToolButton *buttonExit; void setupUi(QWidget *FormDocViewer) { if (FormDocViewer->objectName().isEmpty()) FormDocViewer->setObjectName(QString::fromUtf8("FormDocViewer")); - FormDocViewer->resize(640, 563); + FormDocViewer->resize(645, 557); gridLayout = new QGridLayout(FormDocViewer); gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - gridLayout->setContentsMargins(2, 4, 2, 2); + horizontalLayout_3 = new QHBoxLayout(); + horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + buttonHome = new QToolButton(FormDocViewer); + buttonHome->setObjectName(QString::fromUtf8("buttonHome")); + buttonHome->setAutoRaise(false); + + horizontalLayout_3->addWidget(buttonHome); + + buttonBackward = new QToolButton(FormDocViewer); + buttonBackward->setObjectName(QString::fromUtf8("buttonBackward")); + buttonBackward->setAutoRaise(false); + + horizontalLayout_3->addWidget(buttonBackward); + + buttonForward = new QToolButton(FormDocViewer); + buttonForward->setObjectName(QString::fromUtf8("buttonForward")); + buttonForward->setAutoRaise(false); + + horizontalLayout_3->addWidget(buttonForward); + + buttonUp = new QToolButton(FormDocViewer); + buttonUp->setObjectName(QString::fromUtf8("buttonUp")); + buttonUp->setAutoRaise(false); + + horizontalLayout_3->addWidget(buttonUp); + + buttonRefresh = new QToolButton(FormDocViewer); + buttonRefresh->setObjectName(QString::fromUtf8("buttonRefresh")); + buttonRefresh->setAutoRaise(false); + + horizontalLayout_3->addWidget(buttonRefresh); + + buttonPrint = new QToolButton(FormDocViewer); + buttonPrint->setObjectName(QString::fromUtf8("buttonPrint")); + buttonPrint->setAutoRaise(false); + + horizontalLayout_3->addWidget(buttonPrint); + + buttonPdf = new QToolButton(FormDocViewer); + buttonPdf->setObjectName(QString::fromUtf8("buttonPdf")); + + horizontalLayout_3->addWidget(buttonPdf); + + horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_3->addItem(horizontalSpacer_2); + + buttonSave = new QToolButton(FormDocViewer); + buttonSave->setObjectName(QString::fromUtf8("buttonSave")); + buttonSave->setAutoRaise(false); + + horizontalLayout_3->addWidget(buttonSave); + + buttonExit = new QToolButton(FormDocViewer); + buttonExit->setObjectName(QString::fromUtf8("buttonExit")); + buttonExit->setAutoRaise(false); + + horizontalLayout_3->addWidget(buttonExit); + + + gridLayout->addLayout(horizontalLayout_3, 0, 0, 1, 1); + horizontalLayout = new QHBoxLayout(); horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); labelInstall = new QLabel(FormDocViewer); @@ -152,11 +215,14 @@ public: horizontalLayout->addWidget(editDocPrefix); - gridLayout->addLayout(horizontalLayout, 2, 0, 1, 2); + gridLayout->addLayout(horizontalLayout, 1, 0, 1, 1); - tabWidgetContents = new QTabWidget(FormDocViewer); + splitter = new QSplitter(FormDocViewer); + splitter->setObjectName(QString::fromUtf8("splitter")); + splitter->setOrientation(Qt::Horizontal); + tabWidgetContents = new QTabWidget(splitter); tabWidgetContents->setObjectName(QString::fromUtf8("tabWidgetContents")); - tabWidgetContents->setMaximumSize(QSize(200, 16777215)); + tabWidgetContents->setMaximumSize(QSize(16777215, 16777215)); tabWidgetContents->setDocumentMode(false); tabContents = new QWidget(); tabContents->setObjectName(QString::fromUtf8("tabContents")); @@ -199,10 +265,8 @@ public: verticalLayout_3->addWidget(treeCategory); tabWidgetContents->addTab(tabByCategory, QString()); - - gridLayout->addWidget(tabWidgetContents, 5, 0, 1, 1); - - tabWidgetElements = new QTabWidget(FormDocViewer); + splitter->addWidget(tabWidgetContents); + tabWidgetElements = new QTabWidget(splitter); tabWidgetElements->setObjectName(QString::fromUtf8("tabWidgetElements")); tabView = new QWidget(); tabView->setObjectName(QString::fromUtf8("tabView")); @@ -421,70 +485,9 @@ public: gridLayout_6->addWidget(plainTests, 0, 0, 1, 1); tabWidgetElements->addTab(tabTests, QString()); + splitter->addWidget(tabWidgetElements); - gridLayout->addWidget(tabWidgetElements, 5, 1, 1, 1); - - horizontalLayout_3 = new QHBoxLayout(); - horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); - buttonHome = new QToolButton(FormDocViewer); - buttonHome->setObjectName(QString::fromUtf8("buttonHome")); - buttonHome->setAutoRaise(false); - - horizontalLayout_3->addWidget(buttonHome); - - buttonBackward = new QToolButton(FormDocViewer); - buttonBackward->setObjectName(QString::fromUtf8("buttonBackward")); - buttonBackward->setAutoRaise(false); - - horizontalLayout_3->addWidget(buttonBackward); - - buttonForward = new QToolButton(FormDocViewer); - buttonForward->setObjectName(QString::fromUtf8("buttonForward")); - buttonForward->setAutoRaise(false); - - horizontalLayout_3->addWidget(buttonForward); - - buttonUp = new QToolButton(FormDocViewer); - buttonUp->setObjectName(QString::fromUtf8("buttonUp")); - buttonUp->setAutoRaise(false); - - horizontalLayout_3->addWidget(buttonUp); - - buttonRefresh = new QToolButton(FormDocViewer); - buttonRefresh->setObjectName(QString::fromUtf8("buttonRefresh")); - buttonRefresh->setAutoRaise(false); - - horizontalLayout_3->addWidget(buttonRefresh); - - buttonPrint = new QToolButton(FormDocViewer); - buttonPrint->setObjectName(QString::fromUtf8("buttonPrint")); - buttonPrint->setAutoRaise(false); - - horizontalLayout_3->addWidget(buttonPrint); - - buttonPdf = new QToolButton(FormDocViewer); - buttonPdf->setObjectName(QString::fromUtf8("buttonPdf")); - - horizontalLayout_3->addWidget(buttonPdf); - - horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_3->addItem(horizontalSpacer_2); - - buttonSave = new QToolButton(FormDocViewer); - buttonSave->setObjectName(QString::fromUtf8("buttonSave")); - buttonSave->setAutoRaise(false); - - horizontalLayout_3->addWidget(buttonSave); - - buttonExit = new QToolButton(FormDocViewer); - buttonExit->setObjectName(QString::fromUtf8("buttonExit")); - buttonExit->setAutoRaise(false); - - horizontalLayout_3->addWidget(buttonExit); - - - gridLayout->addLayout(horizontalLayout_3, 0, 0, 1, 2); + gridLayout->addWidget(splitter, 2, 0, 1, 1); retranslateUi(FormDocViewer); @@ -499,6 +502,15 @@ public: void retranslateUi(QWidget *FormDocViewer) { FormDocViewer->setWindowTitle(QApplication::translate("FormDocViewer", "Form", 0, QApplication::UnicodeUTF8)); + buttonHome->setText(QString()); + buttonBackward->setText(QString()); + buttonForward->setText(QString()); + buttonUp->setText(QString()); + buttonRefresh->setText(QString()); + buttonPrint->setText(QString()); + buttonPdf->setText(QString()); + buttonSave->setText(QString()); + buttonExit->setText(QString()); labelInstall->setText(QApplication::translate("FormDocViewer", "Harbour Installation Root:", 0, QApplication::UnicodeUTF8)); buttonInstall->setText(QString()); labelDocPrefix->setText(QApplication::translate("FormDocViewer", "Doc folder prefix:", 0, QApplication::UnicodeUTF8)); @@ -529,15 +541,6 @@ public: tabWidgetElements->setTabText(tabWidgetElements->indexOf(tabDesc), QApplication::translate("FormDocViewer", "Desc", 0, QApplication::UnicodeUTF8)); tabWidgetElements->setTabText(tabWidgetElements->indexOf(tabExamples), QApplication::translate("FormDocViewer", "Examples", 0, QApplication::UnicodeUTF8)); tabWidgetElements->setTabText(tabWidgetElements->indexOf(tabTests), QApplication::translate("FormDocViewer", "Tests", 0, QApplication::UnicodeUTF8)); - buttonHome->setText(QString()); - buttonBackward->setText(QString()); - buttonForward->setText(QString()); - buttonUp->setText(QString()); - buttonRefresh->setText(QString()); - buttonPrint->setText(QString()); - buttonPdf->setText(QString()); - buttonSave->setText(QString()); - buttonExit->setText(QString()); Q_UNUSED(FormDocViewer); } // retranslateUi diff --git a/harbour/doc/hdr_tpl.txt b/harbour/doc/hdr_tpl.txt index 50e715c8eb..7e938a1bad 100644 --- a/harbour/doc/hdr_tpl.txt +++ b/harbour/doc/hdr_tpl.txt @@ -76,7 +76,7 @@ FUNCTION HEADER TEMPLATE /* $DOC$ $NAME$ - + StartHere() $CATEGORY$ $SUBCATEGORY$ @@ -106,7 +106,7 @@ FUNCTION HEADER TEMPLATE $FILES$ $SEEALSO$ - comma separated list of references + Comma separated list of references $END$ */