From ae40e2d43673ffacdb903b991f43f9c8a700b7fc Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Tue, 26 Jan 2010 10:22:47 +0000 Subject: [PATCH] 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
prompts: + in - => - => ! Separated the dialog from And added a menu option in 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 tab. --- harbour/ChangeLog | 27 +++ harbour/contrib/hbide/hbide.prg | 4 + harbour/contrib/hbide/ideactions.prg | 22 +- harbour/contrib/hbide/idedocks.prg | 2 +- harbour/contrib/hbide/idefindreplace.prg | 2 +- harbour/contrib/hbide/idemisc.prg | 42 ++++ harbour/contrib/hbide/ideprojmanager.prg | 206 ++++++++++++++++-- harbour/contrib/hbide/idethemes.prg | 4 +- .../hbide/resources/projectproperties.ui | 68 +++--- harbour/contrib/hbxbp/Makefile | 2 +- .../hbxbp/{xbpqtuiloader.prg => hbpqtui.prg} | 22 +- harbour/contrib/hbxbp/xbpgeneric.prg | 4 +- harbour/contrib/hbxbp/xbpwindow.prg | 3 + 13 files changed, 343 insertions(+), 65 deletions(-) rename harbour/contrib/hbxbp/{xbpqtuiloader.prg => hbpqtui.prg} (93%) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 32ee30f0b1..2385a19a0f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -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
prompts: + + in + - => + - => + ! Separated the dialog from + And added a menu option in 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 + tab. + 2010-01-25 18:33 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbide/idemisc.prg * contrib/hbide/ideprojmanager.prg diff --git a/harbour/contrib/hbide/hbide.prg b/harbour/contrib/hbide/hbide.prg index dcf8028b67..bf6f4e3628 100644 --- a/harbour/contrib/hbide/hbide.prg +++ b/harbour/contrib/hbide/hbide.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 diff --git a/harbour/contrib/hbide/ideactions.prg b/harbour/contrib/hbide/ideactions.prg index c79b4fd670..baa8ab2d26 100644 --- a/harbour/contrib/hbide/ideactions.prg +++ b/harbour/contrib/hbide/ideactions.prg @@ -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" ) } } ) diff --git a/harbour/contrib/hbide/idedocks.prg b/harbour/contrib/hbide/idedocks.prg index 050d43cf32..eb89dd3ab9 100644 --- a/harbour/contrib/hbide/idedocks.prg +++ b/harbour/contrib/hbide/idedocks.prg @@ -128,7 +128,7 @@ METHOD IdeDocks:buildDialog() #if 1 LOCAL oUI - oUI := XbpQtUiLoader():new() + oUI := HbpQtUI():new() oUI:file := ::resPath + "mainWindow.ui" oUI:create() diff --git a/harbour/contrib/hbide/idefindreplace.prg b/harbour/contrib/hbide/idefindreplace.prg index 904667b590..90e9f8e1ad 100644 --- a/harbour/contrib/hbide/idefindreplace.prg +++ b/harbour/contrib/hbide/idefindreplace.prg @@ -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 ) diff --git a/harbour/contrib/hbide/idemisc.prg b/harbour/contrib/hbide/idemisc.prg index 312a6f7d0c..8359593e97 100644 --- a/harbour/contrib/hbide/idemisc.prg +++ b/harbour/contrib/hbide/idemisc.prg @@ -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 diff --git a/harbour/contrib/hbide/ideprojmanager.prg b/harbour/contrib/hbide/ideprojmanager.prg index 11dd28d69e..22e79211b5 100644 --- a/harbour/contrib/hbide/ideprojmanager.prg +++ b/harbour/contrib/hbide/ideprojmanager.prg @@ -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() diff --git a/harbour/contrib/hbide/idethemes.prg b/harbour/contrib/hbide/idethemes.prg index 909a6868de..8a6e92425b 100644 --- a/harbour/contrib/hbide/idethemes.prg +++ b/harbour/contrib/hbide/idethemes.prg @@ -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" ) diff --git a/harbour/contrib/hbide/resources/projectproperties.ui b/harbour/contrib/hbide/resources/projectproperties.ui index 487b9279fc..3aa9b42d55 100644 --- a/harbour/contrib/hbide/resources/projectproperties.ui +++ b/harbour/contrib/hbide/resources/projectproperties.ui @@ -33,7 +33,7 @@ General - + @@ -49,7 +49,7 @@ - + <!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; } - + Project Title: @@ -73,7 +73,7 @@ p, li { white-space: pre-wrap; } - + <!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; } - + Project Location: @@ -94,7 +94,7 @@ p, li { white-space: pre-wrap; } - + <!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; } - + Working Folder: @@ -115,7 +115,7 @@ p, li { white-space: pre-wrap; } - + <!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; } - + Destination Folder: @@ -136,7 +136,7 @@ p, li { white-space: pre-wrap; } - + <!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; } - + Compile/Link Flags: @@ -158,7 +158,7 @@ p, li { white-space: pre-wrap; } - + <!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; } - + Launch Parameters: @@ -185,10 +185,10 @@ p, li { white-space: pre-wrap; } - + - + Launch Program: @@ -198,10 +198,10 @@ p, li { white-space: pre-wrap; } - + - + Backup Location: @@ -211,10 +211,10 @@ p, li { white-space: pre-wrap; } - + - + <!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; } - + Output Name: @@ -235,34 +235,52 @@ p, li { white-space: pre-wrap; } - + ... - + ... - + ... - + ... + + + + <!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> + + + ... + + + @@ -332,7 +350,7 @@ p, li { white-space: pre-wrap; } - + Meta Data diff --git a/harbour/contrib/hbxbp/Makefile b/harbour/contrib/hbxbp/Makefile index bb1a9da181..304057b9a4 100644 --- a/harbour/contrib/hbxbp/Makefile +++ b/harbour/contrib/hbxbp/Makefile @@ -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 \ diff --git a/harbour/contrib/hbxbp/xbpqtuiloader.prg b/harbour/contrib/hbxbp/hbpqtui.prg similarity index 93% rename from harbour/contrib/hbxbp/xbpqtuiloader.prg rename to harbour/contrib/hbxbp/hbpqtui.prg index 4127626ba6..c66778f16a 100644 --- a/harbour/contrib/hbxbp/xbpqtuiloader.prg +++ b/harbour/contrib/hbxbp/hbpqtui.prg @@ -56,7 +56,7 @@ * EkOnkar * ( The LORD is ONE ) * - * Xbase++ Syntax Inspired XbpQtUiLoader Class + * Xbase++ Syntax Inspired HbpQtUI Class * * Pritpal Bedi * 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 diff --git a/harbour/contrib/hbxbp/xbpgeneric.prg b/harbour/contrib/hbxbp/xbpgeneric.prg index b103838bb8..5f2115ed80 100644 --- a/harbour/contrib/hbxbp/xbpgeneric.prg +++ b/harbour/contrib/hbxbp/xbpgeneric.prg @@ -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 diff --git a/harbour/contrib/hbxbp/xbpwindow.prg b/harbour/contrib/hbxbp/xbpwindow.prg index c8311e176c..a367bd1e64 100644 --- a/harbour/contrib/hbxbp/xbpwindow.prg +++ b/harbour/contrib/hbxbp/xbpwindow.prg @@ -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