+ contrib/hbide/actions.prg
+ contrib/hbide/browse.prg
+ contrib/hbide/changelog.prg
+ contrib/hbide/console.prg
+ contrib/hbide/dict.prg
+ contrib/hbide/docks.prg
+ contrib/hbide/docwriter.prg
+ contrib/hbide/edit.prg
+ contrib/hbide/editor.prg
+ contrib/hbide/environ.prg
+ contrib/hbide/findreplace.prg
+ contrib/hbide/format.prg
+ contrib/hbide/functions.prg
+ contrib/hbide/harbourhelp.prg
+ contrib/hbide/home.prg
+ contrib/hbide/main.prg
+ contrib/hbide/misc.prg
+ contrib/hbide/object.prg
+ contrib/hbide/parseexpr.c
+ contrib/hbide/plugins.prg
+ contrib/hbide/projectwizard.prg
+ contrib/hbide/projmanager.prg
+ contrib/hbide/saveload.prg
+ contrib/hbide/shortcuts.prg
+ contrib/hbide/skeletons.prg
+ contrib/hbide/sources.prg
+ contrib/hbide/stylesheets.prg
+ contrib/hbide/tags.prg
+ contrib/hbide/themes.prg
+ contrib/hbide/tools.prg
+ contrib/hbide/uisrcmanager.prg
+ contrib/hbide/wizard.prg
- contrib/hbide/ideactions.prg
- contrib/hbide/idebrowse.prg
- contrib/hbide/idechangelog.prg
- contrib/hbide/ideconsole.prg
- contrib/hbide/idedict.prg
- contrib/hbide/idedocks.prg
- contrib/hbide/idedocwriter.prg
- contrib/hbide/ideedit.prg
- contrib/hbide/ideeditor.prg
- contrib/hbide/ideenviron.prg
- contrib/hbide/idefindreplace.prg
- contrib/hbide/ideformat.prg
- contrib/hbide/idefunctions.prg
- contrib/hbide/ideharbourhelp.prg
- contrib/hbide/idehome.prg
- contrib/hbide/idemain.prg
- contrib/hbide/idemisc.prg
- contrib/hbide/ideobject.prg
- contrib/hbide/ideparseexpr.c
- contrib/hbide/ideplugins.prg
- contrib/hbide/ideprojectwizard.prg
- contrib/hbide/ideprojmanager.prg
- contrib/hbide/idesaveload.prg
- contrib/hbide/ideshortcuts.prg
- contrib/hbide/ideskeletons.prg
- contrib/hbide/idesources.prg
- contrib/hbide/idestylesheets.prg
- contrib/hbide/idetags.prg
- contrib/hbide/idethemes.prg
- contrib/hbide/idetools.prg
- contrib/hbide/ideuisrcmanager.prg
- contrib/hbide/idewizard.prg
* contrib/hbide/hbide.hbp
* deleted 'ide' prefix from all source files
622 lines
23 KiB
Plaintext
622 lines
23 KiB
Plaintext
/*
|
|
* $Id$
|
|
*/
|
|
|
|
/*
|
|
* Harbour Project source code:
|
|
*
|
|
* Copyright 2010 Pritpal Bedi <pritpal@vouchcac.com>
|
|
* www - http://harbour-project.org
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
* any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this software; see the file COPYING. If not, write to
|
|
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
|
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
|
|
*
|
|
* As a special exception, the Harbour Project gives permission for
|
|
* additional uses of the text contained in its release of Harbour.
|
|
*
|
|
* The exception is that, if you link the Harbour libraries with other
|
|
* files to produce an executable, this does not by itself cause the
|
|
* resulting executable to be covered by the GNU General Public License.
|
|
* Your use of that executable is in no way restricted on account of
|
|
* linking the Harbour library code into it.
|
|
*
|
|
* This exception does not however invalidate any other reasons why
|
|
* the executable file might be covered by the GNU General Public License.
|
|
*
|
|
* This exception applies only to the code released by the Harbour
|
|
* Project under the name Harbour. If you copy code from other
|
|
* Harbour Project or Free Software Foundation releases into a copy of
|
|
* Harbour, as the General Public License permits, the exception does
|
|
* not apply to the code that you add in this way. To avoid misleading
|
|
* anyone as to the status of such modified files, you must delete
|
|
* this exception notice from them.
|
|
*
|
|
* If you write modifications of your own for Harbour, it is your choice
|
|
* whether to permit this exception to apply to your modifications.
|
|
* If you do not wish that, delete this exception notice.
|
|
*
|
|
*/
|
|
/*----------------------------------------------------------------------*/
|
|
/*----------------------------------------------------------------------*/
|
|
/*----------------------------------------------------------------------*/
|
|
/*
|
|
* EkOnkar
|
|
* ( The LORD is ONE )
|
|
*
|
|
* Harbour-Qt IDE
|
|
*
|
|
* Pritpal Bedi <pritpal@vouchcac.com>
|
|
* 04Mar2010
|
|
*/
|
|
/*----------------------------------------------------------------------*/
|
|
/*----------------------------------------------------------------------*/
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
#include "hbide.ch"
|
|
#include "common.ch"
|
|
#include "hbclass.ch"
|
|
#include "xbp.ch"
|
|
#include "hbqtgui.ch"
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
#define __browserStat_anchorClicked__ 2001
|
|
#define __browserWelcome_contextMenuRequested__ 2002
|
|
#define __browserFaq_contextMenuRequested__ 2003
|
|
#define __tabWidget_currentChanged__ 2004
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
STATIC FUNCTION hbide_htmlImgAnchor( cHref, cImg, nWidth, nHeight )
|
|
DEFAULT nWidth TO 12
|
|
DEFAULT nHeight TO 12
|
|
RETURN '<a href="' + cHref + '"' + '>' + ' <img src="' + cImg + '"' + ;
|
|
' width="' + hb_ntos( nWidth ) + '" height="' + hb_ntos( nHeight ) + '"' + '</img>' + '</a>'
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
STATIC FUNCTION hbide_htmlAnchor( cHref, cText, cTooltip )
|
|
|
|
RETURN '<a href="' + cHref + '"' + iif( empty( cTooltip ), '', ' title="' + cTooltip + '"' ) +'>' + cText + '</A>'
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
CLASS IdeHome INHERIT IdeObject
|
|
|
|
DATA oWelcomeTab
|
|
DATA qWelcomeBrowser
|
|
DATA oFaqTab
|
|
DATA qFaqBrowser
|
|
DATA oView
|
|
|
|
DATA cClickedProject
|
|
DATA cClickedSource
|
|
|
|
DATA qCurBrowser
|
|
DATA qPrnDlg
|
|
|
|
METHOD new( oIde )
|
|
METHOD create( oIde )
|
|
METHOD destroy()
|
|
METHOD refresh()
|
|
METHOD execEvent( nEvent, p )
|
|
METHOD buildWelcomeTab()
|
|
METHOD activateTab( mp1, mp2, oTab )
|
|
METHOD addProjectsInfo( aHtm )
|
|
METHOD buildProjectDetails( cProjectTitle )
|
|
METHOD buildSourcesInfo( cProjectTitle, aSrcInfo )
|
|
METHOD formatSourceInfo( aHtm, aSrc )
|
|
METHOD buildFaqTab()
|
|
METHOD setStyleSheetTextBrowser( qBrw )
|
|
METHOD print()
|
|
METHOD paintRequested( qPrinter )
|
|
METHOD buildView()
|
|
METHOD show()
|
|
|
|
ENDCLASS
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
METHOD IdeHome:new( oIde )
|
|
::oIde := oIde
|
|
RETURN Self
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
METHOD IdeHome:create( oIde )
|
|
|
|
DEFAULT oIde TO ::oIde
|
|
::oIde := oIde
|
|
|
|
::buildView()
|
|
|
|
::oView:oTabWidget:oWidget:setDocumentMode( .t. )
|
|
::oView:oTabWidget:oWidget:setStyleSheet( "QTabWidget::tab-bar {left: 5px;}" )
|
|
::oView:qLayout:setContentsMargins( 0,0,0,0 )
|
|
|
|
::buildWelcomeTab()
|
|
::buildFaqTab()
|
|
|
|
::oView:oTabWidget:oWidget:setCurrentIndex( 0 )
|
|
|
|
::oView:hide()
|
|
|
|
RETURN Self
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
METHOD IdeHome:show()
|
|
|
|
IF ::oView:oWidget:isVisible()
|
|
::oView:hide()
|
|
ELSE
|
|
::oIde:setPosAndSizeByIniEx( ::oView:oWidget, ::oINI:cStatsDialogGeometry )
|
|
::oView:show()
|
|
ENDIF
|
|
|
|
RETURN Self
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
METHOD IdeHome:buildView()
|
|
LOCAL oFrame
|
|
|
|
oFrame := XbpWindow():new( ::oDa )
|
|
oFrame:oWidget := QWidget( ::oDa:oWidget )
|
|
oFrame:oWidget:resize( 750,300 )
|
|
oFrame:oWidget:connect( QEvent_Close, {|| ::oINI:cStatsDialogGeometry := hbide_posAndSize( ::oView:oWidget ) } )
|
|
|
|
oFrame:oWidget:setWindowFlags( Qt_Sheet )
|
|
oFrame:oWidget:setObjectName( "Stats" )
|
|
::oDa:addChild( oFrame )
|
|
|
|
oFrame:hbLayout := HBPLAYOUT_TYPE_VERTBOX
|
|
oFrame:qLayout:setContentsMargins( 0,0,0,0 )
|
|
|
|
oFrame:oTabWidget := XbpTabWidget():new():create( oFrame, , {0,0}, {600,300}, , .t. )
|
|
|
|
oFrame:oTabWidget:oWidget:setUsesScrollButtons( .t. )
|
|
oFrame:oTabWidget:oWidget:setMovable( .t. )
|
|
|
|
::oView := oFrame
|
|
|
|
::oIde:setPosAndSizeByIniEx( oFrame:oWidget, ::oINI:cStatsDialogGeometry )
|
|
|
|
RETURN self
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
METHOD IdeHome:destroy()
|
|
|
|
IF !empty( ::qPrnDlg )
|
|
::qPrnDlg:disconnect( "paintRequested(QPrinter*)" )
|
|
::qPrnDlg := NIL
|
|
ENDIF
|
|
|
|
::qWelcomeBrowser:disconnect( "anchorClicked(QUrl)" )
|
|
::qWelcomeBrowser:disconnect( "customContextMenuRequested(QPoint)" )
|
|
::qFaqBrowser:disconnect( "customContextMenuRequested(QPoint)" )
|
|
|
|
::oWelcomeTab := NIL
|
|
::qWelcomeBrowser := NIL
|
|
::qCurBrowser := NIL
|
|
|
|
RETURN Self
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
METHOD IdeHome:execEvent( nEvent, p )
|
|
LOCAL cAct, cText, cExt
|
|
|
|
IF ::lQuitting
|
|
RETURN Self
|
|
ENDIF
|
|
|
|
SWITCH nEvent
|
|
CASE __tabWidget_currentChanged__
|
|
IF p == 0
|
|
::qCurBrowser := ::qWelcomeBrowser
|
|
ELSEIF p == 1
|
|
::qCurBrowser := ::qFaqBrowser
|
|
ENDIF
|
|
EXIT
|
|
CASE __browserStat_anchorClicked__
|
|
cText := p:toString()
|
|
|
|
IF "prj-" $ lower( cText )
|
|
::cClickedProject := substr( cText, 5 )
|
|
::buildProjectDetails( ::cClickedProject )
|
|
|
|
ELSEIF "fle-" $ lower( cText )
|
|
::cClickedSource := substr( cText, 5 )
|
|
|
|
/* Send it for Editing */
|
|
hb_fNameSplit( ::cClickedSource, , , @cExt )
|
|
IF lower( cExt ) == ".hbp"
|
|
::buildProjectDetails( ::cClickedSource )
|
|
ELSE
|
|
::oSM:editSource( hbide_stripFilter( ::cClickedSource ) )
|
|
ENDIF
|
|
/* Stay on the Same Page */
|
|
::buildProjectDetails( ::cClickedProject )
|
|
ENDIF
|
|
EXIT
|
|
CASE __browserWelcome_contextMenuRequested__
|
|
CASE __browserFaq_contextMenuRequested__
|
|
IF !empty( cAct := hbide_popupBrwContextMenu( ::qCurBrowser, p ) )
|
|
IF cAct $ "Back,Forward,Home"
|
|
::refresh()
|
|
ELSEIF cAct == "Print"
|
|
::print()
|
|
ENDIF
|
|
ENDIF
|
|
EXIT
|
|
ENDSWITCH
|
|
RETURN Self
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
METHOD IdeHome:activateTab( mp1, mp2, oTab )
|
|
|
|
HB_SYMBOL_UNUSED( mp1 )
|
|
HB_SYMBOL_UNUSED( mp2 )
|
|
|
|
IF oTab == ::oWelcomeTab
|
|
::qCurBrowser := ::qWelcomeBrowser
|
|
ELSEIF oTab == ::oFaqTab
|
|
::qCurBrowser := ::qFaqBrowser
|
|
ENDIF
|
|
|
|
RETURN Self
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
METHOD IdeHome:print()
|
|
|
|
::qPrnDlg := NIL
|
|
IF empty( ::qPrnDlg )
|
|
::qPrnDlg := QPrintPreviewDialog()
|
|
::qPrnDlg:setWindowTitle( "Welcome::Projects" )
|
|
::qPrnDlg:setWindowIcon( QIcon( hbide_image( "hbide" ) ) )
|
|
::qPrnDlg:connect( "paintRequested(QPrinter*)", {|p| ::paintRequested( p ) } )
|
|
ENDIF
|
|
|
|
::qPrnDlg:exec()
|
|
|
|
RETURN self
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
METHOD IdeHome:paintRequested( qPrinter )
|
|
::qCurBrowser:print( qPrinter )
|
|
RETURN Self
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
METHOD IdeHome:setStyleSheetTextBrowser( qBrw )
|
|
|
|
qBrw:setStyleSheet( 'QTextBrowser { background-image: url(:/resources/hbidesplashwatermark.png); ' + ;
|
|
'background-attachment: scroll; background-repeat:no-repeat; background-position:center; ' + ;
|
|
'background-color: rgb(255,255,255); }' )
|
|
|
|
RETURN Self
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
METHOD IdeHome:buildWelcomeTab()
|
|
LOCAL oTab, qBrw, qSList
|
|
|
|
//oTab := XbpTabPage():new( ::aViews[ 1 ], , { 5,5 }, { 700,400 }, , .t. )
|
|
oTab := XbpTabPage():new( ::oView, , { 5,5 }, { 700,400 }, , .t. )
|
|
oTab:caption := "Welcome"
|
|
oTab:minimized := .F.
|
|
oTab:create()
|
|
oTab:tabActivate := {|mp1,mp2,oXbp| ::activateTab( mp1, mp2, oXbp ) }
|
|
|
|
oTab:hbLayout := HBPLAYOUT_TYPE_VERTBOX
|
|
oTab:qLayout:setContentsMargins( 0,0,0,0 )
|
|
|
|
qBrw := QTextBrowser()
|
|
oTab:qLayout:addWidget( qBrw )
|
|
qBrw:setContextMenuPolicy( Qt_CustomContextMenu )
|
|
::setStyleSheetTextBrowser( qBrw )
|
|
|
|
::oWelcomeTab := oTab
|
|
::qWelcomeBrowser := qBrw
|
|
::qCurBrowser := qBrw
|
|
|
|
qBrw:connect( "anchorClicked(QUrl)" , {|p| ::execEvent( __browserStat_anchorClicked__ , p ) } )
|
|
qBrw:connect( "customContextMenuRequested(QPoint)", {|p| ::execEvent( __browserWelcome_contextMenuRequested__, p ) } )
|
|
|
|
qSList := QStringList()
|
|
qSList:append( hb_dirBase() + "docs" )
|
|
qBrw:setSearchPaths( qSList )
|
|
|
|
RETURN Self
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
METHOD IdeHome:refresh()
|
|
LOCAL aHtm := {}
|
|
|
|
aadd( aHtm, '<html>' )
|
|
aadd( aHtm, ' <body align=center valign=center>' )
|
|
aadd( aHtm, ' <table cols="7" width="95%">' )
|
|
aadd( aHtm, ' <tr>' )
|
|
aadd( aHtm, ' <td align="left" valign="center" colspan="5">' )
|
|
aadd( aHtm, ' <img src=":/resources/project.png"' + '</img>' + ' ' + ' ' + ' ' )
|
|
aadd( aHtm, ' <font face="Times New Roman" color="#FF4719" size="7"><b><U>Projects</u></b></font>' )
|
|
aadd( aHtm, ' ' + ' ' + ' ' )
|
|
aadd( aHtm, ' <font face="Times New Roman" size="5">' + '( ' + hbide_pathNormalized( ::oIde:cProjIni, .f. ) + ' )' + '</font>' )
|
|
aadd( aHtm, ' </td>' )
|
|
aadd( aHtm, ' </tr>' )
|
|
aadd( aHtm, ' <tr bgcolor="#F0F0F5">' )
|
|
aadd( aHtm, ' <th width="150" >Title </th>' )
|
|
aadd( aHtm, ' <th width="50" >Type </th>' )
|
|
aadd( aHtm, ' <th width="75" >Sources </th>' )
|
|
aadd( aHtm, ' <th width="300" >Location </th>' )
|
|
aadd( aHtm, ' <th width="120" >Last Modified </th>' )
|
|
AADD( aHtm, ' </tr>' )
|
|
//
|
|
::addProjectsInfo( @aHtm )
|
|
//
|
|
aadd( aHtm, ' </table>' )
|
|
aadd( aHtm, ' </body>' )
|
|
aadd( aHtm, '</html>' )
|
|
//
|
|
::qWelcomeBrowser:clear()
|
|
//
|
|
::qWelcomeBrowser:setHTML( hbide_arrayToMemo( aHtm ) )
|
|
|
|
RETURN Self
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
METHOD IdeHome:addProjectsInfo( aHtm )
|
|
LOCAL a_, prp_, src_, dir_, cIcon
|
|
|
|
IF empty( ::aProjects )
|
|
aadd( aHtm, ' <tr>' )
|
|
aadd( aHtm, ' <td>' )
|
|
aadd( aHtm, ' ' + 'None' )
|
|
aadd( aHtm, ' </td>' )
|
|
aadd( aHtm, ' <tr>' )
|
|
ELSE
|
|
FOR EACH a_ IN ::aProjects
|
|
prp_ := a_[ 3, PRJ_PRP_PROPERTIES, 1 ]
|
|
src_ := a_[ 3, PRJ_PRP_SOURCES , 1 ]
|
|
dir_ := directory( a_[ 1 ] )
|
|
cIcon := hbide_imageForProjectType( prp_[ PRJ_PRP_TYPE ] )
|
|
|
|
aadd( aHtm, ' <tr height="1">' )
|
|
aadd( aHtm, ' <td><b>' )
|
|
aadd( aHtm, ' ' + hbide_htmlImgAnchor( 'prj-' + prp_[ PRJ_PRP_TITLE ], ':/resources/' + cIcon + '.png' ) + ' ' )
|
|
aadd( aHtm, ' ' + hbide_htmlAnchor( 'prj-' + prp_[ PRJ_PRP_TITLE ], prp_[ PRJ_PRP_TITLE ], a_[ 1 ] ) )
|
|
aadd( aHtm, ' </b></td>' )
|
|
aadd( aHtm, ' <td align=center>' )
|
|
aadd( aHtm, ' ' + left( prp_[ PRJ_PRP_TYPE ], 3 ) )
|
|
aadd( aHtm, ' </td>' )
|
|
aadd( aHtm, ' <td align=center>' )
|
|
aadd( aHtm, ' ' + hb_ntos( Len( src_ ) ) )
|
|
aadd( aHtm, ' </td>' )
|
|
aadd( aHtm, ' <td align=left>' )
|
|
aadd( aHtm, ' ' + hbide_pathNormalized( a_[ 1 ], .f. ) )
|
|
aadd( aHtm, ' </td>' )
|
|
aadd( aHtm, ' <td align=center>' )
|
|
IF ! empty( dir_ )
|
|
aadd( aHtm, ' ' + dtoc( dir_[ 1,3 ] ) + " " + dir_[ 1,4 ] )
|
|
ELSE
|
|
aadd( aHtm, ' ' )
|
|
ENDIF
|
|
aadd( aHtm, ' </td>' )
|
|
aadd( aHtm, ' </tr>' )
|
|
NEXT
|
|
ENDIF
|
|
RETURN Self
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
METHOD IdeHome:buildProjectDetails( cProjectTitle )
|
|
LOCAL aSrc, cSrc, dir_, cRoot, cExt, cIcon, cName, cPath
|
|
LOCAL aSrcInfo := {}, a_:= {}
|
|
|
|
aSrc := ::oPM:getSourcesByProjectTitle( cProjectTitle )
|
|
cRoot := ::oPM:getProjectPathFromTitle( cProjectTitle )
|
|
|
|
FOR EACH cSrc IN aSrc
|
|
aadd( a_, hbide_syncProjPath( cRoot, cSrc ) )
|
|
NEXT
|
|
a_ := hbide_groupSources( "org", a_ )
|
|
FOR EACH cSrc IN a_
|
|
hb_fNameSplit( cSrc, @cPath, @cName, @cExt )
|
|
cExt := lower( cExt )
|
|
cIcon := hbide_imageForFileType( cExt )
|
|
IF !empty( dir_:= directory( cSrc ) )
|
|
// bytes date time
|
|
aadd( aSrcInfo, { cSrc, hbide_pathNormalized( cPath,.f. ), cName, cExt, cIcon, dir_[ 1,2 ], dir_[ 1,3 ], dir_[ 1,4 ] } )
|
|
ENDIF
|
|
NEXT
|
|
|
|
IF !empty( aSrcInfo )
|
|
::buildSourcesInfo( cProjectTitle, aSrcInfo )
|
|
ELSE
|
|
::refresh()
|
|
ENDIF
|
|
|
|
RETURN aSrcInfo
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
METHOD IdeHome:buildSourcesInfo( cProjectTitle, aSrcInfo )
|
|
LOCAL aHtm := {}, aSrc
|
|
LOCAL cIcon := hbide_imageForProjectType( ::oPM:getProjectTypeFromTitle( cProjectTitle ) )
|
|
|
|
aadd( aHtm, '<html>' )
|
|
aadd( aHtm, ' <body align=center valign=center>' )
|
|
aadd( aHtm, ' <table cols="7" width="95%">' )
|
|
aadd( aHtm, ' <tr><td align=left>' )
|
|
aadd( aHtm, ' <img src="' + ':/resources/' + cIcon + '.png' + '"' + '</img>' + ' ' + ' ' + ' ' )
|
|
aadd( aHtm, ' <font color="#FF4719" size=5><u>' + cProjectTitle + '</u></font>' )
|
|
aadd( aHtm, ' </td>' )
|
|
aadd( aHtm, ' <tr bgcolor="#F0F0F5">' )
|
|
aadd( aHtm, ' <th width="150" >Source</th>' )
|
|
aadd( aHtm, ' <th width="50" >Type</th>' )
|
|
aadd( aHtm, ' <th width="60" >Size</th>' )
|
|
aadd( aHtm, ' <th width="250" >Location</th>' )
|
|
aadd( aHtm, ' <th width="120" >Last Modified</th>' )
|
|
AADD( aHtm, ' </tr>' )
|
|
//
|
|
FOR EACH aSrc IN aSrcInfo
|
|
::formatSourceInfo( @aHtm, aSrc )
|
|
NEXT
|
|
//
|
|
aadd( aHtm, ' </table>' )
|
|
aadd( aHtm, ' </body>' )
|
|
aadd( aHtm, '</html>' )
|
|
//
|
|
::qWelcomeBrowser:clear()
|
|
//
|
|
::qWelcomeBrowser:setHTML( hbide_arrayToMemo( aHtm ) )
|
|
|
|
RETURN Self
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
METHOD IdeHome:formatSourceInfo( aHtm, aSrc )
|
|
|
|
aadd( aHtm, ' <tr>' )
|
|
aadd( aHtm, ' <td><b>' )
|
|
aadd( aHtm, ' ' + hbide_htmlImgAnchor( 'fle-' + aSrc[ 1 ], ':/resources/' + aSrc[ 5 ] + '.png' ) + ' ' )
|
|
aadd( aHtm, ' ' + hbide_htmlAnchor( 'fle-' + aSrc[ 1 ], aSrc[ 3 ], aSrc[ 1 ] ) )
|
|
aadd( aHtm, ' </b></td>' )
|
|
aadd( aHtm, ' <td>' )
|
|
aadd( aHtm, ' ' + aSrc[ 4 ] )
|
|
aadd( aHtm, ' </td>' )
|
|
aadd( aHtm, ' <td align=center>' )
|
|
aadd( aHtm, ' ' + hb_ntos( aSrc[ 6 ] ) )
|
|
aadd( aHtm, ' </td>' )
|
|
aadd( aHtm, ' <td align=left>' )
|
|
aadd( aHtm, ' ' + aSrc[ 2 ] )
|
|
aadd( aHtm, ' </td>' )
|
|
aadd( aHtm, ' <td align=center>' )
|
|
aadd( aHtm, ' ' + dtoc( aSrc[ 7 ] ) + " " + aSrc[ 8 ] )
|
|
aadd( aHtm, ' </td>' )
|
|
aadd( aHtm, ' </tr>' )
|
|
|
|
RETURN Self
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
METHOD IdeHome:buildFaqTab()
|
|
LOCAL oTab, qBrw, aFaq, aHtm, a_, b_, s
|
|
|
|
//oTab := XbpTabPage():new( ::aViews[ 1 ], , { 5,5 }, { 700,400 }, , .t. )
|
|
oTab := XbpTabPage():new( ::oView, , { 5,5 }, { 700,400 }, , .t. )
|
|
oTab:caption := "FAQ's"
|
|
oTab:minimized := .F.
|
|
oTab:create()
|
|
oTab:tabActivate := {|mp1,mp2,oXbp| ::activateTab( mp1, mp2, oXbp ) }
|
|
|
|
oTab:hbLayout := HBPLAYOUT_TYPE_VERTBOX
|
|
oTab:qLayout:setContentsMargins( 0,0,0,0 )
|
|
|
|
qBrw := QTextBrowser()
|
|
oTab:qLayout:addWidget( qBrw )
|
|
qBrw:setContextMenuPolicy( Qt_CustomContextMenu )
|
|
::setStyleSheetTextBrowser( qBrw )
|
|
|
|
qBrw:connect( "customContextMenuRequested(QPoint)", {|p| ::execEvent( __browserFaq_contextMenuRequested__, p ) } )
|
|
|
|
::oFaqTab := oTab
|
|
::qFaqBrowser := qBrw
|
|
|
|
aFaq := hbide_getFaqs() ; a_:= aFaq[ 1 ]; b_:= aFaq[ 2 ]
|
|
aHtm := {}
|
|
|
|
aadd( aHtm, '<html>' )
|
|
aadd( aHtm, ' <body align=center valign=center>' )
|
|
aadd( aHtm, ' <table cols="7" width="95%">' )
|
|
FOR EACH s IN a_
|
|
aadd( aHtm, ' <tr><td></td></tr>' )
|
|
aadd( aHtm, ' <tr><td>' )
|
|
aadd( aHtm, ' <font color="red" size=4>' + s + '</font>' )
|
|
aadd( aHtm, ' </td></tr>' )
|
|
aadd( aHtm, ' <tr><td>' )
|
|
aadd( aHtm, ' <font color="black" size=3>' + b_[ s:__enumIndex() ] + '</font>' )
|
|
aadd( aHtm, ' </td></tr>' )
|
|
NEXT
|
|
aadd( aHtm, ' </table>' )
|
|
aadd( aHtm, ' </body>' )
|
|
aadd( aHtm, '</html>' )
|
|
//
|
|
::qFaqBrowser:clear()
|
|
//
|
|
::qFaqBrowser:setHTML( hbide_arrayToMemo( aHtm ) )
|
|
|
|
RETURN Self
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
|
|
STATIC FUNCTION hbide_getFaqs()
|
|
LOCAL a_:= {}, b_:= {}
|
|
|
|
aadd( a_, 'Does HbIDE support editing of same source at more than one place simultaneously ?' )
|
|
aadd( b_, 'Yes. HbIDE provides for splitting an editing window, horizontally and vertically, ' + ;
|
|
'both ways. Right-click anywhere in the editor, point to "Split..." and then ' + ;
|
|
'click on required option.' )
|
|
|
|
aadd( a_, 'Does HbIDE support session management ?' )
|
|
aadd( b_, 'Yes. And in a unique way. It provides to construct n number of "Panels" where you can spread ' + ;
|
|
'sources. Each panel is given a name as well as corresponding button on the left-toolbar, a colored ' + ;
|
|
'circle, to bring it forward. New panel can be created from selecting "New..." from drop-down ' + ;
|
|
'list on top-toolbar and providing a name in the editing dialog. For this reason you will never ' + ;
|
|
'need to exit HbIDE and reenter again. It is a big productivity boost.' )
|
|
|
|
aadd( a_, 'Does HbIDE allows to compile a project for different compilers and/or environments ?' )
|
|
aadd( b_, 'Yes. Infact this feature had been the one of the main reasons of HbIDEs existance. ' + ;
|
|
'All you have to do is to enter different environment settings in _ONE_ hbide.env file which ' + ;
|
|
'resides alongside hbide.ini. HbIDE provides the interface to manipulate this .env settings ' + ;
|
|
'which can be invoked from right-toolbar icon "Compiler Environments". Follow the input fields. ' + ;
|
|
'A template is provided in "hbide.env", inspect it and you are through. Once hbide.env ' + ;
|
|
'is ready, you will simply need to switch over the other environment which can be invoked ' + ;
|
|
'via right-click on a project node in "Projects" tree and point to "Select an environment" ' + ;
|
|
'and click on listed options. Next step is just to build the project.' )
|
|
|
|
aadd( a_, 'Can we keep any other content in hbide.ini ?' )
|
|
aadd( b_, 'No. hbide.ini is always re-written at the time HbIDE exits. Also this action is executed ' + ;
|
|
'several times depending upon the underlying needs. However, you can alter the contents in some ' + ;
|
|
'sections, i.e., [Files], [Projects], etc., but only before running HbIDE. At exit, it will ' + ;
|
|
're-write it again.' )
|
|
|
|
aadd( a_, 'Does HbIDE provides "intellisense" ? If yes, in what aspects ?' )
|
|
aadd( b_, 'Yes. Not so powerful yet, but "yes". HbIDE embeds two components as the basis of this intellisense, ' + ;
|
|
hb_eol() + ;
|
|
' 1. Harbour Documentation, and ' + hb_eol() + ;
|
|
' 2. Project(s) Prototype Tagging. ' + hb_eol() + ;
|
|
'Both these components can be pressed in servive simultaneously and as per need. Both are loaded ' + ;
|
|
'only when requested. Prototype Tagging extends one step forward as to offer to load only those ' + ;
|
|
'projects which a developer will be working on during that session. Both components can be aligned ' + ;
|
|
'on the side corners to provide always-on view of the actual contents. The moment you press "(" ' + ;
|
|
'HbIDE examines the contents of these components, if the function is available in Harbour Docs, ' + ;
|
|
'its details are dumped into the viewer, otherwise if the function is contained in the tagged ' + ;
|
|
'prototypes, it is made current in the list, and a html formatted prototype is displayed as tooltip ' + ;
|
|
'beneth the current caret position. ' + hb_eol() + ;
|
|
hb_eol() + ;
|
|
'Code completion tool is almost done with, and probably will make up its presence in the HbIDE soon. ' )
|
|
|
|
RETURN { a_, b_ }
|
|
|
|
/*----------------------------------------------------------------------*/
|