2010-01-26 02:10 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbxbp/Makefile
* contrib/hbxbp/xbpgeneric.prg
* contrib/hbxbp/xbpwindow.prg
+ contrib/hbxbp/hbpqtui.prg
- contrib/hbxbp/xbpqtuiloader.prg
% Renamed XbpQtUiLoader() class to HbpQtUI()
This is Harbour extension to Xbase++ class framework.
* contrib/hbide/hbide.prg
* contrib/hbide/ideactions.prg
* contrib/hbide/idedocks.prg
* contrib/hbide/idefindreplace.prg
* contrib/hbide/idemisc.prg
* contrib/hbide/ideprojmanager.prg
* contrib/hbide/idethemes.prg
* contrib/hbide/resources/projectproperties.ui
% Changed <Main Menu> prompts:
+ <Environments> in <Project>
- <Options> => <Setup>
- <Codecs> => <Setup> <Codecs>
! Separated the <Define Environments> dialog from <Project Properties>
And added a menu option in <Projects> main-menu prompt.
+ Implemented to load xMate's Project file (.xhp) when a new project
is created. Can be invoked via a push button on top-right corner of
<General> tab.
This commit is contained in:
@@ -17,6 +17,33 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-01-26 02:10 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbxbp/Makefile
|
||||
* contrib/hbxbp/xbpgeneric.prg
|
||||
* contrib/hbxbp/xbpwindow.prg
|
||||
+ contrib/hbxbp/hbpqtui.prg
|
||||
- contrib/hbxbp/xbpqtuiloader.prg
|
||||
% Renamed XbpQtUiLoader() class to HbpQtUI()
|
||||
This is Harbour extension to Xbase++ class framework.
|
||||
|
||||
* contrib/hbide/hbide.prg
|
||||
* contrib/hbide/ideactions.prg
|
||||
* contrib/hbide/idedocks.prg
|
||||
* contrib/hbide/idefindreplace.prg
|
||||
* contrib/hbide/idemisc.prg
|
||||
* contrib/hbide/ideprojmanager.prg
|
||||
* contrib/hbide/idethemes.prg
|
||||
* contrib/hbide/resources/projectproperties.ui
|
||||
% Changed <Main Menu> prompts:
|
||||
+ <Environments> in <Project>
|
||||
- <Options> => <Setup>
|
||||
- <Codecs> => <Setup> <Codecs>
|
||||
! Separated the <Define Environments> dialog from <Project Properties>
|
||||
And added a menu option in <Projects> main-menu prompt.
|
||||
+ Implemented to load xMate's Project file (.xhp) when a new project
|
||||
is created. Can be invoked via a push button on top-right corner of
|
||||
<General> tab.
|
||||
|
||||
2010-01-25 18:33 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbide/idemisc.prg
|
||||
* contrib/hbide/ideprojmanager.prg
|
||||
|
||||
@@ -441,6 +441,7 @@ METHOD HbIde:execAction( cKey )
|
||||
CASE "Properties"
|
||||
CASE "SelectProject"
|
||||
CASE "CloseProject"
|
||||
CASE "Environments"
|
||||
::execProjectAction( cKey )
|
||||
EXIT
|
||||
CASE "New"
|
||||
@@ -632,6 +633,9 @@ METHOD HbIde:execSourceAction( cKey )
|
||||
|
||||
METHOD HbIde:execProjectAction( cKey )
|
||||
SWITCH cKey
|
||||
CASE "Environments"
|
||||
::oPM:manageEnvironments()
|
||||
EXIT
|
||||
CASE "NewProject"
|
||||
::oPM:loadProperties( , .t., .t., .t. )
|
||||
EXIT
|
||||
|
||||
@@ -293,6 +293,8 @@ METHOD IdeActions:loadActions()
|
||||
aadd( aAct, { "StreamComment" , "Stream Comment" , "StreamComment" , "Sh+^Q", "No", "Yes" } )
|
||||
aadd( aAct, { "BlockComment" , "Block Comment" , "BlockComment" , "Sh+^/", "No", "Yes" } )
|
||||
|
||||
aadd( aAct, { "Environments" , "Environments..." , "Envconfig" , "" , "No", "Yes" } )
|
||||
|
||||
RETURN aAct
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
@@ -488,6 +490,8 @@ METHOD IdeActions:buildMainMenu()
|
||||
hbide_menuAddSep( oSubMenu )
|
||||
oSubMenu:addItem( { ::getAction( "SelectProject" ), {|| oIde:execAction( "SelectProject" ) } } )
|
||||
oSubMenu:addItem( { ::getAction( "CloseProject" ), {|| oIde:execAction( "CloseProject" ) } } )
|
||||
hbide_menuAddSep( oSubMenu )
|
||||
oSubMenu:addItem( { ::getAction( "Environments" ), {|| oIde:execAction( "Environments" ) } } )
|
||||
oMenuBar:addItem( { oSubMenu, NIL } )
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
@@ -524,15 +528,13 @@ METHOD IdeActions:buildMainMenu()
|
||||
/* Options */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
oSubMenu := XbpMenu():new( oMenuBar ):create()
|
||||
oSubMenu:title := "~Options"
|
||||
oSubMenu:title := "~Setup"
|
||||
oSubMenu:addItem( { ::getAction( "ManageThemes" ), {|| oIde:oThemes:fetch() } } )
|
||||
oSubMenu:addItem( { ::getAction( "DefaultTheme" ), {|| oIde:oThemes:setWrkTheme() } } )
|
||||
oMenuBar:addItem( { oSubMenu, NIL } )
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Codec */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
oSubMenu := hbide_buildCodecMenu( oIde, oMenuBar )
|
||||
hbide_menuAddSep( oSubMenu )
|
||||
oSubMenu2 := hbide_buildCodecMenu( oIde, oSubMenu )
|
||||
oSubMenu2:title := "~Codecs"
|
||||
oSubMenu:addItem( { oSubMenu2, NIL } )
|
||||
oMenuBar:addItem( { oSubMenu, NIL } )
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
@@ -552,11 +554,11 @@ METHOD IdeActions:buildMainMenu()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
STATIC FUNCTION hbide_buildCodecMenu( oIde, oMenuBar )
|
||||
STATIC FUNCTION hbide_buildCodecMenu( oIde, oMenu )
|
||||
LOCAL oSubMenu, oSub1
|
||||
|
||||
oSubMenu := XbpMenu():new( oMenuBar ):create()
|
||||
oSubMenu:title := "~Codec"
|
||||
oSubMenu := XbpMenu():new( oMenu ):create()
|
||||
|
||||
oSubMenu:addItem( { "Apple Roman " , {|| oIde:setCodec( "Apple Roman" ) } } )
|
||||
oSubMenu:addItem( { "Big5 " , {|| oIde:setCodec( "Big5" ) } } )
|
||||
oSubMenu:addItem( { "Big5-HKSCS " , {|| oIde:setCodec( "Big5-HKSCS" ) } } )
|
||||
|
||||
@@ -128,7 +128,7 @@ METHOD IdeDocks:buildDialog()
|
||||
|
||||
#if 1
|
||||
LOCAL oUI
|
||||
oUI := XbpQtUiLoader():new()
|
||||
oUI := HbpQtUI():new()
|
||||
oUI:file := ::resPath + "mainWindow.ui"
|
||||
oUI:create()
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ METHOD IdeFindReplace:create( oIde )
|
||||
|
||||
::oIde := oIde
|
||||
|
||||
::oUI := XbpQtUiLoader():new( ::oIde:oDlg )
|
||||
::oUI := HbpQtUI():new( ::oIde:oDlg )
|
||||
::oUI:file := ::oIde:resPath + "finddialog.ui"
|
||||
::oUI:create()
|
||||
::oUI:setWindowFlags( Qt_Sheet )
|
||||
|
||||
@@ -585,6 +585,11 @@ FUNCTION hbide_pathFile( cPath, cFile )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
FUNCTION hbide_pathStripLastSlash( cPath )
|
||||
RETURN iif( right( cPath, 1 ) $ "\/", substr( cPath, 1, len( cPath ) - 1 ), cPath )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
FUNCTION hbide_pathToOSPath( cPath )
|
||||
|
||||
cPath := strtran( cPath, "/" , hb_osPathSeparator() )
|
||||
@@ -797,6 +802,43 @@ FUNCTION hbide_parseFilter( s, cKey, cVal )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
FUNCTION hbide_xmateMetaToHbMeta( cText )
|
||||
LOCAL n, n1, cKey
|
||||
|
||||
IF ( n := at( "%", cText ) ) > 0
|
||||
IF ( n1 := hb_at( "%", cText, n+1 ) ) > 0
|
||||
cKey := substr( cText, n, n1-n+1 )
|
||||
cText := substr( cText, 1, n-1 ) + hbide_exchangeMeta( cKey ) + substr( cText, n1+1 )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
RETURN cText
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
FUNCTION hbide_exchangeMeta( cKey )
|
||||
SWITCH cKey
|
||||
CASE "%HB_INC_INSTALL%"
|
||||
RETURN "{hb_inc_install}"
|
||||
CASE "%HB_LIB_INSTALL%"
|
||||
EXIT
|
||||
CASE "%HB_BIN_INSTALL%"
|
||||
EXIT
|
||||
CASE "%C_INC_INSTALL%"
|
||||
EXIT
|
||||
CASE "%C_LIB_INSTALL%"
|
||||
EXIT
|
||||
CASE "%C_BIN_INSTALL%"
|
||||
EXIT
|
||||
CASE "%HB_%"
|
||||
EXIT
|
||||
CASE "%HOME%"
|
||||
EXIT
|
||||
ENDSWITCH
|
||||
RETURN cKey
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
FUNCTION hbide_dbg( ... )
|
||||
HB_TRACE( HB_TR_ALWAYS, ... )
|
||||
RETURN nil
|
||||
|
||||
@@ -361,6 +361,8 @@ CLASS IdeProjManager INHERIT IdeObject
|
||||
METHOD showOutput( cOutput, mp2, oProcess )
|
||||
METHOD finished( nExitCode, nExitStatus, oProcess )
|
||||
METHOD saveEnvironments()
|
||||
METHOD manageEnvironments()
|
||||
METHOD loadXhpProject()
|
||||
ENDCLASS
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
@@ -493,10 +495,12 @@ METHOD IdeProjManager:fetchProperties()
|
||||
LOCAL cLukupPng
|
||||
LOCAL cPrjLoc := hb_dirBase() + "projects"
|
||||
|
||||
::oUI := XbpQtUiLoader():new( ::oDlg )
|
||||
::oUI := HbpQtUI():new( ::oDlg )
|
||||
::oUI:file := ::resPath + "projectproperties.ui"
|
||||
::oUI:create()
|
||||
|
||||
::oUI:q_tabWidget:removeTab( 4 )
|
||||
|
||||
::oUI:q_comboPrjType:addItem( "Executable" )
|
||||
::oUI:q_comboPrjType:addItem( "Library" )
|
||||
::oUI:q_comboPrjType:addItem( "Dll" )
|
||||
@@ -518,9 +522,7 @@ METHOD IdeProjManager:fetchProperties()
|
||||
::oUI:q_buttonChooseWd :setIcon( cLukupPng )
|
||||
::oUI:q_buttonChooseDest :setIcon( cLukupPng )
|
||||
::oUI:q_buttonBackup :setIcon( cLukupPng )
|
||||
::oUI:q_buttonPathMk2 :setIcon( cLukupPng )
|
||||
::oUI:q_buttonPathEnv :setIcon( cLukupPng )
|
||||
::oUI:q_buttonSaveEnv :setIcon( ::resPath + "save.png" )
|
||||
::oUI:q_buttonXmate :setIcon( ::resPath + "xmate.png" )
|
||||
|
||||
::oUI:q_buttonSelect :setIcon( ::resPath + "open.png" )
|
||||
::oUI:q_buttonSort :setIcon( ::resPath + "toupper.png" ) // TODO: toupper.png => atoz.png
|
||||
@@ -534,7 +536,6 @@ METHOD IdeProjManager:fetchProperties()
|
||||
::oUI:signal( "buttonSort" , "clicked()", {|| ::sortSources( "az" ) } )
|
||||
::oUI:signal( "buttonSortZA" , "clicked()", {|| ::sortSources( "za" ) } )
|
||||
::oUI:signal( "buttonSortOrg" , "clicked()", {|| ::sortSources( "org" ) } )
|
||||
::oUI:signal( "buttonSaveEnv" , "clicked()", {|| ::saveEnvironments() } )
|
||||
//
|
||||
::oUI:signal( "tabWidget" , "currentChanged(int)", {|o,p| ::updateHbp( p, o ) } )
|
||||
::oUI:signal( "editMetaData" , "textChanged()" , {|o| ::updateMetaData( o ) } )
|
||||
@@ -543,13 +544,7 @@ METHOD IdeProjManager:fetchProperties()
|
||||
::oUI:signal( "buttonChooseWd" , "clicked()", {|| ::PromptForPath( 'editWrkFolder', 'Choose Working Folder...' ) } )
|
||||
::oUI:signal( "buttonChooseDest" , "clicked()", {|| ::PromptForPath( 'editDstFolder', 'Choose Destination Folder...' ) } )
|
||||
::oUI:signal( "buttonBackup" , "clicked()", {|| ::PromptForPath( 'editBackup' , 'Choose Backup Folder...' ) } )
|
||||
::oUI:signal( "buttonPathMk2" , "clicked()", {|| ::PromptForPath( 'editPathMk2' , 'Choose hbMK2.exe Folder...' ) } )
|
||||
::oUI:signal( "buttonPathEnv" , "clicked()", {|| ::PromptForPath( 'editPathEnv' , 'Choose hbIDE.env Folder...' ), ;
|
||||
::oUI:q_editCompilers:setPlainText( hb_memoread( hbide_pathFile( ::oUI:q_editPathEnv:text(), "hbide.env" ) ) ) } )
|
||||
|
||||
::oUI:q_editPathMk2 :setText( ::aINI[ INI_HBIDE, PathMk2 ] )
|
||||
::oUI:q_editPathEnv :setText( ::aINI[ INI_HBIDE, PathEnv ] )
|
||||
::oUI:q_editCompilers:setPlainText( hb_memoread( hbide_pathFile( ::aINI[ INI_HBIDE, PathEnv ], "hbide.env" ) ) )
|
||||
::oUI:signal( "buttonXmate" , "clicked()", {|| ::loadXhpProject() } )
|
||||
|
||||
IF empty( ::aPrjProps )
|
||||
/*
|
||||
@@ -693,6 +688,191 @@ METHOD IdeProjManager:save( lCanClose )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeProjManager:loadXhpProject()
|
||||
LOCAL cXhp, a_, s, n, cPart, cKey, cVal, b_
|
||||
LOCAL cHome, cOutname, cType, cDefine, cInclude, aFiles := {}
|
||||
LOCAL cRun, cParams, cDestntn, cMap
|
||||
|
||||
cXhp := hbide_fetchAFile( ::oDlg, "Selecet xMate Project File", { { "xMate Project Files", "*.xhp" } } )
|
||||
|
||||
IF empty( cXhp )
|
||||
RETURN Self
|
||||
ENDIF
|
||||
hb_fNameSplit( cXhp, @cHome, @cOutName )
|
||||
cHome := hbide_pathStripLastSlash( cHome )
|
||||
|
||||
a_:= hbide_readSource( cXhp )
|
||||
|
||||
cPart := ""
|
||||
FOR EACH s IN a_
|
||||
s := alltrim( s )
|
||||
IF empty( s )
|
||||
LOOP
|
||||
ENDIF
|
||||
IF left( s, 1 ) == "["
|
||||
IF ( n := at( "]", s ) ) > 0
|
||||
cPart := substr( s, 2, n-2 )
|
||||
ELSE
|
||||
cPart := ""
|
||||
ENDIF
|
||||
ELSE
|
||||
hbide_dbg( cPart )
|
||||
SWITCH lower( cPart )
|
||||
CASE "version"
|
||||
EXIT
|
||||
CASE "xmate"
|
||||
IF hbide_parseKeyValPair( s, @cKey, @cVal )
|
||||
IF cKey == "Create Map/List File" .AND. cVal == "Yes"
|
||||
cMap := "-map"
|
||||
ENDIF
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE "info"
|
||||
IF hbide_parseKeyValPair( s, @cKey, @cVal )
|
||||
SWITCH lower( cKey )
|
||||
CASE "type"
|
||||
cType := cVal
|
||||
EXIT
|
||||
CASE "include"
|
||||
cInclude := cVal
|
||||
EXIT
|
||||
CASE "define"
|
||||
cDefine := cVal
|
||||
EXIT
|
||||
CASE "architecture"
|
||||
EXIT
|
||||
ENDSWITCH
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE "xmate"
|
||||
EXIT
|
||||
CASE "project"
|
||||
IF hbide_parseKeyValPair( s, @cKey, @cVal )
|
||||
SWITCH lower( cKey )
|
||||
CASE "run"
|
||||
cRun := cVal
|
||||
EXIT
|
||||
CASE "params"
|
||||
cParams := cVal
|
||||
EXIT
|
||||
CASE "final path"
|
||||
cDestntn := hbide_pathStripLastSlash( cVal )
|
||||
EXIT
|
||||
ENDSWITCH
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE "data path"
|
||||
EXIT
|
||||
CASE "editor"
|
||||
EXIT
|
||||
CASE "files"
|
||||
IF hbide_parseKeyValPair( s, @cKey, @cVal )
|
||||
aadd( aFiles, cKey )
|
||||
ENDIF
|
||||
EXIT
|
||||
ENDSWITCH
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
/* Basic Parsing is complete , parse paths from keywords */
|
||||
hbide_justACall( cType )
|
||||
|
||||
::oUI:q_editPrjTitle :setText( cOutName )
|
||||
::oUI:q_editPrjLoctn :setText( cHome )
|
||||
* ::oUI:q_editWrkFolder:setText( "" )
|
||||
::oUI:q_editDstFolder:setText( iif( cDestntn == "%HOME%", cHome, hbide_xmateMetaToHbMeta( cDestntn ) ) )
|
||||
* ::oUI:q_editBackup :setText( "" )
|
||||
::oUI:q_editOutName :setText( cOutName )
|
||||
::oUI:q_editLaunchParams:setText( cParams )
|
||||
::oUI:q_editLaunchExe:setText( cRun )
|
||||
|
||||
a_:= {}
|
||||
aadd( a_, iif( empty( cMap ), "", cMap ) )
|
||||
aadd( a_, "" )
|
||||
IF !empty( cDefine )
|
||||
b_:= hb_aTokens( cDefine, ";" )
|
||||
FOR EACH s IN b_
|
||||
IF !empty( s )
|
||||
s := "-D" + s
|
||||
ENDIF
|
||||
NEXT
|
||||
ENDIF
|
||||
aeval( b_, {|e| aadd( a_, e ) } )
|
||||
IF !empty( cInclude )
|
||||
b_:= hb_aTokens( cInclude, ";" )
|
||||
FOR EACH s IN b_
|
||||
IF !empty( s )
|
||||
s := "-incpath=" + strtran( s, "%HOME%\" )
|
||||
ENDIF
|
||||
NEXT
|
||||
ENDIF
|
||||
aeval( b_, {|e| aadd( a_, e ) } )
|
||||
::oUI:q_editFlags:setPlainText( hbide_arrayToMemo( a_ ) )
|
||||
|
||||
a_:= {}
|
||||
FOR EACH s IN aFiles
|
||||
IF !( "%HB_LIB_INSTALL%" $ s .OR. "C_LIB_INSTALL" $ s )
|
||||
aadd( a_, strtran( s, "%HOME%\", ) )
|
||||
ENDIF
|
||||
NEXT
|
||||
::oUI:q_editSources :setPlainText( hbide_arrayToMemo( a_ ) )
|
||||
* ::oUI:q_editMetaData :setPlainText( "" )
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeProjManager:manageEnvironments()
|
||||
LOCAL cLukupPng
|
||||
|
||||
::oUI := HbpQtUI():new( ::oDlg )
|
||||
::oUI:file := ::resPath + "projectproperties.ui"
|
||||
::oUI:create()
|
||||
|
||||
cLukupPng := ::resPath + "folder.png"
|
||||
//
|
||||
::oUI:q_buttonPathMk2:setIcon( cLukupPng )
|
||||
::oUI:q_buttonPathEnv:setIcon( cLukupPng )
|
||||
::oUI:q_buttonSaveEnv:setIcon( ::resPath + "save.png" )
|
||||
|
||||
::oUI:q_buttonSaveEnv:hide()
|
||||
::oUI:q_tabWidget:removeTab( 0 )
|
||||
::oUI:q_tabWidget:removeTab( 0 )
|
||||
::oUI:q_tabWidget:removeTab( 0 )
|
||||
::oUI:q_tabWidget:removeTab( 0 )
|
||||
//::oUI:q_tabFiles:oWidget:hide()
|
||||
//::oUI:q_tabMeta:oWidget:hide()
|
||||
//::oUI:q_tabHbp:oWidget:hide()
|
||||
|
||||
::oUI:signal( "buttonCn" , "clicked()", {|| ::oUI:oWidget:close() } )
|
||||
::oUI:signal( "buttonSave" , "clicked()", {|| ::saveEnvironments() } )
|
||||
::oUI:signal( "buttonSaveExit" , "clicked()", {|| ::saveEnvironments(), ::oUI:oWidget:close() } )
|
||||
* ::oUI:signal( "buttonSaveEnv" , "clicked()", {|| ::saveEnvironments() } )
|
||||
::oUI:signal( "buttonPathMk2" , "clicked()", {|| ::PromptForPath( 'editPathMk2' , 'Choose hbMK2.exe Folder...' ) } )
|
||||
::oUI:signal( "buttonPathEnv" , "clicked()", {|| ::PromptForPath( 'editPathEnv' , 'Choose hbIDE.env Folder...' ), ;
|
||||
::oUI:q_editCompilers:setPlainText( hb_memoread( hbide_pathFile( ::oUI:q_editPathEnv:text(), "hbide.env" ) ) ) } )
|
||||
|
||||
::oUI:q_editPathMk2 :setText( ::aINI[ INI_HBIDE, PathMk2 ] )
|
||||
::oUI:q_editPathEnv :setText( ::aINI[ INI_HBIDE, PathEnv ] )
|
||||
::oUI:q_editCompilers:setPlainText( hb_memoread( hbide_pathFile( ::aINI[ INI_HBIDE, PathEnv ], "hbide.env" ) ) )
|
||||
|
||||
::oUI:oWidget:setWindowTitle( 'Setup Build Environments' )
|
||||
|
||||
::setPosAndSizeByIni( ::oUI:oWidget, PropsDialogGeometry )
|
||||
//
|
||||
::oUI:exec()
|
||||
//
|
||||
::aIni[ INI_HBIDE, PropsDialogGeometry ] := hbide_posAndSize( ::oUI:oWidget )
|
||||
|
||||
::oUI:destroy()
|
||||
::oUI := NIL
|
||||
|
||||
::manageFocusInEditor()
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeProjManager:saveEnvironments()
|
||||
LOCAL cText
|
||||
|
||||
@@ -947,7 +1127,7 @@ METHOD IdeProjManager:selectCurrentProject()
|
||||
RETURN ::cWrkProject
|
||||
ENDIF
|
||||
|
||||
oDlg := XbpQtUiLoader():new( ::oDlg )
|
||||
oDlg := HbpQtUI():new( ::oDlg )
|
||||
oDlg:file := ::oIde:resPath + "selectproject.ui"
|
||||
oDlg:create()
|
||||
|
||||
|
||||
@@ -411,7 +411,7 @@ METHOD IdeThemes:fetch()
|
||||
IF empty( ::oUI )
|
||||
::lCreating := .t.
|
||||
|
||||
::oUI := XbpQtUiLoader():new( ::oIde:oDlg )
|
||||
::oUI := HbpQtUI():new( ::oIde:oDlg )
|
||||
::oUI:file := ::oIde:resPath + "themes.ui"
|
||||
::oUI:create()
|
||||
::oUI:setWindowFlags( Qt_Sheet )
|
||||
@@ -588,7 +588,7 @@ METHOD IdeThemes:selectTheme()
|
||||
LOCAL oSL, oStrList, oStrModel, a_, nDone
|
||||
LOCAL pSlots := Qt_Slots_New()
|
||||
|
||||
oSL := XbpQtUiLoader():new( ::oIde:oDlg )
|
||||
oSL := HbpQtUI():new( ::oIde:oDlg )
|
||||
oSL:file := ::oIde:resPath + "selectionlist.ui"
|
||||
oSL:create()
|
||||
oSL:setWindowTitle( "Available Themes" )
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<string>General</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
@@ -49,7 +49,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="2">
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="comboPrjType">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
@@ -63,7 +63,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Project Title:</string>
|
||||
@@ -73,7 +73,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="editPrjTitle">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
@@ -84,7 +84,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Project Location:</string>
|
||||
@@ -94,7 +94,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="editPrjLoctn">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
@@ -105,7 +105,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Working Folder:</string>
|
||||
@@ -115,7 +115,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="editWrkFolder">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
@@ -126,7 +126,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Destination Folder:</string>
|
||||
@@ -136,7 +136,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="editDstFolder">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
@@ -148,7 +148,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>Compile/Link Flags:</string>
|
||||
@@ -158,7 +158,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1" colspan="2">
|
||||
<item row="9" column="1" colspan="2">
|
||||
<widget class="QPlainTextEdit" name="editFlags">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
@@ -175,7 +175,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Launch Parameters:</string>
|
||||
@@ -185,10 +185,10 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1" colspan="2">
|
||||
<item row="10" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="editLaunchParams"/>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Launch Program:</string>
|
||||
@@ -198,10 +198,10 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1" colspan="2">
|
||||
<item row="11" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="editLaunchExe"/>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>Backup Location:</string>
|
||||
@@ -211,10 +211,10 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<item row="8" column="1">
|
||||
<widget class="QLineEdit" name="editBackup"/>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="editOutName">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
@@ -225,7 +225,7 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Output Name:</string>
|
||||
@@ -235,34 +235,52 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<item row="3" column="2">
|
||||
<widget class="QToolButton" name="buttonChoosePrjLoc">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<item row="8" column="2">
|
||||
<widget class="QToolButton" name="buttonBackup">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<item row="6" column="2">
|
||||
<widget class="QToolButton" name="buttonChooseDest">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<item row="5" column="2">
|
||||
<widget class="QToolButton" name="buttonChooseWd">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QToolButton" name="buttonXmate">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Load an xMate project file.</p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This feature is available only for new projects.</p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">hbIDE attempts to recognize various components</p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">but it is possible that it may not load everything.</p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">So you may need manual editing.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabFiles">
|
||||
@@ -332,7 +350,7 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab">
|
||||
<widget class="QWidget" name="tabMeta">
|
||||
<attribute name="title">
|
||||
<string>Meta Data</string>
|
||||
</attribute>
|
||||
|
||||
@@ -10,6 +10,7 @@ LIBNAME := hbxbp
|
||||
|
||||
PRG_SOURCES := \
|
||||
hbpprocess.prg \
|
||||
hbpqtui.prg \
|
||||
xbp3state.prg \
|
||||
xbpappevent.prg \
|
||||
xbpbitmap.prg \
|
||||
@@ -30,7 +31,6 @@ PRG_SOURCES := \
|
||||
xbpprintdialog.prg \
|
||||
xbpprinter.prg \
|
||||
xbppushbutton.prg \
|
||||
xbpqtuiloader.prg \
|
||||
xbpradiobutton.prg \
|
||||
xbprtf.prg \
|
||||
xbpscrollbar.prg \
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
* EkOnkar
|
||||
* ( The LORD is ONE )
|
||||
*
|
||||
* Xbase++ Syntax Inspired XbpQtUiLoader Class
|
||||
* Xbase++ Syntax Inspired HbpQtUI Class
|
||||
*
|
||||
* Pritpal Bedi <pritpal@vouchcac.com>
|
||||
* 18Decy2009
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
CLASS XbpQtUiLoader INHERIT XbpWindow
|
||||
CLASS HbpQtUI INHERIT XbpWindow
|
||||
|
||||
DATA file INIT ""
|
||||
DATA modal INIT .t.
|
||||
@@ -101,7 +101,7 @@ CLASS XbpQtUiLoader INHERIT XbpWindow
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD XbpQtUiLoader:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
METHOD HbpQtUI:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
|
||||
::xbpWindow:init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
|
||||
@@ -109,7 +109,7 @@ METHOD XbpQtUiLoader:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD XbpQtUiLoader:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
METHOD HbpQtUI:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
|
||||
::xbpWindow:init( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
|
||||
@@ -130,7 +130,7 @@ METHOD XbpQtUiLoader:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD XbpQtUiLoader:destroy()
|
||||
METHOD HbpQtUI:destroy()
|
||||
LOCAL a_
|
||||
|
||||
FOR EACH a_ IN ::aSignals
|
||||
@@ -148,7 +148,7 @@ METHOD XbpQtUiLoader:destroy()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD XbpQtUiLoader:event( cWidget, nEvent, bBlock )
|
||||
METHOD HbpQtUI:event( cWidget, nEvent, bBlock )
|
||||
|
||||
IF hb_hHasKey( ::qObj, cWidget )
|
||||
IF Qt_Events_Connect( ::pEvents, ::qObj[ cWidget ], nEvent, bBlock )
|
||||
@@ -160,7 +160,7 @@ METHOD XbpQtUiLoader:event( cWidget, nEvent, bBlock )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD XbpQtUiLoader:signal( cWidget, cSignal, bBlock )
|
||||
METHOD HbpQtUI:signal( cWidget, cSignal, bBlock )
|
||||
|
||||
IF hb_hHasKey( ::qObj, cWidget )
|
||||
IF Qt_Slots_Connect( ::pSlots, ::qObj[ cWidget ], cSignal, bBlock )
|
||||
@@ -172,7 +172,7 @@ METHOD XbpQtUiLoader:signal( cWidget, cSignal, bBlock )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD XbpQtUiLoader:loadWidgets()
|
||||
METHOD HbpQtUI:loadWidgets()
|
||||
LOCAL a_, pPtr, bBlock, x, cBlock
|
||||
|
||||
FOR EACH a_ IN ::widgets
|
||||
@@ -196,7 +196,7 @@ METHOD XbpQtUiLoader:loadWidgets()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD XbpQtUiLoader:loadContents( cUiFull )
|
||||
METHOD HbpQtUI:loadContents( cUiFull )
|
||||
LOCAL cBuffer := memoread( cUiFull )
|
||||
LOCAL n, cClass, cWidget
|
||||
|
||||
@@ -223,7 +223,7 @@ METHOD XbpQtUiLoader:loadContents( cUiFull )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD XbpQtUiLoader:loadUI( cUiFull )
|
||||
METHOD HbpQtUI:loadUI( cUiFull )
|
||||
LOCAL qWidget, qUiLoader, qFile, pWidget
|
||||
|
||||
qFile := QFile():new( cUiFull )
|
||||
@@ -247,7 +247,7 @@ METHOD XbpQtUiLoader:loadUI( cUiFull )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD OnError( ... )
|
||||
METHOD HbpQtUI:OnError( ... )
|
||||
LOCAL cMsg
|
||||
LOCAL xReturn
|
||||
|
||||
@@ -227,11 +227,13 @@ FUNCTION AppEvent( mp1, mp2, oXbp, nTimeout )
|
||||
DO WHILE !empty( t_oEventLoop ) //.t.
|
||||
t_oEventLoop:processEvents( QEventLoop_AllEvents )
|
||||
|
||||
IF !empty( t_events[ t_nEventOut, 4 ] )
|
||||
IF !empty( t_events[ t_nEventOut, 4 ] )
|
||||
//
|
||||
nEvent := t_events[ t_nEventOut, 1 ]
|
||||
mp1 := t_events[ t_nEventOut, 2 ]
|
||||
mp2 := t_events[ t_nEventOut, 3 ]
|
||||
oXbp := t_events[ t_nEventOut, 4 ]
|
||||
//
|
||||
t_events[ t_nEventOut, 4 ] := NIL
|
||||
EXIT
|
||||
ENDIF
|
||||
|
||||
@@ -708,6 +708,9 @@ METHOD XbpWindow:handleEvent( nEvent, mp1, mp2 )
|
||||
|
||||
SWITCH ( nEvent )
|
||||
|
||||
CASE xbeP_Keyboard
|
||||
::keyboard( mp1 )
|
||||
EXIT
|
||||
CASE xbeM_Motion
|
||||
::motion( mp1, mp2 )
|
||||
EXIT
|
||||
|
||||
Reference in New Issue
Block a user