2012-07-10 15:22 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbide/idebrowse.prg
  * contrib/hbide/idechangelog.prg
  * contrib/hbide/idedict.prg
  * contrib/hbide/idedocwriter.prg
  * contrib/hbide/ideedit.prg
  * contrib/hbide/ideenviron.prg
  * contrib/hbide/idefindreplace.prg
  * contrib/hbide/ideformat.prg
  * contrib/hbide/idefunctions.prg
  * contrib/hbide/ideharbourhelp.prg
  * contrib/hbide/idemisc.prg
  * contrib/hbide/ideprojmanager.prg
  * contrib/hbide/idesaveload.prg
  * contrib/hbide/ideshortcuts.prg
  * contrib/hbide/ideskeletons.prg
  * contrib/hbide/idethemes.prg
  * contrib/hbide/idetools.prg
    - Replaced: all occurances of accessing objects in ui_* classes 
       prefixed with "q_". Removing "q_" was enough to achieve it.
This commit is contained in:
Pritpal Bedi
2012-07-10 22:27:31 +00:00
parent 2b33c59989
commit 9ee2e705e7
18 changed files with 1367 additions and 1347 deletions

View File

@@ -16,6 +16,27 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-07-10 15:22 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/idebrowse.prg
* contrib/hbide/idechangelog.prg
* contrib/hbide/idedict.prg
* contrib/hbide/idedocwriter.prg
* contrib/hbide/ideedit.prg
* contrib/hbide/ideenviron.prg
* contrib/hbide/idefindreplace.prg
* contrib/hbide/ideformat.prg
* contrib/hbide/idefunctions.prg
* contrib/hbide/ideharbourhelp.prg
* contrib/hbide/idemisc.prg
* contrib/hbide/ideprojmanager.prg
* contrib/hbide/idesaveload.prg
* contrib/hbide/ideshortcuts.prg
* contrib/hbide/ideskeletons.prg
* contrib/hbide/idethemes.prg
* contrib/hbide/idetools.prg
- Replaced: all occurances of accessing objects in ui_* classes
prefixed with "q_". Removing "q_" was enough to achieve it.
2012-07-10 15:18 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/hbmk2_qt.hb
! Added: destroy() method.

View File

@@ -280,10 +280,10 @@ METHOD IdeBrowseManager:destroy()
IF !empty( ::qStruct )
::qStruct:disconnect( QEvent_Close )
::qStruct:q_tableFields:disconnect( "itemSelectionChanged()" )
::qStruct:q_buttonCopyStruct:disconnect( "clicked()" )
::qStruct:tableFields:disconnect( "itemSelectionChanged()" )
::qStruct:buttonCopyStruct:disconnect( "clicked()" )
::qStruct:q_tableFields:clearContents()
::qStruct:tableFields:clearContents()
::qStruct:destroy()
::qStruct := NIL
@@ -769,7 +769,7 @@ METHOD IdeBrowseManager:showTablesTree()
oUI := hbide_getUI( "tables", ::oCurPanel:qWidget )
qFont := QFont( "Courier New", 8 )
qTree := oUI:q_treeTables
qTree := oUI:treeTables
qTree:setFont( qFont )
FOR EACH oPanel IN ::aPanels
@@ -803,9 +803,9 @@ METHOD IdeBrowseManager:showTablesTree()
qParent:setExpanded( .t. )
NEXT
::oIde:setPosAndSizeByIniEx( oUI:oWidget, ::oINI:cTablesDialogGeometry )
oUI:q_buttonOk:connect( "clicked()", {|| oUI:done( 1 ) } )
oUI:buttonOk:connect( "clicked()", {|| oUI:done( 1 ) } )
oUI:exec()
oUI:q_buttonOk:disconnect( "clicked()" )
oUI:buttonOk:disconnect( "clicked()" )
::oIde:oINI:cTablesDialogGeometry := hbide_posAndSize( oUI:oWidget )
oUI:destroy()
@@ -846,15 +846,15 @@ FUNCTION hbide_fldType2Desc( cType )
METHOD IdeBrowseManager:populateFieldData()
LOCAL nRow, qItm
IF ( nRow := ::qStruct:q_tableFields:currentRow() ) >= 0
qItm := ::qStruct:q_tableFields:item( nRow, 1 )
::qStruct:q_editName:setText( qItm:text() )
qItm := ::qStruct:q_tableFields:item( nRow, 2 )
::qStruct:q_comboType:setCurrentIndex( ascan( { "Character", "Numeric", "Date", "Logical" }, qItm:text() ) - 1 )
qItm := ::qStruct:q_tableFields:item( nRow, 3 )
::qStruct:q_editSize:setText( qItm:text() )
qItm := ::qStruct:q_tableFields:item( nRow, 4 )
::qStruct:q_editDec:setText( qItm:text() )
IF ( nRow := ::qStruct:tableFields:currentRow() ) >= 0
qItm := ::qStruct:tableFields:item( nRow, 1 )
::qStruct:editName:setText( qItm:text() )
qItm := ::qStruct:tableFields:item( nRow, 2 )
::qStruct:comboType:setCurrentIndex( ascan( { "Character", "Numeric", "Date", "Logical" }, qItm:text() ) - 1 )
qItm := ::qStruct:tableFields:item( nRow, 3 )
::qStruct:editSize:setText( qItm:text() )
qItm := ::qStruct:tableFields:item( nRow, 4 )
::qStruct:editDec:setText( qItm:text() )
ENDIF
RETURN Self
@@ -863,10 +863,10 @@ METHOD IdeBrowseManager:populateFieldData()
METHOD IdeBrowseManager:populateUiStruct()
LOCAL qItm, fld_, n
LOCAL oTbl := ::qStruct:q_tableFields
LOCAL oTbl := ::qStruct:tableFields
LOCAL aStruct := ::oCurBrw:dbStruct()
::qStruct:q_tableFields:clearContents()
::qStruct:tableFields:clearContents()
oTbl:setRowCount( Len( aStruct ) )
@@ -899,7 +899,7 @@ METHOD IdeBrowseManager:populateUiStruct()
n := 0
aeval( aStruct, {|e_| n += e_[ 3 ] } )
::qStruct:q_labelRecSize:setText( hb_ntos( n + 1 ) )
::qStruct:labelRecSize:setText( hb_ntos( n + 1 ) )
oTbl:setCurrentCell( 0,0 )
@@ -921,7 +921,7 @@ METHOD IdeBrowseManager:buildUiStruct()
::qStruct:connect( QEvent_Close, {|| ::execEvent( "dbStruct_closeEvent" ) } )
oTbl := ::qStruct:q_tableFields
oTbl := ::qStruct:tableFields
oTbl:verticalHeader():hide()
oTbl:horizontalHeader():setStretchLastSection( .t. )
oTbl:setAlternatingRowColors( .t. )
@@ -936,14 +936,14 @@ METHOD IdeBrowseManager:buildUiStruct()
oTbl:setColumnWidth( n-1, hdr_[ n,2 ] )
NEXT
::qStruct:q_comboType:addItem( "Character" )
::qStruct:q_comboType:addItem( "Numeric" )
::qStruct:q_comboType:addItem( "Date" )
::qStruct:q_comboType:addItem( "Logical" )
::qStruct:comboType:addItem( "Character" )
::qStruct:comboType:addItem( "Numeric" )
::qStruct:comboType:addItem( "Date" )
::qStruct:comboType:addItem( "Logical" )
oTbl:connect( "itemSelectionChanged()", {|| ::execEvent( "fieldsTable_itemSelectionChanged" ) } )
::qStruct:q_buttonCopyStruct:connect( "clicked()", {|| ::execEvent( "buttonCopyStruct_clicked" ) } )
::qStruct:buttonCopyStruct:connect( "clicked()", {|| ::execEvent( "buttonCopyStruct_clicked" ) } )
RETURN Self

View File

@@ -114,7 +114,7 @@ METHOD IdeChangeLog:create( oIde )
METHOD IdeChangeLog:destroy()
IF !empty( ::oUI )
::oUI:q_buttonNew :disconnect( "clicked()" )
::oUI:buttonNew :disconnect( "clicked()" )
::oUI:destroy()
ENDIF
@@ -130,65 +130,65 @@ METHOD IdeChangeLog:show()
::oUI:setWindowFlags( Qt_Sheet )
::oUI:setWindowIcon( QIcon( hbide_image( "hbide" ) ) )
::oUI:q_buttonOpen :setIcon( QIcon( hbide_image( "dc_folder" ) ) )
::oUI:q_buttonNew :setIcon( QIcon( hbide_image( "new" ) ) )
::oUI:q_buttonTitle :setIcon( QIcon( hbide_image( "dc_plus" ) ) )
::oUI:q_buttonSource :setIcon( QIcon( hbide_image( "dc_plus" ) ) )
::oUI:q_buttonDesc :setIcon( QIcon( hbide_image( "dc_plus" ) ) )
::oUI:q_buttonSrcDesc :setIcon( QIcon( hbide_image( "dc_plus" ) ) )
::oUI:buttonOpen :setIcon( QIcon( hbide_image( "dc_folder" ) ) )
::oUI:buttonNew :setIcon( QIcon( hbide_image( "new" ) ) )
::oUI:buttonTitle :setIcon( QIcon( hbide_image( "dc_plus" ) ) )
::oUI:buttonSource :setIcon( QIcon( hbide_image( "dc_plus" ) ) )
::oUI:buttonDesc :setIcon( QIcon( hbide_image( "dc_plus" ) ) )
::oUI:buttonSrcDesc :setIcon( QIcon( hbide_image( "dc_plus" ) ) )
::oUI:q_buttonOpen :setToolTip( "Open a ChangeLog" )
::oUI:q_buttonNew :setToolTip( "Create Empty ChangeLog" )
::oUI:q_buttonTitle :setToolTip( "Add Title in current entry" )
::oUI:q_buttonSource :setToolTip( "Add Source in current entry" )
::oUI:q_buttonDesc :setToolTip( "Add Action_Description in current entry" )
::oUI:q_buttonSrcDesc :setToolTip( "Add Source_Action_Description in current entry" )
::oUI:buttonOpen :setToolTip( "Open a ChangeLog" )
::oUI:buttonNew :setToolTip( "Create Empty ChangeLog" )
::oUI:buttonTitle :setToolTip( "Add Title in current entry" )
::oUI:buttonSource :setToolTip( "Add Source in current entry" )
::oUI:buttonDesc :setToolTip( "Add Action_Description in current entry" )
::oUI:buttonSrcDesc :setToolTip( "Add Source_Action_Description in current entry" )
::oUI:q_buttonOpen :connect( "clicked()", {|| ::execEvent( "buttonOpen_clicked" ) } )
::oUI:q_buttonNew :connect( "clicked()", {|| ::execEvent( "buttonNew_clicked" ) } )
::oUI:buttonOpen :connect( "clicked()", {|| ::execEvent( "buttonOpen_clicked" ) } )
::oUI:buttonNew :connect( "clicked()", {|| ::execEvent( "buttonNew_clicked" ) } )
::oUI:q_buttonTitle :connect( "clicked()", {|| ::execEvent( "buttonTitle_clicked" ) } )
::oUI:q_buttonSource :connect( "clicked()", {|| ::execEvent( "buttonSource_clicked" ) } )
::oUI:q_buttonDesc :connect( "clicked()", {|| ::execEvent( "buttonDesc_clicked" ) } )
::oUI:q_buttonSrcDesc :connect( "clicked()", {|| ::execEvent( "buttonSrcDesc_clicked" ) } )
::oUI:q_buttonClearDesc :connect( "clicked()", {|| ::execEvent( "buttonClearDesc_clicked" ) } )
::oUI:buttonTitle :connect( "clicked()", {|| ::execEvent( "buttonTitle_clicked" ) } )
::oUI:buttonSource :connect( "clicked()", {|| ::execEvent( "buttonSource_clicked" ) } )
::oUI:buttonDesc :connect( "clicked()", {|| ::execEvent( "buttonDesc_clicked" ) } )
::oUI:buttonSrcDesc :connect( "clicked()", {|| ::execEvent( "buttonSrcDesc_clicked" ) } )
::oUI:buttonClearDesc :connect( "clicked()", {|| ::execEvent( "buttonClearDesc_clicked" ) } )
::oUI:q_buttonCancel :connect( "clicked()", {|| ::execEvent( "buttonCancel_clicked" ) } )
::oUI:q_buttonSave :connect( "clicked()", {|| ::execEvent( "buttonSave_clicked" ) } )
::oUI:buttonCancel :connect( "clicked()", {|| ::execEvent( "buttonCancel_clicked" ) } )
::oUI:buttonSave :connect( "clicked()", {|| ::execEvent( "buttonSave_clicked" ) } )
::oUI:q_editChangelog :connect( "textChanged(QString)", {|p| ::execEvent( "editChangelog_textChanged", p ) } )
::oUI:q_editUser :connect( "textChanged(QString)", {|p| ::execEvent( "editUser_textChanged" , p ) } )
::oUI:editChangelog :connect( "textChanged(QString)", {|p| ::execEvent( "editChangelog_textChanged", p ) } )
::oUI:editUser :connect( "textChanged(QString)", {|p| ::execEvent( "editUser_textChanged" , p ) } )
::oUI:q_comboAction :addItem( "! Fixed : " )
::oUI:q_comboAction :addItem( "* Changed: " )
::oUI:q_comboAction :addItem( "% Optimzd: " )
::oUI:q_comboAction :addItem( "+ Added : " )
::oUI:q_comboAction :addItem( "- Removed: " )
::oUI:q_comboAction :addItem( "; Comment: " )
::oUI:q_comboAction :addItem( "@ TODO : " )
::oUI:q_comboAction :addItem( "| Moved : " )
::oUI:comboAction :addItem( "! Fixed : " )
::oUI:comboAction :addItem( "* Changed: " )
::oUI:comboAction :addItem( "% Optimzd: " )
::oUI:comboAction :addItem( "+ Added : " )
::oUI:comboAction :addItem( "- Removed: " )
::oUI:comboAction :addItem( "; Comment: " )
::oUI:comboAction :addItem( "@ TODO : " )
::oUI:comboAction :addItem( "| Moved : " )
IF empty( ::oINI:cUserChangeLog )
::oINI:cUserChangeLog := hbide_fetchAString( ::oDlg:oWidget, ::oINI:cUserChangeLog, , "Developer Name" )
ENDIF
aeval( ::oINI:aLogTitle , {|e| ::oUI:q_comboTitle:insertItem( 0,e ) } )
aeval( ::oINI:aLogSources, {|e| ::oUI:q_comboSources:insertItem( 0,e ) } )
aeval( ::oINI:aLogTitle , {|e| ::oUI:comboTitle:insertItem( 0,e ) } )
aeval( ::oINI:aLogSources, {|e| ::oUI:comboSources:insertItem( 0,e ) } )
::oUI:q_comboTitle:setCurrentIndex( -1 )
::oUI:q_comboSources:setCurrentIndex( -1 )
::oUI:comboTitle:setCurrentIndex( -1 )
::oUI:comboSources:setCurrentIndex( -1 )
::oUI:q_plainChangelog :setFont( ::oFont:oWidget )
::oUI:q_plainLogEntry :setFont( ::oFont:oWidget )
::oUI:q_plainCurrentLog :setFont( ::oFont:oWidget )
::oUI:plainChangelog :setFont( ::oFont:oWidget )
::oUI:plainLogEntry :setFont( ::oFont:oWidget )
::oUI:plainCurrentLog :setFont( ::oFont:oWidget )
::oUI:q_plainLogEntry :ensureCursorVisible()
::oUI:plainLogEntry :ensureCursorVisible()
::oUI:q_editUser:setText( ::oINI:cUserChangeLog )
::oUI:editUser:setText( ::oINI:cUserChangeLog )
::oUI:setWindowTitle( "Manage ChangeLog(s)" )
::oEdit := IdeEdit():new( ::oIde )
::qEdit := ::oUI:q_plainChangelog
::qEdit := ::oUI:plainChangelog
::oEdit:qEdit := ::qEdit
::qEdit:setFocusPolicy( Qt_NoFocus )
::qEdit:hbHorzRulerVisible( .f. )
@@ -197,7 +197,7 @@ METHOD IdeChangeLog:show()
::qHiliter := ::oTheme:setSyntaxHilighting( ::qEdit, , .t., .t. )
::qHiliter:hbSetType( 1 )
::oUI:q_editChangelog :setText( ::oINI:cChangeLog )
::oUI:editChangelog :setText( ::oINI:cChangeLog )
::oUI:oWidget:connect( QEvent_Close, {|| ::oIde:oINI:cChangelogDialogGeometry := hbide_posAndSize( ::oUI:oWidget ) } )
ENDIF
@@ -238,44 +238,44 @@ METHOD IdeChangeLog:execEvent( cEvent, p )
SWITCH cEvent
CASE "buttonTitle_clicked"
IF ! empty( cTmp := ::oUI:q_comboTitle:currentText() )
IF ! empty( cTmp := ::oUI:comboTitle:currentText() )
::addToLog( { "Title", cTmp, "" } )
::refresh()
IF ascan( ::oINI:aLogTitle, {|e| upper( e ) == upper( cTmp ) } ) == 0
aadd( ::oINI:aLogTitle, cTmp )
::oUI:q_comboTitle:insertItem( 0,cTmp )
::oUI:comboTitle:insertItem( 0,cTmp )
ENDIF
ENDIF
EXIT
CASE "buttonSource_clicked"
IF ! empty( cTmp := ::oUI:q_comboSources:currentText() )
IF ! empty( cTmp := ::oUI:comboSources:currentText() )
::addToLog( { "Source", cTmp, "" } )
::refresh()
IF ascan( ::oINI:aLogSources, {|e| upper( e ) == upper( cTmp ) } ) == 0
aadd( ::oINI:aLogSources, cTmp )
::oUI:q_comboSources:insertItem( 0,cTmp )
::oUI:comboSources:insertItem( 0,cTmp )
ENDIF
ENDIF
EXIT
CASE "buttonDesc_clicked"
IF ! empty( cTmp := ::oUI:q_plainCurrentLog:toPlainText() )
::addToLog( { "Desc", ::oUI:q_comboAction:currentText(), cTmp } )
::oUI:q_plainCurrentLog:clear()
IF ! empty( cTmp := ::oUI:plainCurrentLog:toPlainText() )
::addToLog( { "Desc", ::oUI:comboAction:currentText(), cTmp } )
::oUI:plainCurrentLog:clear()
::refresh()
ENDIF
EXIT
CASE "buttonSrcDesc_clicked"
IF ! empty( cTmp := ::oUI:q_comboSources:currentText() )
IF ! empty( cTmp := ::oUI:comboSources:currentText() )
::addToLog( { "Source", cTmp, "" } )
ENDIF
IF ! empty( cTmp := ::oUI:q_plainCurrentLog:toPlainText() )
::addToLog( { "Desc", ::oUI:q_comboAction:currentText(), cTmp } )
::oUI:q_plainCurrentLog:clear()
IF ! empty( cTmp := ::oUI:plainCurrentLog:toPlainText() )
::addToLog( { "Desc", ::oUI:comboAction:currentText(), cTmp } )
::oUI:plainCurrentLog:clear()
ENDIF
::refresh()
EXIT
CASE "buttonClearDesc_clicked"
::oUI:q_plainCurrentLog:clear()
::oUI:plainCurrentLog:clear()
EXIT
CASE "buttonSave_clicked"
IF ! empty( cTmp := ::buildLogEntry() )
@@ -294,13 +294,13 @@ METHOD IdeChangeLog:execEvent( cEvent, p )
ENDIF
EXIT
CASE "buttonCancel_clicked"
::oUI:q_plainLogEntry:clear()
::oUI:plainLogEntry:clear()
EXIT
CASE "buttonOpen_clicked"
cTmp := hbide_fetchAFile( ::oDlg, "Select a ChangeLog File" )
IF ! empty( cTmp ) .AND. hb_fileExists( cTmp )
::oINI:cChangeLog := cTmp
::oUI:q_editChangelog:setText( ::oINI:cChangeLog )
::oUI:editChangelog:setText( ::oINI:cChangeLog )
ENDIF
EXIT
CASE "buttonNew_clicked"
@@ -314,7 +314,7 @@ METHOD IdeChangeLog:execEvent( cEvent, p )
hb_memowrit( ::oINI:cChangeLog, s )
::oUI:q_editChangelog:setText( ::oINI:cChangeLog )
::oUI:editChangelog:setText( ::oINI:cChangeLog )
ENDIF
EXIT
CASE "editUser_textChanged"
@@ -325,11 +325,11 @@ METHOD IdeChangeLog:execEvent( cEvent, p )
CASE "editChangelog_textChanged"
IF ! empty( p ) .AND. hb_fileExists( p )
::oINI:cChangeLog := p
::oUI:q_editChangelog:setStyleSheet( "" )
::oUI:editChangelog:setStyleSheet( "" )
::updateLog()
ELSE
::oUI:q_editChangelog:setStyleSheet( "background-color: rgba( 240,120,120,255 );" )
::oUI:q_plainChangelog:clear()
::oUI:editChangelog:setStyleSheet( "background-color: rgba( 240,120,120,255 );" )
::oUI:plainChangelog:clear()
ENDIF
EXIT
@@ -341,11 +341,11 @@ METHOD IdeChangeLog:execEvent( cEvent, p )
METHOD IdeChangeLog:updateLog()
::oUI:q_plainLogEntry:clear()
::oUI:q_plainCurrentLog:clear()
::oUI:q_plainChangelog:clear()
::oUI:plainLogEntry:clear()
::oUI:plainCurrentLog:clear()
::oUI:plainChangelog:clear()
::oUI:q_plainChangelog:setPlainText( hb_memoread( ::oINI:cChangeLog ) )
::oUI:plainChangelog:setPlainText( hb_memoread( ::oINI:cChangeLog ) )
::refresh()
@@ -389,8 +389,8 @@ METHOD IdeChangeLog:addToLog( aLog )
NEXT
ENDCASE
::oUI:q_plainLogEntry:setPlainText( hbide_arrayToMemo( a_ ) )
QApplication():sendEvent( ::oUI:q_plainLogEntry, QKeyEvent( QEvent_KeyPress, Qt_Key_End, Qt_ControlModifier ) )
::oUI:plainLogEntry:setPlainText( hbide_arrayToMemo( a_ ) )
QApplication():sendEvent( ::oUI:plainLogEntry, QKeyEvent( QEvent_KeyPress, Qt_Key_End, Qt_ControlModifier ) )
RETURN Self
@@ -398,7 +398,7 @@ METHOD IdeChangeLog:addToLog( aLog )
METHOD IdeChangeLog:getLogEntry()
LOCAL e, n, f, s_:={}, lHandelled
LOCAL a_:= hbide_memoToArray( ::oUI:q_plainLogEntry:toPlainText() )
LOCAL a_:= hbide_memoToArray( ::oUI:plainLogEntry:toPlainText() )
FOR EACH e IN a_
lHandelled := .f.

View File

@@ -157,7 +157,7 @@ METHOD IdeDictionary:destroy()
METHOD IdeDictionary:load( cDict )
LOCAL a_:= hb_aTokens( cDict, ";" )
LOCAL s, b_, n, n1, cKeyword, cSyntax, cDesc, q_
LOCAL s, b_, n, n1, cKeyword, cSyntax, cDesc, c_
IF !empty( a_ ) .AND. HB_ISARRAY( a_ )
asize( a_, DIC_NUM_VRBLS )
@@ -176,11 +176,10 @@ METHOD IdeDictionary:load( cDict )
::cBgColor := a_[ 5 ]
IF !( ::cBgColor == "NONE" )
q_:= hbide_evalAsIs( ::cBgColor )
IF HB_ISARRAY( q_ ) .AND. Len( q_ ) == 3
::qBgColor := QColor( q_[ 1 ], q_[ 2 ], q_[ 3 ] )
c_:= hbide_evalAsIs( ::cBgColor )
IF HB_ISARRAY( c_ ) .AND. Len( c_ ) == 3
::qBgColor := QColor( c_[ 1 ], c_[ 2 ], c_[ 3 ] )
ENDIF
HB_TRACE( HB_TR_DEBUG, ::cBgColor, valtype( q_ ) )
ENDIF
IF !empty( a_[ DIC_FILENAME ] ) .AND. hb_fileExists( a_[ DIC_FILENAME ] )

View File

@@ -229,23 +229,23 @@ METHOD IdeDocWriter:show()
METHOD IdeDocWriter:setImages()
::oUI:q_buttonLoadFromDocFile :setIcon( QIcon( hbide_image( "load_3" ) ) )
::oUI:q_buttonLoadFromSource :setIcon( QIcon( hbide_image( "load_2" ) ) )
::oUI:q_buttonLoadFromCurFunc :setIcon( QIcon( hbide_image( "load_1" ) ) )
::oUI:buttonLoadFromDocFile :setIcon( QIcon( hbide_image( "load_3" ) ) )
::oUI:buttonLoadFromSource :setIcon( QIcon( hbide_image( "load_2" ) ) )
::oUI:buttonLoadFromCurFunc :setIcon( QIcon( hbide_image( "load_1" ) ) )
::oUI:q_buttonArgs :setIcon( QIcon( hbide_image( "arguments" ) ) )
::oUI:q_buttonDesc :setIcon( QIcon( hbide_image( "description" ) ) )
::oUI:q_buttonExamples :setIcon( QIcon( hbide_image( "example" ) ) )
::oUI:q_buttonTests :setIcon( QIcon( hbide_image( "tests" ) ) )
::oUI:buttonArgs :setIcon( QIcon( hbide_image( "arguments" ) ) )
::oUI:buttonDesc :setIcon( QIcon( hbide_image( "description" ) ) )
::oUI:buttonExamples :setIcon( QIcon( hbide_image( "example" ) ) )
::oUI:buttonTests :setIcon( QIcon( hbide_image( "tests" ) ) )
::oUI:q_buttonClear :setIcon( QIcon( hbide_image( "clean" ) ) )
::oUI:q_buttonSaveInFunc :setIcon( QIcon( hbide_image( "unload_1" ) ) )
::oUI:q_buttonSave :setIcon( QIcon( hbide_image( "helpdoc" ) ) )
::oUI:buttonClear :setIcon( QIcon( hbide_image( "clean" ) ) )
::oUI:buttonSaveInFunc :setIcon( QIcon( hbide_image( "unload_1" ) ) )
::oUI:buttonSave :setIcon( QIcon( hbide_image( "helpdoc" ) ) )
::oUI:q_buttonCloseArgs :setIcon( QIcon( hbide_image( "closetab" ) ) )
::oUI:q_buttonCloseDesc :setIcon( QIcon( hbide_image( "closetab" ) ) )
::oUI:q_buttonCloseExamples :setIcon( QIcon( hbide_image( "closetab" ) ) )
::oUI:q_buttonCloseTests :setIcon( QIcon( hbide_image( "closetab" ) ) )
::oUI:buttonCloseArgs :setIcon( QIcon( hbide_image( "closetab" ) ) )
::oUI:buttonCloseDesc :setIcon( QIcon( hbide_image( "closetab" ) ) )
::oUI:buttonCloseExamples :setIcon( QIcon( hbide_image( "closetab" ) ) )
::oUI:buttonCloseTests :setIcon( QIcon( hbide_image( "closetab" ) ) )
RETURN Self
@@ -253,18 +253,18 @@ METHOD IdeDocWriter:setImages()
METHOD IdeDocWriter:installSignals()
::oUI:q_buttonArgs :connect( "toggled(bool)", {|p| ::execEvent( buttonArgs_clicked , p ) } )
::oUI:q_buttonDesc :connect( "toggled(bool)", {|p| ::execEvent( buttonDesc_clicked , p ) } )
::oUI:q_buttonExamples :connect( "toggled(bool)", {|p| ::execEvent( buttonExample_clicked , p ) } )
::oUI:q_buttonTests :connect( "toggled(bool)", {|p| ::execEvent( buttonTests_clicked , p ) } )
::oUI:q_buttonCloseArgs :connect( "clicked()" , {| | ::execEvent( buttonCloseArgs_clicked ) } )
::oUI:q_buttonCloseDesc :connect( "clicked()" , {| | ::execEvent( buttonCloseDesc_clicked ) } )
::oUI:q_buttonCloseExamples :connect( "clicked()" , {| | ::execEvent( buttonCloseExample_clicked ) } )
::oUI:q_buttonCloseTests :connect( "clicked()" , {| | ::execEvent( buttonCloseTests_clicked ) } )
::oUI:q_buttonClear :connect( "clicked()" , {| | ::execEvent( buttonClear_clicked ) } )
::oUI:q_buttonSaveInFunc :connect( "clicked()" , {| | ::execEvent( buttonSaveInFunc_clicked ) } )
::oUI:q_buttonSave :connect( "clicked()" , {| | ::execEvent( buttonSave_clicked ) } )
::oUI:q_buttonLoadFromCurFunc:connect( "clicked()" , {|| ::execEvent( buttonLoadFromCurFunc_clicked ) } )
::oUI:buttonArgs :connect( "toggled(bool)", {|p| ::execEvent( buttonArgs_clicked , p ) } )
::oUI:buttonDesc :connect( "toggled(bool)", {|p| ::execEvent( buttonDesc_clicked , p ) } )
::oUI:buttonExamples :connect( "toggled(bool)", {|p| ::execEvent( buttonExample_clicked , p ) } )
::oUI:buttonTests :connect( "toggled(bool)", {|p| ::execEvent( buttonTests_clicked , p ) } )
::oUI:buttonCloseArgs :connect( "clicked()" , {| | ::execEvent( buttonCloseArgs_clicked ) } )
::oUI:buttonCloseDesc :connect( "clicked()" , {| | ::execEvent( buttonCloseDesc_clicked ) } )
::oUI:buttonCloseExamples :connect( "clicked()" , {| | ::execEvent( buttonCloseExample_clicked ) } )
::oUI:buttonCloseTests :connect( "clicked()" , {| | ::execEvent( buttonCloseTests_clicked ) } )
::oUI:buttonClear :connect( "clicked()" , {| | ::execEvent( buttonClear_clicked ) } )
::oUI:buttonSaveInFunc :connect( "clicked()" , {| | ::execEvent( buttonSaveInFunc_clicked ) } )
::oUI:buttonSave :connect( "clicked()" , {| | ::execEvent( buttonSave_clicked ) } )
::oUI:buttonLoadFromCurFunc:connect( "clicked()" , {|| ::execEvent( buttonLoadFromCurFunc_clicked ) } )
RETURN Self
@@ -272,30 +272,30 @@ METHOD IdeDocWriter:installSignals()
METHOD IdeDocWriter:setParameters()
::oUI:q_buttonArgs :setCheckable( .t. )
::oUI:q_buttonDesc :setCheckable( .t. )
::oUI:q_buttonExamples:setCheckable( .t. )
::oUI:q_buttonTests :setCheckable( .t. )
::oUI:buttonArgs :setCheckable( .t. )
::oUI:buttonDesc :setCheckable( .t. )
::oUI:buttonExamples:setCheckable( .t. )
::oUI:buttonTests :setCheckable( .t. )
::oUI:q_buttonArgs :setChecked( .t. )
::oUI:q_buttonDesc :setChecked( .t. )
::oUI:q_buttonExamples:setChecked( .f. )
::oUI:q_buttonTests :setChecked( .f. )
::oUI:buttonArgs :setChecked( .t. )
::oUI:buttonDesc :setChecked( .t. )
::oUI:buttonExamples:setChecked( .f. )
::oUI:buttonTests :setChecked( .f. )
::oUI:q_frameTests:hide()
::oUI:q_frameExamples:hide()
::oUI:frameTests:hide()
::oUI:frameExamples:hide()
::oUI:q_comboTemplate:addItem( "Function" )
::oUI:q_comboTemplate:addItem( "Procedure" )
::oUI:q_comboTemplate:addItem( "Class" )
::oUI:comboTemplate:addItem( "Function" )
::oUI:comboTemplate:addItem( "Procedure" )
::oUI:comboTemplate:addItem( "Class" )
::qHiliter := ::oTH:SetSyntaxHilighting( ::oUI:q_plainExamples, "Pritpal's Favourite" )
::qHiliter1 := ::oTH:SetSyntaxHilighting( ::oUI:q_plainTests , "Evening Glamour" )
::qHiliter := ::oTH:SetSyntaxHilighting( ::oUI:plainExamples, "Pritpal's Favourite" )
::qHiliter1 := ::oTH:SetSyntaxHilighting( ::oUI:plainTests , "Evening Glamour" )
::oUI:q_plainExamples:setFont( ::oFont:oWidget )
::oUI:q_plainTests:setFont( ::oFont:oWidget )
::oUI:plainExamples:setFont( ::oFont:oWidget )
::oUI:plainTests:setFont( ::oFont:oWidget )
::oUI:q_frameGeneral:setSizePolicy( QSizePolicy_Preferred, QSizePolicy_Fixed )
::oUI:frameGeneral:setSizePolicy( QSizePolicy_Preferred, QSizePolicy_Fixed )
RETURN Self
@@ -310,44 +310,44 @@ METHOD IdeDocWriter:execEvent( nMode, p )
SWITCH nMode
CASE buttonArgs_clicked
IF p
::oUI:q_frameArgs:show()
::oUI:frameArgs:show()
ELSE
::oUI:q_frameArgs:hide()
::oUI:frameArgs:hide()
ENDIF
EXIT
CASE buttonDesc_clicked
IF p
::oUI:q_frameDesc:show()
::oUI:frameDesc:show()
ELSE
::oUI:q_frameDesc:hide()
::oUI:frameDesc:hide()
ENDIF
EXIT
CASE buttonExample_clicked
IF p
::oUI:q_frameExamples:show()
::oUI:frameExamples:show()
ELSE
::oUI:q_frameExamples:hide()
::oUI:frameExamples:hide()
ENDIF
EXIT
CASE buttonTests_clicked
IF p
::oUI:q_frameTests:show()
::oUI:frameTests:show()
ELSE
::oUI:q_frameTests:hide()
::oUI:frameTests:hide()
ENDIF
EXIT
CASE buttonCloseArgs_clicked
::oUI:q_buttonArgs:setChecked( .f. )
::oUI:buttonArgs:setChecked( .f. )
EXIT
CASE buttonCloseDesc_clicked
::oUI:q_buttonDesc:setChecked( .f. )
::oUI:buttonDesc:setChecked( .f. )
EXIT
CASE buttonCloseExample_clicked
::oUI:q_buttonExamples:setChecked( .f. )
::oUI:buttonExamples:setChecked( .f. )
EXIT
CASE buttonCloseTests_clicked
::oUI:q_buttonTests:setChecked( .f. )
::oUI:buttonTests:setChecked( .f. )
EXIT
CASE buttonLoadFromCurFunc_clicked
@@ -385,24 +385,24 @@ METHOD IdeDocWriter:clear()
METHOD IdeDocWriter:fillForm( aFacts )
::oUI:q_editVersion :setText ( aFacts[ qqVersion ] )
::oUI:q_editStatus :setText ( aFacts[ qqStatus ] )
::oUI:q_editCompliance :setText ( aFacts[ qqCompliance ] )
::oUI:q_editCategory :setText ( aFacts[ qqCategory ] )
::oUI:q_editSubCategory :setText ( aFacts[ qqSubCategory ] )
::oUI:q_editName :setText ( aFacts[ qqName ] )
::oUI:q_editExtLink :setText ( aFacts[ qqExtLink ] )
::oUI:q_editOneLiner :setText ( aFacts[ qqOneLiner ] )
::oUI:q_editSyntax :setText ( aFacts[ qqSyntax ] )
::oUI:q_editReturns :setText ( aFacts[ qqReturns ] )
::oUI:q_editSeeAlso :setText ( aFacts[ qqSeeAlso ] )
::oUI:q_editFiles :setText ( aFacts[ qqFiles ] )
::oUI:q_plainArgs :setPlainText ( aFacts[ qqArgs ] )
::oUI:q_plainDesc :setPlainText ( aFacts[ qqDesc ] )
::oUI:q_plainExamples :setPlainText ( aFacts[ qqExamples ] )
::oUI:q_plainTests :setPlainText ( aFacts[ qqTests ] )
::oUI:editVersion :setText ( aFacts[ qqVersion ] )
::oUI:editStatus :setText ( aFacts[ qqStatus ] )
::oUI:editCompliance :setText ( aFacts[ qqCompliance ] )
::oUI:editCategory :setText ( aFacts[ qqCategory ] )
::oUI:editSubCategory :setText ( aFacts[ qqSubCategory ] )
::oUI:editName :setText ( aFacts[ qqName ] )
::oUI:editExtLink :setText ( aFacts[ qqExtLink ] )
::oUI:editOneLiner :setText ( aFacts[ qqOneLiner ] )
::oUI:editSyntax :setText ( aFacts[ qqSyntax ] )
::oUI:editReturns :setText ( aFacts[ qqReturns ] )
::oUI:editSeeAlso :setText ( aFacts[ qqSeeAlso ] )
::oUI:editFiles :setText ( aFacts[ qqFiles ] )
::oUI:plainArgs :setPlainText ( aFacts[ qqArgs ] )
::oUI:plainDesc :setPlainText ( aFacts[ qqDesc ] )
::oUI:plainExamples :setPlainText ( aFacts[ qqExamples ] )
::oUI:plainTests :setPlainText ( aFacts[ qqTests ] )
::oUI:q_comboTemplate:setCurrentIndex( iif( aFacts[ qqVersion ] == "Procedure", 1, ;
::oUI:comboTemplate:setCurrentIndex( iif( aFacts[ qqVersion ] == "Procedure", 1, ;
iif( aFacts[ qqVersion ] == "Class", 2, 0 ) ) )
RETURN Self
@@ -410,24 +410,24 @@ METHOD IdeDocWriter:fillForm( aFacts )
METHOD IdeDocWriter:fillFormByObject( oFunc )
::oUI:q_editVersion :setText ( oFunc:cVersion )
::oUI:q_editStatus :setText ( oFunc:cStatus )
::oUI:q_editCompliance :setText ( oFunc:cPlatForms )
::oUI:q_editCategory :setText ( oFunc:cCategory )
::oUI:q_editSubCategory :setText ( oFunc:cSubCategory )
::oUI:q_editName :setText ( oFunc:cName )
::oUI:q_editExtLink :setText ( oFunc:cExternalLink )
::oUI:q_editOneLiner :setText ( oFunc:cOneLiner )
::oUI:q_editSyntax :setText ( hbide_ar2delString( oFunc:aSyntax , "; " ) )
::oUI:q_editReturns :setText ( hbide_ar2delString( oFunc:aReturns, "; " ) )
::oUI:q_editSeeAlso :setText ( oFunc:cSeeAlso )
::oUI:q_editFiles :setText ( hbide_ar2delString( oFunc:aFiles , "; " ) )
::oUI:q_plainArgs :setPlainText ( hbide_arrayTOmemo( oFunc:aArguments ) )
::oUI:q_plainDesc :setPlainText ( hbide_arrayTOmemo( oFunc:aDescription ) )
::oUI:q_plainExamples :setPlainText ( hbide_arrayTOmemo( oFunc:aExamples ) )
::oUI:q_plainTests :setPlainText ( hbide_arrayTOmemo( oFunc:aTests ) )
::oUI:editVersion :setText ( oFunc:cVersion )
::oUI:editStatus :setText ( oFunc:cStatus )
::oUI:editCompliance :setText ( oFunc:cPlatForms )
::oUI:editCategory :setText ( oFunc:cCategory )
::oUI:editSubCategory :setText ( oFunc:cSubCategory )
::oUI:editName :setText ( oFunc:cName )
::oUI:editExtLink :setText ( oFunc:cExternalLink )
::oUI:editOneLiner :setText ( oFunc:cOneLiner )
::oUI:editSyntax :setText ( hbide_ar2delString( oFunc:aSyntax , "; " ) )
::oUI:editReturns :setText ( hbide_ar2delString( oFunc:aReturns, "; " ) )
::oUI:editSeeAlso :setText ( oFunc:cSeeAlso )
::oUI:editFiles :setText ( hbide_ar2delString( oFunc:aFiles , "; " ) )
::oUI:plainArgs :setPlainText ( hbide_arrayTOmemo( oFunc:aArguments ) )
::oUI:plainDesc :setPlainText ( hbide_arrayTOmemo( oFunc:aDescription ) )
::oUI:plainExamples :setPlainText ( hbide_arrayTOmemo( oFunc:aExamples ) )
::oUI:plainTests :setPlainText ( hbide_arrayTOmemo( oFunc:aTests ) )
::oUI:q_comboTemplate:setCurrentIndex( iif( oFunc:cTemplate == "Procedure", 1, ;
::oUI:comboTemplate:setCurrentIndex( iif( oFunc:cTemplate == "Procedure", 1, ;
iif( oFunc:cTemplate == "Class", 2, 0 ) ) )
RETURN Self
@@ -609,9 +609,9 @@ METHOD IdeDocWriter:parsePrototype( cProto )
METHOD IdeDocWriter:saveInFile()
LOCAL cFile, cBuffer
LOCAL txt_ := ::buildDocument()
LOCAL n := ::oUI:q_comboTemplate:currentIndex()
LOCAL n := ::oUI:comboTemplate:currentIndex()
LOCAL cPrefix := iif( n == 0, "fun_", iif( n == 1, "proc_", "class_" ) )
LOCAL cName := lower( ::oUI:q_editName:text() )
LOCAL cName := lower( ::oUI:editName:text() )
cName := strtran( cName, "(", "" )
cName := strtran( cName, ")", "" )
@@ -677,51 +677,51 @@ METHOD IdeDocWriter:saveInFunction()
METHOD IdeDocWriter:buildDocument()
LOCAL s
LOCAL nIndex := ::oUI:q_comboTemplate:currentIndex()
LOCAL nIndex := ::oUI:comboTemplate:currentIndex()
LOCAL hEntry := { => }
hb_HKeepOrder( hEntry, .T. )
hEntry[ "TEMPLATE" ] := iif( nIndex == 2, "Class", iif( nIndex == 1, "Procedure", "Function" ) )
IF !empty( s := ::oUI:q_editName:text() )
IF !empty( s := ::oUI:editName:text() )
hEntry[ "NAME" ] := s
ENDIF
IF !empty( s := ::oUI:q_editCategory:text() )
IF !empty( s := ::oUI:editCategory:text() )
hEntry[ "CATEGORY" ] := s
ENDIF
IF !empty( s := ::oUI:q_editSubCategory:text() )
IF !empty( s := ::oUI:editSubCategory:text() )
hEntry[ "SUBCATEGORY" ] := s
ENDIF
IF !empty( s := ::oUI:q_editExtLink:text() )
IF !empty( s := ::oUI:editExtLink:text() )
hEntry[ "EXTERNALLINK" ] := s
ENDIF
IF !empty( s := ::oUI:q_editOneLiner:text() )
IF !empty( s := ::oUI:editOneLiner:text() )
hEntry[ "ONELINER" ] := s
ENDIF
IF !empty( s := ::oUI:q_editSyntax:text() )
IF !empty( s := ::oUI:editSyntax:text() )
hEntry[ "SYNTAX" ] := s
ENDIF
hEntry[ "ARGUMENTS" ] := ::oUI:q_plainArgs:toPlainText()
IF !empty( s := ::oUI:q_editReturns:text() )
hEntry[ "ARGUMENTS" ] := ::oUI:plainArgs:toPlainText()
IF !empty( s := ::oUI:editReturns:text() )
hEntry[ "RETURNS" ] := s
ENDIF
hEntry[ "DESCRIPTION" ] := ::oUI:q_plainDesc:toPlainText()
hEntry[ "EXAMPLES" ] := ::oUI:q_plainExamples:toPlainText()
hEntry[ "TESTS" ] := ::oUI:q_plainTests:toPlainText()
IF !empty( s := ::oUI:q_editStatus:text() )
hEntry[ "DESCRIPTION" ] := ::oUI:plainDesc:toPlainText()
hEntry[ "EXAMPLES" ] := ::oUI:plainExamples:toPlainText()
hEntry[ "TESTS" ] := ::oUI:plainTests:toPlainText()
IF !empty( s := ::oUI:editStatus:text() )
hEntry[ "STATUS" ] := s
ENDIF
IF !empty( s := ::oUI:q_editCompliance:text() )
IF !empty( s := ::oUI:editCompliance:text() )
hEntry[ "PLATFORMS" ] := s
ENDIF
IF !empty( s := ::oUI:q_editVersion:text() )
IF !empty( s := ::oUI:editVersion:text() )
hEntry[ "VERSION" ] := s
ENDIF
IF !empty( s := ::oUI:q_editFiles:text() )
IF !empty( s := ::oUI:editFiles:text() )
hEntry[ "FILES" ] := s
ENDIF
IF !empty( s := ::oUI:q_editSeeAlso:text() )
IF !empty( s := ::oUI:editSeeAlso:text() )
hEntry[ "SEEALSO" ] := s
ENDIF

View File

@@ -708,7 +708,7 @@ METHOD IdeEdit:execKeyEvent( nMode, nEvent, p, p1 )
ENDSWITCH
RETURN .F. /* Important */
RETURN .F. /* Important - NEVER CHANGE IT TO .T. */
/*----------------------------------------------------------------------*/
@@ -791,14 +791,14 @@ STATIC FUNCTION hbide_blockContents( aContents )
/*----------------------------------------------------------------------*/
STATIC FUNCTION hbide_setQCursor( qEdit, q_ )
STATIC FUNCTION hbide_setQCursor( qEdit, a_ )
LOCAL qCursor
IF HB_ISARRAY( q_ )
qCursor := q_[ 1 ]
IF HB_ISARRAY( a_ )
qCursor := a_[ 1 ]
qCursor:movePosition( QTextCursor_Start, QTextCursor_MoveAnchor )
qCursor:movePosition( QTextCursor_Down , QTextCursor_MoveAnchor, q_[ 2 ] )
qCursor:movePosition( QTextCursor_Right, QTextCursor_MoveAnchor, q_[ 3 ] )
qCursor:movePosition( QTextCursor_Down , QTextCursor_MoveAnchor, a_[ 2 ] )
qCursor:movePosition( QTextCursor_Right, QTextCursor_MoveAnchor, a_[ 3 ] )
qEdit:setTextCursor( qCursor )
qCursor:endEditBlock()
ELSE
@@ -1126,7 +1126,7 @@ METHOD IdeEdit:deleteBlockContents( aCord )
/*----------------------------------------------------------------------*/
METHOD IdeEdit:blockComment()
LOCAL nT, nL, nB, nR, nW, i, cLine, qCursor, aCord, nMode, q_
LOCAL nT, nL, nB, nR, nW, i, cLine, qCursor, aCord, nMode, a_
LOCAL cComment := "// "
LOCAL nLen := Len( cComment )
@@ -1140,7 +1140,7 @@ METHOD IdeEdit:blockComment()
IF nW >= 0
nMode := aCord[ 5 ]
q_:= hbide_setQCursor( ::qEdit ) ; qCursor := q_[ 1 ]
a_:= hbide_setQCursor( ::qEdit ) ; qCursor := a_[ 1 ]
FOR i := nT TO nB
cLine := ::getLine( i + 1 )
@@ -1165,7 +1165,7 @@ METHOD IdeEdit:blockComment()
hbide_qReplaceLine( qCursor, i, cLine )
NEXT
hbide_setQCursor( ::qEdit, q_ )
hbide_setQCursor( ::qEdit, a_ )
ENDIF
RETURN Self
@@ -1173,7 +1173,7 @@ METHOD IdeEdit:blockComment()
/*----------------------------------------------------------------------*/
METHOD IdeEdit:streamComment()
LOCAL nT, nL, nB, nR, nW, i, cLine, qCursor, aCord, nMode, q_
LOCAL nT, nL, nB, nR, nW, i, cLine, qCursor, aCord, nMode, a_
IF ::lReadOnly
RETURN Self
@@ -1186,7 +1186,7 @@ METHOD IdeEdit:streamComment()
IF nW >= 0
nMode := aCord[ 5 ]
q_:= hbide_setQCursor( ::qEdit ) ; qCursor := q_[ 1 ]
a_:= hbide_setQCursor( ::qEdit ) ; qCursor := a_[ 1 ]
FOR i := nT TO nB
cLine := ::getLine( i + 1 )
@@ -1211,7 +1211,7 @@ METHOD IdeEdit:streamComment()
hbide_qReplaceLine( qCursor, i, cLine )
NEXT
hbide_setQCursor( ::qEdit, q_ )
hbide_setQCursor( ::qEdit, a_ )
ENDIF
RETURN Self
@@ -1219,7 +1219,7 @@ METHOD IdeEdit:streamComment()
/*----------------------------------------------------------------------*/
METHOD IdeEdit:blockIndent( nDirctn )
LOCAL nT, nL, nB, nR, nW, i, cLine, qCursor, aCord, q_, nMode, cLineSel
LOCAL nT, nL, nB, nR, nW, i, cLine, qCursor, aCord, a_, nMode, cLineSel
IF ::lReadOnly
RETURN Self
@@ -1231,7 +1231,7 @@ METHOD IdeEdit:blockIndent( nDirctn )
IF nW >= 0
nMode := aCord[ 5 ]
q_:= hbide_setQCursor( ::qEdit ) ; qCursor := q_[ 1 ]
a_:= hbide_setQCursor( ::qEdit ) ; qCursor := a_[ 1 ]
FOR i := nT TO nB
cLine := ::getLine( i + 1 )
@@ -1262,7 +1262,7 @@ METHOD IdeEdit:blockIndent( nDirctn )
hbide_qReplaceLine( qCursor, i, cLine )
NEXT
hbide_setQCursor( ::qEdit, q_ )
hbide_setQCursor( ::qEdit, a_ )
ENDIF
RETURN Self
@@ -1270,7 +1270,7 @@ METHOD IdeEdit:blockIndent( nDirctn )
/*----------------------------------------------------------------------*/
METHOD IdeEdit:blockConvert( cMode )
LOCAL nT, nL, nB, nR, nW, i, cLine, qCursor, aCord, q_, nMode
LOCAL nT, nL, nB, nR, nW, i, cLine, qCursor, aCord, a_, nMode
IF ::lReadOnly
RETURN Self
@@ -1282,7 +1282,7 @@ METHOD IdeEdit:blockConvert( cMode )
IF nW >= 0
nMode := aCord[ 5 ]
q_:= hbide_setQCursor( ::qEdit ) ; qCursor := q_[ 1 ]
a_:= hbide_setQCursor( ::qEdit ) ; qCursor := a_[ 1 ]
FOR i := nT TO nB
cLine := ::getLine( i + 1 )
@@ -1312,7 +1312,7 @@ METHOD IdeEdit:blockConvert( cMode )
hbide_qReplaceLine( qCursor, i, cLine )
NEXT
hbide_setQCursor( ::qEdit, q_ )
hbide_setQCursor( ::qEdit, a_ )
ENDIF
RETURN Self

View File

@@ -229,13 +229,13 @@ METHOD IdeEnvironments:show()
::oEnvironDock:oWidget:setWidget( ::oUI:oWidget )
::oUI:q_buttonCn :connect( "clicked()", {|| ::oEnvironDock:hide() } )
::oUI:q_buttonSave :connect( "clicked()", {|| ::saveEnv() } )
::oUI:q_buttonSaveExit:connect( "clicked()", {|| ::saveEnv(), ::oEnvironDock:hide() } )
::oUI:buttonCn :connect( "clicked()", {|| ::oEnvironDock:hide() } )
::oUI:buttonSave :connect( "clicked()", {|| ::saveEnv() } )
::oUI:buttonSaveExit:connect( "clicked()", {|| ::saveEnv(), ::oEnvironDock:hide() } )
::oUI:q_editCompilers:setFont( ::oFont:oWidget )
::oUI:editCompilers:setFont( ::oFont:oWidget )
ENDIF
::oUI:q_editCompilers:setPlainText( hb_memoread( ::oINI:getEnvFile() ) )
::oUI:editCompilers:setPlainText( hb_memoread( ::oINI:getEnvFile() ) )
RETURN Self
@@ -244,7 +244,7 @@ METHOD IdeEnvironments:show()
METHOD IdeEnvironments:saveEnv()
LOCAL cText
IF !empty( cText := ::oUI:q_editCompilers:toPlainText() )
IF !empty( cText := ::oUI:editCompilers:toPlainText() )
hb_MemoWrit( ::oINI:getEnvFile(), cText )
::parse( ::oINI:getEnvFile() )
ENDIF

View File

@@ -138,25 +138,25 @@ METHOD IdeUpDown:create( oIde )
::oUI:setWindowFlags( hb_bitOr( Qt_Tool, Qt_FramelessWindowHint ) )
::oUI:setFocusPolicy( Qt_NoFocus )
::oUI:q_buttonPrev:setIcon( QIcon( hbide_image( "go-prev" ) ) )
::oUI:q_buttonPrev:setToolTip( "Find Previous" )
::oUI:q_buttonPrev:connect( "clicked()", {|| ::execEvent( "buttonPrev_clicked" ) } )
::oUI:buttonPrev:setIcon( QIcon( hbide_image( "go-prev" ) ) )
::oUI:buttonPrev:setToolTip( "Find Previous" )
::oUI:buttonPrev:connect( "clicked()", {|| ::execEvent( "buttonPrev_clicked" ) } )
//
::oUI:q_buttonNext:setIcon( QIcon( hbide_image( "go-next" ) ) )
::oUI:q_buttonNext:setToolTip( "Find Next" )
::oUI:q_buttonNext:connect( "clicked()", {|| ::execEvent( "buttonNext_clicked" ) } )
::oUI:buttonNext:setIcon( QIcon( hbide_image( "go-next" ) ) )
::oUI:buttonNext:setToolTip( "Find Next" )
::oUI:buttonNext:connect( "clicked()", {|| ::execEvent( "buttonNext_clicked" ) } )
//
::oUI:q_buttonFirst:setIcon( QIcon( hbide_image( "go-first" ) ) )
::oUI:q_buttonFirst:setToolTip( "Find First" )
::oUI:q_buttonFirst:connect( "clicked()", {|| ::execEvent( "buttonFirst_clicked" ) } )
::oUI:buttonFirst:setIcon( QIcon( hbide_image( "go-first" ) ) )
::oUI:buttonFirst:setToolTip( "Find First" )
::oUI:buttonFirst:connect( "clicked()", {|| ::execEvent( "buttonFirst_clicked" ) } )
//
::oUI:q_buttonLast:setIcon( QIcon( hbide_image( "go-last" ) ) )
::oUI:q_buttonLast:setToolTip( "Find Last" )
::oUI:q_buttonLast:connect( "clicked()", {|| ::execEvent( "buttonLast_clicked" ) } )
::oUI:buttonLast:setIcon( QIcon( hbide_image( "go-last" ) ) )
::oUI:buttonLast:setToolTip( "Find Last" )
::oUI:buttonLast:connect( "clicked()", {|| ::execEvent( "buttonLast_clicked" ) } )
//
::oUI:q_buttonAll:setIcon( QIcon( hbide_image( "hilight-all" ) ) )
::oUI:q_buttonAll:setToolTip( "Highlight All" )
::oUI:q_buttonAll:connect( "clicked()", {|| ::execEvent( "buttonAll_clicked" ) } )
::oUI:buttonAll:setIcon( QIcon( hbide_image( "hilight-all" ) ) )
::oUI:buttonAll:setToolTip( "Highlight All" )
::oUI:buttonAll:connect( "clicked()", {|| ::execEvent( "buttonAll_clicked" ) } )
RETURN Self
@@ -247,39 +247,39 @@ METHOD IdeSearchReplace:create( oIde )
::oUI:setFocusPolicy( Qt_StrongFocus )
::oUI:q_frameFind:setStyleSheet( "" )
::oUI:q_frameReplace:setStyleSheet( "" )
::oUI:frameFind:setStyleSheet( "" )
::oUI:frameReplace:setStyleSheet( "" )
::oUI:q_buttonClose:setIcon( QIcon( hbide_image( "closetab" ) ) )
::oUI:q_buttonClose:setToolTip( "Close" )
::oUI:q_buttonClose:connect( "clicked()", {|| ::oUI:hide() } )
::oUI:buttonClose:setIcon( QIcon( hbide_image( "closetab" ) ) )
::oUI:buttonClose:setToolTip( "Close" )
::oUI:buttonClose:connect( "clicked()", {|| ::oUI:hide() } )
::oUI:q_buttonNext:setIcon( QIcon( hbide_image( "next" ) ) )
::oUI:q_buttonNext:setToolTip( "Find Next" )
::oUI:q_buttonNext:connect( "clicked()", {|| ::find( ::cFind ), ::oIde:manageFocusInEditor() } )
::oUI:buttonNext:setIcon( QIcon( hbide_image( "next" ) ) )
::oUI:buttonNext:setToolTip( "Find Next" )
::oUI:buttonNext:connect( "clicked()", {|| ::find( ::cFind ), ::oIde:manageFocusInEditor() } )
::oUI:q_buttonPrev:setIcon( QIcon( hbide_image( "previous" ) ) )
::oUI:q_buttonPrev:setToolTip( "Find Previous" )
::oUI:q_buttonPrev:connect( "clicked()", {|| ::find( ::cFind, .t. ), ::oIde:manageFocusInEditor() } )
::oUI:buttonPrev:setIcon( QIcon( hbide_image( "previous" ) ) )
::oUI:buttonPrev:setToolTip( "Find Previous" )
::oUI:buttonPrev:connect( "clicked()", {|| ::find( ::cFind, .t. ), ::oIde:manageFocusInEditor() } )
::oUI:q_checkReplace:setChecked( .f. )
::oUI:q_checkReplace:connect( "stateChanged(int)", {|i| ;
::oUI:q_comboReplace:setEnabled( i == 2 ), ;
::oUI:q_buttonReplace:setEnabled( i == 2 ), ;
iif( i == 2, ::oUI:q_frameReplace:show(), ::oUI:q_frameReplace:hide() ) } )
::oUI:checkReplace:setChecked( .f. )
::oUI:checkReplace:connect( "stateChanged(int)", {|i| ;
::oUI:comboReplace:setEnabled( i == 2 ), ;
::oUI:buttonReplace:setEnabled( i == 2 ), ;
iif( i == 2, ::oUI:frameReplace:show(), ::oUI:frameReplace:hide() ) } )
::qFindLineEdit := ::oUI:q_comboFind:lineEdit()
::qFindLineEdit := ::oUI:comboFind:lineEdit()
::qFindLineEdit:setFocusPolicy( Qt_StrongFocus )
::qFindLineEdit:setStyleSheet( "background-color: white;" )
::qFindLineEdit:connect( "textChanged(QString)", {|cText| ::setFindString( cText ) } )
::qFindLineEdit:connect( "returnPressed()" , {|| ::find( ::cFind ) } )
::qReplLineEdit := ::oUI:q_comboReplace:lineEdit()
::qReplLineEdit := ::oUI:comboReplace:lineEdit()
::qReplLineEdit:setFocusPolicy( Qt_StrongFocus )
::qReplLineEdit:setStyleSheet( "background-color: white;" )
::oUI:q_checkReplace:setEnabled( .f. )
::oUI:q_frameReplace:hide()
::oUI:checkReplace:setEnabled( .f. )
::oUI:frameReplace:hide()
RETURN Self
@@ -311,14 +311,14 @@ METHOD IdeSearchReplace:find( cText, lBackward )
IF Len( cText ) > 0
qCursor := ::qCurEdit:textCursor()
IF ::oUI:q_checkRegEx:isChecked()
IF ::oUI:checkRegEx:isChecked()
qDoc := ::qCurEdit:document()
qReg := QRegExp()
qReg:setPattern( cText )
qReg:setCaseSensitivity( iif( ::oUI:q_checkMatchCase:isChecked(), Qt_CaseSensitive, Qt_CaseInsensitive ) )
qReg:setCaseSensitivity( iif( ::oUI:checkMatchCase:isChecked(), Qt_CaseSensitive, Qt_CaseInsensitive ) )
nFlags += ::nCurDirection
nFlags += iif( ::oUI:q_checkWhole:isChecked(), QTextDocument_FindWholeWords, 0 )
nFlags += iif( ::oUI:checkWhole:isChecked(), QTextDocument_FindWholeWords, 0 )
qCur := qDoc:find( qReg, qCursor, nFlags )
lFound := ! qCur:isNull()
@@ -326,8 +326,8 @@ METHOD IdeSearchReplace:find( cText, lBackward )
::qCurEdit:setTextCursor( qCur )
ENDIF
ELSE
nFlags += iif( ::oUI:q_checkMatchCase:isChecked(), QTextDocument_FindCaseSensitively, 0 )
nFlags += iif( ::oUI:q_checkWhole:isChecked(), QTextDocument_FindWholeWords, 0 )
nFlags += iif( ::oUI:checkMatchCase:isChecked(), QTextDocument_FindCaseSensitively, 0 )
nFlags += iif( ::oUI:checkWhole:isChecked(), QTextDocument_FindWholeWords, 0 )
nFlags += ::nCurDirection
lFound := ::oEM:getEditCurrent():find( cText, nFlags )
@@ -335,10 +335,10 @@ METHOD IdeSearchReplace:find( cText, lBackward )
IF ! lFound
::qCurEdit:setTextCursor( qCursor )
::oUI:q_checkReplace:setChecked( .f. )
::oUI:q_checkReplace:setEnabled( .f. )
::oUI:checkReplace:setChecked( .f. )
::oUI:checkReplace:setEnabled( .f. )
ELSE
::oUI:q_checkReplace:setEnabled( .t. )
::oUI:checkReplace:setEnabled( .t. )
::qCurEdit:centerCursor()
ENDIF
ENDIF
@@ -348,10 +348,10 @@ METHOD IdeSearchReplace:find( cText, lBackward )
METHOD IdeSearchReplace:beginFind()
::oUI:q_checkReplace:setChecked( .f. )
::oUI:q_checkReplace:setEnabled( .f. )
::oUI:checkReplace:setChecked( .f. )
::oUI:checkReplace:setEnabled( .f. )
::oUI:q_radioTop:setChecked( .t. )
::oUI:radioTop:setChecked( .t. )
::oUI:show()
::cFind := ""
@@ -372,7 +372,7 @@ METHOD IdeSearchReplace:setFindString( cText )
ENDIF
qCursor := ::qCurEdit:textCursor()
IF ::oUI:q_radioTop:isChecked()
IF ::oUI:radioTop:isChecked()
nPos := qCursor:position()
qCursor:setPosition( 0 )
::qCurEdit:setTextCursor( qCursor )
@@ -465,27 +465,27 @@ METHOD IdeFindReplace:create( oIde )
::oUI:setWindowFlags( Qt_Sheet )
aeval( ::oINI:aFind , {|e| ::oUI:q_comboFindWhat:addItem( e ) } )
aeval( ::oINI:aReplace, {|e| ::oUI:q_comboReplaceWith:addItem( e ) } )
aeval( ::oINI:aFind , {|e| ::oUI:comboFindWhat:addItem( e ) } )
aeval( ::oINI:aReplace, {|e| ::oUI:comboReplaceWith:addItem( e ) } )
::oUI:q_radioFromCursor:setChecked( .t. )
::oUI:q_radioDown:setChecked( .t. )
::oUI:radioFromCursor:setChecked( .t. )
::oUI:radioDown:setChecked( .t. )
::oUI:connect( QEvent_Close, {|| ::oIde:oINI:cFindDialogGeometry := hbide_posAndSize( ::oUI:oWidget ) } )
::oUI:q_buttonFind :connect( "clicked()" , {| | ::onClickFind() } )
::oUI:q_buttonReplace:connect( "clicked()" , {| | ::onClickReplace() } )
::oUI:q_buttonClose :connect( "clicked()" , {| | ::oIde:oINI:cFindDialogGeometry := hbide_posAndSize( ::oUI:oWidget ), ::oUI:hide() } )
::oUI:q_comboFindWhat:connect( "editTextChanged(QString)" , {| | ::oUI:q_radioEntire:setChecked( .t. ) } )
::oUI:q_comboFindWhat:connect( "currentIndexChanged(QString)", {|p| ::oIde:oSBar:getItem( SB_PNL_SEARCH ):caption := "FIND: " + p } )
::oUI:q_checkListOnly:connect( "stateChanged(int)" , {|p| ::oUI:q_comboReplaceWith:setEnabled( p == 0 ), ;
iif( p == 1, ::oUI:q_buttonReplace:setEnabled( .f. ), NIL ) } )
::oUI:buttonFind :connect( "clicked()" , {| | ::onClickFind() } )
::oUI:buttonReplace:connect( "clicked()" , {| | ::onClickReplace() } )
::oUI:buttonClose :connect( "clicked()" , {| | ::oIde:oINI:cFindDialogGeometry := hbide_posAndSize( ::oUI:oWidget ), ::oUI:hide() } )
::oUI:comboFindWhat:connect( "editTextChanged(QString)" , {| | ::oUI:radioEntire:setChecked( .t. ) } )
::oUI:comboFindWhat:connect( "currentIndexChanged(QString)", {|p| ::oIde:oSBar:getItem( SB_PNL_SEARCH ):caption := "FIND: " + p } )
::oUI:checkListOnly:connect( "stateChanged(int)" , {|p| ::oUI:comboReplaceWith:setEnabled( p == 0 ), ;
iif( p == 1, ::oUI:buttonReplace:setEnabled( .f. ), NIL ) } )
::qLineEdit := ::oUI:q_comboFindWhat:lineEdit()
::qLineEdit := ::oUI:comboFindWhat:lineEdit()
::qLineEdit:connect( "returnPressed()", {|| iif( empty( ::cText ), NIL, ;
::qLineEdit:setText( ::cText ) ), ::cText := "", ::onClickFind( 1 ) } )
::qReplaceEdit := ::oUI:q_comboReplaceWith:lineEdit()
::qReplaceEdit := ::oUI:comboReplaceWith:lineEdit()
::qReplaceEdit:connect( "returnPressed()", {|| ::onClickReplace( 1 ) } )
RETURN Self
@@ -501,11 +501,11 @@ METHOD IdeFindReplace:show()
::oIde:setPosByIniEx( ::oUI:oWidget, ::oINI:cFindDialogGeometry )
::oUI:q_buttonReplace:setEnabled( .f. )
::oUI:q_checkGlobal:setEnabled( .f. )
::oUI:q_checkNoPrompting:setEnabled( .f. )
::oUI:q_checkListOnly:setChecked( .f. )
::oUI:q_comboFindWhat:setFocus()
::oUI:buttonReplace:setEnabled( .f. )
::oUI:checkGlobal:setEnabled( .f. )
::oUI:checkNoPrompting:setEnabled( .f. )
::oUI:checkListOnly:setChecked( .f. )
::oUI:comboFindWhat:setFocus()
IF ! empty( ::cText := ::oEM:getSelectedText() )
::qLineEdit:setText( ::cText )
@@ -527,8 +527,8 @@ METHOD IdeFindReplace:onClickFind( nFrom )
::updateFindReplaceData( "find" )
ENDIF
IF ::oUI:q_radioEntire:isChecked()
::oUI:q_radioFromCursor:setChecked( .t. )
IF ::oUI:radioEntire:isChecked()
::oUI:radioFromCursor:setChecked( .t. )
qCursor := ::qCurEdit:textCursor()
nPos := qCursor:position()
@@ -543,16 +543,16 @@ METHOD IdeFindReplace:onClickFind( nFrom )
ENDIF
IF lFound
::oUI:q_buttonReplace:setEnabled( .t. )
::oUI:q_checkGlobal:setEnabled( .t. )
::oUI:q_checkNoPrompting:setEnabled( .t. )
::oUI:buttonReplace:setEnabled( .t. )
::oUI:checkGlobal:setEnabled( .t. )
::oUI:checkNoPrompting:setEnabled( .t. )
ELSE
::oUI:q_buttonReplace:setEnabled( .f. )
::oUI:q_checkGlobal:setEnabled( .f. )
::oUI:q_checkNoPrompting:setEnabled( .f. )
::oUI:buttonReplace:setEnabled( .f. )
::oUI:checkGlobal:setEnabled( .f. )
::oUI:checkNoPrompting:setEnabled( .f. )
::oUI:hide()
::oUI:show()
::oUI:q_comboFindWhat:setFocus()
::oUI:comboFindWhat:setFocus()
::qLineEdit:selectAll()
ENDIF
@@ -562,15 +562,15 @@ METHOD IdeFindReplace:onClickFind( nFrom )
METHOD IdeFindReplace:find( lWarn )
LOCAL nFlags, qfocus
LOCAL cText := ::oUI:q_comboFindWhat:lineEdit():text()
LOCAL cText := ::oUI:comboFindWhat:lineEdit():text()
LOCAL lFound := .f.
DEFAULT lWarn TO .t.
IF ! empty( cText )
nFlags := 0
nFlags += iif( ::oUI:q_checkMatchCase:isChecked(), QTextDocument_FindCaseSensitively, 0 )
nFlags += iif( ::oUI:q_radioUp:isChecked(), QTextDocument_FindBackward, 0 )
nFlags += iif( ::oUI:checkMatchCase:isChecked(), QTextDocument_FindCaseSensitively, 0 )
nFlags += iif( ::oUI:radioUp:isChecked(), QTextDocument_FindBackward, 0 )
IF ! ( lFound := ::oEM:getEditObjectCurrent():findEx( cText, nFlags ) ) .AND. lWarn
qFocus := ::oUI:focusWidget()
@@ -590,7 +590,7 @@ METHOD IdeFindReplace:onClickReplace( nFrom )
::updateFindReplaceData( "replace" )
ENDIF
IF ::oUI:q_comboReplaceWith:isEnabled()
IF ::oUI:comboReplaceWith:isEnabled()
::replace()
ENDIF
@@ -626,20 +626,20 @@ METHOD IdeFindReplace:replace()
LOCAL nFound
IF !empty( ::qCurEdit )
cReplWith := ::oUI:q_comboReplaceWith:lineEdit():text()
cReplWith := ::oUI:comboReplaceWith:lineEdit():text()
::replaceSelection( cReplWith )
IF ::oUI:q_checkGlobal:isChecked()
IF ::oUI:q_checkNoPrompting:isChecked()
IF ::oUI:checkGlobal:isChecked()
IF ::oUI:checkNoPrompting:isChecked()
nFound := 1
DO WHILE ::find( .f. )
nFound++
::replaceSelection( cReplWith )
ENDDO
::oDK:setStatusText( SB_PNL_MAIN, "Replaced [" + hb_ntos( nFound ) + "] : " + cReplWith )
::oUI:q_buttonReplace:setEnabled( .f. )
::oUI:q_checkGlobal:setChecked( .f. )
::oUI:q_checkNoPrompting:setChecked( .f. )
::oUI:buttonReplace:setEnabled( .f. )
::oUI:checkGlobal:setChecked( .f. )
::oUI:checkNoPrompting:setChecked( .f. )
ELSE
::find()
ENDIF
@@ -654,23 +654,23 @@ METHOD IdeFindReplace:updateFindReplaceData( cMode )
LOCAL cData, nIndex
IF cMode == "find"
cData := ::oUI:q_comboFindWhat:lineEdit():text()
cData := ::oUI:comboFindWhat:lineEdit():text()
IF ! empty( cData )
IF ( nIndex := ascan( ::oINI:aFind, {|e| e == cData } ) ) == 0
hb_ains( ::oINI:aFind, 1, cData, .t. )
::oUI:q_comboFindWhat:insertItem( 0, cData )
::oUI:comboFindWhat:insertItem( 0, cData )
ELSE
::oUI:q_comboFindWhat:setCurrentIndex( nIndex - 1 )
::oUI:comboFindWhat:setCurrentIndex( nIndex - 1 )
ENDIF
ENDIF
//
::oDK:setStatusText( SB_PNL_SEARCH, cData )
ELSE
cData := ::oUI:q_comboReplaceWith:lineEdit():text()
cData := ::oUI:comboReplaceWith:lineEdit():text()
IF !empty( cData )
IF ascan( ::oINI:aReplace, cData ) == 0
hb_ains( ::oINI:aReplace, 1, cData, .t. )
::oUI:q_comboReplaceWith:insertItem( 0, cData )
::oUI:comboReplaceWith:insertItem( 0, cData )
ENDIF
ENDIF
ENDIF
@@ -798,33 +798,33 @@ METHOD IdeFindInFiles:buildUI()
::oFindDock:oWidget:setWidget( ::oUI:oWidget )
::oUI:q_buttonFolder:setIcon( QIcon( ::resPath + "folder.png" ) )
::oUI:buttonFolder:setIcon( QIcon( ::resPath + "folder.png" ) )
aeval( ::oINI:aFind , {|e| ::oUI:q_comboExpr:addItem( e ) } )
aeval( ::oINI:aReplace, {|e| ::oUI:q_comboRepl:addItem( e ) } )
aeval( ::oINI:aFolders, {|e| ::oUI:q_comboFolder:addItem( e ) } )
aeval( ::oINI:aFind , {|e| ::oUI:comboExpr:addItem( e ) } )
aeval( ::oINI:aReplace, {|e| ::oUI:comboRepl:addItem( e ) } )
aeval( ::oINI:aFolders, {|e| ::oUI:comboFolder:addItem( e ) } )
n := ascan( ::oINI:aFind, {|e| e == ::cWrkFind } )
::oUI:q_comboExpr:setCurrentIndex( n-1 )
::oUI:comboExpr:setCurrentIndex( n-1 )
n := ascan( ::oINI:aReplace, {|e| e == ::cWrkReplace } )
::oUI:q_comboRepl:setCurrentIndex( n - 1 )
::oUI:comboRepl:setCurrentIndex( n - 1 )
n := ascan( ::oIni:aFolders, {|e| e == ::cWrkFolderFind } )
::oUI:q_comboFolder:setCurrentIndex( n - 1 )
::oUI:q_comboFolder:setEnabled( .f. )
::oUI:q_checkFolders:setChecked( .f. )
::oUI:q_checkSubFolders:setChecked( .f. )
::oUI:q_checkSubFolders:setEnabled( .f. )
::oUI:comboFolder:setCurrentIndex( n - 1 )
::oUI:comboFolder:setEnabled( .f. )
::oUI:checkFolders:setChecked( .f. )
::oUI:checkSubFolders:setChecked( .f. )
::oUI:checkSubFolders:setEnabled( .f. )
::oUI:q_buttonRepl:setEnabled( .f. )
::oUI:q_buttonStop:setEnabled( .f. )
::oUI:q_comboRepl:setEnabled( .f. )
::oUI:buttonRepl:setEnabled( .f. )
::oUI:buttonStop:setEnabled( .f. )
::oUI:comboRepl:setEnabled( .f. )
::oUI:q_checkListOnly:setChecked( .t. )
::oUI:q_checkPrg:setChecked( .t. )
::oUI:checkListOnly:setChecked( .t. )
::oUI:checkPrg:setChecked( .t. )
qLineEdit := ::oUI:q_comboExpr:lineEdit()
qLineEdit := ::oUI:comboExpr:lineEdit()
IF !empty( ::oEM )
IF !empty( cText := ::oEM:getSelectedText() )
qLineEdit:setText( cText )
@@ -841,37 +841,37 @@ METHOD IdeFindInFiles:buildUI()
qItem:setFlags( Qt_ItemIsUserCheckable + Qt_ItemIsEnabled + Qt_ItemIsSelectable )
qItem:setText( cProj )
qItem:setCheckState( 0 )
//::oUI:q_listProjects:addItem_1( qItem )
::oUI:q_listProjects:addItem( qItem )
//::oUI:listProjects:addItem_1( qItem )
::oUI:listProjects:addItem( qItem )
aadd( ::aItems, qItem )
ENDIF
NEXT
ENDIF
::oUI:q_editResults:setReadOnly( .t. )
//::oUI:q_editResults:setFontFamily( "Courier New" )
//::oUI:q_editResults:setFontPointSize( 10 )
::oUI:q_editResults:setFont( ::oIde:oFont:oWidget )
::oUI:q_editResults:setContextMenuPolicy( Qt_CustomContextMenu )
::oUI:editResults:setReadOnly( .t. )
//::oUI:editResults:setFontFamily( "Courier New" )
//::oUI:editResults:setFontPointSize( 10 )
::oUI:editResults:setFont( ::oIde:oFont:oWidget )
::oUI:editResults:setContextMenuPolicy( Qt_CustomContextMenu )
::oUI:q_labelStatus:setText( "Ready" )
::oUI:q_comboExpr:setFocus()
::oUI:labelStatus:setText( "Ready" )
::oUI:comboExpr:setFocus()
/* Attach all signals */
//
::oUI:q_buttonClose :connect( "clicked()" , {| | ::execEvent( "buttonClose" ) } )
::oUI:q_buttonFolder :connect( "clicked()" , {| | ::execEvent( "buttonFolder" ) } )
::oUI:q_buttonFind :connect( "clicked()" , {| | ::execEvent( "buttonFind" ) } )
::oUI:q_buttonRepl :connect( "clicked()" , {| | ::execEvent( "buttonRepl" ) } )
::oUI:q_buttonStop :connect( "clicked()" , {| | ::execEvent( "buttonStop" ) } )
::oUI:q_checkAll :connect( "stateChanged(int)" , {|p| ::execEvent( "checkAll", p ) } )
::oUI:q_comboExpr :connect( "currentIndexChanged(QString)", {|p| ::execEvent( "comboFind", p ) } )
::oUI:q_checkListOnly:connect( "stateChanged(int)" , {|p| ::execEvent( "checkListOnly", p ) } )
::oUI:q_checkFolders :connect( "stateChanged(int)" , {|p| ::execEvent( "checkFolders", p ) } )
::oUI:q_editResults :connect( "copyAvailable(bool)" , {|l| ::execEvent( "editResults", l ) } )
::oUI:q_editResults :connect( "customContextMenuRequested(QPoint)", {|p| ::execEvent( "editResults-contextMenu", p ) } )
::oUI:buttonClose :connect( "clicked()" , {| | ::execEvent( "buttonClose" ) } )
::oUI:buttonFolder :connect( "clicked()" , {| | ::execEvent( "buttonFolder" ) } )
::oUI:buttonFind :connect( "clicked()" , {| | ::execEvent( "buttonFind" ) } )
::oUI:buttonRepl :connect( "clicked()" , {| | ::execEvent( "buttonRepl" ) } )
::oUI:buttonStop :connect( "clicked()" , {| | ::execEvent( "buttonStop" ) } )
::oUI:checkAll :connect( "stateChanged(int)" , {|p| ::execEvent( "checkAll", p ) } )
::oUI:comboExpr :connect( "currentIndexChanged(QString)", {|p| ::execEvent( "comboFind", p ) } )
::oUI:checkListOnly:connect( "stateChanged(int)" , {|p| ::execEvent( "checkListOnly", p ) } )
::oUI:checkFolders :connect( "stateChanged(int)" , {|p| ::execEvent( "checkFolders", p ) } )
::oUI:editResults :connect( "copyAvailable(bool)" , {|l| ::execEvent( "editResults", l ) } )
::oUI:editResults :connect( "customContextMenuRequested(QPoint)", {|p| ::execEvent( "editResults-contextMenu", p ) } )
::qEditFind := ::oUI:q_comboExpr:lineEdit()
::qEditFind := ::oUI:comboExpr:lineEdit()
::qEditFind:connect( "returnPressed()", {|| ::execEvent( "buttonFind" ) } )
RETURN Self
@@ -896,13 +896,13 @@ METHOD IdeFindInFiles:execEvent( cEvent, p )
EXIT
CASE "checkListOnly"
::oUI:q_comboRepl:setEnabled( p == 0 )
::oUI:q_buttonRepl:setEnabled( !( p == 1 ) )
::oUI:comboRepl:setEnabled( p == 0 )
::oUI:buttonRepl:setEnabled( !( p == 1 ) )
EXIT
CASE "checkFolders"
::oUI:q_comboFolder:setEnabled( p == 2 )
::oUI:q_checkSubFolders:setEnabled( p == 2 )
::oUI:comboFolder:setEnabled( p == 2 )
::oUI:checkSubFolders:setEnabled( p == 2 )
EXIT
CASE "buttonFind"
@@ -922,23 +922,23 @@ METHOD IdeFindInFiles:execEvent( cEvent, p )
IF !empty( cPath )
::oIde:cLastFileOpenPath := cPath
qLineEdit := ::oUI:q_comboFolder:lineEdit()
qLineEdit := ::oUI:comboFolder:lineEdit()
qLineEdit:setText( cPath )
IF ascan( ::oINI:aFolders, {|e| e == cPath } ) == 0
hb_ains( ::oINI:aFolders, 1, cPath, .t. )
ENDIF
::oUI:q_comboFolder:insertItem( 0, cPath )
::oUI:comboFolder:insertItem( 0, cPath )
ENDIF
EXIT
CASE "checkAll"
v := !( p == 0 )
::oUI:q_checkPrg:setChecked( v )
::oUI:q_checkC:setChecked( v )
::oUI:q_checkCpp:setChecked( v )
::oUI:q_checkCh:setChecked( v )
::oUI:q_checkH:setChecked( v )
::oUI:q_checkRc:setChecked( v )
::oUI:checkPrg:setChecked( v )
::oUI:checkC:setChecked( v )
::oUI:checkCpp:setChecked( v )
::oUI:checkCh:setChecked( v )
::oUI:checkH:setChecked( v )
::oUI:checkRc:setChecked( v )
EXIT
CASE "editResults-contextMenu"
@@ -947,7 +947,7 @@ METHOD IdeFindInFiles:execEvent( cEvent, p )
CASE "editResults"
IF p .AND. ! ::lNotDblClick
qCursor := ::oUI:q_editResults:textCursor()
qCursor := ::oUI:editResults:textCursor()
nInfo := qCursor:blockNumber() + 1
IF nInfo <= Len( ::aInfo ) .AND. ::aInfo[ nInfo, 1 ] == -2
@@ -976,7 +976,7 @@ METHOD IdeFindInFiles:replaceAll()
LOCAL nL, nB, qCursor, aFind
LOCAL cSource := ""
IF empty( ::cReplWith := ::oUI:q_comboRepl:currentText() )
IF empty( ::cReplWith := ::oUI:comboRepl:currentText() )
RETURN Self
ENDIF
nL := Len( ::cReplWith )
@@ -1018,7 +1018,7 @@ METHOD IdeFindInFiles:replaceAll()
METHOD IdeFindInFiles:execContextMenu( p )
LOCAL nLine, qCursor, qMenu, qAct, cFind
qCursor := ::oUI:q_editResults:textCursor()
qCursor := ::oUI:editResults:textCursor()
nLine := qCursor:blockNumber() + 1
IF nLine <= Len( ::aInfo )
@@ -1042,15 +1042,15 @@ METHOD IdeFindInFiles:execContextMenu( p )
qMenu:addAction( "Zom In" )
qMenu:addAction( "Zoom Out" )
IF ! empty( qAct := qMenu:exec( ::oUI:q_editResults:mapToGlobal( p ) ) )
IF ! empty( qAct := qMenu:exec( ::oUI:editResults:mapToGlobal( p ) ) )
SWITCH qAct:text()
CASE "Save as..."
EXIT
CASE "Find"
IF !empty( cFind := hbide_fetchAString( ::oUI:q_editResults, , "Find what?", "Find" ) )
IF !empty( cFind := hbide_fetchAString( ::oUI:editResults, , "Find what?", "Find" ) )
::lNotDblClick := .T.
IF !( ::oUI:q_editResults:find( cFind, 0 ) )
IF !( ::oUI:editResults:find( cFind, 0 ) )
MsgBox( "Not Found" )
ENDIF
ENDIF
@@ -1059,25 +1059,25 @@ METHOD IdeFindInFiles:execContextMenu( p )
::print()
EXIT
CASE "Clear"
::oUI:q_editResults:clear()
::oUI:editResults:clear()
::aInfo := {}
EXIT
CASE "Copy"
::lNotDblClick := .T.
::oUI:q_editResults:copy()
::oUI:editResults:copy()
EXIT
CASE "Select All"
::oUI:q_editResults:selectAll()
::oUI:editResults:selectAll()
EXIT
CASE "Replace Line"
EXIT
CASE "Replace Source"
EXIT
CASE "Zoom In"
::oUI:q_editResults:zoomIn()
::oUI:editResults:zoomIn()
EXIT
CASE "Zoom Out"
::oUI:q_editResults:zoomOut()
::oUI:editResults:zoomOut()
EXIT
ENDSWITCH
ENDIF
@@ -1107,15 +1107,15 @@ METHOD IdeFindInFiles:find()
LOCAL aProjs := {}
LOCAL aPaths := {}
IF empty( ::cOrigExpr := ::oUI:q_comboExpr:currentText() )
IF empty( ::cOrigExpr := ::oUI:comboExpr:currentText() )
RETURN Self
ENDIF
::lListOnly := ::oUI:q_checkListOnly:isChecked()
::lMatchCase := ::oUI:q_checkMatchCase:isChecked()
::cReplWith := ::oUI:q_comboRepl:currentText()
::lListOnly := ::oUI:checkListOnly:isChecked()
::lMatchCase := ::oUI:checkMatchCase:isChecked()
::cReplWith := ::oUI:comboRepl:currentText()
::lRegEx := ::oUI:q_checkRegEx:isChecked()
::lRegEx := ::oUI:checkRegEx:isChecked()
IF ::lRegEx
::compRegEx := hb_regExComp( ::cOrigExpr, ::lMatchCase )
IF ! hb_isRegEx( ::compRegEx )
@@ -1124,18 +1124,18 @@ METHOD IdeFindInFiles:find()
ENDIF
ENDIF
cFolder := ::oUI:q_comboFolder:currentText()
cFolder := ::oUI:comboFolder:currentText()
cWrkFolder := cFolder
lTabs := ::oUI:q_checkOpenTabs:isChecked()
lSubF := ::oUI:q_checkSubFolders:isChecked()
lSubP := ::oUI:q_checkSubProjects:isChecked()
lTabs := ::oUI:checkOpenTabs:isChecked()
lSubF := ::oUI:checkSubFolders:isChecked()
lSubP := ::oUI:checkSubProjects:isChecked()
/* Type of files */
lPrg := ::oUi:q_checkPrg:isChecked()
lC := ::oUI:q_checkC:isChecked()
lCpp := ::oUI:q_checkCpp:isChecked()
lH := ::oUI:q_checkH:isChecked()
lCh := ::oUI:q_checkCh:isChecked()
lRc := ::oUI:q_checkRc:isChecked() /* Conceptually it is now lText */
lPrg := ::oUi:checkPrg:isChecked()
lC := ::oUI:checkC:isChecked()
lCpp := ::oUI:checkCpp:isChecked()
lH := ::oUI:checkH:isChecked()
lCh := ::oUI:checkCh:isChecked()
lRc := ::oUI:checkRc:isChecked() /* Conceptually it is now lText */
aFilter := hbide_buildFilter( lPrg, lC, lCpp, lH, lCh, lRc )
@@ -1150,8 +1150,8 @@ METHOD IdeFindInFiles:find()
ENDIF
/* Process Folder */
IF ::oUI:q_checkFolders:isChecked() .AND. ! empty( cFolder )
hbide_fetchSubPaths( @aPaths, cFolder, ::oUI:q_checkSubFolders:isChecked() )
IF ::oUI:checkFolders:isChecked() .AND. ! empty( cFolder )
hbide_fetchSubPaths( @aPaths, cFolder, ::oUI:checkSubFolders:isChecked() )
FOR EACH cFolder IN aPaths
FOR EACH cExt IN aFilter
@@ -1190,14 +1190,14 @@ METHOD IdeFindInFiles:find()
ENDIF
/* Supress Find button - user must not click it again */
::oUI:q_buttonFind:setEnabled( .f. )
::oUI:q_buttonStop:setEnabled( .t. )
::oUI:buttonFind:setEnabled( .f. )
::oUI:buttonStop:setEnabled( .t. )
::nSearched := 0
::nFounds := 0
::nMisses := 0
::oUI:q_labelStatus:setText( "Ready" )
::oUI:labelStatus:setText( "Ready" )
/* Fun Begins */
::showLog( LOG_SEPARATOR )
@@ -1216,7 +1216,7 @@ METHOD IdeFindInFiles:find()
ENDIF
ENDIF
IF ::oUI:q_checkFolders:isChecked() .AND. ! empty( cFolder )
IF ::oUI:checkFolders:isChecked() .AND. ! empty( cFolder )
::showLog( LOG_SECTION, "Folders" )
IF !empty( aFolderSrc )
::showLog( LOG_SECTION_ITEM, "Folder: " + cFolder )
@@ -1247,17 +1247,17 @@ METHOD IdeFindInFiles:find()
::showLog( LOG_SEPARATOR )
::showLog( LOG_EMPTY )
::oUI:q_labelStatus:setText( "[ Time: " + hb_ntos( nEnd - nStart ) + " ] " + ;
::oUI:labelStatus:setText( "[ Time: " + hb_ntos( nEnd - nStart ) + " ] " + ;
"[ Searched: " + hb_ntos( ::nSearched ) + " ] [ Finds: " + hb_ntos( ::nFounds ) + " ] " + ;
"[ Files not found: " + hb_ntos( ::nMisses ) + " ]" )
::lStop := .f.
::oUI:q_buttonStop:setEnabled( .f. )
::oUI:q_buttonFind:setEnabled( .t. )
::oUI:buttonStop:setEnabled( .f. )
::oUI:buttonFind:setEnabled( .t. )
IF ::nFounds > 0
IF ascan( ::oINI:aFind, {|e| e == ::cOrigExpr } ) == 0
hb_ains( ::oINI:aFind, 1, ::cOrigExpr, .t. )
::oUI:q_comboFolder:insertItem( 0, ::cOrigExpr )
::oUI:comboFolder:insertItem( 0, ::cOrigExpr )
ENDIF
::oIde:cWrkFind := ::cOrigExpr
::oIde:cWrkFolderFind := cWrkFolder
@@ -1336,12 +1336,12 @@ METHOD IdeFindInFiles:showLog( nType, cMsg, aLines )
LOCAL a_, n, cPre, cPost, nWidth, cText, nB, cL, nL, cT, cExp, aM
LOCAL qCursor, qResult
qResult := ::oUI:q_editResults
qResult := ::oUI:editResults
DEFAULT cMsg TO ""
cMsg := hbide_convertHtmlDelimiters( cMsg )
qCursor := ::oUI:q_editResults:textCursor()
qCursor := ::oUI:editResults:textCursor()
SWITCH nType
@@ -1372,8 +1372,8 @@ METHOD IdeFindInFiles:showLog( nType, cMsg, aLines )
CASE LOG_FINDS
cText := F_FILE + "<b>" + cMsg + " ( "+ hb_ntos( Len( aLines ) ) + " )" + "</b>" + F_END
::oUI:q_editResults:append( cText )
::oUI:q_labelStatus:setText( cText )
::oUI:editResults:append( cText )
::oUI:labelStatus:setText( cText )
aadd( ::aInfo, { -1, cMsg, NIL } )
n := 0
@@ -1433,7 +1433,7 @@ METHOD IdeFindInFiles:showLog( nType, cMsg, aLines )
ENDSWITCH
qCursor:movePosition( QTextCursor_Down )
::oUI:q_editResults:setTextCursor( qCursor )
::oUI:editResults:setTextCursor( qCursor )
QApplication():processEvents()
RETURN Self
@@ -1472,7 +1472,7 @@ METHOD IdeFindInFiles:print()
/*----------------------------------------------------------------------*/
METHOD IdeFindInFiles:paintRequested( qPrinter )
::oUI:q_editResults:print( qPrinter )
::oUI:editResults:print( qPrinter )
RETURN Self
/*----------------------------------------------------------------------*/

View File

@@ -110,11 +110,11 @@ METHOD IdeFormat:create( oIde )
METHOD IdeFormat:destroy()
IF !empty( ::oUI )
::oUI:q_btnEditCmnds:disconnect( "clicked()" )
::oUI:q_btnStart :disconnect( "clicked()" )
::oUI:q_btnCancel :disconnect( "clicked()" )
::oUI:q_btnUpdSrc :disconnect( "clicked()" )
::oUI:q_checkSelOnly:disconnect( "stateChanged(int)" )
::oUI:btnEditCmnds:disconnect( "clicked()" )
::oUI:btnStart :disconnect( "clicked()" )
::oUI:btnCancel :disconnect( "clicked()" )
::oUI:btnUpdSrc :disconnect( "clicked()" )
::oUI:checkSelOnly:disconnect( "stateChanged(int)" )
::qEdit := NIL
::qHiliter := NIL
@@ -133,13 +133,13 @@ METHOD IdeFormat:show()
::oUI := hbide_getUI( "format" )
::oFormatDock:oWidget:setWidget( ::oUI:oWidget )
::oUI:q_btnEditCmnds:connect( "clicked()" , {| | ::execEvent( "buttonEditCmds_clicked" ) } )
::oUI:q_btnStart :connect( "clicked()" , {| | ::execEvent( "buttonStart_clicked" ) } )
::oUI:q_btnCancel :connect( "clicked()" , {| | ::execEvent( "buttonCancel_clicked" ) } )
::oUI:q_btnUpdSrc :connect( "clicked()" , {| | ::execEvent( "buttonUpdSrc_clicked" ) } )
::oUI:q_checkSelOnly:connect( "stateChanged(int)" , {|i| ::execEvent( "checkSelOnly_changed", i ) } )
::oUI:btnEditCmnds:connect( "clicked()" , {| | ::execEvent( "buttonEditCmds_clicked" ) } )
::oUI:btnStart :connect( "clicked()" , {| | ::execEvent( "buttonStart_clicked" ) } )
::oUI:btnCancel :connect( "clicked()" , {| | ::execEvent( "buttonCancel_clicked" ) } )
::oUI:btnUpdSrc :connect( "clicked()" , {| | ::execEvent( "buttonUpdSrc_clicked" ) } )
::oUI:checkSelOnly:connect( "stateChanged(int)" , {|i| ::execEvent( "checkSelOnly_changed", i ) } )
::qEdit := ::oUI:q_plainFormatter
::qEdit := ::oUI:plainFormatter
::qEdit:setLineWrapMode( QTextEdit_NoWrap )
::qEdit:setFont( ::oIde:oFont:oWidget )
@@ -152,7 +152,7 @@ METHOD IdeFormat:show()
ENDIF
::lSelOnly := .f.
::oUI:q_checkSelOnly:setChecked( .f. )
::oUI:checkSelOnly:setChecked( .f. )
::qEdit:clear()
RETURN Self

View File

@@ -135,14 +135,14 @@ METHOD IdeFunctions:create( oIde )
::buildHeader()
::oUI:q_editFunction :connect( "textChanged(QString)" , {|p| ::execEvent( "editFunc_textChanged", p ) } )
::oUI:q_editFunction :connect( "returnPressed()" , {| | ::execEvent( "editFunc_returnPressed" ) } )
::oUI:q_buttonMark :connect( "clicked()" , {| | ::execEvent( "buttonMark_clicked" ) } )
::oUI:q_buttonLoad :connect( "clicked()" , {| | ::execEvent( "buttonLoad_clicked" ) } )
::oUI:q_buttonTag :connect( "clicked()" , {| | ::execEvent( "buttonTag_clicked" ) } )
::oUI:q_buttonClose :connect( "clicked()" , {| | ::execEvent( "buttonClose_clicked" ) } )
::oUI:q_tableFuncList:connect( "itemSelectionChanged()" , {| | ::execEvent( "tableFuncList_itemSelectionChanged" ) } )
::oUI:q_tableFuncList:connect( "itemDoubleClicked(QTableWidgetItem*)", {|p| ::execEvent( "tableFuncList_itemDoubleClicked", p ) } )
::oUI:editFunction :connect( "textChanged(QString)" , {|p| ::execEvent( "editFunc_textChanged", p ) } )
::oUI:editFunction :connect( "returnPressed()" , {| | ::execEvent( "editFunc_returnPressed" ) } )
::oUI:buttonMark :connect( "clicked()" , {| | ::execEvent( "buttonMark_clicked" ) } )
::oUI:buttonLoad :connect( "clicked()" , {| | ::execEvent( "buttonLoad_clicked" ) } )
::oUI:buttonTag :connect( "clicked()" , {| | ::execEvent( "buttonTag_clicked" ) } )
::oUI:buttonClose :connect( "clicked()" , {| | ::execEvent( "buttonClose_clicked" ) } )
::oUI:tableFuncList:connect( "itemSelectionChanged()" , {| | ::execEvent( "tableFuncList_itemSelectionChanged" ) } )
::oUI:tableFuncList:connect( "itemDoubleClicked(QTableWidgetItem*)", {|p| ::execEvent( "tableFuncList_itemDoubleClicked", p ) } )
RETURN Self
@@ -160,7 +160,7 @@ METHOD IdeFunctions:execEvent( nMode, p )
p := upper( p )
nLen := Len( p )
IF ( n := ascan( ::aList, {|e_| left( e_[ 1 ], nLen ) == p } ) ) > 0
::oUI:q_tableFuncList:setCurrentItem( ::aItems[ n ] )
::oUI:tableFuncList:setCurrentItem( ::aItems[ n ] )
ENDIF
CASE nMode == "editFunc_returnPressed"
@@ -170,15 +170,15 @@ METHOD IdeFunctions:execEvent( nMode, p )
::openFunction( .f. )
CASE nMode == "buttonMark_clicked"
::oUI:q_listProjects:show()
::oUI:listProjects:show()
::listProjects()
CASE nMode == "buttonLoad_clicked"
::oUI:q_listProjects:hide()
::oUI:listProjects:hide()
::loadTags()
CASE nMode == "buttonTag_clicked"
::oUI:q_listProjects:hide()
::oUI:listProjects:hide()
::buildTags()
::oEM:updateCompleter()
@@ -186,9 +186,9 @@ METHOD IdeFunctions:execEvent( nMode, p )
::oFunctionsDock:hide()
CASE nMode == "tableFuncList_itemSelectionChanged"
n := ::oUI:q_tableFuncList:currentRow()
n := ::oUI:tableFuncList:currentRow()
IF n >= 0
::oUI:q_editSyntax:setText( ::aList[ n + 1, 2 ] )
::oUI:editSyntax:setText( ::aList[ n + 1, 2 ] )
ENDIF
ENDCASE
@@ -200,7 +200,7 @@ METHOD IdeFunctions:buildHeader()
LOCAL oTbl, qItm, cHdr, qFnt, qHdr
LOCAL cDH := " "
oTbl := ::oUI:q_tableFuncList
oTbl := ::oUI:tableFuncList
qFnt := QFont( "Courier New" )
oTbl:setFont( qFnt )
@@ -227,7 +227,7 @@ METHOD IdeFunctions:buildHeader()
oTbl:setAlternatingRowColors( .t. )
::oUI:q_listProjects:hide()
::oUI:listProjects:hide()
RETURN Self
@@ -280,9 +280,9 @@ METHOD IdeFunctions:clear( lHdrAlso )
::aItems := {}
IF lHdrAlso
::oUI:q_tableFuncList:clear()
::oUI:tableFuncList:clear()
ELSE
::oUI:q_tableFuncList:clearContents()
::oUI:tableFuncList:clearContents()
ENDIF
RETURN Self
@@ -308,8 +308,8 @@ METHOD IdeFunctions:positionToFunction( cWord, lShowTip )
p := upper( cWord )
nLen := Len( p )
IF ( n := ascan( ::aList, {|e_| left( e_[ 1 ], nLen ) == p } ) ) > 0
::oUI:q_editFunction:setText( cWord )
::oUI:q_tableFuncList:setCurrentItem( ::aItems[ n ] )
::oUI:editFunction:setText( cWord )
::oUI:tableFuncList:setCurrentItem( ::aItems[ n ] )
cProto := ::aList[ n, 2 ]
@@ -331,8 +331,8 @@ METHOD IdeFunctions:jumpToFunction( cWord )
p := upper( cWord )
nLen := Len( p )
IF ( n := ascan( ::aList, {|e_| left( e_[ 1 ], nLen ) == p } ) ) > 0
::oUI:q_editFunction:setText( cWord )
::oUI:q_tableFuncList:setCurrentItem( ::aItems[ n ] )
::oUI:editFunction:setText( cWord )
::oUI:tableFuncList:setCurrentItem( ::aItems[ n ] )
lOpened := ::openFunction( .t. )
ENDIF
ENDIF
@@ -345,12 +345,12 @@ METHOD IdeFunctions:openFunction( lCheckDuplicates )
LOCAL n, cFunc, cSource, oEdit, lFound, cProto
LOCAL lOpened := .f.
IF ( n := ::oUI:q_tableFuncList:currentRow() ) >= 0
IF ( n := ::oUI:tableFuncList:currentRow() ) >= 0
n++
cFunc := ::aList[ n, 1 ]
IF lCheckDuplicates .AND. n < Len( ::aList ) .AND. ::aList[ n + 1, 1 ] == cFunc
::oFunctionsDock:show()
::oUI:q_tableFuncList:setFocus()
::oUI:tableFuncList:setFocus()
RETURN lOpened
ENDIF
@@ -384,14 +384,14 @@ METHOD IdeFunctions:clearProjects()
NEXT
ENDIF
::aProjList := {}
::oUI:q_listProjects:clear()
::oUI:listProjects:clear()
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeFunctions:listProjects()
LOCAL s, qItm, oLst := ::oUI:q_listProjects
LOCAL s, qItm, oLst := ::oUI:listProjects
::clearProjects()
@@ -425,11 +425,11 @@ METHOD IdeFunctions:enableControls( lEnable )
::inAction := ! lEnable
::oUI:q_buttonMark:setEnabled( lEnable )
::oUI:q_buttonLoad:setEnabled( lEnable )
::oUI:q_buttonTag:setEnabled( lEnable )
::oUI:buttonMark:setEnabled( lEnable )
::oUI:buttonLoad:setEnabled( lEnable )
::oUI:buttonTag:setEnabled( lEnable )
::oUI:q_editFunction:setEnabled( lEnable )
::oUI:editFunction:setEnabled( lEnable )
::showApplicationCursor( iif( lEnable, NIL, Qt_BusyCursor ) )
@@ -610,7 +610,7 @@ METHOD IdeFunctions:populateTable()
::clear( .t. )
::buildHeader()
oTbl := ::oUI:q_tableFuncList
oTbl := ::oUI:tableFuncList
oTbl:setRowCount( Len( ::aList ) )
n := 0
@@ -629,7 +629,7 @@ METHOD IdeFunctions:populateTable()
aadd( ::aItems, qItm )
n++
::oUI:q_labelEntries:setText( "Entries: " + hb_ntos( n ) )
::oUI:labelEntries:setText( "Entries: " + hb_ntos( n ) )
NEXT
RETURN Self

View File

@@ -263,7 +263,7 @@ METHOD IdeHarbourHelp:show()
::refreshDocTree()
::oUI:q_editInstall:setText( ::cPathInstall )
::oUI:editInstall:setText( ::cPathInstall )
ENDIF
RETURN Self
@@ -274,23 +274,23 @@ METHOD IdeHarbourHelp:destroy()
LOCAL aTmp, oFun
IF ! empty( ::oUI )
::oUI:q_buttonInstall :disconnect( "clicked()" )
::oUI:q_buttonHome :disconnect( "clicked()" )
::oUI:q_buttonBackward :disconnect( "clicked()" )
::oUI:q_buttonForward :disconnect( "clicked()" )
::oUI:q_buttonUp :disconnect( "clicked()" )
::oUI:q_buttonRefresh :disconnect( "clicked()" )
::oUI:q_buttonPrint :disconnect( "clicked()" )
::oUI:q_buttonPdf :disconnect( "clicked()" )
::oUI:q_buttonPdfAll :disconnect( "clicked()" )
::oUI:q_browserView :disconnect( "anchorClicked(QUrl)" )
::oUI:q_tabWidgetContents:disconnect( "currentChanged(int)" )
::oUI:q_editInstall :disconnect( "textChanged(QString)" )
::oUI:q_editIndex :disconnect( "textChanged(QString)" )
::oUI:q_editIndex :disconnect( "returnPressed()" )
::oUI:q_listIndex :disconnect( "itemDoubleClicked(QListWidgetItem*)" )
::oUI:q_treeDoc :disconnect( "itemSelectionChanged()" )
::oUI:q_treeCategory :disconnect( "itemSelectionChanged()" )
::oUI:buttonInstall :disconnect( "clicked()" )
::oUI:buttonHome :disconnect( "clicked()" )
::oUI:buttonBackward :disconnect( "clicked()" )
::oUI:buttonForward :disconnect( "clicked()" )
::oUI:buttonUp :disconnect( "clicked()" )
::oUI:buttonRefresh :disconnect( "clicked()" )
::oUI:buttonPrint :disconnect( "clicked()" )
::oUI:buttonPdf :disconnect( "clicked()" )
::oUI:buttonPdfAll :disconnect( "clicked()" )
::oUI:browserView :disconnect( "anchorClicked(QUrl)" )
::oUI:tabWidgetContents:disconnect( "currentChanged(int)" )
::oUI:editInstall :disconnect( "textChanged(QString)" )
::oUI:editIndex :disconnect( "textChanged(QString)" )
::oUI:editIndex :disconnect( "returnPressed()" )
::oUI:listIndex :disconnect( "itemDoubleClicked(QListWidgetItem*)" )
::oUI:treeDoc :disconnect( "itemSelectionChanged()" )
::oUI:treeCategory :disconnect( "itemSelectionChanged()" )
::clear()
@@ -385,9 +385,9 @@ METHOD IdeHarbourHelp:clear()
NEXT
::aCategory := {}
::oUI:q_treeDoc:clear()
::oUI:q_treeCategory:clear()
::oUI:q_listIndex:clear()
::oUI:treeDoc:clear()
::oUI:treeCategory:clear()
::oUI:listIndex:clear()
RETURN Self
@@ -396,24 +396,24 @@ METHOD IdeHarbourHelp:clear()
METHOD IdeHarbourHelp:setImages()
LOCAL oUI := ::oUI
oUI:q_buttonHome :setIcon( QIcon( hbide_image( "dc_home" ) ) )
oUI:q_buttonBackward:setIcon( QIcon( hbide_image( "dc_left" ) ) )
oUI:q_buttonForward :setIcon( QIcon( hbide_image( "dc_right" ) ) )
oUI:q_buttonUp :setIcon( QIcon( hbide_image( "dc_up" ) ) )
oUI:q_buttonRefresh :setIcon( QIcon( hbide_image( "dc_refresh" ) ) )
oUI:q_buttonPrint :setIcon( QIcon( hbide_image( "dc_print" ) ) )
oUI:q_buttonPdf :setIcon( QIcon( hbide_image( "dc_pdffile" ) ) )
oUI:q_buttonPdfAll :setIcon( QIcon( hbide_image( "dc_pdffile" ) ) )
oUI:buttonHome :setIcon( QIcon( hbide_image( "dc_home" ) ) )
oUI:buttonBackward:setIcon( QIcon( hbide_image( "dc_left" ) ) )
oUI:buttonForward :setIcon( QIcon( hbide_image( "dc_right" ) ) )
oUI:buttonUp :setIcon( QIcon( hbide_image( "dc_up" ) ) )
oUI:buttonRefresh :setIcon( QIcon( hbide_image( "dc_refresh" ) ) )
oUI:buttonPrint :setIcon( QIcon( hbide_image( "dc_print" ) ) )
oUI:buttonPdf :setIcon( QIcon( hbide_image( "dc_pdffile" ) ) )
oUI:buttonPdfAll :setIcon( QIcon( hbide_image( "dc_pdffile" ) ) )
oUI:q_buttonSave :setIcon( QIcon( hbide_image( "save" ) ) )
oUI:q_buttonExit :setIcon( QIcon( hbide_image( "dc_quit" ) ) )
oUI:buttonSave :setIcon( QIcon( hbide_image( "save" ) ) )
oUI:buttonExit :setIcon( QIcon( hbide_image( "dc_quit" ) ) )
oUI:q_buttonInstall :setIcon( QIcon( hbide_image( "dc_folder" ) ) )
oUI:buttonInstall :setIcon( QIcon( hbide_image( "dc_folder" ) ) )
//oUI:q_buttonArgPlus:setIcon( QIcon( hbide_image( "dc_plus" ) ) )
//oUI:q_buttonArgMinus:setIcon( QIcon( QIcon( hbide_image( "dc_delete" ) ) )
//oUI:q_buttonArgUp:setIcon( QIcon( hbide_image( "dc_up" ) ) )
//oUI:q_buttonArgDown:setIcon( QIcon( hbide_image( "dc_down" ) ) )
//oUI:buttonArgPlus:setIcon( QIcon( hbide_image( "dc_plus" ) ) )
//oUI:buttonArgMinus:setIcon( QIcon( QIcon( hbide_image( "dc_delete" ) ) )
//oUI:buttonArgUp:setIcon( QIcon( hbide_image( "dc_up" ) ) )
//oUI:buttonArgDown:setIcon( QIcon( hbide_image( "dc_down" ) ) )
RETURN Self
@@ -422,19 +422,19 @@ METHOD IdeHarbourHelp:setImages()
METHOD IdeHarbourHelp:setTooltips()
LOCAL oUI := ::oUI
oUI:q_buttonHome :setToolTip( "Home" )
oUI:q_buttonBackward:setToolTip( "Backward" )
oUI:q_buttonForward :setToolTip( "Forward" )
oUI:q_buttonRefresh :setToolTip( "Refresh" )
oUI:q_buttonUp :setToolTip( "Up" )
oUI:q_buttonPrint :setToolTip( "Print" )
oUI:q_buttonPdf :setToolTip( "Export as PDF Document" )
oUI:q_buttonPdfAll :setToolTip( "Export ALL as PDF Documents" )
oUI:buttonHome :setToolTip( "Home" )
oUI:buttonBackward:setToolTip( "Backward" )
oUI:buttonForward :setToolTip( "Forward" )
oUI:buttonRefresh :setToolTip( "Refresh" )
oUI:buttonUp :setToolTip( "Up" )
oUI:buttonPrint :setToolTip( "Print" )
oUI:buttonPdf :setToolTip( "Export as PDF Document" )
oUI:buttonPdfAll :setToolTip( "Export ALL as PDF Documents" )
oUI:q_buttonSave :setToolTip( "Save" )
oUI:q_buttonExit :setToolTip( "Exit" )
oUI:buttonSave :setToolTip( "Save" )
oUI:buttonExit :setToolTip( "Exit" )
oUI:q_buttonInstall :setToolTip( "Select Harbour Installation Path" )
oUI:buttonInstall :setToolTip( "Select Harbour Installation Path" )
RETURN Self
@@ -443,28 +443,28 @@ METHOD IdeHarbourHelp:setTooltips()
METHOD IdeHarbourHelp:setParameters()
LOCAL oUI := ::oUI
oUI:q_treeDoc:setHeaderHidden( .t. )
oUI:q_treeCategory:setHeaderHidden( .t. )
oUI:q_editInstall:setText( ::cWrkHarbour )
oUI:treeDoc:setHeaderHidden( .t. )
oUI:treeCategory:setHeaderHidden( .t. )
oUI:editInstall:setText( ::cWrkHarbour )
#if 0
::qHiliter := ::oTH:SetSyntaxHilighting( oUI:q_plainExamples, "Bare Minimum" )
::qHiliter := ::oTH:SetSyntaxHilighting( oUI:plainExamples, "Bare Minimum" )
oUI:q_plainExamples:setFont( ::oFont:oWidget )
oUI:q_plainDescription:setFont( ::oFont:oWidget )
oUI:q_plainArguments:setFont( ::oFont:oWidget )
oUI:q_plainArgDesc:setFont( ::oFont:oWidget )
oUI:q_plainTests:setFont( ::oFont:oWidget )
oUI:plainExamples:setFont( ::oFont:oWidget )
oUI:plainDescription:setFont( ::oFont:oWidget )
oUI:plainArguments:setFont( ::oFont:oWidget )
oUI:plainArgDesc:setFont( ::oFont:oWidget )
oUI:plainTests:setFont( ::oFont:oWidget )
oUI:q_plainExamples:setLineWrapMode( QTextEdit_NoWrap )
oUI:q_plainTests:setLineWrapMode( QTextEdit_NoWrap )
oUI:plainExamples:setLineWrapMode( QTextEdit_NoWrap )
oUI:plainTests:setLineWrapMode( QTextEdit_NoWrap )
#endif
oUI:q_treeDoc:setExpandsOnDoubleClick( .f. )
oUI:treeDoc:setExpandsOnDoubleClick( .f. )
oUI:q_browserView:setOpenLinks( .t. )
oUI:q_browserView:setOpenExternalLinks( .t. )
oUI:q_tabWidgetContents:setFocusPolicy( Qt_NoFocus )
oUI:browserView:setOpenLinks( .t. )
oUI:browserView:setOpenExternalLinks( .t. )
oUI:tabWidgetContents:setFocusPolicy( Qt_NoFocus )
RETURN Self
@@ -472,26 +472,26 @@ METHOD IdeHarbourHelp:setParameters()
METHOD IdeHarbourHelp:installSignals()
::oUI:q_buttonInstall :connect( "clicked()" , {| | ::execEvent( "buttonInstall_clicked" ) } )
::oUI:q_buttonHome :connect( "clicked()" , {| | ::execEvent( "buttonHome_clicked" ) } )
::oUI:q_buttonBackward :connect( "clicked()" , {| | ::execEvent( "buttonBackward_clicked" ) } )
::oUI:q_buttonForward :connect( "clicked()" , {| | ::execEvent( "buttonForward_clicked" ) } )
::oUI:q_buttonUp :connect( "clicked()" , {| | ::execEvent( "buttonUp_clicked" ) } )
::oUI:q_buttonRefresh :connect( "clicked()" , {| | ::execEvent( "buttonRefresh_clicked" ) } )
::oUI:q_buttonPrint :connect( "clicked()" , {| | ::execEvent( "buttonPrint_clicked" ) } )
::oUI:q_buttonPdf :connect( "clicked()" , {| | ::execEvent( "buttonPdf_clicked" ) } )
::oUI:q_buttonPdfAll :connect( "clicked()" , {| | ::execEvent( "buttonPdfAll_clicked" ) } )
::oUI:buttonInstall :connect( "clicked()" , {| | ::execEvent( "buttonInstall_clicked" ) } )
::oUI:buttonHome :connect( "clicked()" , {| | ::execEvent( "buttonHome_clicked" ) } )
::oUI:buttonBackward :connect( "clicked()" , {| | ::execEvent( "buttonBackward_clicked" ) } )
::oUI:buttonForward :connect( "clicked()" , {| | ::execEvent( "buttonForward_clicked" ) } )
::oUI:buttonUp :connect( "clicked()" , {| | ::execEvent( "buttonUp_clicked" ) } )
::oUI:buttonRefresh :connect( "clicked()" , {| | ::execEvent( "buttonRefresh_clicked" ) } )
::oUI:buttonPrint :connect( "clicked()" , {| | ::execEvent( "buttonPrint_clicked" ) } )
::oUI:buttonPdf :connect( "clicked()" , {| | ::execEvent( "buttonPdf_clicked" ) } )
::oUI:buttonPdfAll :connect( "clicked()" , {| | ::execEvent( "buttonPdfAll_clicked" ) } )
::oUI:q_browserView :connect( "anchorClicked(QUrl)" , {|p| ::execEvent( "browserView_anchorClicked" , p ) } )
::oUI:q_tabWidgetContents:connect( "currentChanged(int)" , {|p| ::execEvent( "tabWidgetContents_currentChanged", p ) } )
::oUI:browserView :connect( "anchorClicked(QUrl)" , {|p| ::execEvent( "browserView_anchorClicked" , p ) } )
::oUI:tabWidgetContents:connect( "currentChanged(int)" , {|p| ::execEvent( "tabWidgetContents_currentChanged", p ) } )
::oUI:q_editInstall :connect( "textChanged(QString)" , {|p| ::execEvent( "editInstall_textChanged" , p ) } )
::oUI:q_editIndex :connect( "textChanged(QString)" , {|p| ::execEvent( "editIndex_textChanged" , p ) } )
::oUI:q_editIndex :connect( "returnPressed()" , {| | ::execEvent( "editIndex_returnPressed" ) } )
::oUI:q_listIndex :connect( "itemDoubleClicked(QListWidgetItem*)", {|p| ::execEvent( "listIndex_ItemDoubleClicked" , p ) } )
::oUI:editInstall :connect( "textChanged(QString)" , {|p| ::execEvent( "editInstall_textChanged" , p ) } )
::oUI:editIndex :connect( "textChanged(QString)" , {|p| ::execEvent( "editIndex_textChanged" , p ) } )
::oUI:editIndex :connect( "returnPressed()" , {| | ::execEvent( "editIndex_returnPressed" ) } )
::oUI:listIndex :connect( "itemDoubleClicked(QListWidgetItem*)", {|p| ::execEvent( "listIndex_ItemDoubleClicked" , p ) } )
::oUI:q_treeDoc :connect( "itemSelectionChanged()" , {| | ::execEvent( "treeDoc_itemSelectionChanged" ) } )
::oUI:q_treeCategory :connect( "itemSelectionChanged()" , {| | ::execEvent( "treeCategory_itemSelectionChanged" ) } )
::oUI:treeDoc :connect( "itemSelectionChanged()" , {| | ::execEvent( "treeDoc_itemSelectionChanged" ) } )
::oUI:treeCategory :connect( "itemSelectionChanged()" , {| | ::execEvent( "treeCategory_itemSelectionChanged" ) } )
RETURN Self
@@ -511,13 +511,13 @@ METHOD IdeHarbourHelp:execEvent( nMode, p, p1 )
CASE "buttonInstall_clicked"
cPath := hbide_fetchADir( ::oDocViewDock, "Harbour Install Root" )
IF !empty( cPath )
::oUI:q_editInstall:setText( cPath )
::oUI:editInstall:setText( cPath )
ENDIF
EXIT
CASE "tabWidgetContents_currentChanged"
IF p == 1
::oUI:q_editIndex:setFocus()
::oUI:editIndex:setFocus()
ENDIF
EXIT
@@ -525,20 +525,20 @@ METHOD IdeHarbourHelp:execEvent( nMode, p, p1 )
cText := lower( p:toString() )
nLen := Len( cText )
IF ( n := ascan( ::aFunctions, {|e_| left( e_[ 6 ], nLen ) == cText } ) ) > 0
::oUI:q_listIndex:setCurrentItem( ::aFunctions[ n, 5 ] )
::oUI:listIndex:setCurrentItem( ::aFunctions[ n, 5 ] )
::populateIndexedSelection()
ENDIF
EXIT
CASE "listIndex_ItemDoubleClicked"
::populateIndexedSelection()
::oUI:q_editIndex:setFocus()
::oUI:editIndex:setFocus()
EXIT
CASE "editIndex_returnPressed"
IF !empty( ::oUI:q_editIndex:text() )
IF !empty( ::oUI:editIndex:text() )
::populateIndexedSelection()
::oUI:q_editIndex:setFocus()
::oUI:editIndex:setFocus()
ENDIF
EXIT
@@ -546,43 +546,43 @@ METHOD IdeHarbourHelp:execEvent( nMode, p, p1 )
IF ( nLen := Len( p ) ) > 0
cLower := lower( p )
IF ( n := ascan( ::aFunctions, {|e_| left( e_[ 6 ], nLen ) == cLower } ) ) > 0
::oUI:q_listIndex:setCurrentItem( ::aFunctions[ n, 5 ] )
::oUI:listIndex:setCurrentItem( ::aFunctions[ n, 5 ] )
ENDIF
ENDIF
EXIT
CASE "editInstall_textChanged"
IF hb_dirExists( p )
::oUI:q_editInstall:setStyleSheet( "" )
::oUI:editInstall:setStyleSheet( "" )
::cPathInstall := hbide_pathStripLastSlash( hbide_pathNormalized( p, .f. ) )
// ::oIde:cWrkHarbour := ::cPathInstall
ELSE
::oUI:q_editInstall:setStyleSheet( getStyleSheet( "PathIsWrong", ::nAnimantionMode ) )
::oUI:editInstall:setStyleSheet( getStyleSheet( "PathIsWrong", ::nAnimantionMode ) )
ENDIF
EXIT
CASE "buttonHome_clicked"
IF !empty( ::aNodes )
::oUI:q_treeDoc:setCurrentItem( ::aNodes[ 1, 1 ], 0 )
::oUI:treeDoc:setCurrentItem( ::aNodes[ 1, 1 ], 0 )
ENDIF
EXIT
CASE "buttonBackward_clicked"
IF ::nCurInHist > 1
::oUI:q_treeDoc:setCurrentItem( ::aNodes[ ::aHistory[ ::nCurInHist - 1 ], 1 ], 0 )
::oUI:treeDoc:setCurrentItem( ::aNodes[ ::aHistory[ ::nCurInHist - 1 ], 1 ], 0 )
ENDIF
EXIT
CASE "buttonForward_clicked"
IF ::nCurInHist < Len( ::aHistory )
::oUI:q_treeDoc:setCurrentItem( ::aNodes[ ::aHistory[ ::nCurInHist + 1 ], 1 ], 0 )
::oUI:treeDoc:setCurrentItem( ::aNodes[ ::aHistory[ ::nCurInHist + 1 ], 1 ], 0 )
ENDIF
EXIT
CASE "buttonUp_clicked"
IF ::nCurInHist > 1 .AND. ::nCurInHist <= Len( ::aHistory )
IF ! empty( qTWItem := ::oUI:q_treeDoc:itemAbove( ::oUI:q_treeDoc:currentItem( 0 ) ) )
::oUI:q_treeDoc:setCurrentItem( qTWItem, 0 )
IF ! empty( qTWItem := ::oUI:treeDoc:itemAbove( ::oUI:treeDoc:currentItem( 0 ) ) )
::oUI:treeDoc:setCurrentItem( qTWItem, 0 )
ENDIF
ENDIF
EXIT
@@ -607,17 +607,17 @@ METHOD IdeHarbourHelp:execEvent( nMode, p, p1 )
EXIT
CASE "treeCategory_itemSelectionChanged"
qTWItem := ::oUI:q_treeCategory:currentItem()
qTWItem := ::oUI:treeCategory:currentItem()
n := ascan( ::aCategory, {|e_| hbqt_IsEqual( e_[ 5 ], qTWItem ) } )
IF n > 0
IF ::aCategory[ n, 5 ]:childCount() == 0
::oUI:q_treeDoc:setCurrentItem( ::aCategory[ n, 4 ], 0 )
::oUI:treeDoc:setCurrentItem( ::aCategory[ n, 4 ], 0 )
ENDIF
ENDIF
EXIT
CASE "treeDoc_itemSelectionChanged"
qTWItem := ::oUI:q_treeDoc:currentItem()
qTWItem := ::oUI:treeDoc:currentItem()
cText := qTWItem:text( 0 )
IF ( n := ascan( ::aNodes, {|e_| e_[ 5 ] == cText } ) ) > 0
@@ -654,7 +654,7 @@ METHOD IdeHarbourHelp:jumpToFunction( cFunction )
cFunction := lower( cFunction )
IF !empty( ::aNodes )
IF ( n := ascan( ::aFunctions, {|e_| lower( left( e_[ 2 ], nLen ) ) == cFunction } ) ) > 0
::oUI:q_treeDoc:setCurrentItem( ::aFunctions[ n, 4 ] )
::oUI:treeDoc:setCurrentItem( ::aFunctions[ n, 4 ] )
ENDIF
ENDIF
@@ -666,10 +666,10 @@ METHOD IdeHarbourHelp:populateIndexedSelection()
LOCAL qItem, cText, n
IF !empty( ::aNodes )
IF !empty( qItem := ::oUI:q_listIndex:currentItem() )
IF !empty( qItem := ::oUI:listIndex:currentItem() )
cText := qItem:text()
IF ( n := ascan( ::aFunctions, {|e_| e_[ 2 ] == cText } ) ) > 0
::oUI:q_treeDoc:setCurrentItem( ::aFunctions[ n, 4 ] )
::oUI:treeDoc:setCurrentItem( ::aFunctions[ n, 4 ] )
ENDIF
ENDIF
ENDIF
@@ -685,8 +685,8 @@ METHOD IdeHarbourHelp:refreshDocTree()
RETURN Self
ENDIF
//::oUI:q_treeDoc:disconnect( "itemSelectionChanged()" )
//::oUI:q_treeCategory:disconnect( "itemSelectionChanged()" )
//::oUI:treeDoc:disconnect( "itemSelectionChanged()" )
//::oUI:treeCategory:disconnect( "itemSelectionChanged()" )
::showApplicationCursor( Qt_BusyCursor )
/* Clean Environment */
@@ -729,7 +729,7 @@ METHOD IdeHarbourHelp:refreshDocTree()
oRoot:setToolTip( 0, aPaths[ 1 ] )
oRoot:setExpanded( .t. )
::oUI:q_treeDoc:addTopLevelItem( oRoot )
::oUI:treeDoc:addTopLevelItem( oRoot )
aadd( ::aNodes, { oRoot, "Path", NIL, cRoot, cRoot } )
hbide_buildFoldersTree( ::aNodes, aDocs )
@@ -761,11 +761,11 @@ METHOD IdeHarbourHelp:refreshDocTree()
::populateIndex()
::oUI:q_treeDoc:expandItem( oRoot )
::oUI:treeDoc:expandItem( oRoot )
::showApplicationCursor()
//::oUI:q_treeDoc:connect( "itemSelectionChanged()" , {|| ::execEvent( "treeDoc_itemSelectionChanged" ) } )
//::oUI:q_treeCategory:connect( "itemSelectionChanged()" , {|| ::execEvent( "treeCategory_itemSelectionChanged" ) } )
//::oUI:treeDoc:connect( "itemSelectionChanged()" , {|| ::execEvent( "treeDoc_itemSelectionChanged" ) } )
//::oUI:treeCategory:connect( "itemSelectionChanged()" , {|| ::execEvent( "treeCategory_itemSelectionChanged" ) } )
RETURN Self
@@ -833,14 +833,14 @@ METHOD IdeHarbourHelp:populateIndex()
asort( ::aFunctions, , , {|e_, f_| e_[ 2 ] < f_[ 2 ] } )
::oUI:q_listIndex:setSortingEnabled( .t. )
::oUI:listIndex:setSortingEnabled( .t. )
FOR EACH a_ IN ::aFunctions
IF !empty( a_[ 2 ] )
qItem := QListWidgetItem()
qItem:setText( a_[ 2 ] )
a_[ 5 ] := qItem
::oUI:q_listIndex:addItem( qItem )
::oUI:listIndex:addItem( qItem )
ENDIF
NEXT
@@ -861,7 +861,7 @@ METHOD IdeHarbourHelp:populateIndex()
FOR EACH a_ IN aUnq
qItem := QTreeWidgetItem()
qItem:setText( 0, a_[ 1 ] )
::oUI:q_treeCategory:addTopLevelItem( qItem )
::oUI:treeCategory:addTopLevelItem( qItem )
a_[ 2 ] := qItem
NEXT
FOR EACH a_ IN ::aCategory
@@ -1108,8 +1108,8 @@ METHOD IdeHarbourHelp:getFunctionPrototypes()
METHOD IdeHarbourHelp:updateViewer( aHtm, cDocName )
::oUI:q_browserView:setHTML( hbide_arrayToMemo( aHtm ) )
::oUI:q_browserView:setDocumentTitle( cDocName )
::oUI:browserView:setHTML( hbide_arrayToMemo( aHtm ) )
::oUI:browserView:setDocumentTitle( cDocName )
RETURN Self
@@ -1399,7 +1399,7 @@ METHOD IdeHarbourHelp:print()
METHOD IdeHarbourHelp:paintRequested( qPrinter )
::oUI:q_browserView:print( qPrinter )
::oUI:browserView:print( qPrinter )
RETURN Self
@@ -1411,9 +1411,9 @@ METHOD IdeHarbourHelp:exportAsPdf()
IF !empty( cPdf := hbide_fetchAFile( ::oDlg, "Provide a file name", { { "Pdf Document", "*.pdf" } } ) )
hb_fNameSplit( cPdf, @cPath, @cFile, @cExt )
qPrinter := QPrinter()
qPrinter:setOutputFileName( cPath + cFile + "_" + trim( ::oUI:q_browserView:documentTitle() ) + ".pdf" )
qPrinter:setOutputFileName( cPath + cFile + "_" + trim( ::oUI:browserView:documentTitle() ) + ".pdf" )
qPrinter:setFullPage( .t. )
::oUI:q_browserView:print( qPrinter )
::oUI:browserView:print( qPrinter )
ENDIF
RETURN Self
@@ -1433,14 +1433,14 @@ METHOD IdeHarbourHelp:exportAsPdfAll()
qPrinter := QPrinter()
FOR EACH aItems IN ::aNodes
::oUI:q_treeDoc:setCurrentItem( aItems[ 1 ], 0 )
::oUI:treeDoc:setCurrentItem( aItems[ 1 ], 0 )
qApp:processEvents()
IF ::lQuitting
EXIT
ENDIF
qPrinter:setOutputFileName( cPath + cFile + "_" + trim( ::oUI:q_browserView:documentTitle() ) + ".pdf" )
qPrinter:setOutputFileName( cPath + cFile + "_" + trim( ::oUI:browserView:documentTitle() ) + ".pdf" )
qPrinter:setFullPage( .t. )
::oUI:q_browserView:print( qPrinter )
::oUI:browserView:print( qPrinter )
qPrinter:newPage()
NEXT
ENDIF

View File

@@ -1279,25 +1279,25 @@ FUNCTION hbide_fetchADate( qParent, cTitle, cPrompt, dDefault )
oUI := hbide_getUI( "fetchdate", qParent )
oUI:setWindowTitle( cTitle )
oUI:q_labelPrompt:setText( cPrompt )
oUI:labelPrompt:setText( cPrompt )
IF dDefault != NIL
qDate := QDate()
qDate:setYear( year( dDefault ) )
qDate:setMonth( month( dDefault ) )
qDate:setDay( day( dDefault ) )
oUI:q_editDate:setDate( qDate )
oUI:editDate:setDate( qDate )
ENDIF
oUI:q_buttonOk:connect( "clicked()", {|| oUI:done( 1 ) } )
oUI:q_buttonCancel:connect( "clicked()", {|| oUI:done( 0 ) } )
oUI:buttonOk:connect( "clicked()", {|| oUI:done( 1 ) } )
oUI:buttonCancel:connect( "clicked()", {|| oUI:done( 0 ) } )
nRet := oUI:exec()
oUI:q_buttonOk:disconnect( "clicked()" )
oUI:q_buttonCancel:disconnect( "clicked()" )
oUI:buttonOk:disconnect( "clicked()" )
oUI:buttonCancel:disconnect( "clicked()" )
IF nRet == 1
qDate := oUI:q_editDate:date()
qDate := oUI:editDate:date()
RETURN stod( strzero( qDate:year(), 4 ) + strzero( qDate:month(),2 ) + strzero( qDate:day(), 2 ) )
ENDIF

View File

@@ -299,21 +299,21 @@ METHOD IdeProjManager:create( oIDE )
METHOD IdeProjManager:destroy()
IF !empty( ::oUI )
::oUI:q_buttonCn :disconnect( "clicked()" )
::oUI:q_buttonSave :disconnect( "clicked()" )
::oUI:q_buttonSaveExit :disconnect( "clicked()" )
::oUI:q_buttonSelect :disconnect( "clicked()" )
::oUI:q_buttonUp :disconnect( "clicked()" )
::oUI:q_buttonDown :disconnect( "clicked()" )
// ::oUI:q_buttonSort :disconnect( "clicked()" )
// ::oUI:q_buttonSortZA :disconnect( "clicked()" )
// ::oUI:q_buttonSortOrg :disconnect( "clicked()" )
::oUI:q_tabWidget :disconnect( "currentChanged(int)" )
::oUI:q_buttonChoosePrjLoc:disconnect( "clicked()" )
::oUI:q_buttonChooseWd :disconnect( "clicked()" )
::oUI:q_buttonChooseDest :disconnect( "clicked()" )
::oUI:q_buttonBackup :disconnect( "clicked()" )
::oUI:q_editPrjLoctn :disconnect( "textChanged(QString)" )
::oUI:buttonCn :disconnect( "clicked()" )
::oUI:buttonSave :disconnect( "clicked()" )
::oUI:buttonSaveExit :disconnect( "clicked()" )
::oUI:buttonSelect :disconnect( "clicked()" )
::oUI:buttonUp :disconnect( "clicked()" )
::oUI:buttonDown :disconnect( "clicked()" )
// ::oUI:buttonSort :disconnect( "clicked()" )
// ::oUI:buttonSortZA :disconnect( "clicked()" )
// ::oUI:buttonSortOrg :disconnect( "clicked()" )
::oUI:tabWidget :disconnect( "currentChanged(int)" )
::oUI:buttonChoosePrjLoc:disconnect( "clicked()" )
::oUI:buttonChooseWd :disconnect( "clicked()" )
::oUI:buttonChooseDest :disconnect( "clicked()" )
::oUI:buttonBackup :disconnect( "clicked()" )
::oUI:editPrjLoctn :disconnect( "textChanged(QString)" )
::oUI:destroy()
ENDIF
@@ -576,19 +576,19 @@ METHOD IdeProjManager:save( lCanClose )
* Validate certain parameters before continuing ... (vailtom)
IF Empty( ::oUI:q_editPrjTitle:text() )
::oUI:q_editPrjTitle:setText( ::oUI:q_editOutName:text() )
IF Empty( ::oUI:editPrjTitle:text() )
::oUI:editPrjTitle:setText( ::oUI:editOutName:text() )
ENDIF
IF Empty( ::oUI:q_editOutName:text() )
IF Empty( ::oUI:editOutName:text() )
MsgBox( 'Invalid Output FileName' )
::oUI:q_editOutName:setFocus()
::oUI:editOutName:setFocus()
RETURN .F.
ENDIF
/* This must be valid, we cannot skip */
IF !hbide_isValidPath( ::oUI:q_editPrjLoctn:text(), 'Project Location' )
::oUI:q_editPrjLoctn:setFocus()
IF !hbide_isValidPath( ::oUI:editPrjLoctn:text(), 'Project Location' )
::oUI:editPrjLoctn:setFocus()
RETURN .F.
ENDIF
@@ -596,46 +596,46 @@ METHOD IdeProjManager:save( lCanClose )
//
aadd( hdr_, c3rd + "hbide_version=" + "1.0" )
//
IF ::oUI:q_comboPrjType:currentIndex() != 0
aadd( hdr_, c3rd + "hbide_type=" + { "Executable", "Lib", "Dll" }[ ::oUI:q_comboPrjType:currentIndex() + 1 ] )
IF ::oUI:comboPrjType:currentIndex() != 0
aadd( hdr_, c3rd + "hbide_type=" + { "Executable", "Lib", "Dll" }[ ::oUI:comboPrjType:currentIndex() + 1 ] )
ENDIF
IF ! Empty( ::oUI:q_editPrjTitle :text() )
aadd( hdr_, c3rd + "hbide_title=" + hbide_space2amp( ::oUI:q_editPrjTitle :text() ) )
IF ! Empty( ::oUI:editPrjTitle :text() )
aadd( hdr_, c3rd + "hbide_title=" + hbide_space2amp( ::oUI:editPrjTitle :text() ) )
ENDIF
IF ! Empty( ::oUI:q_editWrkFolder :text() )
aadd( hdr_, c3rd + "hbide_workingfolder=" + hbide_space2amp( ::oUI:q_editWrkFolder :text() ) )
IF ! Empty( ::oUI:editWrkFolder :text() )
aadd( hdr_, c3rd + "hbide_workingfolder=" + hbide_space2amp( ::oUI:editWrkFolder :text() ) )
ENDIF
IF ! Empty( ::oUI:q_editDstFolder :text() )
aadd( hdr_, c3rd + "hbide_destinationfolder=" + hbide_space2amp( ::oUI:q_editDstFolder :text() ) )
IF ! Empty( ::oUI:editDstFolder :text() )
aadd( hdr_, c3rd + "hbide_destinationfolder=" + hbide_space2amp( ::oUI:editDstFolder :text() ) )
ENDIF
IF ! Empty( ::oUI:q_editOutName :text() )
aadd( hdr_, c3rd + "hbide_output=" + hbide_space2amp( ::oUI:q_editOutName :text() ) )
IF ! Empty( ::oUI:editOutName :text() )
aadd( hdr_, c3rd + "hbide_output=" + hbide_space2amp( ::oUI:editOutName :text() ) )
ENDIF
IF ! Empty( ::oUI:q_editLaunchParams:text() )
aadd( hdr_, c3rd + "hbide_launchparams=" + hbide_space2amp( ::oUI:q_editLaunchParams:text() ) )
IF ! Empty( ::oUI:editLaunchParams:text() )
aadd( hdr_, c3rd + "hbide_launchparams=" + hbide_space2amp( ::oUI:editLaunchParams:text() ) )
ENDIF
IF ! Empty( ::oUI:q_editLaunchExe :text() )
aadd( hdr_, c3rd + "hbide_launchprogram=" + hbide_space2amp( ::oUI:q_editLaunchExe :text() ) )
IF ! Empty( ::oUI:editLaunchExe :text() )
aadd( hdr_, c3rd + "hbide_launchprogram=" + hbide_space2amp( ::oUI:editLaunchExe :text() ) )
ENDIF
IF ! Empty( ::oUI:q_editBackup :text() )
aadd( hdr_, c3rd + "hbide_backupfolder=" + hbide_space2amp( ::oUI:q_editBackup :text() ) )
IF ! Empty( ::oUI:editBackup :text() )
aadd( hdr_, c3rd + "hbide_backupfolder=" + hbide_space2amp( ::oUI:editBackup :text() ) )
ENDIF
IF ::oUI:q_checkXhb:isChecked()
aadd( hdr_, c3rd + "hbide_xhb=" + iif( ::oUI:q_checkXhb:isChecked(), "YES", "NO" ) )
IF ::oUI:checkXhb:isChecked()
aadd( hdr_, c3rd + "hbide_xhb=" + iif( ::oUI:checkXhb:isChecked(), "YES", "NO" ) )
ENDIF
IF ::oUI:q_checkXpp:isChecked()
aadd( hdr_, c3rd + "hbide_xpp=" + iif( ::oUI:q_checkXpp:isChecked(), "YES", "NO" ) )
IF ::oUI:checkXpp:isChecked()
aadd( hdr_, c3rd + "hbide_xpp=" + iif( ::oUI:checkXpp:isChecked(), "YES", "NO" ) )
ENDIF
IF ::oUI:q_checkClp:isChecked()
aadd( hdr_, c3rd + "hbide_clp=" + iif( ::oUI:q_checkClp:isChecked(), "YES", "NO" ) )
IF ::oUI:checkClp:isChecked()
aadd( hdr_, c3rd + "hbide_clp=" + iif( ::oUI:checkClp:isChecked(), "YES", "NO" ) )
ENDIF
a_:= hbide_synchronizeForHbp( hbide_memoToArray( ::oUI:q_editSources:toPlainText() ) )
a_:= hbide_synchronizeForHbp( hbide_memoToArray( ::oUI:editSources:toPlainText() ) )
a_:= ::insertHeader( hdr_, a_ )
aeval( a_, {|e| aadd( txt_, e ) } )
aadd( txt_, " " )
::cSaveTo := ::oUI:q_editPrjLoctn:text() + ::pathSep + ::oUI:q_editOutName:text() + ".hbp"
::cSaveTo := ::oUI:editPrjLoctn:text() + ::pathSep + ::oUI:editOutName:text() + ".hbp"
::cSaveTo := hbide_pathToOSPath( ::cSaveTo )
@@ -735,10 +735,10 @@ METHOD IdeProjManager:updateHbp( iIndex )
ENDIF
/* Sources */
txt_:= hbide_synchronizeForHbp( hb_atokens( ::oUI:q_editSources:toPlainText(), _EOL ) )
txt_:= hbide_synchronizeForHbp( hb_atokens( ::oUI:editSources:toPlainText(), _EOL ) )
/* Final assault */
::oUI:q_editHbp:setPlainText( hbide_arrayToMemo( txt_ ) )
::oUI:editHbp:setPlainText( hbide_arrayToMemo( txt_ ) )
RETURN txt_
@@ -755,56 +755,56 @@ METHOD IdeProjManager:fetchProperties()
ENDIF
IF empty( ::aPrjProps )
::oUI:q_comboPrjType:setCurrentIndex( 0 )
::oUI:comboPrjType:setCurrentIndex( 0 )
::oUI:q_editPrjTitle :setText( "" )
::oUI:q_editPrjLoctn :setText( hbide_pathNormalized( ::oProject:location, .F. ) )
::oUI:q_editDstFolder:setText( "" )
::oUI:q_editBackup :setText( "" )
::oUI:q_editOutName :setText( "" )
::oUI:editPrjTitle :setText( "" )
::oUI:editPrjLoctn :setText( hbide_pathNormalized( ::oProject:location, .F. ) )
::oUI:editDstFolder:setText( "" )
::oUI:editBackup :setText( "" )
::oUI:editOutName :setText( "" )
::oUI:q_editFlags :setPlainText( "" )
::oUI:q_editSources :setPlainText( "" )
::oUI:editFlags :setPlainText( "" )
::oUI:editSources :setPlainText( "" )
::oUI:q_editLaunchParams:setText( "" )
::oUI:q_editLaunchExe:setText( "" )
::oUI:q_editWrkFolder:setText( "" )
::oUI:q_editHbp:setPlainText( "" )
::oUI:editLaunchParams:setText( "" )
::oUI:editLaunchExe:setText( "" )
::oUI:editWrkFolder:setText( "" )
::oUI:editHbp:setPlainText( "" )
::oUI:oWidget:setWindowTitle( 'New Project...' )
ELSE
DO CASE
CASE empty( ::aPrjProps )
::oUI:q_comboPrjType:setCurrentIndex( 0 )
::oUI:comboPrjType:setCurrentIndex( 0 )
CASE ::aPrjProps[ PRJ_PRP_PROPERTIES, 2, E_qPrjType ] == "Lib"
::oUI:q_comboPrjType:setCurrentIndex( 1 )
::oUI:comboPrjType:setCurrentIndex( 1 )
CASE ::aPrjProps[ PRJ_PRP_PROPERTIES, 2, E_qPrjType ] == "Dll"
::oUI:q_comboPrjType:setCurrentIndex( 2 )
::oUI:comboPrjType:setCurrentIndex( 2 )
OTHERWISE
::oUI:q_comboPrjType:setCurrentIndex( 0 )
::oUI:comboPrjType:setCurrentIndex( 0 )
ENDCASE
::oUI:q_editPrjTitle :setText( ::oProject:title )
::oUI:q_editPrjLoctn :setText( ::oProject:location )
::oUI:q_editDstFolder:setText( ::oProject:destination )
::oUI:q_editOutName :setText( ::oProject:outputName )
::oUI:q_editBackup :setText( ::oProject:backup )
::oUI:editPrjTitle :setText( ::oProject:title )
::oUI:editPrjLoctn :setText( ::oProject:location )
::oUI:editDstFolder:setText( ::oProject:destination )
::oUI:editOutName :setText( ::oProject:outputName )
::oUI:editBackup :setText( ::oProject:backup )
::oUI:q_checkXhb :setChecked( ::oProject:isXhb )
::oUI:q_checkXpp :setChecked( ::oProject:isXpp )
::oUI:q_checkClp :setChecked( ::oProject:isClp )
::oUI:checkXhb :setChecked( ::oProject:isXhb )
::oUI:checkXpp :setChecked( ::oProject:isXpp )
::oUI:checkClp :setChecked( ::oProject:isClp )
::oUI:q_editFlags :setPlainText( hbide_arrayToMemo( ::aPrjProps[ PRJ_PRP_FLAGS , 1 ] ) )
::oUI:q_editSources :setPlainText( hbide_arrayToMemo( ::stripHeader( ::aPrjProps[ 5 ] ) ) )
::oUI:editFlags :setPlainText( hbide_arrayToMemo( ::aPrjProps[ PRJ_PRP_FLAGS , 1 ] ) )
::oUI:editSources :setPlainText( hbide_arrayToMemo( ::stripHeader( ::aPrjProps[ 5 ] ) ) )
::oUI:q_editLaunchParams:setText( ::oProject:launchParams )
::oUI:q_editLaunchExe:setText( ::oProject:launchProgram )
::oUI:q_editWrkFolder:setText( ::oProject:wrkDirectory )
::oUI:editLaunchParams:setText( ::oProject:launchParams )
::oUI:editLaunchExe:setText( ::oProject:launchProgram )
::oUI:editWrkFolder:setText( ::oProject:wrkDirectory )
::oUI:q_editHbp:setPlainText( "" )
::oUI:editHbp:setPlainText( "" )
::oUI:oWidget:setWindowTitle( 'Properties for "' + ::oUI:q_editPrjTitle:Text() + '"' )
::oUI:oWidget:setWindowTitle( 'Properties for "' + ::oUI:editPrjTitle:Text() + '"' )
ENDIF
RETURN Self
@@ -818,88 +818,88 @@ METHOD IdeProjManager:buildInterface()
::oPropertiesDock:oWidget:setWidget( ::oUI:oWidget )
::oUI:q_comboPrjType:addItem( "Executable" )
::oUI:q_comboPrjType:addItem( "Library" )
::oUI:q_comboPrjType:addItem( "Dll" )
::oUI:comboPrjType:addItem( "Executable" )
::oUI:comboPrjType:addItem( "Library" )
::oUI:comboPrjType:addItem( "Dll" )
cLukupPng := hbide_image( "folder" )
//
::oUI:q_buttonChoosePrjLoc:setIcon( QIcon( cLukupPng ) )
::oUI:q_buttonChooseWd :setIcon( QIcon( cLukupPng ) )
::oUI:q_buttonChooseDest :setIcon( QIcon( cLukupPng ) )
::oUI:q_buttonBackup :setIcon( QIcon( cLukupPng ) )
::oUI:buttonChoosePrjLoc:setIcon( QIcon( cLukupPng ) )
::oUI:buttonChooseWd :setIcon( QIcon( cLukupPng ) )
::oUI:buttonChooseDest :setIcon( QIcon( cLukupPng ) )
::oUI:buttonBackup :setIcon( QIcon( cLukupPng ) )
::oUI:q_buttonSelect :setIcon( QIcon( hbide_image( "open" ) ) )
::oUI:q_buttonUp :setIcon( QIcon( hbide_image( "dc_up" ) ) )
::oUI:q_buttonDown :setIcon( QIcon( hbide_image( "dc_down" ) ) )
::oUI:buttonSelect :setIcon( QIcon( hbide_image( "open" ) ) )
::oUI:buttonUp :setIcon( QIcon( hbide_image( "dc_up" ) ) )
::oUI:buttonDown :setIcon( QIcon( hbide_image( "dc_down" ) ) )
::oUI:q_buttonSort :setIcon( QIcon( hbide_image( "sort" ) ) )
::oUI:q_buttonSortZA :setIcon( QIcon( hbide_image( "sortdescend" ) ) )
::oUI:q_buttonSortOrg:setIcon( QIcon( hbide_image( "invertcase" ) ) )
::oUI:buttonSort :setIcon( QIcon( hbide_image( "sort" ) ) )
::oUI:buttonSortZA :setIcon( QIcon( hbide_image( "sortdescend" ) ) )
::oUI:buttonSortOrg:setIcon( QIcon( hbide_image( "invertcase" ) ) )
::oUI:q_buttonSort :hide()
::oUI:q_buttonSortZA :hide()
::oUI:q_buttonSortOrg:hide()
::oUI:buttonSort :hide()
::oUI:buttonSortZA :hide()
::oUI:buttonSortOrg:hide()
::oUI:q_buttonCn :connect( "clicked()", {|| ::lSaveOK := .f., ::oPropertiesDock:hide() } )
::oUI:q_buttonSave :connect( "clicked()", {|| ::lSaveOK := .t., ::save( .F. ) } )
::oUI:q_buttonSaveExit :connect( "clicked()", {|| ::lSaveOK := .t., ::save( .T. ) } )
::oUI:q_buttonSelect :connect( "clicked()", {|| ::addSources() } )
::oUI:q_buttonUp :connect( "clicked()", {|| ::moveLine( -1 ) } )
::oUI:q_buttonDown :connect( "clicked()", {|| ::moveLine( +1 ) } )
// ::oUI:q_buttonSort :connect( "clicked()", {|| ::sortSources( "az" ) } )
// ::oUI:q_buttonSortZA :connect( "clicked()", {|| ::sortSources( "za" ) } )
// ::oUI:q_buttonSortOrg :connect( "clicked()", {|| ::sortSources( "org" ) } )
::oUI:q_tabWidget :connect( "currentChanged(int)", {|p| ::updateHbp( p ) } )
::oUI:q_buttonChoosePrjLoc:connect( "clicked()", {|| ::PromptForPath( ::oUI:q_editPrjLoctn , 'Choose Project Location...' ) } )
::oUI:q_buttonChooseWd :connect( "clicked()", {|| ::PromptForPath( ::oUI:q_editWrkFolder, 'Choose Working Folder...' ) } )
::oUI:q_buttonChooseDest :connect( "clicked()", {|| ::PromptForPath( ::oUI:q_editDstFolder, 'Choose Destination Folder...' ) } )
::oUI:q_buttonBackup :connect( "clicked()", {|| ::PromptForPath( ::oUI:q_editBackup , 'Choose Backup Folder...' ) } )
::oUI:q_editPrjLoctn :connect( "textChanged(QString)", {|cPath| ::setProjectLocation( cPath ) } )
::oUI:buttonCn :connect( "clicked()", {|| ::lSaveOK := .f., ::oPropertiesDock:hide() } )
::oUI:buttonSave :connect( "clicked()", {|| ::lSaveOK := .t., ::save( .F. ) } )
::oUI:buttonSaveExit :connect( "clicked()", {|| ::lSaveOK := .t., ::save( .T. ) } )
::oUI:buttonSelect :connect( "clicked()", {|| ::addSources() } )
::oUI:buttonUp :connect( "clicked()", {|| ::moveLine( -1 ) } )
::oUI:buttonDown :connect( "clicked()", {|| ::moveLine( +1 ) } )
// ::oUI:buttonSort :connect( "clicked()", {|| ::sortSources( "az" ) } )
// ::oUI:buttonSortZA :connect( "clicked()", {|| ::sortSources( "za" ) } )
// ::oUI:buttonSortOrg :connect( "clicked()", {|| ::sortSources( "org" ) } )
::oUI:tabWidget :connect( "currentChanged(int)", {|p| ::updateHbp( p ) } )
::oUI:buttonChoosePrjLoc:connect( "clicked()", {|| ::PromptForPath( ::oUI:editPrjLoctn , 'Choose Project Location...' ) } )
::oUI:buttonChooseWd :connect( "clicked()", {|| ::PromptForPath( ::oUI:editWrkFolder, 'Choose Working Folder...' ) } )
::oUI:buttonChooseDest :connect( "clicked()", {|| ::PromptForPath( ::oUI:editDstFolder, 'Choose Destination Folder...' ) } )
::oUI:buttonBackup :connect( "clicked()", {|| ::PromptForPath( ::oUI:editBackup , 'Choose Backup Folder...' ) } )
::oUI:editPrjLoctn :connect( "textChanged(QString)", {|cPath| ::setProjectLocation( cPath ) } )
/* Set monospaced fonts */
::oUI:q_editFlags :setFont( ::oFont:oWidget )
::oUI:q_editSources :setFont( ::oFont:oWidget )
::oUI:q_editHbp :setFont( ::oFont:oWidget )
::oUI:editFlags :setFont( ::oFont:oWidget )
::oUI:editSources :setFont( ::oFont:oWidget )
::oUI:editHbp :setFont( ::oFont:oWidget )
#if 0
::oUI:q_editPrjTitle :setFont( ::oFont:oWidget )
::oUI:q_editPrjLoctn :setFont( ::oFont:oWidget )
::oUI:q_editWrkFolder :setFont( ::oFont:oWidget )
::oUI:q_editDstFolder :setFont( ::oFont:oWidget )
::oUI:q_editOutName :setFont( ::oFont:oWidget )
::oUI:q_editBackup :setFont( ::oFont:oWidget )
::oUI:q_editLaunchParams:setFont( ::oFont:oWidget )
::oUI:q_editLaunchExe :setFont( ::oFont:oWidget )
::oUI:editPrjTitle :setFont( ::oFont:oWidget )
::oUI:editPrjLoctn :setFont( ::oFont:oWidget )
::oUI:editWrkFolder :setFont( ::oFont:oWidget )
::oUI:editDstFolder :setFont( ::oFont:oWidget )
::oUI:editOutName :setFont( ::oFont:oWidget )
::oUI:editBackup :setFont( ::oFont:oWidget )
::oUI:editLaunchParams:setFont( ::oFont:oWidget )
::oUI:editLaunchExe :setFont( ::oFont:oWidget )
#endif
::oUI:setTabOrder( ::oUI:q_comboPrjType , ::oUI:q_editPrjTitle )
::oUI:setTabOrder( ::oUI:q_editPrjTitle , ::oUI:q_editPrjLoctn )
::oUI:setTabOrder( ::oUI:q_editPrjLoctn , ::oUI:q_editOutName )
::oUI:setTabOrder( ::oUI:q_editOutName , ::oUI:q_checkXhb )
::oUI:setTabOrder( ::oUI:q_checkXhb , ::oUI:q_checkXpp )
::oUI:setTabOrder( ::oUI:q_checkXpp , ::oUI:q_checkClp )
::oUI:setTabOrder( ::oUI:q_checkClp , ::oUI:q_editDstFolder )
::oUI:setTabOrder( ::oUI:q_editDstFolder , ::oUI:q_editBackup )
::oUI:setTabOrder( ::oUI:q_editBackup , ::oUI:q_editLaunchParams )
::oUI:setTabOrder( ::oUI:q_editLaunchParams, ::oUI:q_editLaunchExe )
::oUI:setTabOrder( ::oUI:q_editLaunchExe , ::oUI:q_editWrkFolder )
::oUI:setTabOrder( ::oUI:q_editWrkFolder , ::oUI:q_tabFiles )
::oUI:setTabOrder( ::oUI:comboPrjType , ::oUI:editPrjTitle )
::oUI:setTabOrder( ::oUI:editPrjTitle , ::oUI:editPrjLoctn )
::oUI:setTabOrder( ::oUI:editPrjLoctn , ::oUI:editOutName )
::oUI:setTabOrder( ::oUI:editOutName , ::oUI:checkXhb )
::oUI:setTabOrder( ::oUI:checkXhb , ::oUI:checkXpp )
::oUI:setTabOrder( ::oUI:checkXpp , ::oUI:checkClp )
::oUI:setTabOrder( ::oUI:checkClp , ::oUI:editDstFolder )
::oUI:setTabOrder( ::oUI:editDstFolder , ::oUI:editBackup )
::oUI:setTabOrder( ::oUI:editBackup , ::oUI:editLaunchParams )
::oUI:setTabOrder( ::oUI:editLaunchParams, ::oUI:editLaunchExe )
::oUI:setTabOrder( ::oUI:editLaunchExe , ::oUI:editWrkFolder )
::oUI:setTabOrder( ::oUI:editWrkFolder , ::oUI:tabFiles )
//
::oUI:setTabOrder( ::oUI:q_tabFiles , ::oUI:q_editSources )
::oUI:setTabOrder( ::oUI:q_editSources , ::oUI:q_tabFlags )
::oUI:setTabOrder( ::oUI:tabFiles , ::oUI:editSources )
::oUI:setTabOrder( ::oUI:editSources , ::oUI:tabFlags )
//
::oUI:setTabOrder( ::oUI:q_tabFlags , ::oUI:q_editFlags )
::oUI:setTabOrder( ::oUI:q_editFlags , ::oUI:q_tabHbp )
::oUI:setTabOrder( ::oUI:tabFlags , ::oUI:editFlags )
::oUI:setTabOrder( ::oUI:editFlags , ::oUI:tabHbp )
//
::oUI:setTabOrder( ::oUI:q_tabHbp , ::oUI:q_editHbp )
::oUI:setTabOrder( ::oUI:tabHbp , ::oUI:editHbp )
//
::oUI:setTabOrder( ::oUI:q_editHbp , ::oUI:q_buttonSaveExit )
::oUI:setTabOrder( ::oUI:q_buttonSaveExit , ::oUI:q_buttonSave )
::oUI:setTabOrder( ::oUI:q_buttonSave , ::oUI:q_buttonCn )
::oUI:setTabOrder( ::oUI:editHbp , ::oUI:buttonSaveExit )
::oUI:setTabOrder( ::oUI:buttonSaveExit , ::oUI:buttonSave )
::oUI:setTabOrder( ::oUI:buttonSave , ::oUI:buttonCn )
::oUI:q_tabHbp:hide()
::oUI:q_tabFlags:hide()
::oUI:tabHbp:hide()
::oUI:tabFlags:hide()
RETURN Self
@@ -953,7 +953,7 @@ METHOD IdeProjManager:sortSources( cMode )
LOCAL aTxt := { {} , {} , {} , {} , {} , {} , {} , {} , {} , {} , {} }
LOCAL aRst := {}
a_:= hbide_memoToArray( ::oUI:q_editSources:toPlainText() )
a_:= hbide_memoToArray( ::oUI:editSources:toPlainText() )
IF cMode == "az"
asort( a_, , , {|e,f| lower( hbide_stripFilter( e ) ) < lower( hbide_stripFilter( f ) ) } )
@@ -996,8 +996,8 @@ METHOD IdeProjManager:sortSources( cMode )
ENDIF
ENDIF
::oUI:q_editSources:clear()
::oUI:q_editSources:setPlainText( hbide_arrayToMemo( a_ ) )
::oUI:editSources:clear()
::oUI:editSources:setPlainText( hbide_arrayToMemo( a_ ) )
RETURN Self
@@ -1006,14 +1006,14 @@ METHOD IdeProjManager:sortSources( cMode )
METHOD IdeProjManager:setProjectLocation( cPath )
IF ! hb_dirExists( cPath )
::oUI:q_editPrjLoctn:setStyleSheet( "background-color: rgba( 240,120,120,255 );" )
::oUI:q_editSources:setEnabled( .f. )
::oUI:q_buttonSelect:setEnabled( .f. )
::oUI:editPrjLoctn:setStyleSheet( "background-color: rgba( 240,120,120,255 );" )
::oUI:editSources:setEnabled( .f. )
::oUI:buttonSelect:setEnabled( .f. )
ELSE
::oProject:location := cPath
::oUI:q_editPrjLoctn:setStyleSheet( "" )
::oUI:q_editSources:setEnabled( .T. )
::oUI:q_buttonSelect:setEnabled( .T. )
::oUI:editPrjLoctn:setStyleSheet( "" )
::oUI:editSources:setEnabled( .T. )
::oUI:buttonSelect:setEnabled( .T. )
ENDIF
RETURN Self
@@ -1023,11 +1023,11 @@ METHOD IdeProjManager:setProjectLocation( cPath )
METHOD IdeProjManager:isValidProjectLocation( lTell )
LOCAL lOk := .f.
IF empty( ::oUI:q_editPrjLoctn:text() )
IF empty( ::oUI:editPrjLoctn:text() )
IF lTell
MsgBox( "Please supply 'Project Location' first" )
ENDIF
ELSEIF ! hb_dirExists( ::oUI:q_editPrjLoctn:text() )
ELSEIF ! hb_dirExists( ::oUI:editPrjLoctn:text() )
IF lTell
MsgBox( "Please ensure 'Project Location' is correct" )
ENDIF
@@ -1055,13 +1055,13 @@ METHOD IdeProjManager:addSources()
LOCAL aFiles, a_, b_, s, cHome
IF ::isValidProjectLocation( .t. )
IF !empty( aFiles := ::oSM:selectSource( "openmany", , , ::oUI:q_editPrjLoctn:text() ) )
a_:= hbide_memoToArray( ::oUI:q_editSources:toPlainText() )
IF !empty( aFiles := ::oSM:selectSource( "openmany", , , ::oUI:editPrjLoctn:text() ) )
a_:= hbide_memoToArray( ::oUI:editSources:toPlainText() )
b_:={}
aeval( aFiles, {|e| aadd( b_, e ) } )
cHome := ::oUI:q_editPrjLoctn:text()
cHome := ::oUI:editPrjLoctn:text()
FOR EACH s IN b_
s := hbide_prepareSourceForHbp( hbide_stripRoot( cHome, s ) )
IF ascan( a_, s ) == 0
@@ -1069,7 +1069,7 @@ METHOD IdeProjManager:addSources()
ENDIF
NEXT
::oUI:q_editSources:setPlainText( hbide_arrayToMemo( a_ ) )
::oUI:editSources:setPlainText( hbide_arrayToMemo( a_ ) )
ENDIF
ENDIF
RETURN Self
@@ -1175,17 +1175,17 @@ METHOD IdeProjManager:selectCurrentProject()
FOR EACH p IN ::aProjects
IF !empty( t := p[ 3, PRJ_PRP_PROPERTIES, 2, E_oPrjTtl ] )
oDlg:q_cbProjects:addItem( t )
oDlg:cbProjects:addItem( t )
ENDIF
NEXT
oDlg:q_btnCancel:connect( "clicked()", {|| oDlg:oWidget:done( 1 ) } )
oDlg:q_btnOk :connect( "clicked()", {|| ::setCurrentProject( oDlg:q_cbProjects:currentText() ), ;
oDlg:btnCancel:connect( "clicked()", {|| oDlg:oWidget:done( 1 ) } )
oDlg:btnOk :connect( "clicked()", {|| ::setCurrentProject( oDlg:cbProjects:currentText() ), ;
oDlg:done( 1 ) } )
oDlg:exec()
oDlg:q_btnCancel:disconnect( "clicked()" )
oDlg:q_btnOk :disconnect( "clicked()" )
oDlg:btnCancel:disconnect( "clicked()" )
oDlg:btnOk :disconnect( "clicked()" )
oDlg:destroy()
oDlg := NIL

File diff suppressed because it is too large Load Diff

View File

@@ -320,7 +320,7 @@ METHOD IdeShortcuts:execEvent( nMode, p )
MsgBox( "KeyPress on LabelMacros" )
EXIT
CASE buttonDelete_clicked
nRow := ::oUI:q_tableMacros:currentRow()
nRow := ::oUI:tableMacros:currentRow()
IF nRow >= 0 .AND. nRow < Len( ::aDftSCuts )
nRow++
IF hbide_getYesNo( "Delete", ::aDftSCuts[ nRow, 1 ], "A Delete Operation Requested" )
@@ -329,7 +329,7 @@ METHOD IdeShortcuts:execEvent( nMode, p )
::populateDftSCuts()
ENDIF
IF nRow <= Len( ::aDftSCuts )
::oUI:q_tableMacros:setCurrentCell( nRow - 1, 0 )
::oUI:tableMacros:setCurrentCell( nRow - 1, 0 )
ENDIF
ENDIF
EXIT
@@ -373,7 +373,7 @@ METHOD IdeShortcuts:execEvent( nMode, p )
IF !( ::checkDuplicate( ::cKey, ::cAlt, ::cCtrl, ::cShift ) )
aadd( ::aDftSCuts, { ::cName, ::cKey, ::cAlt, ::cCtrl, ::cShift, ::cMenu, ::cBlock, ::cIcon } )
aadd( ::aDftSCutsItms, array( 6 ) )
::oUI:q_tableMacros:setRowCount( ::oUI:q_tableMacros:rowCount() + 1 )
::oUI:tableMacros:setRowCount( ::oUI:tableMacros:rowCount() + 1 )
::array2table( Len( ::aDftSCuts ), { ::cName, ::cKey, ::cAlt, ::cCtrl, ::cShift, ::cMenu, ::cBlock, ::cIcon } )
ELSE
MsgBox( "Current shortcut is already defined!" )
@@ -383,7 +383,7 @@ METHOD IdeShortcuts:execEvent( nMode, p )
EXIT
CASE buttonSet_clicked
nRow := ::oUI:q_tableMacros:currentRow()
nRow := ::oUI:tableMacros:currentRow()
IF nRow >= 0 .AND. nRow < Len( ::aDftSCuts )
nRow++
::controls2vrbls()
@@ -396,24 +396,24 @@ METHOD IdeShortcuts:execEvent( nMode, p )
CASE tableMacros_itemDoubleClicked
EXIT
CASE tableMacros_itemSelectionChanged
nRow := ::oUI:q_tableMacros:currentRow()
nRow := ::oUI:tableMacros:currentRow()
IF nRow >= 0 .AND. nRow < Len( ::aDftSCuts )
nRow++
::array2controls( nRow )
ENDIF
EXIT
CASE listMethods_itemDoubleClicked
IF ( nRow := ::oUI:q_listMethods:currentRow() ) >= 0
IF ( nRow := ::oUI:listMethods:currentRow() ) >= 0
nRow++
IF !empty( ::aMethods[ nRow, 2 ] )
cMethod := "::" + ::aMethods[ nRow, 2 ]
::oUI:q_plainBlock:insertPlainText( cMethod )
::oUI:plainBlock:insertPlainText( cMethod )
ENDIF
ENDIF
EXIT
CASE listMethods_currentRowChanged
IF p >= 0 .AND. p < Len( ::aMethods )
::oUI:q_texteditSyntax:setPlainText( ::aMethods[ p+1, 3 ] )
::oUI:texteditSyntax:setPlainText( ::aMethods[ p+1, 3 ] )
ENDIF
EXIT
ENDSWITCH
@@ -425,20 +425,20 @@ METHOD IdeShortcuts:execEvent( nMode, p )
METHOD IdeShortcuts:array2controls( nRow )
LOCAL cKey, nKey
::oUI:q_editName:setText( ::aDftSCuts[ nRow, 1 ] )
::oUI:editName:setText( ::aDftSCuts[ nRow, 1 ] )
cKey := ::aDftSCuts[ nRow, 2 ]
IF ( nKey := ascan( ::aKeys, {|e_| e_[ 2 ] == cKey } ) ) > 0
::oUI:q_comboKey:setCurrentIndex( nKey - 1 )
::oUI:comboKey:setCurrentIndex( nKey - 1 )
ENDIF
::oUI:q_checkAlt :setChecked( ::aDftSCuts[ nRow, 3 ] == "YES" )
::oUI:q_checkCtrl :setChecked( ::aDftSCuts[ nRow, 4 ] == "YES" )
::oUI:q_checkShift:setChecked( ::aDftSCuts[ nRow, 5 ] == "YES" )
::oUI:checkAlt :setChecked( ::aDftSCuts[ nRow, 3 ] == "YES" )
::oUI:checkCtrl :setChecked( ::aDftSCuts[ nRow, 4 ] == "YES" )
::oUI:checkShift:setChecked( ::aDftSCuts[ nRow, 5 ] == "YES" )
::oUI:q_editMenu:setText( ::aDftSCuts[ nRow, 6 ] )
::oUI:editMenu:setText( ::aDftSCuts[ nRow, 6 ] )
::oUI:q_plainBlock:setPlainText( ::aDftSCuts[ nRow, 7 ] )
::oUI:plainBlock:setPlainText( ::aDftSCuts[ nRow, 7 ] )
RETURN Self
@@ -479,7 +479,7 @@ METHOD IdeShortcuts:vrbls2controls( nRow )
METHOD IdeShortcuts:array2table( nRow, a_ )
LOCAL q0, q1, q2, q3, q4, q5
LOCAL oTbl := ::oUI:q_tableMacros
LOCAL oTbl := ::oUI:tableMacros
LOCAL n := nRow - 1
q0 := QTableWidgetItem()
@@ -520,17 +520,17 @@ METHOD IdeShortcuts:array2table( nRow, a_ )
/*----------------------------------------------------------------------*/
METHOD IdeShortcuts:controls2vrbls()
LOCAL nRow := ::oUI:q_comboKey:currentIndex()
LOCAL nRow := ::oUI:comboKey:currentIndex()
IF nRow >= 0
nRow++
::cName := ::oUI:q_editName:text()
::cName := ::oUI: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()
::cAlt := iif( ::oUI:checkAlt :isChecked(), "YES", "NO" )
::cCtrl := iif( ::oUI:checkCtrl :isChecked(), "YES", "NO" )
::cShift := iif( ::oUI:checkShift:isChecked(), "YES", "NO" )
::cMenu := ::oUI:editMenu:text()
::cBlock := ::oUI:plainBlock:toPlainText()
ENDIF
RETURN Self
@@ -569,7 +569,7 @@ METHOD IdeShortcuts:buildUI()
::oUI:oWidget:connect( QEvent_Close, {|| ::oIde:oINI:cShortcutsDialogGeometry := hbide_posAndSize( ::oUI:oWidget ) } )
oTbl := ::oUI:q_tableMacros /* Build Table Header */
oTbl := ::oUI:tableMacros /* Build Table Header */
oTbl:verticalHeader():hide()
oTbl:horizontalHeader():setStretchLastSection( .t. )
oTbl:setAlternatingRowColors( .t. )
@@ -585,15 +585,15 @@ METHOD IdeShortcuts:buildUI()
aadd( ::aHdr, qItm )
NEXT
::oUI:q_listMethods:setAlternatingRowColors( .t. ) /* Public Methods List */
::oUI:listMethods:setAlternatingRowColors( .t. ) /* Public Methods List */
::qHiliter := ::oTH:SetSyntaxHilighting( ::oUI:q_plainBlock, "Pritpal's Favourite" )
::qHiliter := ::oTH:SetSyntaxHilighting( ::oUI:plainBlock, "Pritpal's Favourite" )
::buildSignals()
/* Demonstration only */
::oUI:q_labelMacros:setFocusPolicy( Qt_StrongFocus )
::oUI:q_labelMacros:connect( QEvent_KeyPress, {|p| ::execEvent( 21000, p ) } )
::oUI:labelMacros:setFocusPolicy( Qt_StrongFocus )
::oUI:labelMacros:connect( QEvent_KeyPress, {|p| ::execEvent( 21000, p ) } )
RETURN Self
@@ -601,17 +601,17 @@ METHOD IdeShortcuts:buildUI()
METHOD IdeShortcuts:buildSignals()
::oUI:q_buttonNew :connect( "clicked()" , {| | ::execEvent( buttonNew_clicked ) } )
::oUI:q_buttonSet :connect( "clicked()" , {| | ::execEvent( buttonSet_clicked ) } )
::oUI:q_buttonTest :connect( "clicked()" , {| | ::execEvent( buttonTest_clicked ) } )
::oUI:q_buttonLoad :connect( "clicked()" , {| | ::execEvent( buttonLoad_clicked ) } )
::oUI:q_buttonSave :connect( "clicked()" , {| | ::execEvent( buttonSave_clicked ) } )
::oUI:q_buttonSaveAs:connect( "clicked()" , {| | ::execEvent( buttonSaveAs_clicked ) } )
::oUI:q_buttonDelete:connect( "clicked()" , {| | ::execEvent( buttonDelete_clicked ) } )
::oUI:q_listMethods :connect( "itemDoubleClicked(QListWidgetItem*)" , {|p| ::execEvent( listMethods_itemDoubleClicked, p ) } )
::oUI:q_listMethods :connect( "currentRowChanged(int)" , {|p| ::execEvent( listMethods_currentRowChanged, p ) } )
::oUI:q_tableMacros :connect( "itemSelectionChanged()" , {| | ::execEvent( tableMacros_itemSelectionChanged ) } )
::oUI:q_tableMacros :connect( "itemDoubleClicked(QTableWidgetItem*)", {|p| ::execEvent( tableMacros_itemDoubleClicked, p ) } )
::oUI:buttonNew :connect( "clicked()" , {| | ::execEvent( buttonNew_clicked ) } )
::oUI:buttonSet :connect( "clicked()" , {| | ::execEvent( buttonSet_clicked ) } )
::oUI:buttonTest :connect( "clicked()" , {| | ::execEvent( buttonTest_clicked ) } )
::oUI:buttonLoad :connect( "clicked()" , {| | ::execEvent( buttonLoad_clicked ) } )
::oUI:buttonSave :connect( "clicked()" , {| | ::execEvent( buttonSave_clicked ) } )
::oUI:buttonSaveAs:connect( "clicked()" , {| | ::execEvent( buttonSaveAs_clicked ) } )
::oUI:buttonDelete:connect( "clicked()" , {| | ::execEvent( buttonDelete_clicked ) } )
::oUI:listMethods :connect( "itemDoubleClicked(QListWidgetItem*)" , {|p| ::execEvent( listMethods_itemDoubleClicked, p ) } )
::oUI:listMethods :connect( "currentRowChanged(int)" , {|p| ::execEvent( listMethods_currentRowChanged, p ) } )
::oUI:tableMacros :connect( "itemSelectionChanged()" , {| | ::execEvent( tableMacros_itemSelectionChanged ) } )
::oUI:tableMacros :connect( "itemDoubleClicked(QTableWidgetItem*)", {|p| ::execEvent( tableMacros_itemDoubleClicked, p ) } )
RETURN Self
@@ -631,7 +631,7 @@ METHOD IdeShortcuts:populateData( nMode )
METHOD IdeShortcuts:clearDftSCuts()
LOCAL a_, qItm
LOCAL oTbl := ::oUI:q_tableMacros
LOCAL oTbl := ::oUI:tableMacros
FOR EACH a_ IN ::aDftSCutsItms
FOR EACH qItm IN a_
@@ -648,7 +648,7 @@ METHOD IdeShortcuts:clearDftSCuts()
METHOD IdeShortcuts:populateDftSCuts()
LOCAL a_, nRow
LOCAL oTbl := ::oUI:q_tableMacros
LOCAL oTbl := ::oUI:tableMacros
LOCAL qApp := QApplication()
oTbl:setRowCount( Len( ::aDftSCuts ) )
@@ -671,7 +671,7 @@ METHOD IdeShortcuts:populateDftSCuts()
METHOD IdeShortcuts:populateMethods()
LOCAL qItem, a_
LOCAL qLW := ::oUI:q_listMethods
LOCAL qLW := ::oUI:listMethods
//qLW:setSortingEnabled( .t. )
@@ -699,7 +699,7 @@ METHOD IdeShortcuts:populateMethods()
METHOD IdeShortcuts:populateKeys()
LOCAL a_
LOCAL oCB := ::oUI:q_comboKey
LOCAL oCB := ::oUI:comboKey
FOR EACH a_ IN ::aKeys
oCB:addItem( a_[ 2 ] )

View File

@@ -123,13 +123,13 @@ METHOD IdeSkeletons:create( oIde )
METHOD IdeSkeletons:destroy()
IF !empty( ::oUI )
::oUI:q_buttonNew :disconnect( "clicked()" )
::oUI:q_buttonRename:disconnect( "clicked()" )
::oUI:q_buttonDelete:disconnect( "clicked()" )
::oUI:q_buttonClear :disconnect( "clicked()" )
::oUI:q_buttonGetSel:disconnect( "clicked()" )
::oUI:q_buttonUpdate:disconnect( "clicked()" )
::oUI:q_listNames :disconnect( "itemSelectionChanged()" )
::oUI:buttonNew :disconnect( "clicked()" )
::oUI:buttonRename:disconnect( "clicked()" )
::oUI:buttonDelete:disconnect( "clicked()" )
::oUI:buttonClear :disconnect( "clicked()" )
::oUI:buttonGetSel:disconnect( "clicked()" )
::oUI:buttonUpdate:disconnect( "clicked()" )
::oUI:listNames :disconnect( "itemSelectionChanged()" )
::oUI:destroy()
ENDIF
@@ -148,18 +148,18 @@ METHOD IdeSkeletons:show()
::oSkeltnDock:oWidget:setWidget( ::oUI:oWidget )
::oUI:q_buttonNew :connect( "clicked()" , {|| ::execEvent( "buttonNew_clicked" ) } )
::oUI:q_buttonRename:connect( "clicked()" , {|| ::execEvent( "buttonRename_clicked" ) } )
::oUI:q_buttonDelete:connect( "clicked()" , {|| ::execEvent( "buttonDelete_clicked" ) } )
::oUI:q_buttonClear :connect( "clicked()" , {|| ::execEvent( "buttonClear_clicked" ) } )
::oUI:q_buttonGetSel:connect( "clicked()" , {|| ::execEvent( "buttonGetSel_clicked" ) } )
::oUI:q_buttonUpdate:connect( "clicked()" , {|| ::execEvent( "buttonUpdate_clicked" ) } )
::oUI:q_listNames :connect( "itemSelectionChanged()", {|| ::execEvent( "listNames_itemSelectionChanged" ) } )
::oUI:buttonNew :connect( "clicked()" , {|| ::execEvent( "buttonNew_clicked" ) } )
::oUI:buttonRename:connect( "clicked()" , {|| ::execEvent( "buttonRename_clicked" ) } )
::oUI:buttonDelete:connect( "clicked()" , {|| ::execEvent( "buttonDelete_clicked" ) } )
::oUI:buttonClear :connect( "clicked()" , {|| ::execEvent( "buttonClear_clicked" ) } )
::oUI:buttonGetSel:connect( "clicked()" , {|| ::execEvent( "buttonGetSel_clicked" ) } )
::oUI:buttonUpdate:connect( "clicked()" , {|| ::execEvent( "buttonUpdate_clicked" ) } )
::oUI:listNames :connect( "itemSelectionChanged()", {|| ::execEvent( "listNames_itemSelectionChanged" ) } )
//::oUI:q_editCode:setFontFamily( "Courier New" )
//::oUI:q_editCode:setFontPointSize( 10 )
//::oUI:editCode:setFontFamily( "Courier New" )
//::oUI:editCode:setFontPointSize( 10 )
::oUI:q_editCode:setFont( ::oFont:oWidget )
::oUI:editCode:setFont( ::oFont:oWidget )
ENDIF
::refreshList()
@@ -180,44 +180,44 @@ METHOD IdeSkeletons:execEvent( cEvent, p )
SWITCH cEvent
CASE "buttonNew_clicked"
IF !empty( cName := hbide_fetchAString( ::oUI:q_listNames, "", "Name", "New Skeleton" ) )
::oUI:q_listNames:addItem( cName )
IF !empty( cName := hbide_fetchAString( ::oUI:listNames, "", "Name", "New Skeleton" ) )
::oUI:listNames:addItem( cName )
aadd( ::oIde:aSkltns, { cName, "" } )
::oUI:q_listNames:setCurrentRow( Len( ::aSkltns ) - 1 )
::oUI:listNames:setCurrentRow( Len( ::aSkltns ) - 1 )
ENDIF
EXIT
CASE "buttonRename_clicked"
qItem := ::oUI:q_listNames:currentItem()
qItem := ::oUI:listNames:currentItem()
qItem:setText( ::rename( qItem:text() ) )
EXIT
CASE "buttonDelete_clicked"
qItem := ::oUI:q_listNames:currentItem()
qItem := ::oUI:listNames:currentItem()
::delete( qItem:text() )
EXIT
CASE "buttonClear_clicked"
::oUI:q_editCode:clear()
::oUI:editCode:clear()
EXIT
CASE "buttonGetSel_clicked"
IF !empty( cCode := ::oEM:getSelectedText() )
// TODO: Format cCode
::oUI:q_editCode:setPlainText( cCode )
::oUI:editCode:setPlainText( cCode )
ENDIF
EXIT
CASE "buttonUpdate_clicked"
qItem := ::oUI:q_listNames:currentItem()
::save( qItem:text(), ::oUI:q_editCode:toPlainText() )
qItem := ::oUI:listNames:currentItem()
::save( qItem:text(), ::oUI:editCode:toPlainText() )
EXIT
CASE "listNames_itemSelectionChanged"
qItem := ::oUI:q_listNames:currentItem()
qItem := ::oUI:listNames:currentItem()
cName := qItem:text()
IF ( n := ascan( ::aSkltns, {|e_| e_[ 1 ] == cName } ) ) > 0
::oUI:q_editCode:setPlainText( ::aSkltns[ n, 2 ] )
::oUI:editCode:setPlainText( ::aSkltns[ n, 2 ] )
ENDIF
EXIT
@@ -252,8 +252,8 @@ METHOD IdeSkeletons:execEvent( cEvent, p )
METHOD IdeSkeletons:refreshList()
::oUI:q_listNames:clear()
aeval( ::aSkltns, {|e_| ::oUI:q_listNames:addItem( e_[ 1 ] ) } )
::oUI:listNames:clear()
aeval( ::aSkltns, {|e_| ::oUI:listNames:addItem( e_[ 1 ] ) } )
RETURN Self

View File

@@ -153,9 +153,9 @@ METHOD IdeThemes:new( oIde, cThemesFile )
METHOD IdeThemes:destroy()
IF !empty( ::oSL )
::oSL:q_listOptions :disConnect( "doubleClicked(QModelIndex)" )
::oSL:q_buttonOk :disConnect( "clicked()" )
::oSL:q_buttonCancel :disConnect( "clicked()" )
::oSL:listOptions :disConnect( "doubleClicked(QModelIndex)" )
::oSL:buttonOk :disConnect( "clicked()" )
::oSL:buttonCancel :disConnect( "clicked()" )
::oSL:destroy()
ENDIF
@@ -167,19 +167,19 @@ METHOD IdeThemes:destroy()
::aApplyAct := NIL
IF !empty( ::oUI )
::oUI:q_listThemes :disconnect( "currentRowChanged(int)" )
::oUI:q_listItems :disconnect( "currentRowChanged(int)" )
::oUI:q_buttonColor :disconnect( "clicked()" )
::oUI:q_buttonSave :disconnect( "clicked()" )
::oUI:q_buttonSaveAs :disconnect( "clicked()" )
::oUI:q_buttonCopy :disconnect( "clicked()" )
::oUI:q_buttonApply :disconnect( "clicked()" )
::oUI:q_buttonApplyAll:disconnect( "clicked()" )
::oUI:q_buttonDefault :disconnect( "clicked()" )
::oUI:q_checkItalic :disconnect( "stateChanged(int)" )
::oUI:q_checkBold :disconnect( "stateChanged(int)" )
::oUI:q_checkUnderline:disconnect( "stateChanged(int)" )
::oUI:q_buttonClose :disconnect( "clicked()" )
::oUI:listThemes :disconnect( "currentRowChanged(int)" )
::oUI:listItems :disconnect( "currentRowChanged(int)" )
::oUI:buttonColor :disconnect( "clicked()" )
::oUI:buttonSave :disconnect( "clicked()" )
::oUI:buttonSaveAs :disconnect( "clicked()" )
::oUI:buttonCopy :disconnect( "clicked()" )
::oUI:buttonApply :disconnect( "clicked()" )
::oUI:buttonApplyAll:disconnect( "clicked()" )
::oUI:buttonDefault :disconnect( "clicked()" )
::oUI:checkItalic :disconnect( "stateChanged(int)" )
::oUI:checkBold :disconnect( "stateChanged(int)" )
::oUI:checkUnderline:disconnect( "stateChanged(int)" )
::oUI:buttonClose :disconnect( "clicked()" )
::qHiliter := NIL
::qEdit := NIL
@@ -549,38 +549,38 @@ METHOD IdeThemes:show()
::oThemesDock:oWidget:setWidget( ::oUI:oWidget )
::oUI:q_listThemes :connect( "currentRowChanged(int)" , {|i| ::execEvent( "listThemes_currentRowChanged", i ) } )
::oUI:q_listItems :connect( "currentRowChanged(int)" , {|i| ::execEvent( "listItems_currentRowChanged", i ) } )
::oUI:q_buttonColor :connect( "clicked()" , {| | ::updateColor() } )
::oUI:q_buttonSave :connect( "clicked()" , {| | ::save( .f. ) } )
::oUI:q_buttonSaveAs :connect( "clicked()" , {| | ::save( .t. ) } )
::oUI:q_buttonCopy :connect( "clicked()" , {| | ::copy( .t. ) } )
::oUI:q_buttonApply :connect( "clicked()" , {| | ::execEvent( "applyMenu_triggered_applyToCurrentTab" ) } )
::oUI:q_buttonApplyAll:connect( "clicked()" , {| | ::execEvent( "applyMenu_triggered_applyToAllTabs" ) } )
::oUI:q_buttonDefault :connect( "clicked()" , {| | ::execEvent( "applyMenu_triggered_setAsDefault" ) } )
::oUI:q_checkItalic :connect( "stateChanged(int)" , {|i| ::updateAttribute( THM_ATR_ITALIC, i ) } )
::oUI:q_checkBold :connect( "stateChanged(int)" , {|i| ::updateAttribute( THM_ATR_BOLD , i ) } )
::oUI:q_checkUnderline:connect( "stateChanged(int)" , {|i| ::updateAttribute( THM_ATR_ULINE , i ) } )
::oUI:q_buttonClose :connect( "clicked()" , {| | ::oThemesDock:hide() } )
::oUI:listThemes :connect( "currentRowChanged(int)" , {|i| ::execEvent( "listThemes_currentRowChanged", i ) } )
::oUI:listItems :connect( "currentRowChanged(int)" , {|i| ::execEvent( "listItems_currentRowChanged", i ) } )
::oUI:buttonColor :connect( "clicked()" , {| | ::updateColor() } )
::oUI:buttonSave :connect( "clicked()" , {| | ::save( .f. ) } )
::oUI:buttonSaveAs :connect( "clicked()" , {| | ::save( .t. ) } )
::oUI:buttonCopy :connect( "clicked()" , {| | ::copy( .t. ) } )
::oUI:buttonApply :connect( "clicked()" , {| | ::execEvent( "applyMenu_triggered_applyToCurrentTab" ) } )
::oUI:buttonApplyAll:connect( "clicked()" , {| | ::execEvent( "applyMenu_triggered_applyToAllTabs" ) } )
::oUI:buttonDefault :connect( "clicked()" , {| | ::execEvent( "applyMenu_triggered_setAsDefault" ) } )
::oUI:checkItalic :connect( "stateChanged(int)" , {|i| ::updateAttribute( THM_ATR_ITALIC, i ) } )
::oUI:checkBold :connect( "stateChanged(int)" , {|i| ::updateAttribute( THM_ATR_BOLD , i ) } )
::oUI:checkUnderline:connect( "stateChanged(int)" , {|i| ::updateAttribute( THM_ATR_ULINE , i ) } )
::oUI:buttonClose :connect( "clicked()" , {| | ::oThemesDock:hide() } )
/* Fill Themes Dialog Values */
::oUI:setWindowTitle( GetKeyValue( ::aControls, "dialogTitle" ) )
::oUI:q_checkItalic :setText( GetKeyValue( ::aControls, "checkItalic" , "Italic" ) )
::oUI:q_checkBold :setText( GetKeyValue( ::aControls, "checkBold" , "Bold" ) )
::oUI:q_checkUnderline :setText( GetKeyValue( ::aControls, "checkUnderline", "Underline" ) )
::oUI:checkItalic :setText( GetKeyValue( ::aControls, "checkItalic" , "Italic" ) )
::oUI:checkBold :setText( GetKeyValue( ::aControls, "checkBold" , "Bold" ) )
::oUI:checkUnderline :setText( GetKeyValue( ::aControls, "checkUnderline", "Underline" ) )
//
::oUI:q_buttonColor :setText( GetKeyValue( ::aControls, "buttonColor" , "Color" ) )
::oUI:q_buttonSave :setText( GetKeyValue( ::aControls, "buttonSave" , "Save" ) )
::oUI:q_buttonSaveAs :setText( GetKeyValue( ::aControls, "buttonSaveAs" , "SaveAs" ) )
::oUI:q_buttonClose :setText( GetKeyValue( ::aControls, "buttonClose" , "Close" ) )
::oUI:q_buttonCopy :setText( GetKeyValue( ::aControls, "buttonCopy" , "Copy" ) )
::oUI:buttonColor :setText( GetKeyValue( ::aControls, "buttonColor" , "Color" ) )
::oUI:buttonSave :setText( GetKeyValue( ::aControls, "buttonSave" , "Save" ) )
::oUI:buttonSaveAs :setText( GetKeyValue( ::aControls, "buttonSaveAs" , "SaveAs" ) )
::oUI:buttonClose :setText( GetKeyValue( ::aControls, "buttonClose" , "Close" ) )
::oUI:buttonCopy :setText( GetKeyValue( ::aControls, "buttonCopy" , "Copy" ) )
aeval( ::aThemes, {|e_| ::oUI:q_listThemes:addItem( e_[ 1 ] ) } )
aeval( ::aItems , {|e_| ::oUI:q_listItems:addItem( e_[ 2 ] ) } )
aeval( ::aThemes, {|e_| ::oUI:listThemes:addItem( e_[ 1 ] ) } )
aeval( ::aItems , {|e_| ::oUI:listItems:addItem( e_[ 2 ] ) } )
::oEdit := IdeEdit():new( ::oIde )
::qEdit := ::oUI:q_plainThemeText
::qEdit := ::oUI:plainThemeText
::oEdit:qEdit := ::qEdit
::qEdit:setPlainText( GetSource() )
@@ -592,8 +592,8 @@ METHOD IdeThemes:show()
::lCreating := .f.
::oUI:q_listThemes:setCurrentRow( 0 )
::oUI:q_listItems:setCurrentRow( 0 )
::oUI:listThemes:setCurrentRow( 0 )
::oUI:listItems:setCurrentRow( 0 )
::setTheme()
ENDIF
@@ -623,10 +623,10 @@ METHOD IdeThemes:setAttributes()
IF ! ::lCreating
aAttr := ::aThemes[ ::nCurTheme, 2, ::nCurItem, 2 ]
//
::oUI:q_checkItalic :setChecked( aAttr[ THM_ATR_ITALIC ] )
::oUI:q_checkBold :setChecked( aAttr[ THM_ATR_BOLD ] )
::oUI:q_checkUnderline :setChecked( aAttr[ THM_ATR_ULINE ] )
::oUI:q_buttonColor :setStyleSheet( "color: " + Attr2RGBfnRev( aAttr ) + ";" + ;
::oUI:checkItalic :setChecked( aAttr[ THM_ATR_ITALIC ] )
::oUI:checkBold :setChecked( aAttr[ THM_ATR_BOLD ] )
::oUI:checkUnderline :setChecked( aAttr[ THM_ATR_ULINE ] )
::oUI:buttonColor :setStyleSheet( "color: " + Attr2RGBfnRev( aAttr ) + ";" + ;
"background-color: " + Attr2RGBfn( aAttr ) + ";" )
ENDIF
@@ -731,9 +731,9 @@ METHOD IdeThemes:selectTheme()
::oSL:setWindowTitle( "Available Themes" )
::oSL:q_listOptions :connect( "doubleClicked(QModelIndex)", {|p| ::selectThemeProc( 1, p ) } )
::oSL:q_buttonOk :connect( "clicked()" , {|p| ::selectThemeProc( 2, p ) } )
::oSL:q_buttonCancel:connect( "clicked()" , {|p| ::selectThemeProc( 3, p ) } )
::oSL:listOptions :connect( "doubleClicked(QModelIndex)", {|p| ::selectThemeProc( 1, p ) } )
::oSL:buttonOk :connect( "clicked()" , {|p| ::selectThemeProc( 2, p ) } )
::oSL:buttonCancel:connect( "clicked()" , {|p| ::selectThemeProc( 3, p ) } )
ENDIF
oStrList := QStringList()
@@ -744,7 +744,7 @@ METHOD IdeThemes:selectTheme()
oStrModel := QStringListModel()
oStrModel:setStringList( oStrList )
::oSL:q_listOptions:setModel( oStrModel )
::oSL:listOptions:setModel( oStrModel )
nDone := ::oSL:exec()
@@ -761,7 +761,7 @@ METHOD IdeThemes:selectThemeProc( nMode, p )
::oSL:done( 1 )
CASE nMode == 2
qModalIndex := ::oSL:q_listOptions:currentIndex()
qModalIndex := ::oSL:listOptions:currentIndex()
::cSelTheme := ::aThemes[ qModalIndex:row() + 1, 1 ]
::oSL:done( 1 )
@@ -790,8 +790,8 @@ METHOD IdeThemes:copy()
aItems := aclone( ::aThemes[ ::nCurTheme ] )
aItems[ 1 ] := cTheme
aadd( ::aThemes, aItems )
::oUI:q_listThemes:addItem( cTheme )
::oUI:q_listThemes:setCurrentRow( Len( ::aThemes ) - 1 )
::oUI:listThemes:addItem( cTheme )
::oUI:listThemes:setCurrentRow( Len( ::aThemes ) - 1 )
ENDIF
RETURN Self

View File

@@ -173,19 +173,19 @@ METHOD IdeToolsManager:destroy()
::clearList()
::qPanelsButton :disconnect( "clicked()" )
::oUI:q_buttonAdd :disconnect( "clicked()" )
::oUI:q_buttonDelete :disconnect( "clicked()" )
::oUI:q_buttonUp :disconnect( "clicked()" )
::oUI:q_buttonDown :disconnect( "clicked()" )
::oUI:q_buttonExec :disconnect( "clicked()" )
::oUI:q_buttonBrowse :disconnect( "clicked()" )
::oUI:q_buttonUpdate :disconnect( "clicked()" )
::oUI:q_buttonClose :disconnect( "clicked()" )
::oUI:q_buttonSetImage :disconnect( "clicked()" )
::oUI:q_buttonUserToolbarUpd:disconnect( "clicked()" )
::oUI:q_comboToolbarAsgnd :disconnect( "currentIndexChanged(int)" )
::oUI:q_listToolbars :disconnect( "itemSelectionChanged()" )
::oUI:q_listNames :disconnect( "itemSelectionChanged()" )
::oUI:buttonAdd :disconnect( "clicked()" )
::oUI:buttonDelete :disconnect( "clicked()" )
::oUI:buttonUp :disconnect( "clicked()" )
::oUI:buttonDown :disconnect( "clicked()" )
::oUI:buttonExec :disconnect( "clicked()" )
::oUI:buttonBrowse :disconnect( "clicked()" )
::oUI:buttonUpdate :disconnect( "clicked()" )
::oUI:buttonClose :disconnect( "clicked()" )
::oUI:buttonSetImage :disconnect( "clicked()" )
::oUI:buttonUserToolbarUpd:disconnect( "clicked()" )
::oUI:comboToolbarAsgnd :disconnect( "currentIndexChanged(int)" )
::oUI:listToolbars :disconnect( "itemSelectionChanged()" )
::oUI:listNames :disconnect( "itemSelectionChanged()" )
::oUI:destroy()
ENDIF
@@ -229,63 +229,63 @@ METHOD IdeToolsManager:show()
::oUI:setMaximumHeight( ::oUI:height() )
::oUI:setMinimumHeight( ::oUI:height() )
::oUI:q_buttonAdd :connect( "clicked()", {|| ::execEvent( "buttonAdd_clicked" ) } )
::oUI:q_buttonDelete:connect( "clicked()", {|| ::execEvent( "buttonDelete_clicked" ) } )
::oUI:q_buttonUp :connect( "clicked()", {|| ::execEvent( "buttonUp_clicked" ) } )
::oUI:q_buttonDown :connect( "clicked()", {|| ::execEvent( "buttonDown_clicked" ) } )
::oUI:q_buttonExec :connect( "clicked()", {|| ::execEvent( "buttonExec_clicked" ) } )
::oUI:q_buttonBrowse:connect( "clicked()", {|| ::execEvent( "buttonBrowse_clicked" ) } )
::oUI:q_buttonUpdate:connect( "clicked()", {|| ::execEvent( "buttonUpdate_clicked" ) } )
::oUI:q_buttonClose :connect( "clicked()", {|| ::execEvent( "buttonClose_clicked" ) } )
::oUI:buttonAdd :connect( "clicked()", {|| ::execEvent( "buttonAdd_clicked" ) } )
::oUI:buttonDelete:connect( "clicked()", {|| ::execEvent( "buttonDelete_clicked" ) } )
::oUI:buttonUp :connect( "clicked()", {|| ::execEvent( "buttonUp_clicked" ) } )
::oUI:buttonDown :connect( "clicked()", {|| ::execEvent( "buttonDown_clicked" ) } )
::oUI:buttonExec :connect( "clicked()", {|| ::execEvent( "buttonExec_clicked" ) } )
::oUI:buttonBrowse:connect( "clicked()", {|| ::execEvent( "buttonBrowse_clicked" ) } )
::oUI:buttonUpdate:connect( "clicked()", {|| ::execEvent( "buttonUpdate_clicked" ) } )
::oUI:buttonClose :connect( "clicked()", {|| ::execEvent( "buttonClose_clicked" ) } )
::oUI:q_listNames :connect( "itemSelectionChanged()", {|| ::execEvent( "listNames_itemSelectionChanged" ) } )
::oUI:listNames :connect( "itemSelectionChanged()", {|| ::execEvent( "listNames_itemSelectionChanged" ) } )
::oUI:q_buttonBtnDown :setIcon( QIcon( hbide_image( "dc_down" ) ) )
::oUI:q_buttonBtnUp :setIcon( QIcon( hbide_image( "dc_up" ) ) )
::oUI:buttonBtnDown :setIcon( QIcon( hbide_image( "dc_down" ) ) )
::oUI:buttonBtnUp :setIcon( QIcon( hbide_image( "dc_up" ) ) )
::oUI:q_buttonSetImage:setIcon( QIcon( hbide_image( "open" ) ) )
::oUI:q_buttonSetImage:connect( "clicked()", {|| ::execEvent( "buttonSetImage_clicked" ) } )
::oUI:buttonSetImage:setIcon( QIcon( hbide_image( "open" ) ) )
::oUI:buttonSetImage:connect( "clicked()", {|| ::execEvent( "buttonSetImage_clicked" ) } )
::oUI:q_buttonUserToolbarUpd:connect( "clicked()", {|| ::execEvent( "buttonUserToolbarUpd_clicked" ) } )
::oUI:buttonUserToolbarUpd:connect( "clicked()", {|| ::execEvent( "buttonUserToolbarUpd_clicked" ) } )
::oUI:q_comboToolbarAsgnd:addItem( "User_Toolbar_1" )
::oUI:q_comboToolbarAsgnd:addItem( "User_Toolbar_2" )
::oUI:q_comboToolbarAsgnd:addItem( "User_Toolbar_3" )
::oUI:q_comboToolbarAsgnd:addItem( "User_Toolbar_4" )
::oUI:q_comboToolbarAsgnd:addItem( "User_Toolbar_5" )
::oUI:q_comboToolbarAsgnd:setCurrentIndex( -1 )
::oUI:q_comboToolbarAsgnd:connect( "currentIndexChanged(int)", {|p| ::execEvent( "comboToolbarAsgnd_currentIndexChanged", p ) } )
::oUI:comboToolbarAsgnd:addItem( "User_Toolbar_1" )
::oUI:comboToolbarAsgnd:addItem( "User_Toolbar_2" )
::oUI:comboToolbarAsgnd:addItem( "User_Toolbar_3" )
::oUI:comboToolbarAsgnd:addItem( "User_Toolbar_4" )
::oUI:comboToolbarAsgnd:addItem( "User_Toolbar_5" )
::oUI:comboToolbarAsgnd:setCurrentIndex( -1 )
::oUI:comboToolbarAsgnd:connect( "currentIndexChanged(int)", {|p| ::execEvent( "comboToolbarAsgnd_currentIndexChanged", p ) } )
::oUI:q_listToolbars:addItem( "User_Toolbar_1" )
::oUI:q_listToolbars:addItem( "User_Toolbar_2" )
::oUI:q_listToolbars:addItem( "User_Toolbar_3" )
::oUI:q_listToolbars:addItem( "User_Toolbar_4" )
::oUI:q_listToolbars:addItem( "User_Toolbar_5" )
::oUI:q_listToolbars:connect( "itemSelectionChanged()", {|| ::execEvent( "listToolbars_itemSelectionChanged" ) } )
::oUI:listToolbars:addItem( "User_Toolbar_1" )
::oUI:listToolbars:addItem( "User_Toolbar_2" )
::oUI:listToolbars:addItem( "User_Toolbar_3" )
::oUI:listToolbars:addItem( "User_Toolbar_4" )
::oUI:listToolbars:addItem( "User_Toolbar_5" )
::oUI:listToolbars:connect( "itemSelectionChanged()", {|| ::execEvent( "listToolbars_itemSelectionChanged" ) } )
::oUI:q_comboInitPos:addItem( "Left" )
::oUI:q_comboInitPos:addItem( "Top" )
::oUI:q_comboInitPos:addItem( "Right" )
::oUI:q_comboInitPos:addItem( "Bottom" )
::oUI:q_comboToolbarAsgnd:setCurrentIndex( -1 )
::oUI:comboInitPos:addItem( "Left" )
::oUI:comboInitPos:addItem( "Top" )
::oUI:comboInitPos:addItem( "Right" )
::oUI:comboInitPos:addItem( "Bottom" )
::oUI:comboToolbarAsgnd:setCurrentIndex( -1 )
::oUI:q_checkDockTop :setChecked( .f. )
::oUI:q_checkDockLeft :setChecked( .t. )
::oUI:q_checkDockBottom:setChecked( .t. )
::oUI:q_checkDockRight :setChecked( .t. )
::oUI:q_checkFloatable :setChecked( .t. )
::oUI:checkDockTop :setChecked( .f. )
::oUI:checkDockLeft :setChecked( .t. )
::oUI:checkDockBottom:setChecked( .t. )
::oUI:checkDockRight :setChecked( .t. )
::oUI:checkFloatable :setChecked( .t. )
::oUI:q_checkToolActive:setChecked( .t. )
::oUI:checkToolActive:setChecked( .t. )
#if 0
::oUI:q_checkToolActive:connect( "stateChanged(int)", {|i| ::execEvent( "checkToolActive_stateChanged", i ) } )
::oUI:checkToolActive:connect( "stateChanged(int)", {|i| ::execEvent( "checkToolActive_stateChanged", i ) } )
#endif
#if 1
::oUI:q_checkInactive:connect( "stateChanged(int)", {|i| ::execEvent( "checkToolActive_stateChanged", i ) } )
::oUI:checkInactive:connect( "stateChanged(int)", {|i| ::execEvent( "checkToolActive_stateChanged", i ) } )
#endif
hdr_:= { { "Img", 30 }, { "Tool", 218 } }
oTbl := ::oUI:q_tableButtons
oTbl := ::oUI:tableButtons
//
oTbl:verticalHeader():hide()
oTbl:horizontalHeader():setStretchLastSection( .t. )
@@ -302,13 +302,13 @@ METHOD IdeToolsManager:show()
aadd( ::aHdr, qItm )
NEXT
::oUI:q_listToolbars:setCurrentRow( 0 )
::oUI:listToolbars:setCurrentRow( 0 )
ENDIF
::populatePlugins( .t. )
::clearList()
::populateList( ::oINI:aTools )
::oUI:q_listNames:setCurrentRow( 0 )
::oUI:listNames:setCurrentRow( 0 )
::oIde:setPosByIniEx( ::oUI:oWidget, ::oINI:cToolsDialogGeometry )
::oUI:show()
@@ -328,7 +328,7 @@ METHOD IdeToolsManager:execEvent( cMode, p )
SWITCH cMode
CASE "checkToolActive_stateChanged"
nRow := ::oUI:q_listToolbars:currentRow()
nRow := ::oUI:listToolbars:currentRow()
::aUserToolbars[ nRow + 1, 3 ] := "YES"
IF !empty( ::aToolbars[ nRow + 1 ] )
IF p > 0
@@ -341,37 +341,37 @@ METHOD IdeToolsManager:execEvent( cMode, p )
CASE "buttonSetImage_clicked"
cFileName := hbide_fetchAFile( ::oDlg, "Select an PNG image", { { "Image Files", "*.png" } },/* cFolder */ , /*cDftSuffix*/ )
IF !empty( cFileName )
::oUI:q_editImage:setText( hbide_pathNormalized( cFileName, .f. ) )
::oUI:q_buttonSetImage:setIcon( QIcon( hbide_pathToOsPath( cFileName ) ) )
::oUI:editImage:setText( hbide_pathNormalized( cFileName, .f. ) )
::oUI:buttonSetImage:setIcon( QIcon( hbide_pathToOsPath( cFileName ) ) )
ENDIF
EXIT
CASE "buttonUserToolbarUpd_clicked"
::ini2toolbarControls( ::oUI:q_listToolbars:currentRow(), 2 )
::ini2toolbarControls( ::oUI:listToolbars:currentRow(), 2 )
EXIT
CASE "listToolbars_itemSelectionChanged"
// Clear q_tableButtons and populate with new values
::ini2toolbarControls( ::oUI:q_listToolbars:currentRow(), 1 )
::populateButtonsTable( ::oUI:q_listToolbars:currentRow() )
// Clear tableButtons and populate with new values
::ini2toolbarControls( ::oUI:listToolbars:currentRow(), 1 )
::populateButtonsTable( ::oUI:listToolbars:currentRow() )
EXIT
CASE "comboToolbarAsgnd_currentIndexChanged"
::oUI:q_listToolbars:setCurrentRow( p )
::oUI:listToolbars:setCurrentRow( p )
EXIT
CASE "listNames_itemSelectionChanged"
qItem := ::oUI:q_listNames:currentItem()
qItem := ::oUI:listNames:currentItem()
cName := qItem:text()
IF ( nIndex := ascan( aTools, {|e_| e_[ 1 ] == cName } ) ) > 0
::ini2Controls( nIndex )
ENDIF
EXIT
CASE "buttonAdd_clicked"
IF !empty( ::oUI:q_editName:text() )
IF !empty( ::oUI:editName:text() )
::controls2ini()
::oUI:q_listNames:addItem( ::oUI:q_editName:text() )
::oUI:listNames:addItem( ::oUI:editName:text() )
ENDIF
EXIT
CASE "buttonDelete_clicked"
IF ::oUI:q_listNames:currentRow() >= 0
qItem := ::oUI:q_listNames:currentItem()
IF ::oUI:listNames:currentRow() >= 0
qItem := ::oUI:listNames:currentItem()
cName := qItem:text()
IF ( nIndex := ascan( aTools, {|e_| e_[ 1 ] == cName } ) ) > 0
hb_adel( ::oINI:aTools, nIndex, .t. )
@@ -387,8 +387,8 @@ METHOD IdeToolsManager:execEvent( cMode, p )
CASE "buttonExec_clicked"
IF ! ::lExecuting
::lExecuting := .t.
IF ::oUI:q_listNames:currentRow() >= 0
qItem := ::oUI:q_listNames:currentItem()
IF ::oUI:listNames:currentRow() >= 0
qItem := ::oUI:listNames:currentItem()
::execTool( qItem:text() )
ENDIF
::lExecuting := .f.
@@ -398,20 +398,20 @@ METHOD IdeToolsManager:execEvent( cMode, p )
IF !empty( cFile := hbide_fetchAFile( ::oDlg, "Select a Tool" ) )
hb_fNameSplit( cFile, , @cFileName )
//::ini2controls()
::oUI:q_editName : setText( cFileName )
::oUI:q_editCmdLine : setText( cFile )
::oUI:editName : setText( cFileName )
::oUI:editCmdLine : setText( cFile )
ENDIF
EXIT
CASE "buttonUpdate_clicked"
IF ( nRow := ::oUI:q_listNames:currentRow() ) >= 0
qItem := ::oUI:q_listNames:currentItem()
IF ( nRow := ::oUI:listNames:currentRow() ) >= 0
qItem := ::oUI:listNames:currentItem()
cName := qItem:text()
IF ( nIndex := ascan( aTools, {|e_| e_[ 1 ] == cName } ) ) > 0
::controls2ini( nIndex )
::clearList()
::populateList()
::oUI:q_listNames:setCurrentRow( nRow )
::oUI:listNames:setCurrentRow( nRow )
ENDIF
ENDIF
EXIT
@@ -491,7 +491,7 @@ METHOD IdeToolsManager:buildUserToolbars()
METHOD IdeToolsManager:populateButtonsTable( nIndex )
LOCAL a_:={}, b_, q0, q1, oTbl, nRow
oTbl := ::oUI:q_tableButtons
oTbl := ::oUI:tableButtons
oTbl:clearContents()
IF nIndex > -1
@@ -530,22 +530,22 @@ METHOD IdeToolsManager:ini2toolbarControls( nIndex, nMode )
IF nIndex > -1
nIndex++
IF nMode == 1
::oUI:q_comboInitPos :setCurrentIndex( val( ::aUserToolBars[ nIndex, 1 ] ) )
::oUI:q_checkFloatable :setChecked( ::aUserToolBars[ nIndex, 2 ] == "YES" )
::oUI:q_checkInactive :setChecked( ::aUserToolBars[ nIndex, 3 ] == "YES" )
::oUI:q_checkDockTop :setChecked( ::aUserToolBars[ nIndex, 4 ] == "YES" )
::oUI:q_checkDockLeft :setChecked( ::aUserToolBars[ nIndex, 5 ] == "YES" )
::oUI:q_checkDockBottom:setChecked( ::aUserToolBars[ nIndex, 6 ] == "YES" )
::oUI:q_checkDockRight :setChecked( ::aUserToolBars[ nIndex, 7 ] == "YES" )
::oUI:comboInitPos :setCurrentIndex( val( ::aUserToolBars[ nIndex, 1 ] ) )
::oUI:checkFloatable :setChecked( ::aUserToolBars[ nIndex, 2 ] == "YES" )
::oUI:checkInactive :setChecked( ::aUserToolBars[ nIndex, 3 ] == "YES" )
::oUI:checkDockTop :setChecked( ::aUserToolBars[ nIndex, 4 ] == "YES" )
::oUI:checkDockLeft :setChecked( ::aUserToolBars[ nIndex, 5 ] == "YES" )
::oUI:checkDockBottom:setChecked( ::aUserToolBars[ nIndex, 6 ] == "YES" )
::oUI:checkDockRight :setChecked( ::aUserToolBars[ nIndex, 7 ] == "YES" )
ELSE
::aUserToolBars[ nIndex, 1 ] := hb_ntos( ::oUI:q_comboInitPos:currentIndex() )
::aUserToolBars[ nIndex, 2 ] := iif( ::oUI:q_checkFloatable :isChecked(), "YES", "NO" )
::aUserToolBars[ nIndex, 3 ] := iif( ::oUI:q_checkInactive :isChecked(), "YES", "NO" )
::aUserToolBars[ nIndex, 4 ] := iif( ::oUI:q_checkDockTop :isChecked(), "YES", "NO" )
::aUserToolBars[ nIndex, 5 ] := iif( ::oUI:q_checkDockLeft :isChecked(), "YES", "NO" )
::aUserToolBars[ nIndex, 6 ] := iif( ::oUI:q_checkDockBottom:isChecked(), "YES", "NO" )
::aUserToolBars[ nIndex, 7 ] := iif( ::oUI:q_checkDockRight :isChecked(), "YES", "NO" )
::aUserToolBars[ nIndex, 1 ] := hb_ntos( ::oUI:comboInitPos:currentIndex() )
::aUserToolBars[ nIndex, 2 ] := iif( ::oUI:checkFloatable :isChecked(), "YES", "NO" )
::aUserToolBars[ nIndex, 3 ] := iif( ::oUI:checkInactive :isChecked(), "YES", "NO" )
::aUserToolBars[ nIndex, 4 ] := iif( ::oUI:checkDockTop :isChecked(), "YES", "NO" )
::aUserToolBars[ nIndex, 5 ] := iif( ::oUI:checkDockLeft :isChecked(), "YES", "NO" )
::aUserToolBars[ nIndex, 6 ] := iif( ::oUI:checkDockBottom:isChecked(), "YES", "NO" )
::aUserToolBars[ nIndex, 7 ] := iif( ::oUI:checkDockRight :isChecked(), "YES", "NO" )
ENDIF
ENDIF
@@ -557,37 +557,37 @@ METHOD IdeToolsManager:ini2toolbarControls( nIndex, nMode )
METHOD IdeToolsManager:ini2controls( nIndex )
IF nIndex > 0
::oUI:q_editName :setText( ::aTools[ nIndex, 1 ] )
::oUI:q_editCmdLine :setText( ::aTools[ nIndex, 2 ] )
::oUI:q_editParams :setText( ::aTools[ nIndex, 3 ] )
::oUI:q_editStayIn :setText( ::aTools[ nIndex, 4 ] )
::oUI:q_checkCapture :setChecked( !empty( ::aTools[ nIndex, 5 ] ) )
::oUI:q_checkOpenCons :setChecked( !empty( ::aTools[ nIndex, 6 ] ) )
::oUI:editName :setText( ::aTools[ nIndex, 1 ] )
::oUI:editCmdLine :setText( ::aTools[ nIndex, 2 ] )
::oUI:editParams :setText( ::aTools[ nIndex, 3 ] )
::oUI:editStayIn :setText( ::aTools[ nIndex, 4 ] )
::oUI:checkCapture :setChecked( !empty( ::aTools[ nIndex, 5 ] ) )
::oUI:checkOpenCons :setChecked( !empty( ::aTools[ nIndex, 6 ] ) )
::oUI:q_comboToolbarAsgnd:setCurrentIndex( iif( empty( ::aTools[ nIndex, 7 ] ), -1, val( ::aTools[ nIndex, 7 ] ) ) )
::oUI:q_checkToolActive :setChecked( ::aTools[ nIndex, 8 ] == "YES" )
::oUI:q_editImage :setText( hbide_pathNormalized( ::aTools[ nIndex, 9 ], .f. ) )
::oUI:q_buttonSetImage :setIcon( QIcon( iif( empty( ::aTools[ nIndex, 9 ] ), hbide_image( "open" ), ;
::oUI:comboToolbarAsgnd:setCurrentIndex( iif( empty( ::aTools[ nIndex, 7 ] ), -1, val( ::aTools[ nIndex, 7 ] ) ) )
::oUI:checkToolActive :setChecked( ::aTools[ nIndex, 8 ] == "YES" )
::oUI:editImage :setText( hbide_pathNormalized( ::aTools[ nIndex, 9 ], .f. ) )
::oUI:buttonSetImage :setIcon( QIcon( iif( empty( ::aTools[ nIndex, 9 ] ), hbide_image( "open" ), ;
hbide_pathToOsPath( ::aTools[ nIndex, 9 ] ) ) ) )
::oUI:q_editTooltip :setText( ::aTools[ nIndex, 10 ] )
::oUI:q_comboPlugin :setCurrentIndex( ascan( ::aPlugins, {|e| ::aTools[ nIndex, 11 ] == e } ) - 1 )
::oUI:q_checkPlugInit :setChecked( ::aTools[ nIndex, 12 ] == "YES" )
::oUI:editTooltip :setText( ::aTools[ nIndex, 10 ] )
::oUI:comboPlugin :setCurrentIndex( ascan( ::aPlugins, {|e| ::aTools[ nIndex, 11 ] == e } ) - 1 )
::oUI:checkPlugInit :setChecked( ::aTools[ nIndex, 12 ] == "YES" )
ELSE
::oUI:q_editName :setText( "" )
::oUI:q_editCmdLine :setText( "" )
::oUI:q_editParams :setText( "" )
::oUI:q_editStayIn :setText( "" )
::oUI:q_checkCapture :setChecked( .f. )
::oUI:q_checkOpenCons :setChecked( .f. )
::oUI:editName :setText( "" )
::oUI:editCmdLine :setText( "" )
::oUI:editParams :setText( "" )
::oUI:editStayIn :setText( "" )
::oUI:checkCapture :setChecked( .f. )
::oUI:checkOpenCons :setChecked( .f. )
::oUI:q_comboToolbarAsgnd:setCurrentIndex( -1 )
::oUI:q_checkToolActive :setChecked( .t. )
::oUI:q_editImage :setText( "" )
::oUI:q_buttonSetImage :setIcon( QIcon( hbide_image( "open" ) ) )
::oUI:q_editTooltip :setText( "" )
::oUI:q_comboPlugin :setCurrentIndex( -1 )
::oUI:q_checkPlugInit :setChecked( .f. )
::oUI:comboToolbarAsgnd:setCurrentIndex( -1 )
::oUI:checkToolActive :setChecked( .t. )
::oUI:editImage :setText( "" )
::oUI:buttonSetImage :setIcon( QIcon( hbide_image( "open" ) ) )
::oUI:editTooltip :setText( "" )
::oUI:comboPlugin :setCurrentIndex( -1 )
::oUI:checkPlugInit :setChecked( .f. )
ENDIF
@@ -602,19 +602,19 @@ METHOD IdeToolsManager:controls2ini( nIndex )
nIndex := Len( ::oINI:aTools )
ENDIF
::oINI:aTools[ nIndex ] := { ::oUI:q_editName:text() , ;
hbide_pathNormalized( ::oUI:q_editCmdLine:text() ), ;
hbide_pathNormalized( ::oUI:q_editParams:text() ), ;
hbide_pathNormalized( ::oUI:q_editStayIn:text() ), ;
iif( ::oUI:q_checkCapture :isChecked(), "YES", "" ), ;
iif( ::oUI:q_checkOpenCons:isChecked(), "YES", "" ), ;
::oINI:aTools[ nIndex ] := { ::oUI:editName:text() , ;
hbide_pathNormalized( ::oUI:editCmdLine:text() ), ;
hbide_pathNormalized( ::oUI:editParams:text() ), ;
hbide_pathNormalized( ::oUI:editStayIn:text() ), ;
iif( ::oUI:checkCapture :isChecked(), "YES", "" ), ;
iif( ::oUI:checkOpenCons:isChecked(), "YES", "" ), ;
;
hb_ntos( ::oUI:q_comboToolbarAsgnd:currentIndex() ), ;
iif( ::oUI:q_checkToolActive:isChecked(), "YES", "NO" ), ;
::oUI:q_editImage:text(), ;
::oUI:q_editTooltip:text(), ;
::oUI:q_comboPlugin:currentText(), ;
iif( ::oUI:q_checkPlugInit:isChecked(), "YES", "NO" ) ;
hb_ntos( ::oUI:comboToolbarAsgnd:currentIndex() ), ;
iif( ::oUI:checkToolActive:isChecked(), "YES", "NO" ), ;
::oUI:editImage:text(), ;
::oUI:editTooltip:text(), ;
::oUI:comboPlugin:currentText(), ;
iif( ::oUI:checkPlugInit:isChecked(), "YES", "NO" ) ;
}
RETURN Self
@@ -622,7 +622,7 @@ METHOD IdeToolsManager:controls2ini( nIndex )
METHOD IdeToolsManager:clearList()
::oUI:q_listNames:clear()
::oUI:listNames:clear()
RETURN Self
@@ -634,7 +634,7 @@ METHOD IdeToolsManager:populateList( aList )
DEFAULT aList TO ::oINI:aTools
FOR EACH a_ IN aList
::oUI:q_listNames:addItem( a_[ 1 ] )
::oUI:listNames:addItem( a_[ 1 ] )
NEXT
RETURN Self
@@ -645,7 +645,7 @@ METHOD IdeToolsManager:populatePlugins( lClear )
LOCAL cDir, aDir, aFile
IF lClear
::oUI:q_comboPlugin:clear()
::oUI:comboPlugin:clear()
ENDIF
::aPlugins := {}
@@ -653,10 +653,10 @@ METHOD IdeToolsManager:populatePlugins( lClear )
aDir := directory( cDir + "*" )
IF !empty( aDir )
FOR EACH aFile IN aDir
::oUI:q_comboPlugin:addItem( aFile[ 1 ] )
::oUI:comboPlugin:addItem( aFile[ 1 ] )
aadd( ::aPlugins, aFile[ 1 ] )
NEXT
::oUI:q_comboPlugin:setCurrentIndex( -1 )
::oUI:comboPlugin:setCurrentIndex( -1 )
ENDIF
RETURN Self