2010-04-12 23:25 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbqt/hbqt_hbqplaintextedit.cpp
! Little formatting.
* contrib/hbxbp/xbpdialog.prg
+ Added :removeEventFilter() on destruction.
* contrib/hbide/resources/environments.ui
* contrib/hbide/resources/environments.uic
* contrib/hbide/resources/projectpropertiesex.ui
* contrib/hbide/resources/projectpropertiesex.uic
* contrib/hbide/resources/shortcuts.ui
* contrib/hbide/resources/shortcuts.uic
* contrib/hbide/hbide.ch
* contrib/hbide/hbide.prg
* contrib/hbide/ideactions.prg
* contrib/hbide/ideeditor.prg
* contrib/hbide/idefindreplace.prg
* contrib/hbide/idehome.prg
* contrib/hbide/ideobject.prg
* contrib/hbide/ideprojmanager.prg
* contrib/hbide/idesaveload.prg
* contrib/hbide/ideshortcuts.prg
! Removed keyboard shortcuts from menu items.
! Attempted fix on nixes when project folder is not created before
definition is saved.
! Dialog control labels: Exit => Close.
! More fixes to detect the executable from linker output ( still not perfect ).
! Changed the way project is launched. hope it will be useful for *nixes.
+ Implemented user-defined keyboard macros with following functionality:
New : whatever definition is typed-in the relevant fields is validated
with existing ones and if unique is appended at the end of list.
The macro is also validated for compilation.
Set : current hilighted macro is redefined from values from fields
after duplicate validation. The macro is also validated for compilation.
Test : Attempts to compile the macro as a block and reports back if
successful or not. It just compiles but not evaluates.
delete : deletes the highlighted macro after confirmation.
Load : loads macros from a disk-file and merges them with existing ones.
In case of duplicacy, last loaded macro is retained.
Save : Saves the macros in hbide.scu disk-file in hb_serialize()d form.
Save As: Saves the macros in a disk-file with any name but with .scu extension.
Any change is visible instantly,
Unless <Save> is clicked, current loaded macros are not saved on disk.
This allows to use temporary created macros for current session.
More info at http://hbide.vouch.info/ ( Topic: Keyboard Mappings )
This commit is contained in:
@@ -17,6 +17,58 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-04-12 23:25 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbqt/hbqt_hbqplaintextedit.cpp
|
||||
! Little formatting.
|
||||
|
||||
* contrib/hbxbp/xbpdialog.prg
|
||||
+ Added :removeEventFilter() on destruction.
|
||||
|
||||
* contrib/hbide/resources/environments.ui
|
||||
* contrib/hbide/resources/environments.uic
|
||||
* contrib/hbide/resources/projectpropertiesex.ui
|
||||
* contrib/hbide/resources/projectpropertiesex.uic
|
||||
* contrib/hbide/resources/shortcuts.ui
|
||||
* contrib/hbide/resources/shortcuts.uic
|
||||
|
||||
* contrib/hbide/hbide.ch
|
||||
* contrib/hbide/hbide.prg
|
||||
* contrib/hbide/ideactions.prg
|
||||
* contrib/hbide/ideeditor.prg
|
||||
* contrib/hbide/idefindreplace.prg
|
||||
* contrib/hbide/idehome.prg
|
||||
* contrib/hbide/ideobject.prg
|
||||
* contrib/hbide/ideprojmanager.prg
|
||||
* contrib/hbide/idesaveload.prg
|
||||
* contrib/hbide/ideshortcuts.prg
|
||||
|
||||
! Removed keyboard shortcuts from menu items.
|
||||
! Attempted fix on nixes when project folder is not created before
|
||||
definition is saved.
|
||||
! Dialog control labels: Exit => Close.
|
||||
! More fixes to detect the executable from linker output ( still not perfect ).
|
||||
! Changed the way project is launched. hope it will be useful for *nixes.
|
||||
|
||||
+ Implemented user-defined keyboard macros with following functionality:
|
||||
New : whatever definition is typed-in the relevant fields is validated
|
||||
with existing ones and if unique is appended at the end of list.
|
||||
The macro is also validated for compilation.
|
||||
Set : current hilighted macro is redefined from values from fields
|
||||
after duplicate validation. The macro is also validated for compilation.
|
||||
Test : Attempts to compile the macro as a block and reports back if
|
||||
successful or not. It just compiles but not evaluates.
|
||||
delete : deletes the highlighted macro after confirmation.
|
||||
Load : loads macros from a disk-file and merges them with existing ones.
|
||||
In case of duplicacy, last loaded macro is retained.
|
||||
Save : Saves the macros in hbide.scu disk-file in hb_serialize()d form.
|
||||
Save As: Saves the macros in a disk-file with any name but with .scu extension.
|
||||
|
||||
Any change is visible instantly,
|
||||
Unless <Save> is clicked, current loaded macros are not saved on disk.
|
||||
This allows to use temporary created macros for current session.
|
||||
|
||||
More info at http://hbide.vouch.info/ ( Topic: Keyboard Mappings )
|
||||
|
||||
2010-04-12 22:56 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
+ contrib/hbqt/generator2
|
||||
+ contrib/hbqt/generator2/hbqtgen2.prg
|
||||
|
||||
@@ -107,8 +107,10 @@
|
||||
#define CurrentReplace 20
|
||||
#define CurrentView 21
|
||||
#define CurrentHarbour 22
|
||||
#define CurrentShortcuts 23
|
||||
#define TextFileExtensions 24
|
||||
|
||||
#define INI_HBIDE_VRBLS 22
|
||||
#define INI_HBIDE_VRBLS 24
|
||||
|
||||
/* .hbi structure constants */
|
||||
#define PRJ_PRP_PROPERTIES 1
|
||||
|
||||
@@ -240,6 +240,8 @@ CLASS HbIde
|
||||
DATA cWrkReplace INIT ""
|
||||
DATA cWrkView INIT ""
|
||||
DATA cWrkHarbour INIT ""
|
||||
DATA cPathShortcuts INIT ""
|
||||
DATA cTextExtensions INIT ""
|
||||
|
||||
DATA oEnvironment
|
||||
|
||||
@@ -358,9 +360,6 @@ HB_TRACE( HB_TR_ALWAYS, "HbIde:create( cProjIni )", "#Params=" )
|
||||
/* Skeletons Manager */
|
||||
::oSK := IdeSkeletons():new( Self ):create()
|
||||
|
||||
/* Shortcuts */
|
||||
::oSC := IdeShortcuts():new( Self ):create()
|
||||
|
||||
/* Initialte Project Manager */
|
||||
::oPM := IdeProjManager():new( Self ):create()
|
||||
|
||||
@@ -368,6 +367,10 @@ HB_TRACE( HB_TR_ALWAYS, "HbIde:create( cProjIni )", "#Params=" )
|
||||
IF ::nRunMode == HBIDE_RUN_MODE_INI
|
||||
hbide_loadINI( Self, ::cProjIni )
|
||||
ENDIF
|
||||
|
||||
/* Shortcuts */
|
||||
::oSC := IdeShortcuts():new( Self ):create()
|
||||
|
||||
/* Insert command line projects */
|
||||
aeval( ::aHbpOnCmdLine, {|e| aadd( ::aINI[ INI_PROJECTS ], e ) } )
|
||||
/* Insert command line sources */
|
||||
@@ -563,7 +566,7 @@ HB_TRACE( HB_TR_ALWAYS, "HbIde:create( cProjIni )", "#Params=" )
|
||||
|
||||
/* Very important - destroy resources */
|
||||
HB_TRACE( HB_TR_ALWAYS, "======================================================" )
|
||||
HB_TRACE( HB_TR_ALWAYS, "Before ::oDlg:destroy()", memory( 1001 ) )
|
||||
HB_TRACE( HB_TR_ALWAYS, "Before ::oDlg:destroy()", memory( 1001 ) )
|
||||
HB_TRACE( HB_TR_ALWAYS, " " )
|
||||
|
||||
::oTM:destroy()
|
||||
@@ -588,7 +591,7 @@ HB_TRACE( HB_TR_ALWAYS, "HbIde:create( cProjIni )", "#Params=" )
|
||||
::oFont := NIL
|
||||
|
||||
HB_TRACE( HB_TR_ALWAYS, " " )
|
||||
HB_TRACE( HB_TR_ALWAYS, "After ::oDlg:destroy()", memory( 1001 ) )
|
||||
HB_TRACE( HB_TR_ALWAYS, "After ::oDlg:destroy()", memory( 1001 ) )
|
||||
HB_TRACE( HB_TR_ALWAYS, "======================================================" )
|
||||
|
||||
RETURN self
|
||||
|
||||
@@ -134,7 +134,7 @@ METHOD IdeActions:getAction( cKey )
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeActions:buildActions()
|
||||
LOCAL qAction, aAct, k, a_
|
||||
LOCAL qAction, aAct, a_
|
||||
|
||||
aAct := ::loadActions()
|
||||
|
||||
@@ -147,6 +147,7 @@ METHOD IdeActions:buildActions()
|
||||
IF !empty( a_[ ACT_IMAGE ] )
|
||||
qAction:setIcon( ::resPath + a_[ ACT_IMAGE ] + ".png" )
|
||||
ENDIF
|
||||
#if 0
|
||||
IF !empty( a_[ ACT_SHORTCUT ] )
|
||||
k := a_[ ACT_SHORTCUT ]
|
||||
k := strtran( k, "Sh+", "Shift+" )
|
||||
@@ -154,6 +155,7 @@ METHOD IdeActions:buildActions()
|
||||
k := strtran( k, "^" , "Ctrl+" )
|
||||
qAction:setShortcut( QKeySequence():new( k ) )
|
||||
ENDIF
|
||||
#endif
|
||||
qAction:setTooltip( strtran( a_[ ACT_TEXT ], "~", "" ) )
|
||||
|
||||
::hActions[ a_[ ACT_NAME ] ] := qAction
|
||||
@@ -255,7 +257,7 @@ METHOD IdeActions:loadActions()
|
||||
aadd( aAct, { "InsertDateTime" , "~Date && Time" , "insert-datetime", "Sh+F7", "No", "Yes" } )
|
||||
aadd( aAct, { "InsertRandomName" , "~Random Function Name" , "insert-procname", "Sh+F8", "No", "Yes" } )
|
||||
aadd( aAct, { "InsertExternalFile" , "~External File at Cursor" , "insert-external-file", "", "No", "Yes" } )
|
||||
aadd( aAct, { "InsertSeparator" , "~Separator" , "insert-separator", "F7" , "No", "Yes" } )
|
||||
aadd( aAct, { "InsertSeparator" , "~Separator" , "insert-separator", "F7" , "No", "Yes" } )
|
||||
aadd( aAct, { "switchReadOnly" , "Switch Read~Only Mode" , "readonly" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "Properties" , "Properties" , "" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "ProjAddSource" , "Add Source to Project" , "projectadd" , "" , "No", "Yes" } )
|
||||
@@ -271,11 +273,6 @@ METHOD IdeActions:loadActions()
|
||||
aadd( aAct, { "CompilePPO" , "Compile Current Source to PPO", "ppo" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "LaunchProject" , "Launch Project" , "" , "^F10" , "No", "Yes" } )
|
||||
aadd( aAct, { "ConfigureTools" , "Configure Tools...*" , "" , "" , "No", "Yes" } )
|
||||
#ifdef __PLATFORM__WINDOWS
|
||||
aadd( aAct, { "CommandPrompt" , "Command Prompt...*" , "" , "" , "No", "Yes" } )
|
||||
#else
|
||||
aadd( aAct, { "Terminal" , "Terminal" , "" , "" , "No", "Yes" } )
|
||||
#endif
|
||||
|
||||
aadd( aAct, { "ManageThemes" , "Manage Themes" , "" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "DefaultTheme" , "Set Default Theme" , "" , "" , "No", "Yes" } )
|
||||
@@ -293,19 +290,24 @@ METHOD IdeActions:loadActions()
|
||||
aadd( aAct, { "RemoveTrailingSpaces" , "Remove Trailing Spaces" , "removetrailingspaces", "", "No", "Yes" } )
|
||||
aadd( aAct, { "FormatBraces" , "Format Braces" , "ormatbraces" , "" , "No", "Yes" } )
|
||||
|
||||
aadd( aAct, { "StreamComment" , "Stream Comment" , "streamcomment" , "Sh+^Q", "No", "Yes" } )
|
||||
aadd( aAct, { "BlockComment" , "Block Comment" , "blockcomment" , "Sh+^/", "No", "Yes" } )
|
||||
aadd( aAct, { "BlockIndentR" , "Indent Right" , "blockindentr" , "^Tab" , "No", "Yes" } )
|
||||
aadd( aAct, { "BlockIndentL" , "Indent Left" , "blockindentl" , "Sh+^Tab", "No", "Yes" } )
|
||||
aadd( aAct, { "StreamComment" , "Stream Comment" , "streamcomment" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "BlockComment" , "Block Comment" , "blockcomment" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "BlockIndentR" , "Indent Right" , "blockindentr" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "BlockIndentL" , "Indent Left" , "blockindentl" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "BlockDbl2Sgl" , "Double Quotes to Single" , "dbl2sglquote" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "BlockSgl2Dbl" , "Single Quotes to Double" , "sgl2dblquote" , "" , "No", "Yes" } )
|
||||
|
||||
#if 0
|
||||
aadd( aAct, { "DuplicateLine" , "Duplicate Current Line" , "duplicateline" , "^D" , "No", "Yes" } )
|
||||
aadd( aAct, { "DeleteLine" , "Delete Line" , "deleteline" , "^Delete", "No", "Yes" } )
|
||||
aadd( aAct, { "MoveLineUp" , "Move Line Up" , "movelineup" , "Sh+^Up", "No", "Yes" } )
|
||||
aadd( aAct, { "MoveLineDown" , "Move Line Down" , "movelinedown" , "Sh+^Down", "No", "Yes" } )
|
||||
|
||||
#endif
|
||||
aadd( aAct, { "DuplicateLine" , "Duplicate Current Line" , "duplicateline" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "DeleteLine" , "Delete Line" , "deleteline" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "MoveLineUp" , "Move Line Up" , "movelineup" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "MoveLineDown" , "Move Line Down" , "movelinedown" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "Environments" , "Environments..." , "envconfig" , "" , "No", "Yes" } )
|
||||
|
||||
aadd( aAct, { "GotoFunc" , "Goto Function" , "dc_function" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "Shortcuts" , "Keyboard Mappings" , "" , "" , "No", "Yes" } )
|
||||
|
||||
@@ -464,7 +466,7 @@ METHOD IdeActions:buildMainMenu()
|
||||
oSubMenu:addItem( { ::getAction( "SelectAll" ), {|| oIde:execAction( "SelectAll" ) } } )
|
||||
hbide_menuAddSep( oSubMenu )
|
||||
oSubMenu:addItem( { ::getAction( "Find" ), {|| oIde:execAction( "Find" ) } } )
|
||||
oSubMenu:addItem( { ::getAction( "FindEx" ), {|| oIde:execAction( "FindEx" ) } } )
|
||||
oSubMenu:addItem( { ::getAction( "FindEx" ), {|| oIde:execAction( "FindEx" ) } } )
|
||||
oSubMenu:addItem( { ::getAction( "Goto" ), {|| oIde:execAction( "Goto" ) } } )
|
||||
hbide_menuAddSep( oSubMenu )
|
||||
//
|
||||
|
||||
@@ -127,13 +127,13 @@ CLASS IdeEditsManager INHERIT IdeObject
|
||||
METHOD switchToReadOnly()
|
||||
METHOD convertSelection( cKey )
|
||||
METHOD insertText( cKey )
|
||||
METHOD insertSeparator()
|
||||
METHOD insertSeparator( cSep )
|
||||
METHOD zoom( nKey )
|
||||
METHOD printPreview()
|
||||
METHOD paintRequested( pPrinter )
|
||||
METHOD setMark()
|
||||
METHOD gotoMark( nIndex )
|
||||
METHOD goto()
|
||||
METHOD goto( nLine )
|
||||
METHOD formatBraces()
|
||||
METHOD removeTabs()
|
||||
METHOD RemoveTrailingSpaces()
|
||||
@@ -682,10 +682,10 @@ METHOD IdeEditsManager:convertSelection( cKey )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeEditsManager:insertSeparator()
|
||||
METHOD IdeEditsManager:insertSeparator( cSep )
|
||||
LOCAL oEdit
|
||||
IF !empty( oEdit := ::getEditObjectCurrent() )
|
||||
oEdit:insertSeparator()
|
||||
oEdit:insertSeparator( cSep )
|
||||
ENDIF
|
||||
RETURN Self
|
||||
|
||||
@@ -901,26 +901,32 @@ METHOD IdeEditsManager:gotoMark( nIndex )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeEditsManager:goto()
|
||||
LOCAL qGo, nLine, qCursor, nRows, oEdit
|
||||
METHOD IdeEditsManager:goto( nLine )
|
||||
LOCAL qGo, qCursor, nRows, oEdit
|
||||
|
||||
IF ! empty( oEdit := ::oEM:getEditObjectCurrent() )
|
||||
qCursor := QTextCursor():configure( oEdit:qEdit:textCursor() )
|
||||
nLine := qCursor:blockNumber()
|
||||
nRows := oEdit:qEdit:blockCount()
|
||||
|
||||
qGo := QInputDialog():new( ::oDlg:oWidget )
|
||||
qGo:setIntMinimum( 1 )
|
||||
qGo:setIntMaximum( nRows + 1 )
|
||||
qGo:setIntValue( nLine + 1 )
|
||||
qGo:setLabelText( "Goto Line Number [1-" + hb_ntos( nRows ) + "]" )
|
||||
qGo:setWindowTitle( "Harbour-Qt" )
|
||||
IF hb_isNumeric( nLine ) .AND. nLine >= 0 .AND. nLine <= nRows
|
||||
//
|
||||
ELSE
|
||||
nLine := qCursor:blockNumber()
|
||||
|
||||
::setPosByIni( qGo, GotoDialogGeometry )
|
||||
qGo:exec()
|
||||
::aIni[ INI_HBIDE, GotoDialogGeometry ] := hbide_posAndSize( qGo )
|
||||
qGo := QInputDialog():new( ::oDlg:oWidget )
|
||||
qGo:setIntMinimum( 1 )
|
||||
qGo:setIntMaximum( nRows + 1 )
|
||||
qGo:setIntValue( nLine + 1 )
|
||||
qGo:setLabelText( "Goto Line Number [1-" + hb_ntos( nRows ) + "]" )
|
||||
qGo:setWindowTitle( "Harbour-Qt" )
|
||||
|
||||
oEdit:goto( qGo:intValue() )
|
||||
::setPosByIni( qGo, GotoDialogGeometry )
|
||||
qGo:exec()
|
||||
::aIni[ INI_HBIDE, GotoDialogGeometry ] := hbide_posAndSize( qGo )
|
||||
nLine := qGo:intValue()
|
||||
ENDIF
|
||||
|
||||
oEdit:goto( nLine )
|
||||
ENDIF
|
||||
|
||||
RETURN nLine
|
||||
@@ -1451,7 +1457,7 @@ CLASS IdeEdit INHERIT IdeObject
|
||||
METHOD getSelectedText()
|
||||
METHOD getColumnNo()
|
||||
METHOD getLineNo()
|
||||
METHOD insertSeparator()
|
||||
METHOD insertSeparator( cSep )
|
||||
METHOD insertText( cText )
|
||||
|
||||
METHOD suspendPrototype()
|
||||
@@ -1744,6 +1750,10 @@ METHOD IdeEdit:execKeyEvent( nMode, nEvent, p, p1 )
|
||||
lShift := .t.
|
||||
ENDIF
|
||||
|
||||
IF ::oSC:execKey( key, lAlt, lCtrl, lShift )
|
||||
RETURN .f.
|
||||
ENDIF
|
||||
|
||||
SWITCH ( key )
|
||||
CASE Qt_Key_Space
|
||||
IF !lAlt .AND. !lShift .AND. !lCtrl
|
||||
@@ -2137,14 +2147,16 @@ METHOD IdeEdit:getLineNo()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeEdit:insertSeparator()
|
||||
METHOD IdeEdit:insertSeparator( cSep )
|
||||
LOCAL qCursor := QTextCursor():configure( ::qEdit:textCursor() )
|
||||
|
||||
DEFAULT cSep TO ::cSeparator
|
||||
|
||||
qCursor:beginEditBlock()
|
||||
qCursor:movePosition( QTextCursor_StartOfBlock )
|
||||
qCursor:insertBlock()
|
||||
qCursor:movePosition( QTextCursor_PreviousBlock )
|
||||
qCursor:insertText( ::cSeparator )
|
||||
qCursor:insertText( cSep )
|
||||
qCursor:movePosition( QTextCursor_NextBlock )
|
||||
qCursor:movePosition( QTextCursor_StartOfBlock )
|
||||
qCursor:endEditBlock()
|
||||
|
||||
@@ -656,8 +656,6 @@ METHOD IdeFindInFiles:buildUI()
|
||||
::oUI:q_checkListOnly:setChecked( .t. )
|
||||
::oUI:q_checkPrg:setChecked( .t. )
|
||||
|
||||
* ::oIde:setPosAndSizeByIni( ::oUI:oWidget, FindInFilesDialogGeometry )
|
||||
|
||||
qLineEdit := QLineEdit():configure( ::oUI:q_comboExpr:lineEdit() )
|
||||
IF !empty( ::oEM )
|
||||
IF !empty( cText := ::oEM:getSelectedText() )
|
||||
|
||||
@@ -364,7 +364,11 @@ METHOD IdeHome:addProjectsInfo( aHtm )
|
||||
aadd( aHtm, ' ' + hb_ntos( len( src_ ) ) )
|
||||
aadd( aHtm, ' </td>' )
|
||||
aadd( aHtm, ' <td align=center>' )
|
||||
aadd( aHtm, ' ' + dtoc( dir_[ 1,3 ] ) + " " + dir_[ 1,4 ] )
|
||||
IF ! empty( dir_ )
|
||||
aadd( aHtm, ' ' + dtoc( dir_[ 1,3 ] ) + " " + dir_[ 1,4 ] )
|
||||
ELSE
|
||||
aadd( aHtm, ' ' )
|
||||
ENDIF
|
||||
aadd( aHtm, ' </td>' )
|
||||
aadd( aHtm, ' <td align=right>' )
|
||||
aadd( aHtm, ' ' + hbide_pathNormalized( a_[ 1 ] ) )
|
||||
|
||||
@@ -137,6 +137,8 @@ CLASS IdeObject
|
||||
ACCESS cWrkReplace INLINE ::oIde:cWrkReplace
|
||||
ACCESS cWrkView INLINE ::oIde:cWrkView
|
||||
ACCESS cWrkHarbour INLINE ::oIde:cWrkHarbour
|
||||
ACCESS cPathShortcuts INLINE ::oIde:cPathShortcuts
|
||||
ACCESS cTextExtensions INLINE ::oIde:cTextExtensions
|
||||
//
|
||||
ACCESS resPath INLINE ::oIde:resPath
|
||||
ACCESS pathSep INLINE ::oIde:pathSep
|
||||
|
||||
@@ -1296,7 +1296,8 @@ METHOD IdeProjManager:finished( nExitCode, nExitStatus, oProcess )
|
||||
IF ( n := at( cTkn, cTmp ) ) > 0
|
||||
cT := Chr( 10 )
|
||||
n1 := hb_at( cT, cTmp, n + len( cTkn ) )
|
||||
cExe := StrTran( substr( cTmp, n + len( cTkn ), n1 - n - len( cTkn ) + len( cT ) ), Chr( 13 ) )
|
||||
cExe := StrTran( substr( cTmp, n + len( cTkn ), n1 - n - len( cTkn ) + len( cT ) ), Chr( 13 ), "" )
|
||||
cExe := StrTran( cExe, Chr( 10 ), "" )
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF empty( cExe )
|
||||
@@ -1304,7 +1305,8 @@ METHOD IdeProjManager:finished( nExitCode, nExitStatus, oProcess )
|
||||
IF ( n := at( cTkn, cTmp ) ) > 0
|
||||
cT := Chr( 10 )
|
||||
n1 := hb_at( cT, cTmp, n + len( cTkn ) )
|
||||
cExe := StrTran( substr( cTmp, n + len( cTkn ), n1 - n - len( cTkn ) + len( cT ) ), Chr( 13 ) )
|
||||
cExe := StrTran( substr( cTmp, n + len( cTkn ), n1 - n - len( cTkn ) + len( cT ) ), Chr( 13 ), "" )
|
||||
cExe := StrTran( cExe, Chr( 10 ), "" )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
@@ -1312,7 +1314,8 @@ METHOD IdeProjManager:finished( nExitCode, nExitStatus, oProcess )
|
||||
IF empty( cExe )
|
||||
::outputText( "<font color=red>" + "Executable could not been detected from linker output!" + "</font>" )
|
||||
ELSE
|
||||
::outputText( "<font color=blue>" + "Detected exeutable => " + cExe + "</font>" )
|
||||
cExe := alltrim( cExe )
|
||||
::outputText( "<font color=blue>" + "Detected exeutable => " + cExe + " " + hb_ntos( len( cExe ) ) + "</font>" )
|
||||
ENDIF
|
||||
::outputText( " " )
|
||||
|
||||
@@ -1334,7 +1337,7 @@ METHOD IdeProjManager:finished( nExitCode, nExitStatus, oProcess )
|
||||
* 03/01/2010 - 09:24:50
|
||||
*/
|
||||
METHOD IdeProjManager:launchProject( cProject, cExe )
|
||||
LOCAL cTargetFN, cTmp, oProject, qProcess, qStr, cExt
|
||||
LOCAL cTargetFN, cTmp, oProject, qProcess, qStr
|
||||
|
||||
IF empty( cProject )
|
||||
cProject := ::oPM:getCurrentProject()
|
||||
@@ -1344,7 +1347,22 @@ METHOD IdeProjManager:launchProject( cProject, cExe )
|
||||
ENDIF
|
||||
|
||||
oProject := ::getProjectByTitle( cProject )
|
||||
IF empty( cExe )
|
||||
cTargetFN := hbide_pathFile( oProject:destination, iif( empty( oProject:outputName ), "_temp", oProject:outputName ) )
|
||||
#ifdef __PLATFORM__WINDOWS
|
||||
IF oProject:type == "Executable"
|
||||
cTargetFN += '.exe'
|
||||
ENDIF
|
||||
#endif
|
||||
IF ! hb_FileExists( cTargetFN )
|
||||
cTargetFN := oProject:launchProgram
|
||||
ENDIF
|
||||
ELSE
|
||||
cTargetFN := cExe
|
||||
ENDIF
|
||||
cTargetFN := hbide_pathToOSPath( cTargetFN )
|
||||
|
||||
#if 0
|
||||
IF !empty( cExe )
|
||||
hb_fNameSplit( cExe, , , @cExt )
|
||||
ENDIF
|
||||
@@ -1361,14 +1379,14 @@ METHOD IdeProjManager:launchProject( cProject, cExe )
|
||||
cTargetFN := oProject:launchProgram
|
||||
ENDIF
|
||||
ENDIF
|
||||
#endif
|
||||
|
||||
IF !hb_FileExists( cTargetFN )
|
||||
IF ! hb_FileExists( cTargetFN )
|
||||
cTmp := "Launch error: file not found - " + cTargetFN
|
||||
|
||||
ELSEIF oProject:type == "Executable"
|
||||
cTmp := "Launching application [ " + cTargetFN + " ]"
|
||||
|
||||
#if 1
|
||||
qProcess := QProcess():new()
|
||||
qProcess:setWorkingDirectory( hbide_pathToOSPath( oProject:wrkDirectory ) )
|
||||
IF !empty( oProject:launchParams )
|
||||
@@ -1381,13 +1399,6 @@ METHOD IdeProjManager:launchProject( cProject, cExe )
|
||||
qProcess:waitForStarted()
|
||||
qProcess := NIL
|
||||
|
||||
#else
|
||||
::oProcess := HbpProcess():new()
|
||||
::oProcess:output := {|s| HB_TRACE( HB_TR_ALWAYS, s ) }
|
||||
::oProcess:finished := {|n,nn| HB_TRACE( HB_TR_ALWAYS, "Finished", n, nn ) }
|
||||
::oProcess:start( cTargetFN )
|
||||
#endif
|
||||
|
||||
ELSE
|
||||
cTmp := "Launching application [ " + cTargetFN + " ] ( not applicable )."
|
||||
|
||||
@@ -1404,3 +1415,5 @@ METHOD IdeProjManager:outputText( cText )
|
||||
::oOutputResult:oWidget:append( cText )
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
@@ -115,6 +115,9 @@ HB_TRACE( HB_TR_ALWAYS, "hbide_saveINI( oIde )", 0, oIde:nRunMode, oIde:cProjIni
|
||||
aadd( txt_, "CurrentReplace=" + oIde:cWrkReplace )
|
||||
aadd( txt_, "CurrentView=" + oIde:cWrkView )
|
||||
aadd( txt_, "CurrentHarbour=" + oIde:cWrkHarbour )
|
||||
aadd( txt_, "CurrentShortcuts=" + oIde:cPathShortcuts )
|
||||
aadd( txt_, "TextFileExtensions=" + oIde:cTextExtensions )
|
||||
aadd( txt_, "FindInFilesDialogGeometry=" + oIde:aIni[ INI_HBIDE, FindInFilesDialogGeometry ] )
|
||||
aadd( txt_, " " )
|
||||
|
||||
aadd( txt_, "[PROJECTS]" )
|
||||
@@ -238,10 +241,12 @@ FUNCTION hbide_loadINI( oIde, cHbideIni )
|
||||
"currentcodec" , "pathmk2" , "pathenv" , ;
|
||||
"currentenvironment" , "findinfilesdialoggeometry", "currentfind" , ;
|
||||
"currentreplace" , "currentfolderfind" , "currentview" , ;
|
||||
"currentharbour" }
|
||||
"currentharbour" , "currentshortcuts" , "textfileextensions" }
|
||||
|
||||
IF empty( cHbideIni )
|
||||
IF hb_fileExists( "hbide.ini" )
|
||||
/* Please Check for *nixes */
|
||||
//cHbideIni := hb_curDrive() + hb_osDriveSeparator() + hb_osPathSeparator() + CurDir() + hb_osPathSeparator() + "hbide.ini"
|
||||
cHbideIni := "hbide.ini"
|
||||
ELSE
|
||||
cHbideIni := hb_dirBase() + "hbide.ini"
|
||||
@@ -461,3 +466,56 @@ FUNCTION hbide_saveSkltns( oIde )
|
||||
RETURN hbide_createTarget( oIde:cPathSkltns, txt_ )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
FUNCTION hbide_loadShortcuts( oIde, cFileShortcuts )
|
||||
LOCAL cPath, a_:= {}
|
||||
|
||||
IF empty( cFileShortcuts )
|
||||
cFileShortcuts := oIde:cPathShortcuts
|
||||
IF empty( cFileShortcuts )
|
||||
cFileShortcuts := oIde:cProjIni
|
||||
ENDIF
|
||||
|
||||
hb_fNameSplit( cFileShortcuts, @cPath )
|
||||
cPath += "hbide.scu"
|
||||
|
||||
IF hb_fileExists( cPath )
|
||||
cFileShortcuts := cPath
|
||||
ELSE
|
||||
cFileShortcuts := hb_dirBase() + "hbide.scu"
|
||||
ENDIF
|
||||
ENDIF
|
||||
oIde:cPathShortcuts := cFileShortcuts
|
||||
|
||||
IF hb_fileExists( cFileShortcuts )
|
||||
a_:= hb_deSerialize( hb_memoread( cFileShortcuts ) )
|
||||
ENDIF
|
||||
|
||||
RETURN a_
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
FUNCTION hbide_saveShortcuts( oIde, a_, cFileShortcuts )
|
||||
LOCAL cPath
|
||||
|
||||
IF empty( cFileShortcuts )
|
||||
cFileShortcuts := oIde:cPathShortcuts
|
||||
IF empty( cFileShortcuts )
|
||||
cFileShortcuts := oIde:cProjIni
|
||||
ENDIF
|
||||
|
||||
hb_fNameSplit( cFileShortcuts, @cPath )
|
||||
cPath += "hbide.scu"
|
||||
|
||||
IF hb_fileExists( cPath )
|
||||
cFileShortcuts := cPath
|
||||
ELSE
|
||||
cFileShortcuts := hb_dirBase() + "hbide.scu"
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
hb_memowrit( cFileShortcuts, hb_serialize( a_ ) )
|
||||
|
||||
RETURN hb_fileExists( cFileShortcuts )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
#include "hbqt.ch"
|
||||
#include "common.ch"
|
||||
#include "hbclass.ch"
|
||||
#include "appevent.ch"
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
@@ -77,6 +78,12 @@
|
||||
#define tableMacros_itemDoubleClicked 104
|
||||
#define buttonSet_clicked 105
|
||||
#define buttonNew_clicked 106
|
||||
#define buttonTest_clicked 107
|
||||
#define buttonLoad_clicked 108
|
||||
#define buttonSave_clicked 109
|
||||
#define buttonSaveAs_clicked 110
|
||||
#define buttonAssign_clicked 111
|
||||
#define buttonDelete_clicked 112
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
@@ -96,6 +103,9 @@ CLASS IdeShortcuts INHERIT IdeObject
|
||||
DATA cShift
|
||||
DATA cMenu
|
||||
DATA cBlock
|
||||
DATA cIcon
|
||||
|
||||
DATA qHiliter
|
||||
|
||||
METHOD new( oIde )
|
||||
METHOD create( oIde )
|
||||
@@ -105,18 +115,17 @@ CLASS IdeShortcuts INHERIT IdeObject
|
||||
METHOD buildUI()
|
||||
METHOD buildSignals()
|
||||
|
||||
METHOD buildBlock( cString )
|
||||
METHOD evalMacro( cString )
|
||||
METHOD fetchAndExecMacro()
|
||||
|
||||
METHOD getWord( lSelect )
|
||||
METHOD getLine( lSelect )
|
||||
METHOD getText()
|
||||
METHOD execTool( ... )
|
||||
METHOD test( cString, lWarn )
|
||||
METHOD execKey( nKey, lAlt, lCtrl, lShift )
|
||||
METHOD mergeMacros( a_ )
|
||||
|
||||
METHOD loadDftSCuts()
|
||||
METHOD loadMethods()
|
||||
METHOD loadKeys()
|
||||
|
||||
METHOD clearDftSCuts()
|
||||
METHOD populateData( nMode )
|
||||
METHOD populateDftSCuts()
|
||||
METHOD populateKeys()
|
||||
@@ -128,6 +137,39 @@ CLASS IdeShortcuts INHERIT IdeObject
|
||||
METHOD array2table( nRow, a_ )
|
||||
METHOD vrbls2array( nRow )
|
||||
|
||||
/* Public API Methods */
|
||||
METHOD getWord( lSelect )
|
||||
METHOD getLine( lSelect )
|
||||
METHOD getText()
|
||||
METHOD execTool( ... )
|
||||
|
||||
/* hbIDE defined Macros as API Methods */
|
||||
METHOD help( cTopic )
|
||||
METHOD exit( lWarn )
|
||||
METHOD newSource( cType )
|
||||
METHOD open()
|
||||
METHOD save()
|
||||
METHOD saveAll()
|
||||
METHOD close()
|
||||
METHOD print()
|
||||
METHOD revertToSaved()
|
||||
METHOD findDlg()
|
||||
METHOD findDlgEx()
|
||||
METHOD gotoLine( nLine )
|
||||
METHOD duplicateLine()
|
||||
METHOD deleteLine()
|
||||
METHOD moveLineUp()
|
||||
METHOD moveLineDown()
|
||||
METHOD indentRight()
|
||||
METHOD indentLeft()
|
||||
METHOD blockComment()
|
||||
METHOD streamComment()
|
||||
METHOD build( cProj )
|
||||
METHOD buildLaunch( cProj )
|
||||
METHOD launch( cProj )
|
||||
METHOD insert( cText )
|
||||
METHOD separator( cSep )
|
||||
|
||||
ENDCLASS
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
@@ -157,6 +199,11 @@ METHOD IdeShortcuts:destroy()
|
||||
LOCAL a_, qItm
|
||||
|
||||
IF !empty( ::oUI )
|
||||
Qt_Events_disConnect( ::pEvents, ::oUI:oWidget, QEvent_Close )
|
||||
::oUI:oWidget:removeEventFilter( ::pEvents )
|
||||
|
||||
::qHiliter := NIL
|
||||
|
||||
FOR EACH qItm IN ::aHdr
|
||||
qItm := NIL
|
||||
NEXT
|
||||
@@ -177,7 +224,6 @@ METHOD IdeShortcuts:destroy()
|
||||
::oUI:destroy()
|
||||
ENDIF
|
||||
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
@@ -187,6 +233,7 @@ METHOD IdeShortcuts:show()
|
||||
IF empty( ::oUI )
|
||||
::buildUI()
|
||||
::populateData( 1 )
|
||||
::oIde:setPosAndSizeByIni( ::oUI:oWidget, FindInFilesDialogGeometry )
|
||||
ENDIF
|
||||
|
||||
::oUI:show()
|
||||
@@ -197,19 +244,66 @@ METHOD IdeShortcuts:show()
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:execEvent( nMode, p )
|
||||
LOCAL nRow
|
||||
LOCAL nRow, cMethod, cFile, cPath, cTemp, cExt, a_
|
||||
|
||||
SWITCH nMode
|
||||
|
||||
CASE buttonDelete_clicked
|
||||
nRow := ::oUI:q_tableMacros:currentRow()
|
||||
IF nRow >= 0 .AND. nRow < len( ::aDftSCuts )
|
||||
nRow++
|
||||
IF hbide_getYesNo( "Delete", ::aDftSCuts[ nRow, 1 ], "A Delete Operation Requested" )
|
||||
hb_adel( ::aDftSCuts, nRow, .t. )
|
||||
::clearDftSCuts()
|
||||
::populateDftSCuts()
|
||||
ENDIF
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE buttonTest_clicked
|
||||
IF .t.
|
||||
::controls2vrbls()
|
||||
IF !empty( ::cBlock )
|
||||
::test( ::cBlock, .t. )
|
||||
ENDIF
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE buttonLoad_clicked
|
||||
cTemp := hbide_fetchAFile( ::oDlg, "Select a macro file", { { "hbIDE Script File", "*.scu" } }, ::cPathShortcuts )
|
||||
IF ! Empty( cTemp )
|
||||
hb_fNameSplit( hbide_pathNormalized( cTemp, .f. ), @cPath, @cFile, @cExt )
|
||||
IF lower( cExt ) == ".scu"
|
||||
a_:= hb_deSerialize( hb_memoread( cTemp ) )
|
||||
IF !empty( a_ )
|
||||
::mergeMacros( a_ )
|
||||
::clearDftSCuts()
|
||||
::populateDftSCuts()
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE buttonSave_clicked
|
||||
hbide_saveShortcuts( ::oIde, ::aDftSCuts )
|
||||
EXIT
|
||||
CASE buttonSaveAs_clicked
|
||||
cTemp := hbide_saveAFile( ::oDlg, "Select a macro file", { { "hbIDE Script File", "*.scu" } }, ::cPathShortcuts, ".scu" )
|
||||
IF ! Empty( cTemp )
|
||||
hb_fNameSplit( hbide_pathNormalized( cTemp, .f. ), @cPath, @cFile, @cExt )
|
||||
cFile := hbide_pathToOSPath( cPath + cFile + "scu" )
|
||||
hbide_saveShortcuts( ::oIde, ::aDftSCuts, cFile )
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE buttonNew_clicked
|
||||
IF .t.
|
||||
::controls2vrbls()
|
||||
IF !( ::checkDuplicate( ::cKey, ::cAlt, ::cCtrl, ::cShift ) )
|
||||
aadd( ::aDftSCuts, { ::cName, ::cKey, ::cAlt, ::cCtrl, ::cShift, ::cMenu, ::cBlock } )
|
||||
aadd( ::aDftSCutsItms, array( 5 ) )
|
||||
::oUI:q_tableMacros:setRowCount( ::oUI:q_tableMacros:rowCount() + 1 )
|
||||
::array2table( len( ::aDftSCuts ), { ::cName, ::cKey, ::cAlt, ::cCtrl, ::cShift, ::cMenu, ::cBlock } )
|
||||
ELSE
|
||||
MsgBox( "Current shortcut is already defined!" )
|
||||
IF !empty( ::cName )
|
||||
IF !( ::checkDuplicate( ::cKey, ::cAlt, ::cCtrl, ::cShift ) )
|
||||
aadd( ::aDftSCuts, { ::cName, ::cKey, ::cAlt, ::cCtrl, ::cShift, ::cMenu, ::cBlock } )
|
||||
aadd( ::aDftSCutsItms, array( 5 ) )
|
||||
::oUI:q_tableMacros:setRowCount( ::oUI:q_tableMacros:rowCount() + 1 )
|
||||
::array2table( len( ::aDftSCuts ), { ::cName, ::cKey, ::cAlt, ::cCtrl, ::cShift, ::cMenu, ::cBlock } )
|
||||
ELSE
|
||||
MsgBox( "Current shortcut is already defined!" )
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
EXIT
|
||||
@@ -219,14 +313,13 @@ METHOD IdeShortcuts:execEvent( nMode, p )
|
||||
IF nRow >= 0 .AND. nRow < len( ::aDftSCuts )
|
||||
nRow++
|
||||
::controls2vrbls()
|
||||
IF !( ::checkDuplicate( ::cKey, ::cAlt, ::cCtrl, ::cShift, nRow ) )
|
||||
IF !empty( ::cName ) .AND. !( ::checkDuplicate( ::cKey, ::cAlt, ::cCtrl, ::cShift, nRow ) ) .AND. ::test( ::cBlock, .f. )
|
||||
::vrbls2array( nRow )
|
||||
::vrbls2controls( nRow )
|
||||
ENDIF
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE tableMacros_itemDoubleClicked
|
||||
|
||||
EXIT
|
||||
CASE tableMacros_itemSelectionChanged
|
||||
nRow := ::oUI:q_tableMacros:currentRow()
|
||||
@@ -236,10 +329,15 @@ METHOD IdeShortcuts:execEvent( nMode, p )
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE listMethods_itemDoubleClicked
|
||||
IF ( nRow := ::oUI:q_listMethods:currentRow() ) >= 0
|
||||
nRow++
|
||||
cMethod := "::" + ::aMethods[ nRow, 2 ]
|
||||
::oUI:q_plainBlock:insertPlainText( cMethod )
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE listMethods_currentRowChanged
|
||||
IF p >= 0 .AND. p < len( ::aMethods )
|
||||
::oUI:q_texteditSyntax:setPlainText( ::aMethods[ p+1, 2 ] )
|
||||
::oUI:q_texteditSyntax:setPlainText( ::aMethods[ p+1, 3 ] )
|
||||
ENDIF
|
||||
EXIT
|
||||
ENDSWITCH
|
||||
@@ -284,6 +382,7 @@ METHOD IdeShortcuts:vrbls2array( nRow )
|
||||
::aDftSCuts[ nRow, 5 ] := ::cShift
|
||||
::aDftSCuts[ nRow, 6 ] := ::cMenu
|
||||
::aDftSCuts[ nRow, 7 ] := ::cBlock
|
||||
//::aDftSCuts[ nRow, 8 ] := ::cIcon
|
||||
|
||||
RETURN Self
|
||||
|
||||
@@ -291,63 +390,72 @@ METHOD IdeShortcuts:vrbls2array( nRow )
|
||||
|
||||
METHOD IdeShortcuts:vrbls2controls( nRow )
|
||||
|
||||
::aDftSCutsItms[ nRow, 1 ]:setText( ::cName )
|
||||
::aDftSCutsItms[ nRow, 2 ]:setText( ::cKey )
|
||||
::aDftSCutsItms[ nRow, 3 ]:setIcon( hbide_image( iif( ::cAlt == "YES", "check", "" ) ) )
|
||||
::aDftSCutsItms[ nRow, 4 ]:setIcon( hbide_image( iif( ::cCtrl == "YES", "check", "" ) ) )
|
||||
::aDftSCutsItms[ nRow, 5 ]:setIcon( hbide_image( iif( ::cShift == "YES", "check", "" ) ) )
|
||||
::aDftSCutsItms[ nRow, 1 ]:setIcon( hbide_image( ::cIcon ) )
|
||||
::aDftSCutsItms[ nRow, 2 ]:setText( ::cName )
|
||||
::aDftSCutsItms[ nRow, 3 ]:setText( ::cKey )
|
||||
::aDftSCutsItms[ nRow, 4 ]:setIcon( hbide_image( iif( ::cAlt == "YES", "check", "" ) ) )
|
||||
::aDftSCutsItms[ nRow, 5 ]:setIcon( hbide_image( iif( ::cCtrl == "YES", "check", "" ) ) )
|
||||
::aDftSCutsItms[ nRow, 6 ]:setIcon( hbide_image( iif( ::cShift == "YES", "check", "" ) ) )
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:array2table( nRow, a_ )
|
||||
LOCAL q1, q2, q3, q4, q5
|
||||
LOCAL q0, q1, q2, q3, q4, q5
|
||||
LOCAL oTbl := ::oUI:q_tableMacros
|
||||
LOCAL n := nRow - 1
|
||||
|
||||
q0 := QTableWidgetItem():new()
|
||||
q0:setIcon( hbide_image( a_[ 8 ] ) )
|
||||
oTbl:setItem( n, 0, q0 )
|
||||
|
||||
q1 := QTableWidgetItem():new()
|
||||
q1:setText( a_[ 1 ] )
|
||||
oTbl:setItem( n, 0, q1 )
|
||||
oTbl:setItem( n, 1, q1 )
|
||||
|
||||
q2 := QTableWidgetItem():new()
|
||||
q2:setText( a_[ 2 ] )
|
||||
oTbl:setItem( n, 1, q2 )
|
||||
oTbl:setItem( n, 2, q2 )
|
||||
|
||||
q3 := QTableWidgetItem():new()
|
||||
q3:setIcon( iif( a_[ 3 ] == "YES", hbide_image( "check" ), "" ) )
|
||||
oTbl:setItem( n, 2, q3 )
|
||||
oTbl:setItem( n, 3, q3 )
|
||||
|
||||
q4 := QTableWidgetItem():new()
|
||||
q4:setIcon( iif( a_[ 4 ] == "YES", hbide_image( "check" ), "" ) )
|
||||
oTbl:setItem( n, 3, q4 )
|
||||
oTbl:setItem( n, 4, q4 )
|
||||
|
||||
q5 := QTableWidgetItem():new()
|
||||
q5:setIcon( iif( a_[ 5 ] == "YES", hbide_image( "check" ), "" ) )
|
||||
oTbl:setItem( n, 4, q5 )
|
||||
oTbl:setItem( n, 5, q5 )
|
||||
|
||||
oTbl:setRowHeight( n, 16 )
|
||||
|
||||
::aDftSCutsItms[ nRow, 1 ] := q1
|
||||
::aDftSCutsItms[ nRow, 2 ] := q2
|
||||
::aDftSCutsItms[ nRow, 3 ] := q3
|
||||
::aDftSCutsItms[ nRow, 4 ] := q4
|
||||
::aDftSCutsItms[ nRow, 5 ] := q5
|
||||
::aDftSCutsItms[ nRow, 1 ] := q0
|
||||
::aDftSCutsItms[ nRow, 2 ] := q1
|
||||
::aDftSCutsItms[ nRow, 3 ] := q2
|
||||
::aDftSCutsItms[ nRow, 4 ] := q3
|
||||
::aDftSCutsItms[ nRow, 5 ] := q4
|
||||
::aDftSCutsItms[ nRow, 6 ] := q5
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:controls2vrbls()
|
||||
LOCAL nRow := ::oUI:q_comboKey:currentIndex()
|
||||
|
||||
::cName := ::oUI:q_editName:text()
|
||||
::cKey := ::aKeys[ ::oUI:q_comboKey:currentIndex() + 1, 2 ]
|
||||
::cAlt := iif( ::oUI:q_checkAlt :isChecked(), "YES", "NO" )
|
||||
::cCtrl := iif( ::oUI:q_checkCtrl :isChecked(), "YES", "NO" )
|
||||
::cShift := iif( ::oUI:q_checkShift:isChecked(), "YES", "NO" )
|
||||
::cMenu := ::oUI:q_editMenu:text()
|
||||
::cBlock := ::oUI:q_plainBlock:toPlainText()
|
||||
|
||||
IF nRow >= 0
|
||||
nRow++
|
||||
::cName := ::oUI:q_editName:text()
|
||||
::cKey := ::aKeys[ nRow, 2 ]
|
||||
::cAlt := iif( ::oUI:q_checkAlt :isChecked(), "YES", "NO" )
|
||||
::cCtrl := iif( ::oUI:q_checkCtrl :isChecked(), "YES", "NO" )
|
||||
::cShift := iif( ::oUI:q_checkShift:isChecked(), "YES", "NO" )
|
||||
::cMenu := ::oUI:q_editMenu:text()
|
||||
::cBlock := ::oUI:q_plainBlock:toPlainText()
|
||||
ENDIF
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
@@ -376,17 +484,23 @@ METHOD IdeShortcuts:checkDuplicate( cKey, cAlt, cCtrl, cShift, nRow )
|
||||
|
||||
METHOD IdeShortcuts:buildUI()
|
||||
LOCAL oTbl, n, qItm
|
||||
LOCAL hdr_:= { { "Name", 190 }, { "Key", 50 }, { "Alt", 30 }, { "Ctrl", 30 }, { "Shift", 30 } }
|
||||
LOCAL hdr_:= { { "Img", 30 }, { "Name", 190 }, { "Key", 50 }, { "Alt", 30 }, { "Ctrl", 30 }, { "Shift", 30 } }
|
||||
|
||||
::oUI := HbQtUI():new( hbide_uic( "shortcuts" ) ):build()
|
||||
::oUI:setWindowIcon( hbide_image( "hbide" ) )
|
||||
::oUI:setParent( ::oDlg:oWidget )
|
||||
::oUI:setWindowFlags( Qt_Sheet )
|
||||
|
||||
::oUI:oWidget:installEventFilter( ::pEvents )
|
||||
|
||||
Qt_Events_Connect( ::pEvents, ::oUI:oWidget, QEvent_Close, {|| ::oIde:aIni[ INI_HBIDE, FindInFilesDialogGeometry ] := hbide_posAndSize( ::oUI:oWidget ) } )
|
||||
|
||||
oTbl := ::oUI:q_tableMacros /* Build Table Header */
|
||||
QHeaderView():from( oTbl:verticalHeader() ):hide()
|
||||
QHeaderView():from( oTbl:horizontalHeader() ):stretchLastSection( .t. )
|
||||
oTbl:setAlternatingRowColors( .t. )
|
||||
oTbl:setColumnCount( len( hdr_ ) )
|
||||
oTbl:setShowGrid( .f. )
|
||||
oTbl:setShowGrid( .t. )
|
||||
oTbl:setSelectionMode( QAbstractItemView_SingleSelection )
|
||||
oTbl:setSelectionBehavior( QAbstractItemView_SelectRows )
|
||||
FOR n := 1 TO len( hdr_ )
|
||||
@@ -399,6 +513,8 @@ METHOD IdeShortcuts:buildUI()
|
||||
|
||||
::oUI:q_listMethods:setAlternatingRowColors( .t. ) /* Public Methods List */
|
||||
|
||||
::qHiliter := ::oTH:SetSyntaxHilighting( ::oUI:q_plainBlock, "Pritpal's Favourite" )
|
||||
|
||||
::buildSignals()
|
||||
|
||||
RETURN Self
|
||||
@@ -407,14 +523,20 @@ METHOD IdeShortcuts:buildUI()
|
||||
|
||||
METHOD IdeShortcuts:buildSignals()
|
||||
|
||||
::oUI:signal( "buttonNew" , "clicked()" , {| | ::execEvent( buttonNew_clicked ) } )
|
||||
::oUI:signal( "buttonSet" , "clicked()" , {| | ::execEvent( buttonSet_clicked ) } )
|
||||
::oUI:signal( "buttonNew" , "clicked()" , {| | ::execEvent( buttonNew_clicked ) } )
|
||||
::oUI:signal( "buttonSet" , "clicked()" , {| | ::execEvent( buttonSet_clicked ) } )
|
||||
::oUI:signal( "buttonTest" , "clicked()" , {| | ::execEvent( buttonTest_clicked ) } )
|
||||
::oUI:signal( "buttonLoad" , "clicked()" , {| | ::execEvent( buttonLoad_clicked ) } )
|
||||
::oUI:signal( "buttonSave" , "clicked()" , {| | ::execEvent( buttonSave_clicked ) } )
|
||||
::oUI:signal( "buttonSaveAs", "clicked()" , {| | ::execEvent( buttonSaveAs_clicked ) } )
|
||||
::oUI:signal( "buttonAssign", "clicked()" , {| | ::execEvent( buttonAssign_clicked ) } )
|
||||
::oUI:signal( "buttonDelete", "clicked()" , {| | ::execEvent( buttonDelete_clicked ) } )
|
||||
|
||||
::oUI:signal( "listMethods", "itemDoubleClicked(QLWItem)" , {|p| ::execEvent( listMethods_itemDoubleClicked, p ) } )
|
||||
::oUI:signal( "listMethods", "currentRowChanged(int)" , {|p| ::execEvent( listMethods_currentRowChanged, p ) } )
|
||||
::oUI:signal( "listMethods" , "itemDoubleClicked(QLWItem)" , {|p| ::execEvent( listMethods_itemDoubleClicked, p ) } )
|
||||
::oUI:signal( "listMethods" , "currentRowChanged(int)" , {|p| ::execEvent( listMethods_currentRowChanged, p ) } )
|
||||
|
||||
::oUI:signal( "tableMacros", "itemSelectionChanged()" , {| | ::execEvent( tableMacros_itemSelectionChanged ) } )
|
||||
::oUI:signal( "tableMacros", "itemDoubleClicked(QTblWItem)", {|p| ::execEvent( tableMacros_itemDoubleClicked, p ) } )
|
||||
::oUI:signal( "tableMacros" , "itemSelectionChanged()" , {| | ::execEvent( tableMacros_itemSelectionChanged ) } )
|
||||
::oUI:signal( "tableMacros" , "itemDoubleClicked(QTblWItem)", {|p| ::execEvent( tableMacros_itemDoubleClicked, p ) } )
|
||||
|
||||
RETURN Self
|
||||
|
||||
@@ -432,6 +554,23 @@ METHOD IdeShortcuts:populateData( nMode )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:clearDftSCuts()
|
||||
LOCAL a_, qItm
|
||||
LOCAL oTbl := ::oUI:q_tableMacros
|
||||
|
||||
FOR EACH a_ IN ::aDftSCutsItms
|
||||
FOR EACH qItm IN a_
|
||||
qItm := NIL
|
||||
NEXT
|
||||
NEXT
|
||||
::aDftSCutsItms := {}
|
||||
|
||||
oTbl:clearContents()
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:populateDftSCuts()
|
||||
LOCAL a_, nRow
|
||||
LOCAL oTbl := ::oUI:q_tableMacros
|
||||
@@ -441,10 +580,11 @@ METHOD IdeShortcuts:populateDftSCuts()
|
||||
nRow := 0
|
||||
FOR EACH a_ IN ::aDftSCuts
|
||||
nRow++
|
||||
aadd( ::aDftSCutsItms, array( 5 ) )
|
||||
aadd( ::aDftSCutsItms, array( 6 ) )
|
||||
::array2table( nRow, a_ )
|
||||
QApplication():processEvents()
|
||||
NEXT
|
||||
oTbl:setCurrentCell( 0,0 )
|
||||
|
||||
RETURN Self
|
||||
|
||||
@@ -483,14 +623,97 @@ METHOD IdeShortcuts:populateKeys()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:loadDftSCuts()
|
||||
METHOD IdeShortcuts:buildBlock( cString )
|
||||
LOCAL n, cBlock, cParam, a_
|
||||
|
||||
/* Name Key Alt Ctrl Sh Menu Expr Icon */
|
||||
//
|
||||
aadd( ::aDftSCuts, { "Duplicate Line" , "D" , "NO", "YES", "NO", "", "", "" } )
|
||||
aadd( ::aDftSCuts, { "Current Line Up", "Up", "NO", "YES", "NO", "", "", "" } )
|
||||
a_:= hbide_memoTOarray( cString )
|
||||
cString := ""
|
||||
aeval( a_, {|e| cString += e } )
|
||||
|
||||
RETURN Self
|
||||
IF ( n := at( "|", cString ) ) > 0
|
||||
cString := substr( cString, n + 1 )
|
||||
IF ( n := at( "|", cString ) ) == 0
|
||||
RETURN Self
|
||||
ENDIF
|
||||
cParam := substr( cString, 1, n - 1 )
|
||||
cString := substr( cString, n + 1 )
|
||||
cBlock := "{|o," + cParam + "|" + cString + " }"
|
||||
ELSE
|
||||
cBlock := "{|o| " + cString + " }"
|
||||
ENDIF
|
||||
cBlock := strtran( cBlock, "::", "o:" )
|
||||
|
||||
RETURN cBlock
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:test( cString, lWarn )
|
||||
LOCAL cBlock, oErr, bBlock
|
||||
LOCAL lOk := .f.
|
||||
LOCAL bError := ErrorBlock( {|o| break( o ) } )
|
||||
|
||||
cBlock := ::buildBlock( cString )
|
||||
|
||||
BEGIN SEQUENCE
|
||||
bBlock := &( cBlock )
|
||||
lOk := .t.
|
||||
IF lWarn
|
||||
MsgBox( "Script compiles fine!", "Syntax checking", , , , bBlock )
|
||||
ENDIF
|
||||
RECOVER USING oErr
|
||||
MsgBox( "Wrongly defined script, syntax is |v| ::method( v )" + oErr:description )
|
||||
ENDSEQUENCE
|
||||
|
||||
ErrorBlock( bError )
|
||||
::oUI:raise()
|
||||
::oUI:setFocus_1()
|
||||
|
||||
RETURN lOk
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:evalMacro( cString )
|
||||
LOCAL bError := ErrorBlock( {|o| break( o ) } )
|
||||
LOCAL oErr, bBlock, cBlock
|
||||
LOCAL lEvaluated := .f.
|
||||
|
||||
cBlock := ::buildBlock( cString ) ; HB_TRACE( HB_TR_ALWAYS, cString, cBlock )
|
||||
|
||||
bBlock := &( cBlock )
|
||||
|
||||
BEGIN SEQUENCE
|
||||
eval( bBlock, self )
|
||||
lEvaluated := .t.
|
||||
RECOVER USING oErr
|
||||
HB_TRACE( HB_TR_ALWAYS, valtype( oErr ), oErr:description )
|
||||
END SEQUENCE
|
||||
|
||||
ErrorBlock( bError )
|
||||
RETURN lEvaluated
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:execKey( nKey, lAlt, lCtrl, lShift )
|
||||
LOCAL lExecuted := .f.
|
||||
LOCAL cKey, n
|
||||
|
||||
IF ( n := ascan( ::aKeys, {|e_| e_[ 1 ] == nKey } ) ) > 0
|
||||
cKey := ::aKeys[ n, 2 ]
|
||||
|
||||
n := ascan( ::aDftSCuts, {|e_| e_[ 2 ] == cKey .AND. ;
|
||||
e_[ 3 ] == iif( lAlt , "YES", "NO" ) .AND. ;
|
||||
e_[ 4 ] == iif( lCtrl , "YES", "NO" ) .AND. ;
|
||||
e_[ 5 ] == iif( lShift, "YES", "NO" ) } )
|
||||
IF n > 0
|
||||
IF ! empty( ::aDftSCuts[ n, 7 ] )
|
||||
HB_TRACE( HB_TR_ALWAYS, nKey, lAlt, lCtrl, lShift, cKey )
|
||||
|
||||
lExecuted := ::evalMacro( ::aDftSCuts[ n, 7 ] )
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
RETURN lExecuted
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
@@ -633,62 +856,6 @@ METHOD IdeShortcuts:loadKeys()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:evalMacro( cString )
|
||||
LOCAL bError := ErrorBlock( {|o| break( o ) } )
|
||||
LOCAL oErr, bBlock, n, cBlock, cParam
|
||||
|
||||
IF ( n := at( "|", cString ) ) > 0
|
||||
cString := substr( cString, n + 1 )
|
||||
IF ( n := at( "|", cString ) ) == 0
|
||||
RETURN Self
|
||||
ENDIF
|
||||
cParam := substr( cString, 1, n - 1 )
|
||||
cString := substr( cString, n + 1 )
|
||||
cBlock := "{|o," + cParam + "|" + cString + " }"
|
||||
ELSE
|
||||
cBlock := "{|o| " + cString + " }"
|
||||
ENDIF
|
||||
cBlock := strtran( cBlock, "::", "o:" )
|
||||
|
||||
bBlock := &( cBlock )
|
||||
|
||||
HB_TRACE( HB_TR_ALWAYS, cBlock )
|
||||
BEGIN SEQUENCE
|
||||
eval( bBlock, self )
|
||||
RECOVER USING oErr
|
||||
MsgBox( "Wrongly defined block. Syntax is |var| method_call( var ) --- " + oErr:description )
|
||||
END SEQUENCE
|
||||
|
||||
ErrorBlock( bError )
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:fetchAndExecMacro()
|
||||
LOCAL cStr
|
||||
|
||||
cStr := hbide_fetchAString( ::oDlg:oWidget, "", "Macro", "Compilation" )
|
||||
IF !empty( cStr )
|
||||
::evalMacro( cStr )
|
||||
ENDIF
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:loadMethods()
|
||||
|
||||
aadd( ::aMethods, { "getWord( lSelect )", "Returns text of the word under cursor. If <lSelect == .T.> text appears as selected." } )
|
||||
aadd( ::aMethods, { "getLine( lSelect )", "Returns text of the current line. If <lSelect == .T.> text appears as selected." } )
|
||||
aadd( ::aMethods, { "getText()" , "Returns current selected text." } )
|
||||
aadd( ::aMethods, { "execTool( ... )" , "Executes a 'Tool' under tools menu or without an entry." } )
|
||||
#if 0
|
||||
aadd( ::aMethods, { "", "" } )
|
||||
#endif
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:execTool( ... )
|
||||
RETURN ::oTM:execTool( ... )
|
||||
|
||||
@@ -700,7 +867,7 @@ METHOD IdeShortcuts:getWord( lSelect )
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:getLine( lSelect )
|
||||
RETURN ::oEM:getLine( lSelect )
|
||||
RETURN ::oEM:getLine( , lSelect )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
@@ -708,3 +875,314 @@ METHOD IdeShortcuts:getText()
|
||||
RETURN ::oEM:getText()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:duplicateLine()
|
||||
RETURN ::oEM:duplicateLine()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:deleteLine()
|
||||
RETURN ::oEM:deleteLine()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:moveLineUp()
|
||||
RETURN ::oEM:moveLine( -1 )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:moveLineDown()
|
||||
RETURN ::oEM:moveLine( 1 )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:help( cTopic )
|
||||
HB_SYMBOL_UNUSED( cTopic )
|
||||
RETURN ::oHelpDock:show()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:exit( lWarn )
|
||||
IF hb_isLogical( lWarn ) .AND. lWarn
|
||||
IF hbide_getYesNo( "Exit hbIDE ?", , "Macro Executed" )
|
||||
PostAppEvent( xbeP_Close, NIL, NIL, ::oDlg )
|
||||
ENDIF
|
||||
ELSE
|
||||
PostAppEvent( xbeP_Close, NIL, NIL, ::oDlg )
|
||||
ENDIF
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:newSource( cType )
|
||||
HB_SYMBOL_UNUSED( cType )
|
||||
RETURN ::oSM:editSource( '' )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:open()
|
||||
RETURN ::oSM:openSource()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:save()
|
||||
RETURN ::oSM:saveSource( ::oEM:getTabCurrent(), .f., .f. )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:saveAll()
|
||||
RETURN ::oSM:saveAllSources()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:close()
|
||||
RETURN ::oSM:closeSource()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:print()
|
||||
RETURN ::oEM:printPreview()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:revertToSaved()
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:findDlg()
|
||||
IF !Empty( ::qCurEdit )
|
||||
::oFR:show()
|
||||
ENDIF
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:findDlgEx()
|
||||
IF !Empty( ::qCurEdit )
|
||||
::oSearchReplace:beginFind()
|
||||
ENDIF
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:gotoLine( nLine )
|
||||
RETURN ::oEM:goTo( nLine )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:indentRight()
|
||||
RETURN ::oEM:indent( 1 )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:indentLeft()
|
||||
RETURN ::oEM:indent( -1 )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:blockComment()
|
||||
RETURN ::oEM:blockComment()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:streamComment()
|
||||
RETURN ::oEM:streamComment()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:build( cProj )
|
||||
IF ! hb_isChar( cProj )
|
||||
cProj := ""
|
||||
ENDIF
|
||||
RETURN ::oPM:buildProject( cProj, .F., .F. )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:buildLaunch( cProj )
|
||||
IF ! hb_isChar( cProj )
|
||||
cProj := ""
|
||||
ENDIF
|
||||
RETURN ::oPM:buildProject( cProj, .T., .F. )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:launch( cProj )
|
||||
IF ! hb_isChar( cProj )
|
||||
cProj := ""
|
||||
ENDIF
|
||||
RETURN ::oPM:launchProject( cProj )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:insert( cText )
|
||||
LOCAL oEdit
|
||||
IF ! empty( oEdit := ::getEditObjectCurrent() )
|
||||
IF hb_isChar( cText )
|
||||
oEdit:insertText( cText )
|
||||
ENDIF
|
||||
ENDIF
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:separator( cSep )
|
||||
RETURN ::oEM:insertSeparator( cSep )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:loadMethods()
|
||||
#if 0
|
||||
aadd( ::aMethods, { '', ;
|
||||
'', ;
|
||||
'' } )
|
||||
#endif
|
||||
aadd( ::aMethods, { 'help( cTopic )', ;
|
||||
'help( "" )', ;
|
||||
'Invokes "Help" docking widget in the right docking area. <cTopic> is not active yet.' } )
|
||||
aadd( ::aMethods, { 'exit( lWarn )', ;
|
||||
'exit( .f. )', ;
|
||||
'Exits hbIDE. If <lWarn == TRUE> then confirmation is requested through a popup dialog. All sources are saved if in modified state after confirmation to do so.' } )
|
||||
aadd( ::aMethods, { 'newSource( cType )', ;
|
||||
'newSource( "" )', ;
|
||||
'Initiates a blank source file in an editing instance on the current panel.' } )
|
||||
aadd( ::aMethods, { 'open()', ;
|
||||
'open()', ;
|
||||
'Invokes "Open File" dialog and if a selection is made and such selection is a hbIDE supported valid text file, that is opened in a new editor instance on visible panel.' } )
|
||||
aadd( ::aMethods, { 'save()', ;
|
||||
'save()', ;
|
||||
'Saves the current editing instance if in modified state. Visual artifacts are updated accordingly.' } )
|
||||
aadd( ::aMethods, { 'saveAll()', ;
|
||||
'saveAll()', ;
|
||||
'Saves all opened editing instances on the visible panel, if in modified state. Visual artifacts are updated accordingly.' } )
|
||||
aadd( ::aMethods, { 'close()', ;
|
||||
'close()', ;
|
||||
'Closes the current editing instance.' } )
|
||||
aadd( ::aMethods, { 'print()', ;
|
||||
'print()', ;
|
||||
'Invokes "Print Preview" dialog with current source contents ready to be printed.' } )
|
||||
aadd( ::aMethods, { 'findDlg()', ;
|
||||
'findDlg()', ;
|
||||
'Invokes "Find and Replace" dialog.' } )
|
||||
aadd( ::aMethods, { 'findDlgEx()', ;
|
||||
'findDlgEx()', ;
|
||||
'Invokes extended "Find and Replace" dialog at the bottom of editing area.' } )
|
||||
aadd( ::aMethods, { 'gotoLine( nLine )', ;
|
||||
'gotoLine( )', ;
|
||||
'Attempt is made to position the cursor at <nLine>. If <nLine> is not supplied, a "Goto" dialog is opened to supply <nLine>.' } )
|
||||
aadd( ::aMethods, { 'indentRight()', ;
|
||||
'indentRight()', ;
|
||||
'Pushes one character right the currently selected text.' } )
|
||||
aadd( ::aMethods, { 'indentLeft()', ;
|
||||
'indentLeft()', ;
|
||||
'Pushes one character left the currently selected text. If there are no columns remains at left nothing happens.' } )
|
||||
aadd( ::aMethods, { 'blockComment()', ;
|
||||
'blockComment()', ;
|
||||
'Encloses currently selected text in line comments where each line is prefixed with //.' } )
|
||||
aadd( ::aMethods, { 'streamComment()', ;
|
||||
'streamComment()', ;
|
||||
'Encloses currently selected text in Anci-C like comments /* */' } )
|
||||
aadd( ::aMethods, { 'build( cProj )', ;
|
||||
'build( "" )', ;
|
||||
'Builds <cProj> if it is already loaded. All sources are saved if found in modified state before "build" is initiated.' } )
|
||||
aadd( ::aMethods, { 'buildLaunch( cProj )', ;
|
||||
'buildLaunch( "" )', ;
|
||||
'Builds and launches <cProj> if it is already loaded. All sources are saved if found in modified state before "build" is initiated.' } )
|
||||
aadd( ::aMethods, { 'launch( cProj )', ;
|
||||
'launch( "" )', ;
|
||||
'Launches <cProj> if it is already loaded.' } )
|
||||
aadd( ::aMethods, { 'insert( cText )', ;
|
||||
'insert( "" )', ;
|
||||
'Insert <cText> at current cursor position.' } )
|
||||
aadd( ::aMethods, { 'separator( cSep )', ;
|
||||
'separator( "" )', ;
|
||||
'Inserts separator line <cSep> immediately before current line. <cSep> defaults to "/*---*/"' } )
|
||||
aadd( ::aMethods, { 'getWord( lSelect )', ;
|
||||
'getWord( .f. )' , ;
|
||||
'Returns text of the word under cursor. If <lSelect == .T.> text appears as selected.' } )
|
||||
aadd( ::aMethods, { 'getLine( lSelect )', ;
|
||||
'getLine( .f. )' , ;
|
||||
'Returns text of the current line. If <lSelect == .T.> text appears as selected.' } )
|
||||
aadd( ::aMethods, { 'getText()' , ;
|
||||
'getText()' , ;
|
||||
'Returns current selected text.' } )
|
||||
aadd( ::aMethods, { 'execTool( cName )' , ;
|
||||
'execTool( "" )' , ;
|
||||
'Executes a Tool defined and visible under tools menu.' } )
|
||||
aadd( ::aMethods, { 'execTool( cCmd, cParams, cStartIn, lCapture, lShowOutput )' , ;
|
||||
'execTool( "", "", "", .f., .f. )', ;
|
||||
'Executes a program or file with parameters and other attributes.' + CRLF + ;
|
||||
'http://hbide.vouch.info/ ( Topic: Tools and Utilities )' } )
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:loadDftSCuts()
|
||||
LOCAL a_, b_
|
||||
|
||||
IF .t.
|
||||
b_:= {}
|
||||
|
||||
/* Name Key Alt Ctrl Sh Menu Expr Icon */
|
||||
//
|
||||
aadd( b_, { "Help" , "F1" , "NO", "NO" , "NO" , "", '::help( "" )' , "help" , "", "" } )
|
||||
aadd( b_, { "Exit" , "W" , "NO", "YES", "YES", "", '::exit( .f. )' , "exit" , "", "" } )
|
||||
|
||||
aadd( b_, { "New Source" , "N" , "NO", "YES", "NO" , "", '::newSource( "" )' , "new" , "", "" } )
|
||||
aadd( b_, { "Open" , "O" , "NO", "YES", "NO" , "", '::open()' , "open" , "", "" } )
|
||||
aadd( b_, { "Save" , "S" , "NO", "YES", "NO" , "", '::save()' , "save" , "", "" } )
|
||||
aadd( b_, { "Save All" , "S" , "NO", "YES", "YES", "", '::saveAll()' , "saveall" , "", "" } )
|
||||
aadd( b_, { "Close" , "W" , "NO", "YES", "NO" , "", '::close()' , "close" , "", "" } )
|
||||
aadd( b_, { "Print" , "P" , "NO", "YES", "NO" , "", '::print()' , "print" , "", "" } )
|
||||
* aadd( b_, { "Revert to Saved" , "R" , "NO", "NO" , "YES", "", '::revertToSaved()' , "" , "", "" } )
|
||||
|
||||
aadd( b_, { "Find Dialog" , "F" , "NO", "YES", "NO" , "", '::findDlg()' , "find" , "", "" } )
|
||||
aadd( b_, { "Find Dialog Ex" , "F" , "NO", "YES", "YES", "", '::findDlgEx()' , "find" , "", "" } )
|
||||
|
||||
aadd( b_, { "Goto Line" , "G" , "NO", "YES", "NO" , "", '::gotoLine()' , "gotoline" , "", "" } )
|
||||
aadd( b_, { "Duplicate Line" , "D" , "NO", "YES", "NO" , "", '::duplicateLine()' , "duplicateline" , "", "" } )
|
||||
aadd( b_, { "Delete Line" , "Delete" , "NO", "YES", "NO" , "", '::deleteLine()' , "deleteline" , "", "" } )
|
||||
aadd( b_, { "Line Up" , "Up" , "NO", "YES", "YES", "", '::moveLineUp()' , "movelineup" , "", "" } )
|
||||
aadd( b_, { "Line Down" , "Down" , "NO", "YES", "YES", "", '::moveLineDown()' , "movelinedown" , "", "" } )
|
||||
|
||||
aadd( b_, { "Indent Right" , "Tab" , "NO", "YES", "NO" , "", '::indentRight()' , "blockindentr" , "", "" } )
|
||||
aadd( b_, { "Indent Left" , "Tab" , "NO", "YES", "YES", "", '::indentLeft()' , "blockindentl" , "", "" } )
|
||||
aadd( b_, { "Block Comment" , "Slash" , "NO", "YES", "YES", "", '::blockComment()' , "blockcomment" , "", "" } )
|
||||
aadd( b_, { "Stream Comment" , "Q" , "NO", "YES", "YES", "", '::streamComment()' , "streamcomment" , "", "" } )
|
||||
|
||||
aadd( b_, { "Build Project" , "F9" , "NO", "YES", "NO" , "", '::build( "" )' , "build" , "", "" } )
|
||||
aadd( b_, { "Build & Launch" , "F9" , "NO", "NO" , "NO" , "", '::buildLaunch( "" )' , "buildlaunch" , "", "" } )
|
||||
aadd( b_, { "Launch Project" , "F10" , "NO", "YES", "NO" , "", '::launch( "" )' , "launch" , "", "" } )
|
||||
|
||||
aadd( b_, { "Insert Text" , "F7" , "NO", "YES", "NO" , "", '::insert( "" )' , "insert-external-file", "", "" } )
|
||||
aadd( b_, { "Insert Separator", "F7" , "NO", "NO" , "NO" , "", '::separator( "" )' , "insert-separator", "", "" } )
|
||||
|
||||
::aDftSCuts := b_
|
||||
ENDIF
|
||||
|
||||
IF !empty( a_:= hbide_loadShortcuts( ::oIde ) )
|
||||
::mergeMacros( a_ )
|
||||
ENDIF
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeShortcuts:mergeMacros( a_ )
|
||||
LOCAL c_, n
|
||||
|
||||
FOR EACH c_ IN a_
|
||||
IF ( n := ascan( ::aDftSCuts, {|e_| e_[ 2 ] == c_[ 2 ] .AND. e_[ 3 ] == c_[ 3 ] .AND. ;
|
||||
e_[ 4 ] == c_[ 4 ] .AND. e_[ 5 ] == c_[ 5 ] } ) ) == 0
|
||||
aadd( ::aDftSCuts, c_ )
|
||||
ELSE
|
||||
::aDftSCuts[ n ] := c_
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="4" column="0">
|
||||
<widget class="QPushButton" name="buttonSaveExit">
|
||||
<property name="text">
|
||||
<string>Save and Exit</string>
|
||||
<string>Save and Close</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading ui file 'environments.ui'
|
||||
**
|
||||
** Created: Mon Mar 8 23:16:40 2010
|
||||
** Created: Mon Apr 12 21:21:08 2010
|
||||
** by: Qt User Interface Compiler version 4.5.2
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost when recompiling ui file!
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
editCompilers->setStyleSheet(QString());
|
||||
buttonCn->setText(QApplication::translate("FormEnvironments", "Cancel", 0, QApplication::UnicodeUTF8));
|
||||
labelPathMk2->setText(QApplication::translate("FormEnvironments", "Path to hbmk2", 0, QApplication::UnicodeUTF8));
|
||||
buttonSaveExit->setText(QApplication::translate("FormEnvironments", "Save and Exit", 0, QApplication::UnicodeUTF8));
|
||||
buttonSaveExit->setText(QApplication::translate("FormEnvironments", "Save and Close", 0, QApplication::UnicodeUTF8));
|
||||
buttonSave->setText(QApplication::translate("FormEnvironments", "Save", 0, QApplication::UnicodeUTF8));
|
||||
Q_UNUSED(FormEnvironments);
|
||||
} // retranslateUi
|
||||
|
||||
@@ -397,7 +397,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonSaveExit">
|
||||
<property name="text">
|
||||
<string>Save and Exit</string>
|
||||
<string>Save and Close</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading ui file 'projectpropertiesex.ui'
|
||||
**
|
||||
** Created: Sat Mar 6 14:12:50 2010
|
||||
** by: Qt User Interface Compiler version 4.5.3
|
||||
** Created: Mon Apr 12 21:20:46 2010
|
||||
** by: Qt User Interface Compiler version 4.5.2
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost when recompiling ui file!
|
||||
********************************************************************************/
|
||||
@@ -432,7 +432,7 @@ public:
|
||||
#endif // QT_NO_TOOLTIP
|
||||
editHbp->setStyleSheet(QString());
|
||||
tabWidget->setTabText(tabWidget->indexOf(tabHbp), QApplication::translate("FormProjectPropEx", "hbp", 0, QApplication::UnicodeUTF8));
|
||||
buttonSaveExit->setText(QApplication::translate("FormProjectPropEx", "Save and Exit", 0, QApplication::UnicodeUTF8));
|
||||
buttonSaveExit->setText(QApplication::translate("FormProjectPropEx", "Save and Close", 0, QApplication::UnicodeUTF8));
|
||||
buttonSave->setText(QApplication::translate("FormProjectPropEx", "Save", 0, QApplication::UnicodeUTF8));
|
||||
buttonCn->setText(QApplication::translate("FormProjectPropEx", "Cancel", 0, QApplication::UnicodeUTF8));
|
||||
Q_UNUSED(FormProjectPropEx);
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>664</width>
|
||||
<height>478</height>
|
||||
<width>732</width>
|
||||
<height>438</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Shortcuts</string>
|
||||
<string>Keyboard Macros</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
@@ -21,64 +21,64 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="6">
|
||||
<item row="0" column="1" colspan="10">
|
||||
<widget class="QLabel" name="labelSyntax">
|
||||
<property name="text">
|
||||
<string>Description</string>
|
||||
<string> Description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QListWidget" name="listMethods"/>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="6">
|
||||
<item row="1" column="1" colspan="10">
|
||||
<widget class="QTextEdit" name="texteditSyntax"/>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="7">
|
||||
<item row="2" column="0" colspan="11">
|
||||
<widget class="QLabel" name="labelMacros">
|
||||
<property name="text">
|
||||
<string>Macros</string>
|
||||
<string>Keyboard Shortcuts</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" rowspan="5">
|
||||
<item row="3" column="0" rowspan="12">
|
||||
<widget class="QTableWidget" name="tableMacros"/>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="labelName">
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
<string> Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2" colspan="5">
|
||||
<item row="3" column="2" colspan="9">
|
||||
<widget class="QLineEdit" name="editName"/>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="labelKey">
|
||||
<property name="text">
|
||||
<string>Key</string>
|
||||
<string> Key</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QComboBox" name="comboKey"/>
|
||||
</item>
|
||||
<item row="4" column="3" colspan="2">
|
||||
<item row="4" column="5" colspan="2">
|
||||
<widget class="QCheckBox" name="checkAlt">
|
||||
<property name="text">
|
||||
<string>Alt</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="5">
|
||||
<item row="4" column="7">
|
||||
<widget class="QCheckBox" name="checkCtrl">
|
||||
<property name="text">
|
||||
<string>Ctrl</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="6">
|
||||
<item row="4" column="10">
|
||||
<widget class="QCheckBox" name="checkShift">
|
||||
<property name="text">
|
||||
<string>Shift</string>
|
||||
@@ -88,110 +88,159 @@
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="labelMenu">
|
||||
<property name="text">
|
||||
<string>Menu</string>
|
||||
<string> Menu</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2" colspan="5">
|
||||
<item row="5" column="2" colspan="9">
|
||||
<widget class="QLineEdit" name="editMenu"/>
|
||||
</item>
|
||||
<item row="6" column="1" colspan="6">
|
||||
<item row="7" column="1" rowspan="5" colspan="10">
|
||||
<widget class="QPlainTextEdit" name="plainBlock"/>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QPushButton" name="buttonNew">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>45</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>45</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>New</string>
|
||||
<string> Script:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QPushButton" name="buttonSet">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>45</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>45</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="3">
|
||||
<widget class="QPushButton" name="buttonLoad">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>45</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>45</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Load</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="4" colspan="2">
|
||||
<widget class="QPushButton" name="buttonSave">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>45</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>45</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="6">
|
||||
<widget class="QPushButton" name="buttonSaveAs">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>45</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>45</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>SaveAs</string>
|
||||
</property>
|
||||
</widget>
|
||||
<item row="12" column="1" rowspan="3" colspan="10">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonNew">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>New</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonSet">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonTest">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Test</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonDelete">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Delete</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonLoad">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Load</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonSave">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonSaveAs">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>SaveAs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading ui file 'shortcuts.ui'
|
||||
**
|
||||
** Created: Wed Apr 7 12:19:23 2010
|
||||
** Created: Mon Apr 12 21:22:31 2010
|
||||
** by: Qt User Interface Compiler version 4.5.2
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost when recompiling ui file!
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <QtGui/QCheckBox>
|
||||
#include <QtGui/QComboBox>
|
||||
#include <QtGui/QGridLayout>
|
||||
#include <QtGui/QHBoxLayout>
|
||||
#include <QtGui/QHeaderView>
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QLineEdit>
|
||||
@@ -49,8 +50,12 @@ public:
|
||||
QLabel *labelMenu;
|
||||
QLineEdit *editMenu;
|
||||
QPlainTextEdit *plainBlock;
|
||||
QLabel *label;
|
||||
QHBoxLayout *horizontalLayout;
|
||||
QPushButton *buttonNew;
|
||||
QPushButton *buttonSet;
|
||||
QPushButton *buttonTest;
|
||||
QPushButton *buttonDelete;
|
||||
QPushButton *buttonLoad;
|
||||
QPushButton *buttonSave;
|
||||
QPushButton *buttonSaveAs;
|
||||
@@ -59,7 +64,7 @@ public:
|
||||
{
|
||||
if (FormShortCuts->objectName().isEmpty())
|
||||
FormShortCuts->setObjectName(QString::fromUtf8("FormShortCuts"));
|
||||
FormShortCuts->resize(664, 478);
|
||||
FormShortCuts->resize(732, 438);
|
||||
gridLayout = new QGridLayout(FormShortCuts);
|
||||
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
|
||||
labelMethods = new QLabel(FormShortCuts);
|
||||
@@ -70,7 +75,7 @@ public:
|
||||
labelSyntax = new QLabel(FormShortCuts);
|
||||
labelSyntax->setObjectName(QString::fromUtf8("labelSyntax"));
|
||||
|
||||
gridLayout->addWidget(labelSyntax, 0, 1, 1, 6);
|
||||
gridLayout->addWidget(labelSyntax, 0, 1, 1, 10);
|
||||
|
||||
listMethods = new QListWidget(FormShortCuts);
|
||||
listMethods->setObjectName(QString::fromUtf8("listMethods"));
|
||||
@@ -80,17 +85,17 @@ public:
|
||||
texteditSyntax = new QTextEdit(FormShortCuts);
|
||||
texteditSyntax->setObjectName(QString::fromUtf8("texteditSyntax"));
|
||||
|
||||
gridLayout->addWidget(texteditSyntax, 1, 1, 1, 6);
|
||||
gridLayout->addWidget(texteditSyntax, 1, 1, 1, 10);
|
||||
|
||||
labelMacros = new QLabel(FormShortCuts);
|
||||
labelMacros->setObjectName(QString::fromUtf8("labelMacros"));
|
||||
|
||||
gridLayout->addWidget(labelMacros, 2, 0, 1, 7);
|
||||
gridLayout->addWidget(labelMacros, 2, 0, 1, 11);
|
||||
|
||||
tableMacros = new QTableWidget(FormShortCuts);
|
||||
tableMacros->setObjectName(QString::fromUtf8("tableMacros"));
|
||||
|
||||
gridLayout->addWidget(tableMacros, 3, 0, 5, 1);
|
||||
gridLayout->addWidget(tableMacros, 3, 0, 12, 1);
|
||||
|
||||
labelName = new QLabel(FormShortCuts);
|
||||
labelName->setObjectName(QString::fromUtf8("labelName"));
|
||||
@@ -100,7 +105,7 @@ public:
|
||||
editName = new QLineEdit(FormShortCuts);
|
||||
editName->setObjectName(QString::fromUtf8("editName"));
|
||||
|
||||
gridLayout->addWidget(editName, 3, 2, 1, 5);
|
||||
gridLayout->addWidget(editName, 3, 2, 1, 9);
|
||||
|
||||
labelKey = new QLabel(FormShortCuts);
|
||||
labelKey->setObjectName(QString::fromUtf8("labelKey"));
|
||||
@@ -115,17 +120,17 @@ public:
|
||||
checkAlt = new QCheckBox(FormShortCuts);
|
||||
checkAlt->setObjectName(QString::fromUtf8("checkAlt"));
|
||||
|
||||
gridLayout->addWidget(checkAlt, 4, 3, 1, 2);
|
||||
gridLayout->addWidget(checkAlt, 4, 5, 1, 2);
|
||||
|
||||
checkCtrl = new QCheckBox(FormShortCuts);
|
||||
checkCtrl->setObjectName(QString::fromUtf8("checkCtrl"));
|
||||
|
||||
gridLayout->addWidget(checkCtrl, 4, 5, 1, 1);
|
||||
gridLayout->addWidget(checkCtrl, 4, 7, 1, 1);
|
||||
|
||||
checkShift = new QCheckBox(FormShortCuts);
|
||||
checkShift->setObjectName(QString::fromUtf8("checkShift"));
|
||||
|
||||
gridLayout->addWidget(checkShift, 4, 6, 1, 1);
|
||||
gridLayout->addWidget(checkShift, 4, 10, 1, 1);
|
||||
|
||||
labelMenu = new QLabel(FormShortCuts);
|
||||
labelMenu->setObjectName(QString::fromUtf8("labelMenu"));
|
||||
@@ -135,47 +140,71 @@ public:
|
||||
editMenu = new QLineEdit(FormShortCuts);
|
||||
editMenu->setObjectName(QString::fromUtf8("editMenu"));
|
||||
|
||||
gridLayout->addWidget(editMenu, 5, 2, 1, 5);
|
||||
gridLayout->addWidget(editMenu, 5, 2, 1, 9);
|
||||
|
||||
plainBlock = new QPlainTextEdit(FormShortCuts);
|
||||
plainBlock->setObjectName(QString::fromUtf8("plainBlock"));
|
||||
|
||||
gridLayout->addWidget(plainBlock, 6, 1, 1, 6);
|
||||
gridLayout->addWidget(plainBlock, 7, 1, 5, 10);
|
||||
|
||||
label = new QLabel(FormShortCuts);
|
||||
label->setObjectName(QString::fromUtf8("label"));
|
||||
|
||||
gridLayout->addWidget(label, 6, 1, 1, 1);
|
||||
|
||||
horizontalLayout = new QHBoxLayout();
|
||||
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
|
||||
buttonNew = new QPushButton(FormShortCuts);
|
||||
buttonNew->setObjectName(QString::fromUtf8("buttonNew"));
|
||||
buttonNew->setMinimumSize(QSize(45, 0));
|
||||
buttonNew->setMaximumSize(QSize(45, 16777215));
|
||||
buttonNew->setMinimumSize(QSize(40, 0));
|
||||
buttonNew->setMaximumSize(QSize(40, 16777215));
|
||||
|
||||
gridLayout->addWidget(buttonNew, 7, 1, 1, 1);
|
||||
horizontalLayout->addWidget(buttonNew);
|
||||
|
||||
buttonSet = new QPushButton(FormShortCuts);
|
||||
buttonSet->setObjectName(QString::fromUtf8("buttonSet"));
|
||||
buttonSet->setMinimumSize(QSize(45, 0));
|
||||
buttonSet->setMaximumSize(QSize(45, 16777215));
|
||||
buttonSet->setMinimumSize(QSize(40, 0));
|
||||
buttonSet->setMaximumSize(QSize(40, 16777215));
|
||||
|
||||
gridLayout->addWidget(buttonSet, 7, 2, 1, 1);
|
||||
horizontalLayout->addWidget(buttonSet);
|
||||
|
||||
buttonTest = new QPushButton(FormShortCuts);
|
||||
buttonTest->setObjectName(QString::fromUtf8("buttonTest"));
|
||||
buttonTest->setMinimumSize(QSize(40, 0));
|
||||
buttonTest->setMaximumSize(QSize(40, 16777215));
|
||||
|
||||
horizontalLayout->addWidget(buttonTest);
|
||||
|
||||
buttonDelete = new QPushButton(FormShortCuts);
|
||||
buttonDelete->setObjectName(QString::fromUtf8("buttonDelete"));
|
||||
buttonDelete->setMinimumSize(QSize(40, 0));
|
||||
buttonDelete->setMaximumSize(QSize(40, 16777215));
|
||||
|
||||
horizontalLayout->addWidget(buttonDelete);
|
||||
|
||||
buttonLoad = new QPushButton(FormShortCuts);
|
||||
buttonLoad->setObjectName(QString::fromUtf8("buttonLoad"));
|
||||
buttonLoad->setMinimumSize(QSize(45, 0));
|
||||
buttonLoad->setMaximumSize(QSize(45, 16777215));
|
||||
buttonLoad->setMinimumSize(QSize(40, 0));
|
||||
buttonLoad->setMaximumSize(QSize(40, 16777215));
|
||||
|
||||
gridLayout->addWidget(buttonLoad, 7, 3, 1, 1);
|
||||
horizontalLayout->addWidget(buttonLoad);
|
||||
|
||||
buttonSave = new QPushButton(FormShortCuts);
|
||||
buttonSave->setObjectName(QString::fromUtf8("buttonSave"));
|
||||
buttonSave->setMinimumSize(QSize(45, 0));
|
||||
buttonSave->setMaximumSize(QSize(45, 16777215));
|
||||
buttonSave->setMinimumSize(QSize(40, 0));
|
||||
buttonSave->setMaximumSize(QSize(40, 16777215));
|
||||
|
||||
gridLayout->addWidget(buttonSave, 7, 4, 1, 2);
|
||||
horizontalLayout->addWidget(buttonSave);
|
||||
|
||||
buttonSaveAs = new QPushButton(FormShortCuts);
|
||||
buttonSaveAs->setObjectName(QString::fromUtf8("buttonSaveAs"));
|
||||
buttonSaveAs->setMinimumSize(QSize(45, 0));
|
||||
buttonSaveAs->setMaximumSize(QSize(45, 16777215));
|
||||
buttonSaveAs->setMinimumSize(QSize(40, 0));
|
||||
buttonSaveAs->setMaximumSize(QSize(40, 16777215));
|
||||
|
||||
gridLayout->addWidget(buttonSaveAs, 7, 6, 1, 1);
|
||||
horizontalLayout->addWidget(buttonSaveAs);
|
||||
|
||||
|
||||
gridLayout->addLayout(horizontalLayout, 12, 1, 3, 10);
|
||||
|
||||
|
||||
retranslateUi(FormShortCuts);
|
||||
@@ -185,18 +214,21 @@ public:
|
||||
|
||||
void retranslateUi(QWidget *FormShortCuts)
|
||||
{
|
||||
FormShortCuts->setWindowTitle(QApplication::translate("FormShortCuts", "Shortcuts", 0, QApplication::UnicodeUTF8));
|
||||
FormShortCuts->setWindowTitle(QApplication::translate("FormShortCuts", "Keyboard Macros", 0, QApplication::UnicodeUTF8));
|
||||
labelMethods->setText(QApplication::translate("FormShortCuts", "Public Methods", 0, QApplication::UnicodeUTF8));
|
||||
labelSyntax->setText(QApplication::translate("FormShortCuts", "Description", 0, QApplication::UnicodeUTF8));
|
||||
labelMacros->setText(QApplication::translate("FormShortCuts", "Macros", 0, QApplication::UnicodeUTF8));
|
||||
labelName->setText(QApplication::translate("FormShortCuts", "Name", 0, QApplication::UnicodeUTF8));
|
||||
labelKey->setText(QApplication::translate("FormShortCuts", "Key", 0, QApplication::UnicodeUTF8));
|
||||
labelSyntax->setText(QApplication::translate("FormShortCuts", " Description", 0, QApplication::UnicodeUTF8));
|
||||
labelMacros->setText(QApplication::translate("FormShortCuts", "Keyboard Shortcuts", 0, QApplication::UnicodeUTF8));
|
||||
labelName->setText(QApplication::translate("FormShortCuts", " Name", 0, QApplication::UnicodeUTF8));
|
||||
labelKey->setText(QApplication::translate("FormShortCuts", " Key", 0, QApplication::UnicodeUTF8));
|
||||
checkAlt->setText(QApplication::translate("FormShortCuts", "Alt", 0, QApplication::UnicodeUTF8));
|
||||
checkCtrl->setText(QApplication::translate("FormShortCuts", "Ctrl", 0, QApplication::UnicodeUTF8));
|
||||
checkShift->setText(QApplication::translate("FormShortCuts", "Shift", 0, QApplication::UnicodeUTF8));
|
||||
labelMenu->setText(QApplication::translate("FormShortCuts", "Menu", 0, QApplication::UnicodeUTF8));
|
||||
labelMenu->setText(QApplication::translate("FormShortCuts", " Menu", 0, QApplication::UnicodeUTF8));
|
||||
label->setText(QApplication::translate("FormShortCuts", " Script:", 0, QApplication::UnicodeUTF8));
|
||||
buttonNew->setText(QApplication::translate("FormShortCuts", "New", 0, QApplication::UnicodeUTF8));
|
||||
buttonSet->setText(QApplication::translate("FormShortCuts", "Set", 0, QApplication::UnicodeUTF8));
|
||||
buttonTest->setText(QApplication::translate("FormShortCuts", "Test", 0, QApplication::UnicodeUTF8));
|
||||
buttonDelete->setText(QApplication::translate("FormShortCuts", "Delete", 0, QApplication::UnicodeUTF8));
|
||||
buttonLoad->setText(QApplication::translate("FormShortCuts", "Load", 0, QApplication::UnicodeUTF8));
|
||||
buttonSave->setText(QApplication::translate("FormShortCuts", "Save", 0, QApplication::UnicodeUTF8));
|
||||
buttonSaveAs->setText(QApplication::translate("FormShortCuts", "SaveAs", 0, QApplication::UnicodeUTF8));
|
||||
|
||||
@@ -100,8 +100,6 @@ HBQPlainTextEdit::HBQPlainTextEdit( QWidget * parent ) : QPlainTextEdit( parent
|
||||
|
||||
HBQPlainTextEdit::~HBQPlainTextEdit()
|
||||
{
|
||||
HB_TRACE( HB_TR_ALWAYS, ( "HBQPlainTextEdit::~HBQPlainTextEdit( 0 )" ) );
|
||||
|
||||
disconnect( this, SIGNAL( blockCountChanged( int ) ) );
|
||||
disconnect( this, SIGNAL( updateRequest( const QRect &, int ) ) );
|
||||
disconnect( this, SIGNAL( cursorPositionChanged() ) );
|
||||
@@ -199,7 +197,7 @@ void HBQPlainTextEdit::keyPressEvent( QKeyEvent * event )
|
||||
|
||||
QPlainTextEdit::keyPressEvent( event );
|
||||
|
||||
const bool ctrlOrShift = event->modifiers() & (Qt::ControlModifier | Qt::ShiftModifier);
|
||||
const bool ctrlOrShift = event->modifiers() & ( Qt::ControlModifier | Qt::ShiftModifier );
|
||||
if( !c || ( ctrlOrShift && event->text().isEmpty() ) )
|
||||
return;
|
||||
|
||||
|
||||
@@ -248,6 +248,8 @@ METHOD XbpDialog:destroy()
|
||||
HB_TRACE( HB_TR_ALWAYS, ". " )
|
||||
HB_TRACE( HB_TR_ALWAYS, "<<<<<<<<<< XbpDialog:destroy B >>>>>>>>>>" )
|
||||
|
||||
::oWidget:removeEventFilter( ::pEvents )
|
||||
|
||||
hbxbp_SetEventLoop( NIL )
|
||||
::oEventLoop:exit( 0 )
|
||||
::oEventLoop:pPtr := NIL
|
||||
|
||||
Reference in New Issue
Block a user