diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7b0a40b2a2..0eb0e802ac 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,48 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-05-06 09:52 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * contrib/hbqt/THbQtUI.prg + + Added functionality for "WhatsThis" feature of Qt. + + - contrib/hbide/resources/projectproperties.ui + - contrib/hbide/resources/projectproperties.uic + - Deleted: no longer required dialog. + + * contrib/hbide/resources/projectpropertiesex.ui + * contrib/hbide/resources/projectpropertiesex.uic + * contrib/hbide/resources/shortcuts.ui + * contrib/hbide/resources/shortcuts.uic + % Shifted: tooltips to WhatsThis slot. Shift+F1 key is the + universal key to activate it. Alternatively "?" icon appears + on the left of "X" button in titlebat; press it and move over + the dialog; where "WhatsThis" will be defined, cursor will + change its shape and click there, tooltip like popup will open. + + * contrib/hbqt/doc/en/class_hbqplaintextedit.txt + * contrib/hbqt/hbqt_hbqplaintextedit.cpp + * contrib/hbqt/hbqt_hbqplaintextedit.h + * contrib/hbqt/qtgui/HBQPlainTextEdit.cpp + * contrib/hbqt/qtgui/THBQPlainTextEdit.prg + * contrib/hbqt/qth/HBQPlainTextEdit.qth + + * contrib/hbide/hbide.hbp + + contrib/hbide/ideedit.prg + + Added: new source file which contains code to handle + editing window at the micro level. It was going unmanageable + in single file due to heavy changed needed for future. + + * contrib/hbide/ideeditor.prg + - IdeEdit() class moved to ideedit.prg. + + + Implemented: base protocol to keep all the three variants of + selections, viz., stream, column and line, persistant. It is a + work in progress and may be some features of "cut" may not be + working as expected yet. + + Please play with it a little and tell me about the artifacts + it must respect to. + 2010-05-06 07:13 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbide/idesaveload.prg ! Fixed hbide_getIniPath() to initialize for OS2. diff --git a/harbour/contrib/hbide/hbide.hbp b/harbour/contrib/hbide/hbide.hbp index 8e1ab3b946..36c0832b15 100644 --- a/harbour/contrib/hbide/hbide.hbp +++ b/harbour/contrib/hbide/hbide.hbp @@ -35,4 +35,6 @@ ideskeletons.prg idewizard.prg idetools.prg ideshortcuts.prg +ideedit.prg + diff --git a/harbour/contrib/hbide/ideedit.prg b/harbour/contrib/hbide/ideedit.prg new file mode 100644 index 0000000000..ea15b41a31 --- /dev/null +++ b/harbour/contrib/hbide/ideedit.prg @@ -0,0 +1,1658 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * + * Copyright 2009-2010 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ +/* + * EkOnkar + * ( The LORD is ONE ) + * + * Harbour-Qt IDE + * + * Pritpal Bedi + * 27Dec2009 + */ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ + +#include "common.ch" +#include "hbclass.ch" +#include "hbqt.ch" +#include "hbide.ch" +#include "xbp.ch" + +/*----------------------------------------------------------------------*/ + +#define customContextMenuRequested 1 +#define textChanged 2 +#define copyAvailable 3 +#define modificationChanged 4 +#define redoAvailable 5 +#define selectionChanged 6 +#define undoAvailable 7 +#define updateRequest 8 +#define cursorPositionChanged 9 + +#define timerTimeout 23 + +/*----------------------------------------------------------------------*/ + +CLASS IdeEdit INHERIT IdeObject + + DATA oEditor + + DATA qEdit + DATA qHLayout + DATA nOrient INIT 0 + + DATA nMode INIT 0 + DATA nLineNo INIT -99 + DATA nMaxDigits INIT 5 // Tobe + DATA nMaxRows INIT 100 + DATA nLastLine INIT -99 + DATA nCurLineNo INIT 0 + DATA nPrevLineNo INIT -1 + DATA nPrevLineNo1 INIT -1 + + DATA aBookMarks INIT {} + + DATA lModified INIT .F. + DATA lIndentIt INIT .f. + DATA lUpdatePrevWord INIT .f. + DATA lCopyWhenDblClicked INIT .f. + DATA cCurLineText INIT "" + + DATA cProto INIT "" + DATA qTimer + DATA nProtoLine INIT -1 + DATA nProtoCol INIT -1 + DATA isSuspended INIT .f. + + DATA fontFamily INIT "Courier New" + DATA pointSize INIT 10 + DATA currentPointSize INIT 10 + DATA qFont + DATA aBlockCopyContents INIT {} + DATA isLineSelectionMode INIT .f. + DATA aSelectionInfo INIT { -1,-1,-1,-1,0 } + + METHOD new( oEditor, nMode ) + METHOD create( oEditor, nMode ) + METHOD destroy() + METHOD execEvent( nMode, oEdit, p, p1 ) + METHOD execKeyEvent( nMode, nEvent, p, p1 ) + METHOD connectEditSignals( oEdit ) + METHOD disconnectEditSignals( oEdit ) + + METHOD redo() + METHOD undo() + METHOD cut() + METHOD copy() + METHOD paste() + METHOD selectAll() + METHOD toggleSelectionMode() + + METHOD setReadOnly() + METHOD setNewMark() + METHOD gotoMark( nIndex ) + METHOD duplicateLine() + METHOD deleteLine() + METHOD blockComment() + METHOD streamComment() + METHOD blockIndent( nMode ) + METHOD moveLine( nDirection ) + METHOD caseUpper() + METHOD caseLower() + METHOD caseInvert() + METHOD convertQuotes() + METHOD convertDQuotes() + METHOD findLastIndent() + METHOD reLayMarkButtons() + METHOD presentSkeletons() + METHOD handleCurrentIndent() + METHOD handlePreviousWord( lUpdatePrevWord ) + METHOD loadFuncHelp() + METHOD clickFuncHelp() + METHOD goto( nLine ) + METHOD gotoFunction() + METHOD toggleLineNumbers() + METHOD toggleLineSelectionMode() + + METHOD getWord( lSelect ) + METHOD getLine( nLine, lSelect ) + METHOD getText() + METHOD getSelectedText() + METHOD getColumnNo() + METHOD getLineNo() + METHOD insertSeparator( cSep ) + METHOD insertText( cText ) + + METHOD suspendPrototype() + METHOD resumePrototype() + METHOD showPrototype( cProto ) + METHOD hidePrototype() + METHOD completeCode( p ) + + METHOD setLineNumbersBkColor( nR, nG, nB ) + METHOD setCurrentLineColor( nR, nG, nB ) + METHOD getCursor() INLINE QTextCursor():from( ::qEdit:textCursor() ) + METHOD down() + METHOD up() + METHOD home() + METHOD find( cText, nPosFrom ) + METHOD refresh() + METHOD isModified() INLINE ::oEditor:qDocument:isModified() + METHOD setFont() + METHOD markCurrentFunction() + METHOD copyBlockContents( aCord ) + METHOD pasteBlockContents( nMode ) + METHOD insertBlockContents( aCord ) + METHOD deleteBlockContents( aCord ) + METHOD zoom( nKey ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:new( oEditor, nMode ) + + ::oEditor := oEditor + ::nMode := nMode + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:create( oEditor, nMode ) + LOCAL nBlock + + DEFAULT oEditor TO ::oEditor + DEFAULT nMode TO ::nMode + + ::oEditor := oEditor + ::nMode := nMode + ::oIde := ::oEditor:oIde + + ::qEdit := HBQPlainTextEdit():new() + // + ::qEdit:setLineWrapMode( QTextEdit_NoWrap ) + ::qEdit:ensureCursorVisible() + ::qEdit:setContextMenuPolicy( Qt_CustomContextMenu ) + ::qEdit:installEventFilter( ::pEvents ) + ::qEdit:setTabChangesFocus( .f. ) + + ::setFont() + + ::qEdit:hbHighlightCurrentLine( .t. ) /* Via user-setup */ + ::qEdit:hbSetSpaces( ::nTabSpaces ) + + ::qEdit:hbSetCompleter( ::qCompleter ) + + ::toggleLineNumbers() + + FOR EACH nBlock IN ::aBookMarks + ::qEdit:hbBookMarks( nBlock ) + NEXT + + ::qHLayout := QHBoxLayout():new() + ::qHLayout:setSpacing( 0 ) + + ::qHLayout:addWidget( ::qEdit ) + + ::connectEditSignals( Self ) + + Qt_Events_Connect( ::pEvents, ::qEdit, QEvent_KeyPress , {|p| ::execKeyEvent( 101, QEvent_KeyPress, p ) } ) + Qt_Events_Connect( ::pEvents, ::qEdit, QEvent_Wheel , {|p| ::execKeyEvent( 102, QEvent_Wheel , p ) } ) + Qt_Events_Connect( ::pEvents, ::qEdit, QEvent_FocusIn , {| | ::execKeyEvent( 104, QEvent_FocusIn ) } ) + Qt_Events_Connect( ::pEvents, ::qEdit, QEvent_FocusOut , {| | ::execKeyEvent( 105, QEvent_FocusOut ) } ) + Qt_Events_Connect( ::pEvents, ::qEdit, QEvent_MouseButtonDblClick, {|p| ::execKeyEvent( 103, QEvent_MouseButtonDblClick, p ) } ) + + ::qEdit:hbSetEventBlock( {|p,p1| ::execKeyEvent( 115, 1001, p, p1 ) } ) + + ::qTimer := QTimer():new() + ::qTimer:setInterval( 2000 ) + ::connect( ::qTimer, "timeout()", {|| ::execEvent( timerTimeout, Self ) } ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:zoom( nKey ) + + DEFAULT nKey TO 0 + + IF nKey == 1 + IF ::currentPointSize + 1 < 30 + ::currentPointSize++ + ENDIF + + ELSEIF nKey == -1 + IF ::currentPointSize - 1 > 5 + ::currentPointSize-- + ENDIF + + ELSEIF nKey == 0 + ::currentPointSize := ::pointSize + + ELSEIF nKey >= 5 .AND. nKey <= 30 + ::currentPointSize := nKey + + ELSE + RETURN Self + + ENDIF + + ::setFont() + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:setFont() + + ::qFont := QFont():new() + ::qFont:setFamily( ::fontFamily ) + ::qFont:setFixedPitch( .t. ) + ::qFont:setPointSize( ::currentPointSize ) + + ::qEdit:setFont( ::qFont ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:destroy() + + ::disconnect( ::qTimer, "timeout()" ) + IF ::qTimer:isActive() + ::qTimer:stop() + ENDIF + ::qTimer := NIL + + Qt_Events_DisConnect( ::pEvents, ::qEdit, QEvent_KeyPress ) + Qt_Events_DisConnect( ::pEvents, ::qEdit, QEvent_Wheel ) + Qt_Events_DisConnect( ::pEvents, ::qEdit, QEvent_FocusIn ) + Qt_Events_DisConnect( ::pEvents, ::qEdit, QEvent_FocusOut ) + Qt_Events_DisConnect( ::pEvents, ::qEdit, QEvent_MouseButtonDblClick ) + + ::disconnectEditSignals( Self ) + + ::oEditor:qLayout:removeItem( ::qHLayout ) + // + ::qHLayout:removeWidget( ::qEdit ) + ::qEdit := NIL + ::qHLayout := NIL + ::qFont := NIL + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:disconnectEditSignals( oEdit ) + HB_SYMBOL_UNUSED( oEdit ) + + ::disConnect( oEdit:qEdit, "customContextMenuRequested(QPoint)" ) + ::disConnect( oEdit:qEdit, "textChanged()" ) + ::disConnect( oEdit:qEdit, "selectionChanged()" ) + ::disConnect( oEdit:qEdit, "cursorPositionChanged()" ) + ::disConnect( oEdit:qEdit, "copyAvailable(bool)" ) + + #if 0 + ::disConnect( oEdit:qEdit, "modificationChanged(bool)" ) + ::disConnect( oEdit:qEdit, "updateRequest(QRect,int)" ) + ::disConnect( oEdit:qEdit, "redoAvailable(bool)" ) + ::disConnect( oEdit:qEdit, "undoAvailable(bool)" ) + #endif + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:connectEditSignals( oEdit ) + HB_SYMBOL_UNUSED( oEdit ) + + ::connect( oEdit:qEdit, "customContextMenuRequested(QPoint)", {|p | ::execEvent( 1, oEdit, p ) } ) + ::Connect( oEdit:qEdit, "textChanged()" , {| | ::execEvent( 2, oEdit, ) } ) + ::Connect( oEdit:qEdit, "selectionChanged()" , {|p | ::execEvent( 6, oEdit, p ) } ) + ::Connect( oEdit:qEdit, "cursorPositionChanged()" , {| | ::execEvent( 9, oEdit, ) } ) + ::Connect( oEdit:qEdit, "copyAvailable(bool)" , {|p | ::execEvent( 3, oEdit, p ) } ) + + #if 0 + ::Connect( oEdit:qEdit, "modificationChanged(bool)" , {|p | ::execEvent( 4, oEdit, p ) } ) + ::Connect( oEdit:qEdit, "updateRequest(QRect,int)" , {|p,p1| ::execEvent( 8, oEdit, p, p1 ) } ) + ::Connect( oEdit:qEdit, "redoAvailable(bool)" , {|p | ::execEvent( 5, oEdit, p ) } ) + ::Connect( oEdit:qEdit, "undoAvailable(bool)" , {|p | ::execEvent( 7, oEdit, p ) } ) + #endif + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:execEvent( nMode, oEdit, p, p1 ) + LOCAL pAct, qAct, n, qCursor, qEdit, oo, nLine + + HB_SYMBOL_UNUSED( p1 ) + + qEdit := oEdit:qEdit + qCursor := QTextCursor():configure( qEdit:textCursor() ) + oEdit:nCurLineNo := qCursor:blockNumber() + + SWITCH nMode + + CASE customContextMenuRequested + QAction():from( ::oEM:aActions[ 17, 2 ] ):setEnabled( !empty( qCursor:selectedText() ) ) + + pAct := ::oEM:qContextMenu:exec_1( qEdit:mapToGlobal( p ) ) + IF !hbqt_isEmptyQtPointer( pAct ) + qAct := QAction():configure( pAct ) + DO CASE + CASE qAct:text() == "Split Horizontally" + ::oEditor:split( 1, oEdit ) + CASE qAct:text() == "Split Vertically" + ::oEditor:split( 2, oEdit ) + CASE qAct:text() == "Close Split Window" + IF ( n := ascan( ::oEditor:aEdits, {|o| o == oEdit } ) ) > 0 /* 1 == Main Edit */ + oo := ::oEditor:aEdits[ n ] + hb_adel( ::oEditor:aEdits, n, .t. ) + oo:destroy() + ::oEditor:relay() + ::oEditor:qCqEdit := ::oEditor:qEdit + ::oEditor:qCoEdit := ::oEditor:oEdit + ::oIde:manageFocusInEditor() + ENDIF + CASE qAct:text() == "Save as Skeleton..." + ::oSK:saveAs( ::getSelectedText() ) + CASE qAct:text() == "Apply Theme" + ::oEditor:applyTheme() + CASE qAct:text() == "Goto Function" + ::gotoFunction() + ENDCASE + ENDIF + EXIT + + CASE textChanged + //HB_TRACE( HB_TR_ALWAYS, "textChanged()" ) + ::oEditor:setTabImage( qEdit ) + EXIT + + CASE selectionChanged + //HB_TRACE( HB_TR_ALWAYS, "selectionChanged()" ) + ::oEditor:qCqEdit := qEdit + ::oEditor:qCoEdit := oEdit + + qCursor := QTextCursor():configure( qEdit:TextCursor() ) + + /* Book Marks reach-out buttons */ + ::relayMarkButtons() + ::toggleLineNumbers() + + ::updateTitleBar() + + /* An experimental move but seems a lot is required to achieve column selection */ + qEdit:hbHighlightSelectedColumns( ::isColumnSelectionEnabled ) + + ::oDK:setStatusText( SB_PNL_SELECTEDCHARS, len( qCursor:selectedText() ) ) + EXIT + + CASE cursorPositionChanged + //HB_TRACE( HB_TR_ALWAYS, "cursorPositionChanged()", ::nProtoLine, ::nProtoCol, ::isSuspended, ::getLineNo(), ::getColumnNo(), ::cProto ) + ::oEditor:dispEditInfo( qEdit ) + ::handlePreviousWord( ::lUpdatePrevWord ) + ::handleCurrentIndent() + + ::markCurrentFunction() + + IF ::nProtoLine != -1 + nLine := ::getLineNo() + IF ! ::isSuspended + IF nLine != ::nProtoLine .OR. ::getColumnNo() <= ::nProtoCol + ::suspendPrototype() + ENDIF + ELSE + IF nLine == ::nProtoLine .AND. ::getColumnNo() >= ::nProtoCol + ::resumePrototype() + ENDIF + ENDIF + ENDIF + + EXIT + + CASE copyAvailable + IF p .AND. ::lCopyWhenDblClicked + ::qEdit:copy() + ENDIF + ::lCopyWhenDblClicked := .f. + EXIT + + CASE timerTimeout + IF empty( ::cProto ) + ::hidePrototype() + ELSE + ::showPrototype() + ENDIF + EXIT + + #if 0 + CASE modificationChanged + //HB_TRACE( HB_TR_ALWAYS, "modificationChanged(bool)", p ) + EXIT + CASE redoAvailable + //HB_TRACE( HB_TR_ALWAYS, "redoAvailable(bool)", p ) + EXIT + CASE undoAvailable + //HB_TRACE( HB_TR_ALWAYS, "undoAvailable(bool)", p ) + EXIT + CASE updateRequest + EXIT + #endif + ENDSWITCH + + RETURN Nil + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:execKeyEvent( nMode, nEvent, p, p1 ) + LOCAL key, kbm, txt, qEvent + LOCAL lAlt := .f. + LOCAL lCtrl := .f. + LOCAL lShift := .f. + + p1 := p1 + + SWITCH nEvent + CASE QEvent_KeyPress + + qEvent := QKeyEvent():configure( p ) + + key := qEvent:key() + kbm := qEvent:modifiers() + txt := qEvent:text() + + IF hb_bitAnd( kbm, Qt_AltModifier ) == Qt_AltModifier + lAlt := .t. + ENDIF + IF hb_bitAnd( kbm, Qt_ControlModifier ) == Qt_ControlModifier + lCtrl := .t. + ENDIF + IF hb_bitAnd( kbm, Qt_ShiftModifier ) == Qt_ShiftModifier + lShift := .t. + ENDIF + + IF ::oSC:execKey( key, lAlt, lCtrl, lShift ) + RETURN .f. + ENDIF + + SWITCH ( key ) + CASE Qt_Key_Space + IF !lAlt .AND. !lShift .AND. !lCtrl + ::lUpdatePrevWord := .t. + ENDIF + EXIT + CASE Qt_Key_Return + CASE Qt_Key_Enter + ::handlePreviousWord( .t. ) + ::lIndentIt := .t. + EXIT + CASE Qt_Key_Tab + IF lCtrl + ::blockIndent( 1 ) + RETURN .T. + ENDIF + EXIT + CASE Qt_Key_Backtab + IF lCtrl + ::blockIndent( -1 ) + RETURN .t. + ENDIF + EXIT + CASE Qt_Key_Q /* All these actions will be pulled from user-setup */ + IF lCtrl .AND. lShift + ::streamComment() + ENDIF + EXIT + CASE Qt_Key_Slash + IF lCtrl + ::blockComment() + ENDIF + EXIT + CASE Qt_Key_D + IF lCtrl + ::duplicateLine() + ENDIF + EXIT + CASE Qt_Key_K + IF lCtrl + ::presentSkeletons() + ENDIF + EXIT + CASE Qt_Key_Backspace + hbide_justACall( txt, lAlt, lShift, lCtrl, qEvent, nMode ) + EXIT + CASE Qt_Key_Delete + IF lCtrl + ::deleteLine() + RETURN .t. + ENDIF + EXIT + CASE Qt_Key_Up + IF lCtrl .AND. lShift + ::moveLine( -1 ) + RETURN .t. + ENDIF + EXIT + CASE Qt_Key_Down + IF lCtrl .AND. lShift + ::moveLine( 1 ) + RETURN .t. + ENDIF + EXIT + CASE Qt_Key_ParenLeft + IF ! lCtrl .AND. ! lAlt + ::loadFuncHelp() // Also invokes prototype display + ENDIF + EXIT + CASE Qt_Key_ParenRight + IF ! lCtrl .AND. ! lAlt + ::hidePrototype() + ENDIF + EXIT + CASE Qt_Key_T + IF lCtrl + ::gotoFunction() + ENDIF + EXIT + CASE Qt_Key_F1 + ::gotoFunction() + EXIT + ENDSWITCH + + EXIT + + CASE QEvent_Enter + CASE QEvent_FocusIn + ::resumePrototype() + EXIT + + CASE QEvent_Leave + CASE QEvent_FocusOut + ::suspendPrototype() + EXIT + + CASE QEvent_Wheel + EXIT + + CASE QEvent_MouseButtonDblClick + ::lCopyWhenDblClicked := .t. + EXIT + + CASE 1001 + IF p == QEvent_MouseButtonDblClick + ::lCopyWhenDblClicked := .f. /* not intuitive */ + ::clickFuncHelp() + + ELSEIF p == QEvent_Paint + // ::oIde:testPainter( p1 ) + + ELSEIF p == 21000 + ::aSelectionInfo := p1 + + ELSEIF p == 21001 + ::handlePreviousWord( .t. ) + + ELSEIF p == 21011 + ::copyBlockContents( p1 ) + + ELSEIF p == 21012 + ::pasteBlockContents( p1 ) + + ELSEIF p == 21013 + ::insertBlockContents( p1 ) + + ELSEIF p == 21014 + ::deleteBlockContents( p1 ) + + ENDIF + EXIT + + ENDSWITCH + + RETURN .F. /* Important */ + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:copyBlockContents( aCord ) + LOCAL nT, nL, nB, nR, nW, i, cLine, nMode + LOCAL cClip := "" + + hbide_normalizeRect( aCord, @nT, @nL, @nB, @nR ) + nMode := aCord[ 5 ] + + nW := nR - nL + FOR i := nT TO nB + cLine := ::getLine( i + 1 ) + + IF nMode == 1 /* Stream */ + IF i == 1 + cLine := substr( cLine, nL + 1 ) + ELSEIF i == nB + cLine := substr( cLine, 1, nR + 1 ) + ENDIF + + ELSEIF nMode == 2 /* Column */ + cLine := pad( substr( cLine, nL + 1, nW ), nW ) + + ELSEIF nMode == 3 /* Line */ + // Nothing to do, complete line is already pulled + + ENDIF + cClip += cLine + hb_osNewLine() + NEXT + + QClipboard():new():setText( cClip ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:pasteBlockContents( nMode ) + LOCAL i, nRow, nCol, qCursor, nMaxCol, aBlockCopyContents + + HB_SYMBOL_UNUSED( nMode ) + + aBlockCopyContents := hbide_memoToArray( QClipboard():new():text() ) + IF empty( aBlockCopyContents ) + RETURN Self + ENDIF + + qCursor := QTextCursor():from( ::qEdit:textCursor() ) + nCol := qCursor:columnNumber() + qCursor:beginEditBlock() + // + FOR i := 1 TO len( aBlockCopyContents ) + qCursor:insertText( aBlockCopyContents[ i ] ) + IF i < len( aBlockCopyContents ) + nRow := qCursor:blockNumber() + qCursor:movePosition( QTextCursor_Down, QTextCursor_MoveAnchor ) + IF qCursor:blockNumber() == nRow + qCursor:movePosition( QTextCursor_EndOfBlock, QTextCursor_MoveAnchor ) + qCursor:insertBlock() + qCursor:movePosition( QTextCursor_NextBlock, QTextCursor_MoveAnchor ) + ENDIF + qCursor:movePosition( QTextCursor_EndOfLine, QTextCursor_MoveAnchor ) + nMaxCol := qCursor:columnNumber() + IF nMaxCol < nCol + qCursor:insertText( replicate( " ", nCol - nMaxCol ) ) + ENDIF + qCursor:movePosition( QTextCursor_StartOfBlock, QTextCursor_MoveAnchor ) + qCursor:movePosition( QTextCursor_Right, QTextCursor_MoveAnchor, nCol ) + ENDIF + NEXT + // + qCursor:endEditBlock() + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:insertBlockContents( aCord ) + LOCAL nT, nL, nB, nR, nW, i, cLine, cKey, qCursor + + hbide_normalizeRect( aCord, @nT, @nL, @nB, @nR ) + + nW := nR - nL + + cKey := chr( XbpQKeyEventToAppEvent( aCord[ 5 ] ) ) + + qCursor := QTextCursor():from( ::qEdit:textCursor() ) + qCursor:beginEditBlock() + + IF nW == 0 + FOR i := nT TO nB + cLine := ::getLine( i + 1 ) + cLine := pad( substr( cLine, 1, nL ), nL ) + cKey + substr( cLine, nL + 1 ) + + qCursor:movePosition( QTextCursor_Start , QTextCursor_MoveAnchor ) + qCursor:movePosition( QTextCursor_Down , QTextCursor_MoveAnchor, i ) + qCursor:movePosition( QTextCursor_StartOfBlock, QTextCursor_MoveAnchor ) + qCursor:movePosition( QTextCursor_EndOfLine , QTextCursor_KeepAnchor ) + qCursor:insertText( cLine ) + NEXT + qCursor:movePosition( QTextCursor_Start, QTextCursor_MoveAnchor ) + qCursor:movePosition( QTextCursor_Down , QTextCursor_MoveAnchor, nB ) + qCursor:movePosition( QTextCursor_Right, QTextCursor_MoveAnchor, nR + 1 ) + ELSE + FOR i := nT TO nB + cLine := ::getLine( i + 1 ) + cLine := pad( substr( cLine, 1, nL ), nL ) + replicate( cKey, nW ) + substr( cLine, nR + 1 ) + + qCursor:movePosition( QTextCursor_Start , QTextCursor_MoveAnchor ) + qCursor:movePosition( QTextCursor_Down , QTextCursor_MoveAnchor, i ) + qCursor:movePosition( QTextCursor_StartOfBlock, QTextCursor_MoveAnchor ) + qCursor:movePosition( QTextCursor_EndOfLine , QTextCursor_KeepAnchor ) + qCursor:insertText( cLine ) + NEXT + qCursor:movePosition( QTextCursor_Start, QTextCursor_MoveAnchor ) + qCursor:movePosition( QTextCursor_Down , QTextCursor_MoveAnchor, nB ) + qCursor:movePosition( QTextCursor_Right, QTextCursor_MoveAnchor, nR ) + ENDIF + // + ::qEdit:setCursorWidth( 1 ) + ::qEdit:setTextCursor( qCursor ) + qCursor:endEditBlock() + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:deleteBlockContents( aCord ) + LOCAL nT, nL, nB, nR, nW, i, cLine, qCursor, k + + hbide_normalizeRect( aCord, @nT, @nL, @nB, @nR ) + k := aCord[ 5 ] + + IF k == Qt_Key_X + ::copyBlockContents( aCord ) + ENDIF + + nW := nR - nL + + qCursor := QTextCursor():from( ::qEdit:textCursor() ) + qCursor:beginEditBlock() + IF nW == 0 .AND. k == Qt_Key_Backspace + FOR i := nT TO nB + cLine := ::getLine( i + 1 ) + cLine := pad( substr( cLine, 1, nL - 1 ), nL - 1 ) + substr( cLine, nL + 1 ) + + qCursor:movePosition( QTextCursor_Start , QTextCursor_MoveAnchor ) + qCursor:movePosition( QTextCursor_Down , QTextCursor_MoveAnchor, i ) + qCursor:movePosition( QTextCursor_StartOfLine , QTextCursor_MoveAnchor ) + qCursor:movePosition( QTextCursor_EndOfLine , QTextCursor_KeepAnchor ) + qCursor:insertText( cLine ) + NEXT + qCursor:movePosition( QTextCursor_Start, QTextCursor_MoveAnchor ) + qCursor:movePosition( QTextCursor_Down , QTextCursor_MoveAnchor, nB ) + qCursor:movePosition( QTextCursor_Right, QTextCursor_MoveAnchor, nR - 1 ) + ELSE + IF k == Qt_Key_Delete .OR. k == Qt_Key_X + FOR i := nT TO nB + cLine := ::getLine( i + 1 ) + cLine := pad( substr( cLine, 1, nL ), nL ) + substr( cLine, nR + 1 ) + + qCursor:movePosition( QTextCursor_Start , QTextCursor_MoveAnchor ) + qCursor:movePosition( QTextCursor_Down , QTextCursor_MoveAnchor, i ) + qCursor:movePosition( QTextCursor_StartOfLine , QTextCursor_MoveAnchor ) + qCursor:movePosition( QTextCursor_EndOfLine , QTextCursor_KeepAnchor ) + qCursor:insertText( cLine ) + NEXT + qCursor:movePosition( QTextCursor_Start, QTextCursor_MoveAnchor ) + qCursor:movePosition( QTextCursor_Down , QTextCursor_MoveAnchor, nT ) + qCursor:movePosition( QTextCursor_Right, QTextCursor_MoveAnchor, nL ) + ENDIF + ENDIF + // + ::qEdit:setTextCursor( qCursor ) + qCursor:endEditBlock() + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:markCurrentFunction() + LOCAL n, nCurLine + + IF ::nPrevLineNo1 != ::getLineNo() + ::nPrevLineNo1 := ::getLineNo() + + IF !empty( ::aTags ) + nCurLine := ::getLineNo() + IF len( ::aTags ) == 1 + n := 1 + ELSEIF ( n := ascan( ::aTags, {|e_| e_[ 3 ] >= nCurLine } ) ) == 0 + n := len( ::aTags ) + ELSEIF n > 0 + n-- + ENDIF + IF n > 0 + ::oIde:oFuncList:setItemColorFG( n, { 255,0,0 } ) + ENDIF + ENDIF + ENDIF + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:presentSkeletons() + ::oSK:selectByMenuAndPostText( ::qEdit ) + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:toggleLineNumbers() + ::qEdit:hbNumberBlockVisible( ::lLineNumbersVisible ) + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:toggleSelectionMode() + ::qEdit:hbHighlightSelectedColumns( ::isColumnSelectionEnabled ) + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:toggleLineSelectionMode() + ::isLineSelectionMode := ! ::isLineSelectionMode + ::qEdit:hbSetSelectionMode( 3, ::isLineSelectionMode ) + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:redo() + ::qEdit:redo() + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:undo() + ::qEdit:undo() + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:cut() + ::qEdit:hbCut() + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:copy() + ::qEdit:hbCopy() + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:paste() + ::qEdit:hbPaste() + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:selectAll() + ::qEdit:selectAll() + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:setReadOnly() + ::qEdit:setReadOnly( .t. ) // ! ::qEdit:isReadOnly() ) + ::oEditor:setTabImage() + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:gotoMark( nIndex ) + IF len( ::aBookMarks ) >= nIndex + ::qEdit:hbGotoBookmark( ::aBookMarks[ nIndex ] ) + ::qEdit:centerCursor() + ENDIF + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:relayMarkButtons() + LOCAL oBtn + FOR EACH oBtn IN ::aMarkTBtns + oBtn:hide() + NEXT + FOR EACH oBtn IN ::aBookMarks + ::aMarkTBtns[ oBtn:__enumIndex() ]:show() + NEXT + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:setNewMark() + LOCAL qCursor, nBlock, n + + IF !( qCursor := QTextCursor():configure( ::qEdit:textCursor() ) ):isNull() + nBlock := qCursor:blockNumber() + 1 + + IF ( n := ascan( ::aBookMarks, nBlock ) ) > 0 + hb_adel( ::aBookMarks, n, .t. ) + ::aMarkTBtns[ len( ::aBookMarks ) + 1 ]:hide() + ELSE + IF len( ::aBookMarks ) == 6 + RETURN Self + ENDIF + aadd( ::aBookMarks, nBlock ) + n := len( ::aBookMarks ) + ::aMarkTBtns[ n ]:show() + ENDIF + + ::qEdit:hbBookMarks( nBlock ) + ENDIF + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:setLineNumbersBkColor( nR, nG, nB ) + ::qEdit:hbSetLineAreaBkColor( QColor():new( nR, nG, nB ) ) + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:setCurrentLineColor( nR, nG, nB ) + ::qEdit:hbSetCurrentLineColor( QColor():new( nR, nG, nB ) ) + RETURN Self + +/*----------------------------------------------------------------------*/ +/* TO BE EXTENDED */ +METHOD IdeEdit:find( cText, nPosFrom ) + LOCAL lFound, nPos + LOCAL qCursor := ::getCursor() + + nPos := qCursor:position() + IF hb_isNumeric( nPosFrom ) + qCursor:setPosition( nPosFrom ) + ENDIF + ::qEdit:setTextCursor( qCursor ) + IF ( lFound := ::qEdit:find( cText, QTextDocument_FindCaseSensitively ) ) + ::qEdit:centerCursor() + ELSE + qCursor:setPosition( nPos ) + ::qEdit:setTextCursor( qCursor ) + ENDIF + + RETURN lFound + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:refresh() + ::qEdit:hbRefresh() + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:home() + LOCAL qCursor := ::getCursor() + + qCursor:movePosition( QTextCursor_StartOfBlock ) + ::qEdit:setTextCursor( qCursor ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:down() + LOCAL qCursor := QTextCursor():configure( ::qEdit:textCursor() ) + + qCursor:movePosition( QTextCursor_Down ) + ::qEdit:setTextCursor( qCursor ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:up() + LOCAL qCursor := QTextCursor():configure( ::qEdit:textCursor() ) + + qCursor:movePosition( QTextCursor_Up ) + ::qEdit:setTextCursor( qCursor ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:duplicateLine() + ::qEdit:hbDuplicateLine() + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:deleteLine() + ::qEdit:hbDeleteLine() + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:moveLine( nDirection ) + ::qEdit:hbMoveLine( nDirection ) + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:blockComment() + ::qEdit:hbBlockComment() + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:streamComment() + ::qEdit:hbStreamComment() + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:blockIndent( nMode ) + ::qEdit:hbBlockIndent( nMode ) + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:caseUpper() + ::qEdit:hbCaseUpper() + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:caseLower() + ::qEdit:hbCaseLower() + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:convertQuotes() + ::qEdit:hbConvertQuotes() + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:convertDQuotes() + ::qEdit:hbConvertDQuotes() + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:caseInvert() + LOCAL i, c, s, cBuffer, nLen + + IF !empty( cBuffer := ::getSelectedText() ) + s := "" + nLen := len( cBuffer ) + FOR i := 1 TO nLen + c := substr( cBuffer, i, 1 ) + IF isAlpha( c ) + s += iif( isUpper( c ), lower( c ), upper( c ) ) + ELSE + s += c + ENDIF + NEXT + ::qEdit:hbReplaceSelection( s ) + ENDIF + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:getSelectedText() + RETURN ::qEdit:hbGetSelectedText() + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:getText() + RETURN QTextCursor():from( ::qEdit:textCursor() ):selectedText() + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:getWord( lSelect ) + LOCAL cText, qCursor := QTextCursor():configure( ::qEdit:textCursor() ) + + DEFAULT lSelect TO .F. + + qCursor:select( QTextCursor_WordUnderCursor ) + cText := qCursor:selectedText() + + IF lSelect + ::qEdit:setTextCursor( qCursor ) + ENDIF + RETURN cText + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:goto( nLine ) + LOCAL qCursor := QTextCursor():configure( ::qEdit:textCursor() ) + + qCursor:movePosition( QTextCursor_Start ) + qCursor:movePosition( QTextCursor_Down, QTextCursor_MoveAnchor, nLine - 1 ) + ::qEdit:setTextCursor( qCursor ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:getLine( nLine, lSelect ) + LOCAL cText, qCursor := QTextCursor():configure( ::qEdit:textCursor() ) + + DEFAULT nLine TO qCursor:blockNumber() + 1 + DEFAULT lSelect TO .F. + + IF nLine != qCursor:blockNumber() + 1 + qCursor:movePosition( QTextCursor_Start ) + qCursor:movePosition( QTextCursor_Down, QTextCursor_MoveAnchor, nLine - 1 ) + ENDIF + + qCursor:select( QTextCursor_LineUnderCursor ) + cText := qCursor:selectedText() + IF lSelect + ::qEdit:setTextCursor( qCursor ) + ENDIF + + RETURN cText + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:getColumnNo() + RETURN QTextCursor():from( ::qEdit:textCursor() ):columnNumber() + 1 + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:getLineNo() + RETURN QTextCursor():from( ::qEdit:textCursor() ):blockNumber() + 1 + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:insertSeparator( cSep ) + LOCAL qCursor := QTextCursor():configure( ::qEdit:textCursor() ) + + IF empty( cSep ) + cSep := ::cSeparator + ENDIF + qCursor:beginEditBlock() + qCursor:movePosition( QTextCursor_StartOfBlock ) + qCursor:insertBlock() + qCursor:movePosition( QTextCursor_PreviousBlock ) + qCursor:insertText( cSep ) + qCursor:movePosition( QTextCursor_NextBlock ) + qCursor:movePosition( QTextCursor_StartOfBlock ) + qCursor:endEditBlock() + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:insertText( cText ) + LOCAL qCursor, nL, nB + + IF !Empty( cText ) + qCursor := QTextCursor():configure( ::qEdit:textCursor() ) + + nL := len( cText ) + nB := qCursor:position() + nL + + qCursor:beginEditBlock() + qCursor:removeSelectedText() + qCursor:insertText( cText ) + qCursor:setPosition( nB ) + qCursor:endEditBlock() + ENDIF + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:handlePreviousWord( lUpdatePrevWord ) + LOCAL qCursor, qTextBlock, cText, cWord, nB, nL, qEdit, lPrevOnly, nCol, nSpace, nSpaces, nOff + + * HB_TRACE( HB_TR_ALWAYS, "IdeEdit:handlePreviousWord( lUpdatePrevWord )", lUpdatePrevWord ) + + IF ! lUpdatePrevWord + RETURN Self + ENDIF + ::lUpdatePrevWord := .f. + + qEdit := ::qEdit + + qCursor := QTextCursor():configure( qEdit:textCursor() ) + qTextBlock := QTextBlock():configure( qCursor:block() ) + cText := qTextBlock:text() + nCol := qCursor:columnNumber() + IF ( substr( cText, nCol - 1, 1 ) == " " ) + RETURN nil + ENDIF + nSpace := iif( substr( cText, nCol, 1 ) == " ", 1, 0 ) + cWord := hbide_getPreviousWord( cText, nCol + 1 ) + + IF !empty( cWord ) .AND. hbide_isHarbourKeyword( cWord ) + lPrevOnly := left( lower( ltrim( cText ) ), len( cWord ) ) == lower( cWord ) + + nL := len( cWord ) + nSpace + nB := qCursor:position() - nL + + IF ::oEditor:cExt $ ".prg" + qCursor:beginEditBlock() + qCursor:setPosition( nB ) + qCursor:movePosition( QTextCursor_NextCharacter, QTextCursor_KeepAnchor, nL ) + qCursor:removeSelectedText() + qCursor:insertText( upper( cWord ) + space( nSpace ) ) + qCursor:endEditBlock() + qEdit:setTextCursor( qCursor ) + ENDIF + + IF hbide_isStartingKeyword( cWord ) + IF lPrevOnly + qCursor:setPosition( nB ) + IF ( nCol := qCursor:columnNumber() ) > 0 + qCursor:beginEditBlock() + qCursor:movePosition( QTextCursor_StartOfBlock ) + qCursor:movePosition( QTextCursor_NextCharacter, QTextCursor_KeepAnchor, nCol ) + qCursor:removeSelectedText() + qCursor:movePosition( QTextCursor_NextCharacter, QTextCursor_MoveAnchor, nL ) + qCursor:endEditBlock() + qEdit:setTextCursor( qCursor ) + ENDIF + ENDIF + + ELSEIF hbide_isMinimumIndentableKeyword( cWord ) + IF lPrevOnly + qCursor:setPosition( nB ) + IF ( nCol := qCursor:columnNumber() ) >= 0 + qCursor:beginEditBlock() + qCursor:movePosition( QTextCursor_StartOfBlock ) + qCursor:movePosition( QTextCursor_NextCharacter, QTextCursor_KeepAnchor, nCol ) + qCursor:removeSelectedText() + qCursor:insertText( space( ::nTabSpaces ) ) + qCursor:movePosition( QTextCursor_NextCharacter, QTextCursor_MoveAnchor, nL ) + qEdit:setTextCursor( qCursor ) + qCursor:endEditBlock() + ENDIF + ENDIF + + ELSEIF hbide_isIndentableKeyword( cWord ) + IF lPrevOnly + nSpaces := hbide_getFrontSpacesAndWord( cText ) + IF nSpaces > 0 .AND. ( nOff := nSpaces % ::nTabSpaces ) > 0 + qCursor:setPosition( nB ) + qCursor:beginEditBlock() + qCursor:movePosition( QTextCursor_PreviousCharacter, QTextCursor_KeepAnchor, nOff ) + qCursor:removeSelectedText() + qCursor:movePosition( QTextCursor_NextCharacter, QTextCursor_MoveAnchor, nL ) + qEdit:setTextCursor( qCursor ) + qCursor:endEditBlock() + ENDIF + ENDIF + ENDIF + ENDIF + + RETURN .t. + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:findLastIndent() + LOCAL qCursor, qTextBlock, cText, cWord + LOCAL nSpaces := 0 + + qCursor := QTextCursor():configure( ::qEdit:textCursor() ) + qTextBlock := QTextBlock():configure( qCursor:block() ) + + qTextBlock := QTextBlock():configure( qTextBlock:previous() ) + DO WHILE .t. + IF !( qTextBlock:isValid() ) + EXIT + ENDIF + IF !empty( cText := qTextBlock:text() ) + nSpaces := hbide_getFrontSpacesAndWord( cText, @cWord ) + IF !empty( cWord ) + IF hbide_isIndentableKeyword( cWord ) + nSpaces += ::nTabSpaces + ENDIF + EXIT + ENDIF + ENDIF + qTextBlock := QTextBlock():configure( qTextBlock:previous() ) + ENDDO + + RETURN nSpaces + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:handleCurrentIndent() + LOCAL qCursor, nSpaces + + IF ::lIndentIt + ::lIndentIt := .f. + IF ( nSpaces := ::findLastIndent() ) > 0 + qCursor := QTextCursor():configure( ::qEdit:textCursor() ) + qCursor:insertText( space( nSpaces ) ) + ENDIF + ENDIF + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:gotoFunction() + LOCAL cWord + IF !empty( cWord := ::getWord( .f. ) ) + ::oFN:jumpToFunction( cWord, .t. ) + ENDIF + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:clickFuncHelp() + LOCAL cWord + IF !empty( cWord := ::getWord( .f. ) ) + IF ! empty( ::oHL ) + ::oHL:jumpToFunction( cWord ) + ENDIF + ENDIF + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:loadFuncHelp() + LOCAL qEdit, qCursor, qTextBlock, cText, cWord, nCol, cPro + + qEdit := ::qEdit + qCursor := QTextCursor():configure( qEdit:textCursor() ) + qTextBlock := QTextBlock():configure( qCursor:block() ) + cText := qTextBlock:text() + nCol := qCursor:columnNumber() + cWord := hbide_getPreviousWord( cText, nCol ) + + IF !empty( cWord ) + IF ! empty( ::oHL ) + ::oHL:jumpToFunction( cWord ) + ENDIF + IF !empty( cPro := ::oFN:positionToFunction( cWord, .t. ) ) + IF empty( ::cProto ) + ::showPrototype( ::cProto := hbide_formatProto( cPro ) ) + ENDIF + ENDIF + ENDIF + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:resumePrototype() + + ::isSuspended := .f. + IF !empty( ::qEdit ) + IF ::getLineNo() == ::nProtoLine .AND. ::getColumnNo() >= ::nProtoCol + ::qEdit:hbShowPrototype( ::cProto ) + ENDIF + ENDIF + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:suspendPrototype() + + ::isSuspended := .t. + IF !empty( ::qEdit ) + ::qEdit:hbShowPrototype( "" ) + ENDIF + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:showPrototype( cProto ) + + IF ! ::isSuspended .AND. !empty( ::qEdit ) + IF !empty( cProto ) + ::cProto := cProto + ::nProtoLine := ::getLineNo() + ::nProtoCol := ::getColumnNo() + ::qTimer:start() + ENDIF + ::qEdit:hbShowPrototype( ::cProto ) + ENDIF + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:hidePrototype() + + IF !empty( ::qedit ) + ::nProtoLine := -1 + ::nProtoCol := -1 + ::cProto := "" + ::qTimer:stop() + ::qEdit:hbShowPrototype( "" ) + ENDIF + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeEdit:completeCode( p ) + LOCAL qCursor := QTextCursor():from( ::qEdit:textCursor() ) + + qCursor:movePosition( QTextCursor_Left ) + + qCursor:movePosition( QTextCursor_StartOfWord ) + qCursor:movePosition( QTextCursor_EndOfWord, QTextCursor_KeepAnchor ) + qCursor:insertText( p ) + qCursor:movePosition( QTextCursor_Left ) + qCursor:movePosition( QTextCursor_Right ) + + ::qEdit:setTextCursor( qCursor ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + +FUNCTION hbide_getPreviousWord( cText, nPos ) + LOCAL cWord, n + + cText := alltrim( substr( cText, 1, nPos ) ) + IF ( n := rat( " ", cText ) ) > 0 + cWord := substr( cText, n + 1 ) + ELSE + cWord := cText + ENDIF + + RETURN cWord + +/*----------------------------------------------------------------------*/ + +FUNCTION hbide_getFirstWord( cText ) + LOCAL cWord, n + + cText := alltrim( cText ) + IF ( n := at( " ", cText ) ) > 0 + cWord := left( cText, n-1 ) + ELSE + cWord := cText + ENDIF + + RETURN cWord + +/*----------------------------------------------------------------------*/ + +FUNCTION hbide_getFrontSpacesAndWord( cText, cWord ) + LOCAL n := 0 + + DO WHILE .t. + IF substr( cText, ++n, 1 ) != " " + EXIT + ENDIF + ENDDO + n-- + + cWord := hbide_getFirstWord( cText ) + + RETURN n + +/*----------------------------------------------------------------------*/ + +FUNCTION hbide_isStartingKeyword( cWord ) + STATIC s_b_ := { ; + 'function' => NIL,; + 'class' => NIL,; + 'method' => NIL } + + RETURN Lower( cWord ) $ s_b_ + +/*----------------------------------------------------------------------*/ + +FUNCTION hbide_isMinimumIndentableKeyword( cWord ) + STATIC s_b_ := { ; + 'local' => NIL,; + 'static' => NIL,; + 'return' => NIL,; + 'default' => NIL } + + RETURN Lower( cWord ) $ s_b_ + +/*----------------------------------------------------------------------*/ + +FUNCTION hbide_isIndentableKeyword( cWord ) + STATIC s_b_ := { ; + 'if' => NIL,; + 'else' => NIL,; + 'elseif' => NIL,; + 'docase' => NIL,; + 'case' => NIL,; + 'otherwise' => NIL,; + 'do' => NIL,; + 'while' => NIL,; + 'switch' => NIL,; + 'for' => NIL,; + 'next' => NIL,; + 'begin' => NIL,; + 'sequence' => NIL,; + 'try' => NIL,; + 'catch' => NIL,; + 'always' => NIL,; + 'recover' => NIL,; + 'finally' => NIL } + + RETURN Lower( cWord ) $ s_b_ + +/*----------------------------------------------------------------------*/ + +FUNCTION hbide_isHarbourKeyword( cWord ) + STATIC s_b_ := { ; + 'function' => NIL,; + 'return' => NIL,; + 'static' => NIL,; + 'local' => NIL,; + 'default' => NIL,; + 'if' => NIL,; + 'else' => NIL,; + 'elseif' => NIL,; + 'endif' => NIL,; + 'end' => NIL,; + 'endswitch' => NIL,; + 'docase' => NIL,; + 'case' => NIL,; + 'endcase' => NIL,; + 'otherwise' => NIL,; + 'switch' => NIL,; + 'do' => NIL,; + 'while' => NIL,; + 'enddo' => NIL,; + 'exit' => NIL,; + 'for' => NIL,; + 'each' => NIL,; + 'next' => NIL,; + 'step' => NIL,; + 'to' => NIL,; + 'class' => NIL,; + 'endclass' => NIL,; + 'method' => NIL,; + 'data' => NIL,; + 'var' => NIL,; + 'destructor' => NIL,; + 'inline' => NIL,; + 'setget' => NIL,; + 'assign' => NIL,; + 'access' => NIL,; + 'inherit' => NIL,; + 'init' => NIL,; + 'create' => NIL,; + 'virtual' => NIL,; + 'message' => NIL,; + 'begin' => NIL,; + 'sequence' => NIL,; + 'try' => NIL,; + 'catch' => NIL,; + 'always' => NIL,; + 'recover' => NIL,; + 'hb_symbol_unused' => NIL,; + 'error' => NIL,; + 'handler' => NIL,; + 'nil' => NIL,; + 'or' => NIL,; + 'and' => NIL } + + RETURN Lower( cWord ) $ s_b_ + +/*----------------------------------------------------------------------*/ + +FUNCTION hbide_formatProto( cProto ) + LOCAL n, n1, cArgs + + n := at( "(", cProto ) + n1 := at( ")", cProto ) + + IF n > 0 .AND. n1 > 0 + cArgs := substr( cProto, n + 1, n1 - n - 1 ) + cArgs := strtran( cArgs, ",", "" + "," + "" ) + cProto := "

" + "" + substr( cProto, 1, n - 1 ) + "" + ; + "" + "(" + "" + ; + cArgs + ; + "" + ")" + "" + "

" + ENDIF + RETURN cProto + +/*----------------------------------------------------------------------*/ + +STATIC FUNCTION hbide_normalizeRect( aCord, nT, nL, nB, nR ) + nT := iif( aCord[ 1 ] > aCord[ 3 ], aCord[ 3 ], aCord[ 1 ] ) + nB := iif( aCord[ 1 ] > aCord[ 3 ], aCord[ 1 ], aCord[ 3 ] ) + nL := iif( aCord[ 2 ] > aCord[ 4 ], aCord[ 4 ], aCord[ 2 ] ) + nR := iif( aCord[ 2 ] > aCord[ 4 ], aCord[ 2 ], aCord[ 4 ] ) + RETURN NIL + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbide/ideeditor.prg b/harbour/contrib/hbide/ideeditor.prg index 4124ad13e1..1a33ff9a76 100644 --- a/harbour/contrib/hbide/ideeditor.prg +++ b/harbour/contrib/hbide/ideeditor.prg @@ -636,11 +636,11 @@ METHOD IdeEditsManager:convertDQuotes() RETURN Self /*----------------------------------------------------------------------*/ -//// + METHOD IdeEditsManager:switchToReadOnly() - IF !empty( ::qCurEdit ) - ::qCurEdit:setReadOnly( !( ::qCurEdit:isReadOnly() ) ) - ::oCurEditor:setTabImage() + LOCAL oEdit + IF !empty( oEdit := ::getEditObjectCurrent() ) + oEdit:setReadOnly() ENDIF RETURN Self @@ -1030,8 +1030,6 @@ METHOD IdeEditor:new( oIde, cSourceFile, nPos, nHPos, nVPos, cTheme, cView ) METHOD IdeEditor:create( oIde, cSourceFile, nPos, nHPos, nVPos, cTheme, cView, aBookMarks ) LOCAL cFileTemp - //::qSlots := HBSlots():new() - DEFAULT oIde TO ::oIde DEFAULT cSourceFile TO ::sourceFile DEFAULT nPos TO ::nPos @@ -1160,7 +1158,7 @@ METHOD IdeEditor:destroy() ::oIde:lDockRVisible := .f. ENDIF ENDIF -//HB_TRACE( HB_TR_ALWAYS, "IdeEditor:destroy()", 1, "-------------------------------------" ) + RETURN Self /*----------------------------------------------------------------------*/ @@ -1385,1560 +1383,3 @@ METHOD IdeEditor:applyTheme( cTheme ) RETURN Self /*----------------------------------------------------------------------*/ -// Class IdeEdit -// Holds One QPlainTextEdit with its ancilliary Components -/*----------------------------------------------------------------------*/ - -CLASS IdeEdit INHERIT IdeObject - - DATA oEditor - - DATA qEdit - DATA qHLayout - DATA nOrient INIT 0 - - DATA nMode INIT 0 - DATA nLineNo INIT -99 - DATA nMaxDigits INIT 5 // Tobe - DATA nMaxRows INIT 100 - DATA nLastLine INIT -99 - DATA nCurLineNo INIT 0 - DATA nPrevLineNo INIT -1 - DATA nPrevLineNo1 INIT -1 - - DATA aBookMarks INIT {} - - DATA lModified INIT .F. - DATA lIndentIt INIT .f. - DATA lUpdatePrevWord INIT .f. - DATA lCopyWhenDblClicked INIT .f. - DATA cCurLineText INIT "" - - DATA cProto INIT "" - DATA qTimer - DATA nProtoLine INIT -1 - DATA nProtoCol INIT -1 - DATA isSuspended INIT .f. - - DATA fontFamily INIT "Courier New" - DATA pointSize INIT 10 - DATA currentPointSize INIT 10 - DATA qFont - DATA aBlockCopyContents INIT {} - DATA isLineSelectionMode INIT .f. - - METHOD new( oEditor, nMode ) - METHOD create( oEditor, nMode ) - METHOD destroy() - METHOD execEvent( nMode, oEdit, p, p1 ) - METHOD execKeyEvent( nMode, nEvent, p, p1 ) - METHOD connectEditSignals( oEdit ) - METHOD disconnectEditSignals( oEdit ) - - METHOD redo() - METHOD undo() - METHOD cut() - METHOD copy() - METHOD paste() - METHOD selectAll() - METHOD toggleSelectionMode() - - METHOD setNewMark() - METHOD gotoMark( nIndex ) - METHOD duplicateLine() - METHOD deleteLine() - METHOD blockComment() - METHOD streamComment() - METHOD blockIndent( nMode ) - METHOD moveLine( nDirection ) - METHOD caseUpper() - METHOD caseLower() - METHOD caseInvert() - METHOD convertQuotes() - METHOD convertDQuotes() - METHOD findLastIndent() - METHOD reLayMarkButtons() - METHOD presentSkeletons() - METHOD handleCurrentIndent() - METHOD handlePreviousWord( lUpdatePrevWord ) - METHOD loadFuncHelp() - METHOD clickFuncHelp() - METHOD goto( nLine ) - METHOD gotoFunction() - METHOD toggleLineNumbers() - METHOD toggleLineSelectionMode() - - METHOD getWord( lSelect ) - METHOD getLine( nLine, lSelect ) - METHOD getText() - METHOD getSelectedText() - METHOD getColumnNo() - METHOD getLineNo() - METHOD insertSeparator( cSep ) - METHOD insertText( cText ) - - METHOD suspendPrototype() - METHOD resumePrototype() - METHOD showPrototype( cProto ) - METHOD hidePrototype() - METHOD completeCode( p ) - - METHOD setLineNumbersBkColor( nR, nG, nB ) - METHOD setCurrentLineColor( nR, nG, nB ) - METHOD getCursor() INLINE QTextCursor():from( ::qEdit:textCursor() ) - METHOD down() - METHOD up() - METHOD home() - METHOD find( cText, nPosFrom ) - METHOD refresh() - METHOD isModified() INLINE ::oEditor:qDocument:isModified() - METHOD setFont() - METHOD markCurrentFunction() - METHOD copyBlockContents( aCord ) - METHOD pasteBlockContents( nMode ) - METHOD insertBlockContents( aCord ) - METHOD deleteBlockContents( aCord ) - METHOD zoom( nKey ) - - ENDCLASS - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:new( oEditor, nMode ) - - ::oEditor := oEditor - ::nMode := nMode - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:create( oEditor, nMode ) - LOCAL nBlock - - DEFAULT oEditor TO ::oEditor - DEFAULT nMode TO ::nMode - - ::oEditor := oEditor - ::nMode := nMode - ::oIde := ::oEditor:oIde - - ::qEdit := HBQPlainTextEdit():new() - // - ::qEdit:setLineWrapMode( QTextEdit_NoWrap ) - ::qEdit:ensureCursorVisible() - ::qEdit:setContextMenuPolicy( Qt_CustomContextMenu ) - ::qEdit:installEventFilter( ::pEvents ) - ::qEdit:setTabChangesFocus( .f. ) - - ::setFont() - - ::qEdit:hbHighlightCurrentLine( .t. ) /* Via user-setup */ - ::qEdit:hbSetSpaces( ::nTabSpaces ) - - ::qEdit:hbSetCompleter( ::qCompleter ) - - ::toggleLineNumbers() - - FOR EACH nBlock IN ::aBookMarks - ::qEdit:hbBookMarks( nBlock ) - NEXT - - ::qHLayout := QHBoxLayout():new() - ::qHLayout:setSpacing( 0 ) - - ::qHLayout:addWidget( ::qEdit ) - - ::connectEditSignals( Self ) - - Qt_Events_Connect( ::pEvents, ::qEdit, QEvent_KeyPress , {|p| ::execKeyEvent( 101, QEvent_KeyPress, p ) } ) - Qt_Events_Connect( ::pEvents, ::qEdit, QEvent_Wheel , {|p| ::execKeyEvent( 102, QEvent_Wheel , p ) } ) - Qt_Events_Connect( ::pEvents, ::qEdit, QEvent_FocusIn , {| | ::execKeyEvent( 104, QEvent_FocusIn ) } ) - Qt_Events_Connect( ::pEvents, ::qEdit, QEvent_FocusOut , {| | ::execKeyEvent( 105, QEvent_FocusOut ) } ) - Qt_Events_Connect( ::pEvents, ::qEdit, QEvent_MouseButtonDblClick, {|p| ::execKeyEvent( 103, QEvent_MouseButtonDblClick, p ) } ) - - ::qEdit:hbSetEventBlock( {|p,p1| ::execKeyEvent( 115, 1001, p, p1 ) } ) - - ::qTimer := QTimer():new() - ::qTimer:setInterval( 2000 ) - ::connect( ::qTimer, "timeout()", {|| ::execEvent( timerTimeout, Self ) } ) - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:zoom( nKey ) - - DEFAULT nKey TO 0 - - IF nKey == 1 - IF ::currentPointSize + 1 < 30 - ::currentPointSize++ - ENDIF - - ELSEIF nKey == -1 - IF ::currentPointSize - 1 > 5 - ::currentPointSize-- - ENDIF - - ELSEIF nKey == 0 - ::currentPointSize := ::pointSize - - ELSEIF nKey >= 5 .AND. nKey <= 30 - ::currentPointSize := nKey - - ELSE - RETURN Self - - ENDIF - - ::setFont() - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:setFont() - - ::qFont := QFont():new() - ::qFont:setFamily( ::fontFamily ) - ::qFont:setFixedPitch( .t. ) - ::qFont:setPointSize( ::currentPointSize ) - - ::qEdit:setFont( ::qFont ) - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:destroy() - - ::disconnect( ::qTimer, "timeout()" ) - IF ::qTimer:isActive() - ::qTimer:stop() - ENDIF - ::qTimer := NIL - - Qt_Events_DisConnect( ::pEvents, ::qEdit, QEvent_KeyPress ) - Qt_Events_DisConnect( ::pEvents, ::qEdit, QEvent_Wheel ) - Qt_Events_DisConnect( ::pEvents, ::qEdit, QEvent_FocusIn ) - Qt_Events_DisConnect( ::pEvents, ::qEdit, QEvent_FocusOut ) - Qt_Events_DisConnect( ::pEvents, ::qEdit, QEvent_MouseButtonDblClick ) - - ::disconnectEditSignals( Self ) - - ::oEditor:qLayout:removeItem( ::qHLayout ) - // - ::qHLayout:removeWidget( ::qEdit ) - ::qEdit := NIL - ::qHLayout := NIL - ::qFont := NIL - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:disconnectEditSignals( oEdit ) - HB_SYMBOL_UNUSED( oEdit ) - - ::disConnect( oEdit:qEdit, "customContextMenuRequested(QPoint)" ) - ::disConnect( oEdit:qEdit, "textChanged()" ) - ::disConnect( oEdit:qEdit, "selectionChanged()" ) - ::disConnect( oEdit:qEdit, "cursorPositionChanged()" ) - ::disConnect( oEdit:qEdit, "copyAvailable(bool)" ) - - #if 0 - ::disConnect( oEdit:qEdit, "modificationChanged(bool)" ) - ::disConnect( oEdit:qEdit, "updateRequest(QRect,int)" ) - ::disConnect( oEdit:qEdit, "redoAvailable(bool)" ) - ::disConnect( oEdit:qEdit, "undoAvailable(bool)" ) - #endif - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:connectEditSignals( oEdit ) - HB_SYMBOL_UNUSED( oEdit ) - - ::connect( oEdit:qEdit, "customContextMenuRequested(QPoint)", {|p | ::execEvent( 1, oEdit, p ) } ) - ::Connect( oEdit:qEdit, "textChanged()" , {| | ::execEvent( 2, oEdit, ) } ) - ::Connect( oEdit:qEdit, "selectionChanged()" , {|p | ::execEvent( 6, oEdit, p ) } ) - ::Connect( oEdit:qEdit, "cursorPositionChanged()" , {| | ::execEvent( 9, oEdit, ) } ) - ::Connect( oEdit:qEdit, "copyAvailable(bool)" , {|p | ::execEvent( 3, oEdit, p ) } ) - - #if 0 - ::Connect( oEdit:qEdit, "modificationChanged(bool)" , {|p | ::execEvent( 4, oEdit, p ) } ) - ::Connect( oEdit:qEdit, "updateRequest(QRect,int)" , {|p,p1| ::execEvent( 8, oEdit, p, p1 ) } ) - ::Connect( oEdit:qEdit, "redoAvailable(bool)" , {|p | ::execEvent( 5, oEdit, p ) } ) - ::Connect( oEdit:qEdit, "undoAvailable(bool)" , {|p | ::execEvent( 7, oEdit, p ) } ) - #endif - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:execEvent( nMode, oEdit, p, p1 ) - LOCAL pAct, qAct, n, qCursor, qEdit, oo, nLine - - HB_SYMBOL_UNUSED( p1 ) - - qEdit := oEdit:qEdit - qCursor := QTextCursor():configure( qEdit:textCursor() ) - oEdit:nCurLineNo := qCursor:blockNumber() - - SWITCH nMode - - CASE customContextMenuRequested - QAction():from( ::oEM:aActions[ 17, 2 ] ):setEnabled( !empty( qCursor:selectedText() ) ) - - pAct := ::oEM:qContextMenu:exec_1( qEdit:mapToGlobal( p ) ) - IF !hbqt_isEmptyQtPointer( pAct ) - qAct := QAction():configure( pAct ) - DO CASE - CASE qAct:text() == "Split Horizontally" - ::oEditor:split( 1, oEdit ) - CASE qAct:text() == "Split Vertically" - ::oEditor:split( 2, oEdit ) - CASE qAct:text() == "Close Split Window" - IF ( n := ascan( ::oEditor:aEdits, {|o| o == oEdit } ) ) > 0 /* 1 == Main Edit */ - oo := ::oEditor:aEdits[ n ] - hb_adel( ::oEditor:aEdits, n, .t. ) - oo:destroy() - ::oEditor:relay() - ::oEditor:qCqEdit := ::oEditor:qEdit - ::oEditor:qCoEdit := ::oEditor:oEdit - ::oIde:manageFocusInEditor() - ENDIF - CASE qAct:text() == "Save as Skeleton..." - ::oSK:saveAs( ::getSelectedText() ) - CASE qAct:text() == "Apply Theme" - ::oEditor:applyTheme() - CASE qAct:text() == "Goto Function" - ::gotoFunction() - ENDCASE - ENDIF - EXIT - - CASE textChanged - //HB_TRACE( HB_TR_ALWAYS, "textChanged()" ) - ::oEditor:setTabImage( qEdit ) - EXIT - - CASE selectionChanged - //HB_TRACE( HB_TR_ALWAYS, "selectionChanged()" ) - ::oEditor:qCqEdit := qEdit - ::oEditor:qCoEdit := oEdit - - qCursor := QTextCursor():configure( qEdit:TextCursor() ) - - /* Book Marks reach-out buttons */ - ::relayMarkButtons() - ::toggleLineNumbers() - - ::updateTitleBar() - - /* An experimental move but seems a lot is required to achieve column selection */ - qEdit:hbHighlightSelectedColumns( ::isColumnSelectionEnabled ) - - ::oDK:setStatusText( SB_PNL_SELECTEDCHARS, len( qCursor:selectedText() ) ) - EXIT - - CASE cursorPositionChanged - //HB_TRACE( HB_TR_ALWAYS, "cursorPositionChanged()", ::nProtoLine, ::nProtoCol, ::isSuspended, ::getLineNo(), ::getColumnNo(), ::cProto ) - ::oEditor:dispEditInfo( qEdit ) - ::handlePreviousWord( ::lUpdatePrevWord ) - ::handleCurrentIndent() - - ::markCurrentFunction() - - IF ::nProtoLine != -1 - nLine := ::getLineNo() - IF ! ::isSuspended - IF nLine != ::nProtoLine .OR. ::getColumnNo() <= ::nProtoCol - ::suspendPrototype() - ENDIF - ELSE - IF nLine == ::nProtoLine .AND. ::getColumnNo() >= ::nProtoCol - ::resumePrototype() - ENDIF - ENDIF - ENDIF - - EXIT - - CASE copyAvailable - IF p .AND. ::lCopyWhenDblClicked - ::qEdit:copy() - ENDIF - ::lCopyWhenDblClicked := .f. - EXIT - - CASE timerTimeout - IF empty( ::cProto ) - ::hidePrototype() - ELSE - ::showPrototype() - ENDIF - EXIT - - #if 0 - CASE modificationChanged - //HB_TRACE( HB_TR_ALWAYS, "modificationChanged(bool)", p ) - EXIT - CASE redoAvailable - //HB_TRACE( HB_TR_ALWAYS, "redoAvailable(bool)", p ) - EXIT - CASE undoAvailable - //HB_TRACE( HB_TR_ALWAYS, "undoAvailable(bool)", p ) - EXIT - CASE updateRequest - EXIT - #endif - ENDSWITCH - - RETURN Nil - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:execKeyEvent( nMode, nEvent, p, p1 ) - LOCAL key, kbm, txt, qEvent - LOCAL lAlt := .f. - LOCAL lCtrl := .f. - LOCAL lShift := .f. - - p1 := p1 - - SWITCH nEvent - CASE QEvent_KeyPress - - qEvent := QKeyEvent():configure( p ) - - key := qEvent:key() - kbm := qEvent:modifiers() - txt := qEvent:text() - - IF hb_bitAnd( kbm, Qt_AltModifier ) == Qt_AltModifier - lAlt := .t. - ENDIF - IF hb_bitAnd( kbm, Qt_ControlModifier ) == Qt_ControlModifier - lCtrl := .t. - ENDIF - IF hb_bitAnd( kbm, Qt_ShiftModifier ) == Qt_ShiftModifier - lShift := .t. - ENDIF - - IF ::oSC:execKey( key, lAlt, lCtrl, lShift ) - RETURN .f. - ENDIF - - SWITCH ( key ) - CASE Qt_Key_Space - IF !lAlt .AND. !lShift .AND. !lCtrl - ::lUpdatePrevWord := .t. - ENDIF - EXIT - CASE Qt_Key_Return - CASE Qt_Key_Enter - ::handlePreviousWord( .t. ) - ::lIndentIt := .t. - EXIT - CASE Qt_Key_Tab - IF lCtrl - ::blockIndent( 1 ) - RETURN .T. - ENDIF - EXIT - CASE Qt_Key_Backtab - IF lCtrl - ::blockIndent( -1 ) - RETURN .t. - ENDIF - EXIT - CASE Qt_Key_Q /* All these actions will be pulled from user-setup */ - IF lCtrl .AND. lShift - ::streamComment() - ENDIF - EXIT - CASE Qt_Key_Slash - IF lCtrl - ::blockComment() - ENDIF - EXIT - CASE Qt_Key_D - IF lCtrl - ::duplicateLine() - ENDIF - EXIT - CASE Qt_Key_K - IF lCtrl - ::presentSkeletons() - ENDIF - EXIT - CASE Qt_Key_Backspace - hbide_justACall( txt, lAlt, lShift, lCtrl, qEvent, nMode ) - EXIT - CASE Qt_Key_Delete - IF lCtrl - ::deleteLine() - RETURN .t. - ENDIF - EXIT - CASE Qt_Key_Up - IF lCtrl .AND. lShift - ::moveLine( -1 ) - RETURN .t. - ENDIF - EXIT - CASE Qt_Key_Down - IF lCtrl .AND. lShift - ::moveLine( 1 ) - RETURN .t. - ENDIF - EXIT - CASE Qt_Key_ParenLeft - IF ! lCtrl .AND. ! lAlt - ::loadFuncHelp() // Also invokes prototype display - ENDIF - EXIT - CASE Qt_Key_ParenRight - IF ! lCtrl .AND. ! lAlt - ::hidePrototype() - ENDIF - EXIT - CASE Qt_Key_T - IF lCtrl - ::gotoFunction() - ENDIF - EXIT - CASE Qt_Key_F1 - ::gotoFunction() - EXIT - ENDSWITCH - - EXIT - - CASE QEvent_Enter - CASE QEvent_FocusIn - ::resumePrototype() - EXIT - - CASE QEvent_Leave - CASE QEvent_FocusOut - ::suspendPrototype() - EXIT - - CASE QEvent_Wheel - EXIT - - CASE QEvent_MouseButtonDblClick - ::lCopyWhenDblClicked := .t. - EXIT - - CASE 1001 - IF p == QEvent_MouseButtonDblClick - ::lCopyWhenDblClicked := .f. /* not intuitive */ - ::clickFuncHelp() - - ELSEIF p == 21001 - ::handlePreviousWord( .t. ) - - ELSEIF p == 21011 - ::copyBlockContents( p1 ) - - ELSEIF p == 21012 - ::pasteBlockContents( p1 ) - - ELSEIF p == 21013 - ::insertBlockContents( p1 ) - - ELSEIF p == 21014 - ::deleteBlockContents( p1 ) - - ELSEIF p == QEvent_Paint - // ::oIde:testPainter( p1 ) - - ENDIF - EXIT - - ENDSWITCH - - RETURN .F. /* Important */ - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:copyBlockContents( aCord ) - LOCAL nT, nL, nB, nR, nW, i, cLine, cClip := "", nMode - - nT := iif( aCord[ 1 ] > aCord[ 3 ], aCord[ 3 ], aCord[ 1 ] ) - nB := iif( aCord[ 1 ] > aCord[ 3 ], aCord[ 1 ], aCord[ 3 ] ) - nL := iif( aCord[ 2 ] > aCord[ 4 ], aCord[ 4 ], aCord[ 2 ] ) - nR := iif( aCord[ 2 ] > aCord[ 4 ], aCord[ 2 ], aCord[ 4 ] ) - nMode := aCord[ 5 ] - - nW := nR - nL - - FOR i := nT TO nB - cLine := ::getLine( i + 1 ) - IF nMode == 2 /* Column */ - cLine := pad( substr( cLine, nL + 1, nW ), nW ) - ELSEIF nMode == 3 /* Line */ - // Nothing to do, complete line is already pulled - ELSEIF nMode == 1 /* Stream */ - IF i == 1 - cLine := substr( cLine, nL + 1 ) - ELSEIF i == nB - cLine := substr( cLine, 1, nR + 1 ) - ENDIF - ENDIF - cClip += cLine + hb_osNewLine() - NEXT -HB_TRACE( HB_TR_ALWAYS, cClip ) - QClipboard():new():setText( cClip ) - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:pasteBlockContents( nMode ) - LOCAL i, nRow, nCol, qCursor, nMaxCol - - HB_SYMBOL_UNUSED( nMode ) - - ::aBlockCopyContents := hbide_memoToArray( QClipboard():new():text() ) - IF empty( ::aBlockCopyContents ) - RETURN Self - ENDIF - - qCursor := QTextCursor():from( ::qEdit:textCursor() ) - nCol := qCursor:columnNumber() - qCursor:beginEditBlock() - // - FOR i := 1 TO len( ::aBlockCopyContents ) - qCursor:insertText( ::aBlockCopyContents[ i ] ) - IF i < len( ::aBlockCopyContents ) - nRow := qCursor:blockNumber() - qCursor:movePosition( QTextCursor_Down, QTextCursor_MoveAnchor ) - IF qCursor:blockNumber() == nRow - qCursor:movePosition( QTextCursor_EndOfBlock, QTextCursor_MoveAnchor ) - qCursor:insertBlock() - qCursor:movePosition( QTextCursor_NextBlock, QTextCursor_MoveAnchor ) - ENDIF - qCursor:movePosition( QTextCursor_EndOfLine, QTextCursor_MoveAnchor ) - nMaxCol := qCursor:columnNumber() - IF nMaxCol < nCol - qCursor:insertText( replicate( " ", nCol - nMaxCol ) ) - ENDIF - qCursor:movePosition( QTextCursor_StartOfBlock, QTextCursor_MoveAnchor ) - qCursor:movePosition( QTextCursor_Right, QTextCursor_MoveAnchor, nCol ) - ENDIF - NEXT - // - qCursor:endEditBlock() - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:insertBlockContents( aCord ) - LOCAL nT, nL, nB, nR, nW, i, cLine, cKey, qCursor - - nT := iif( aCord[ 1 ] > aCord[ 3 ], aCord[ 3 ], aCord[ 1 ] ) - nB := iif( aCord[ 1 ] > aCord[ 3 ], aCord[ 1 ], aCord[ 3 ] ) - nL := iif( aCord[ 2 ] > aCord[ 4 ], aCord[ 4 ], aCord[ 2 ] ) - nR := iif( aCord[ 2 ] > aCord[ 4 ], aCord[ 2 ], aCord[ 4 ] ) - - nW := nR - nL - - cKey := chr( XbpQKeyEventToAppEvent( aCord[ 5 ] ) ) - - qCursor := QTextCursor():from( ::qEdit:textCursor() ) - qCursor:beginEditBlock() - - IF nW == 0 - FOR i := nT TO nB - cLine := ::getLine( i + 1 ) - cLine := pad( substr( cLine, 1, nL ), nL ) + cKey + substr( cLine, nL + 1 ) - - qCursor:movePosition( QTextCursor_Start , QTextCursor_MoveAnchor ) - qCursor:movePosition( QTextCursor_Down , QTextCursor_MoveAnchor, i ) - qCursor:movePosition( QTextCursor_StartOfBlock, QTextCursor_MoveAnchor ) - qCursor:movePosition( QTextCursor_EndOfLine , QTextCursor_KeepAnchor ) - qCursor:insertText( cLine ) - NEXT - qCursor:movePosition( QTextCursor_Start, QTextCursor_MoveAnchor ) - qCursor:movePosition( QTextCursor_Down , QTextCursor_MoveAnchor, nB ) - qCursor:movePosition( QTextCursor_Right, QTextCursor_MoveAnchor, nR + 1 ) - ELSE - FOR i := nT TO nB - cLine := ::getLine( i + 1 ) - cLine := pad( substr( cLine, 1, nL ), nL ) + replicate( cKey, nW ) + substr( cLine, nR + 1 ) - - qCursor:movePosition( QTextCursor_Start , QTextCursor_MoveAnchor ) - qCursor:movePosition( QTextCursor_Down , QTextCursor_MoveAnchor, i ) - qCursor:movePosition( QTextCursor_StartOfBlock, QTextCursor_MoveAnchor ) - qCursor:movePosition( QTextCursor_EndOfLine , QTextCursor_KeepAnchor ) - qCursor:insertText( cLine ) - NEXT - qCursor:movePosition( QTextCursor_Start, QTextCursor_MoveAnchor ) - qCursor:movePosition( QTextCursor_Down , QTextCursor_MoveAnchor, nB ) - qCursor:movePosition( QTextCursor_Right, QTextCursor_MoveAnchor, nR ) - ENDIF - // - ::qEdit:setCursorWidth( 1 ) - ::qEdit:setTextCursor( qCursor ) - qCursor:endEditBlock() - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:deleteBlockContents( aCord ) - LOCAL nT, nL, nB, nR, nW, i, cLine, qCursor, k - - nT := iif( aCord[ 1 ] > aCord[ 3 ], aCord[ 3 ], aCord[ 1 ] ) - nB := iif( aCord[ 1 ] > aCord[ 3 ], aCord[ 1 ], aCord[ 3 ] ) - nL := iif( aCord[ 2 ] > aCord[ 4 ], aCord[ 4 ], aCord[ 2 ] ) - nR := iif( aCord[ 2 ] > aCord[ 4 ], aCord[ 2 ], aCord[ 4 ] ) - k := aCord[ 5 ] - - IF k == Qt_Key_X - ::copyBlockContents( aCord ) - ENDIF - - nW := nR - nL - - qCursor := QTextCursor():from( ::qEdit:textCursor() ) - qCursor:beginEditBlock() - IF nW == 0 .AND. k == Qt_Key_Backspace - FOR i := nT TO nB - cLine := ::getLine( i + 1 ) - cLine := pad( substr( cLine, 1, nL - 1 ), nL - 1 ) + substr( cLine, nL + 1 ) - - qCursor:movePosition( QTextCursor_Start , QTextCursor_MoveAnchor ) - qCursor:movePosition( QTextCursor_Down , QTextCursor_MoveAnchor, i ) - qCursor:movePosition( QTextCursor_StartOfLine , QTextCursor_MoveAnchor ) - qCursor:movePosition( QTextCursor_EndOfLine , QTextCursor_KeepAnchor ) - qCursor:insertText( cLine ) - NEXT - qCursor:movePosition( QTextCursor_Start, QTextCursor_MoveAnchor ) - qCursor:movePosition( QTextCursor_Down , QTextCursor_MoveAnchor, nB ) - qCursor:movePosition( QTextCursor_Right, QTextCursor_MoveAnchor, nR - 1 ) - ELSE - IF k == Qt_Key_Delete .OR. k == Qt_Key_X - FOR i := nT TO nB - cLine := ::getLine( i + 1 ) - cLine := pad( substr( cLine, 1, nL ), nL ) + substr( cLine, nR + 1 ) - - qCursor:movePosition( QTextCursor_Start , QTextCursor_MoveAnchor ) - qCursor:movePosition( QTextCursor_Down , QTextCursor_MoveAnchor, i ) - qCursor:movePosition( QTextCursor_StartOfLine , QTextCursor_MoveAnchor ) - qCursor:movePosition( QTextCursor_EndOfLine , QTextCursor_KeepAnchor ) - qCursor:insertText( cLine ) - NEXT - qCursor:movePosition( QTextCursor_Start, QTextCursor_MoveAnchor ) - qCursor:movePosition( QTextCursor_Down , QTextCursor_MoveAnchor, nT ) - qCursor:movePosition( QTextCursor_Right, QTextCursor_MoveAnchor, nL ) - ENDIF - ENDIF - // - ::qEdit:setTextCursor( qCursor ) - qCursor:endEditBlock() - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:markCurrentFunction() - LOCAL n, nCurLine - - IF ::nPrevLineNo1 != ::getLineNo() - ::nPrevLineNo1 := ::getLineNo() - - IF !empty( ::aTags ) - nCurLine := ::getLineNo() - IF len( ::aTags ) == 1 - n := 1 - ELSEIF ( n := ascan( ::aTags, {|e_| e_[ 3 ] >= nCurLine } ) ) == 0 - n := len( ::aTags ) - ELSEIF n > 0 - n-- - ENDIF - IF n > 0 - ::oIde:oFuncList:setItemColorFG( n, { 255,0,0 } ) - ENDIF - ENDIF - ENDIF - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:presentSkeletons() - ::oSK:selectByMenuAndPostText( ::qEdit ) - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:toggleLineNumbers() - ::qEdit:hbNumberBlockVisible( ::lLineNumbersVisible ) - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:toggleSelectionMode() - ::qEdit:hbHighlightSelectedColumns( ::isColumnSelectionEnabled ) - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:toggleLineSelectionMode() - ::isLineSelectionMode := ! ::isLineSelectionMode - ::qEdit:hbSetSelectionMode( 3, ::isLineSelectionMode ) - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:redo() - ::qEdit:redo() - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:undo() - ::qEdit:undo() - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:cut() - ::qEdit:hbCut() - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:copy() - ::qEdit:hbCopy() - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:paste() - ::qEdit:hbPaste() - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:selectAll() - ::qEdit:selectAll() - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:gotoMark( nIndex ) - IF len( ::aBookMarks ) >= nIndex - ::qEdit:hbGotoBookmark( ::aBookMarks[ nIndex ] ) - ::qEdit:centerCursor() - ENDIF - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:relayMarkButtons() - LOCAL oBtn - FOR EACH oBtn IN ::aMarkTBtns - oBtn:hide() - NEXT - FOR EACH oBtn IN ::aBookMarks - ::aMarkTBtns[ oBtn:__enumIndex() ]:show() - NEXT - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:setNewMark() - LOCAL qCursor, nBlock, n - - IF !( qCursor := QTextCursor():configure( ::qEdit:textCursor() ) ):isNull() - nBlock := qCursor:blockNumber() + 1 - - IF ( n := ascan( ::aBookMarks, nBlock ) ) > 0 - hb_adel( ::aBookMarks, n, .t. ) - ::aMarkTBtns[ len( ::aBookMarks ) + 1 ]:hide() - ELSE - IF len( ::aBookMarks ) == 6 - RETURN Self - ENDIF - aadd( ::aBookMarks, nBlock ) - n := len( ::aBookMarks ) - ::aMarkTBtns[ n ]:show() - ENDIF - - ::qEdit:hbBookMarks( nBlock ) - ENDIF - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:setLineNumbersBkColor( nR, nG, nB ) - ::qEdit:hbSetLineAreaBkColor( QColor():new( nR, nG, nB ) ) - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:setCurrentLineColor( nR, nG, nB ) - ::qEdit:hbSetCurrentLineColor( QColor():new( nR, nG, nB ) ) - RETURN Self - -/*----------------------------------------------------------------------*/ -/* TO BE EXTENDED */ -METHOD IdeEdit:find( cText, nPosFrom ) - LOCAL lFound, nPos - LOCAL qCursor := ::getCursor() - - nPos := qCursor:position() - IF hb_isNumeric( nPosFrom ) - qCursor:setPosition( nPosFrom ) - ENDIF - ::qEdit:setTextCursor( qCursor ) - IF ( lFound := ::qEdit:find( cText, QTextDocument_FindCaseSensitively ) ) - ::qEdit:centerCursor() - ELSE - qCursor:setPosition( nPos ) - ::qEdit:setTextCursor( qCursor ) - ENDIF - - RETURN lFound - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:refresh() - ::qEdit:hbRefresh() - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:home() - LOCAL qCursor := ::getCursor() - - qCursor:movePosition( QTextCursor_StartOfBlock ) - ::qEdit:setTextCursor( qCursor ) - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:down() - LOCAL qCursor := QTextCursor():configure( ::qEdit:textCursor() ) - - qCursor:movePosition( QTextCursor_Down ) - ::qEdit:setTextCursor( qCursor ) - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:up() - LOCAL qCursor := QTextCursor():configure( ::qEdit:textCursor() ) - - qCursor:movePosition( QTextCursor_Up ) - ::qEdit:setTextCursor( qCursor ) - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:duplicateLine() - ::qEdit:hbDuplicateLine() - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:deleteLine() - ::qEdit:hbDeleteLine() - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:moveLine( nDirection ) - ::qEdit:hbMoveLine( nDirection ) - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:blockComment() - ::qEdit:hbBlockComment() - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:streamComment() - ::qEdit:hbStreamComment() - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:blockIndent( nMode ) - ::qEdit:hbBlockIndent( nMode ) - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:caseUpper() - ::qEdit:hbCaseUpper() - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:caseLower() - ::qEdit:hbCaseLower() - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:convertQuotes() - ::qEdit:hbConvertQuotes() - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:convertDQuotes() - ::qEdit:hbConvertDQuotes() - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:caseInvert() - LOCAL i, c, s, cBuffer, nLen - - IF !empty( cBuffer := ::getSelectedText() ) - s := "" - nLen := len( cBuffer ) - FOR i := 1 TO nLen - c := substr( cBuffer, i, 1 ) - IF isAlpha( c ) - s += iif( isUpper( c ), lower( c ), upper( c ) ) - ELSE - s += c - ENDIF - NEXT - ::qEdit:hbReplaceSelection( s ) - ENDIF - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:getSelectedText() - RETURN ::qEdit:hbGetSelectedText() - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:getText() - RETURN QTextCursor():from( ::qEdit:textCursor() ):selectedText() - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:getWord( lSelect ) - LOCAL cText, qCursor := QTextCursor():configure( ::qEdit:textCursor() ) - - DEFAULT lSelect TO .F. - - qCursor:select( QTextCursor_WordUnderCursor ) - cText := qCursor:selectedText() - - IF lSelect - ::qEdit:setTextCursor( qCursor ) - ENDIF - RETURN cText - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:goto( nLine ) - LOCAL qCursor := QTextCursor():configure( ::qEdit:textCursor() ) - - qCursor:movePosition( QTextCursor_Start ) - qCursor:movePosition( QTextCursor_Down, QTextCursor_MoveAnchor, nLine - 1 ) - ::qEdit:setTextCursor( qCursor ) - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:getLine( nLine, lSelect ) - LOCAL cText, qCursor := QTextCursor():configure( ::qEdit:textCursor() ) - - DEFAULT nLine TO qCursor:blockNumber() + 1 - DEFAULT lSelect TO .F. - - IF nLine != qCursor:blockNumber() + 1 - qCursor:movePosition( QTextCursor_Start ) - qCursor:movePosition( QTextCursor_Down, QTextCursor_MoveAnchor, nLine - 1 ) - ENDIF - - qCursor:select( QTextCursor_LineUnderCursor ) - cText := qCursor:selectedText() - IF lSelect - ::qEdit:setTextCursor( qCursor ) - ENDIF - - RETURN cText - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:getColumnNo() - RETURN QTextCursor():from( ::qEdit:textCursor() ):columnNumber() + 1 - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:getLineNo() - RETURN QTextCursor():from( ::qEdit:textCursor() ):blockNumber() + 1 - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:insertSeparator( cSep ) - LOCAL qCursor := QTextCursor():configure( ::qEdit:textCursor() ) - - IF empty( cSep ) - cSep := ::cSeparator - ENDIF - qCursor:beginEditBlock() - qCursor:movePosition( QTextCursor_StartOfBlock ) - qCursor:insertBlock() - qCursor:movePosition( QTextCursor_PreviousBlock ) - qCursor:insertText( cSep ) - qCursor:movePosition( QTextCursor_NextBlock ) - qCursor:movePosition( QTextCursor_StartOfBlock ) - qCursor:endEditBlock() - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:insertText( cText ) - LOCAL qCursor, nL, nB - - IF !Empty( cText ) - qCursor := QTextCursor():configure( ::qEdit:textCursor() ) - - nL := len( cText ) - nB := qCursor:position() + nL - - qCursor:beginEditBlock() - qCursor:removeSelectedText() - qCursor:insertText( cText ) - qCursor:setPosition( nB ) - qCursor:endEditBlock() - ENDIF - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:handlePreviousWord( lUpdatePrevWord ) - LOCAL qCursor, qTextBlock, cText, cWord, nB, nL, qEdit, lPrevOnly, nCol, nSpace, nSpaces, nOff - - * HB_TRACE( HB_TR_ALWAYS, "IdeEdit:handlePreviousWord( lUpdatePrevWord )", lUpdatePrevWord ) - - IF ! lUpdatePrevWord - RETURN Self - ENDIF - ::lUpdatePrevWord := .f. - - qEdit := ::qEdit - - qCursor := QTextCursor():configure( qEdit:textCursor() ) - qTextBlock := QTextBlock():configure( qCursor:block() ) - cText := qTextBlock:text() - nCol := qCursor:columnNumber() - IF ( substr( cText, nCol - 1, 1 ) == " " ) - RETURN nil - ENDIF - nSpace := iif( substr( cText, nCol, 1 ) == " ", 1, 0 ) - cWord := hbide_getPreviousWord( cText, nCol + 1 ) - - IF !empty( cWord ) .AND. hbide_isHarbourKeyword( cWord ) - lPrevOnly := left( lower( ltrim( cText ) ), len( cWord ) ) == lower( cWord ) - - nL := len( cWord ) + nSpace - nB := qCursor:position() - nL - - IF ::oEditor:cExt $ ".prg" - qCursor:beginEditBlock() - qCursor:setPosition( nB ) - qCursor:movePosition( QTextCursor_NextCharacter, QTextCursor_KeepAnchor, nL ) - qCursor:removeSelectedText() - qCursor:insertText( upper( cWord ) + space( nSpace ) ) - qCursor:endEditBlock() - qEdit:setTextCursor( qCursor ) - ENDIF - - IF hbide_isStartingKeyword( cWord ) - IF lPrevOnly - qCursor:setPosition( nB ) - IF ( nCol := qCursor:columnNumber() ) > 0 - qCursor:beginEditBlock() - qCursor:movePosition( QTextCursor_StartOfBlock ) - qCursor:movePosition( QTextCursor_NextCharacter, QTextCursor_KeepAnchor, nCol ) - qCursor:removeSelectedText() - qCursor:movePosition( QTextCursor_NextCharacter, QTextCursor_MoveAnchor, nL ) - qCursor:endEditBlock() - qEdit:setTextCursor( qCursor ) - ENDIF - ENDIF - - ELSEIF hbide_isMinimumIndentableKeyword( cWord ) - IF lPrevOnly - qCursor:setPosition( nB ) - IF ( nCol := qCursor:columnNumber() ) >= 0 - qCursor:beginEditBlock() - qCursor:movePosition( QTextCursor_StartOfBlock ) - qCursor:movePosition( QTextCursor_NextCharacter, QTextCursor_KeepAnchor, nCol ) - qCursor:removeSelectedText() - qCursor:insertText( space( ::nTabSpaces ) ) - qCursor:movePosition( QTextCursor_NextCharacter, QTextCursor_MoveAnchor, nL ) - qEdit:setTextCursor( qCursor ) - qCursor:endEditBlock() - ENDIF - ENDIF - - ELSEIF hbide_isIndentableKeyword( cWord ) - IF lPrevOnly - nSpaces := hbide_getFrontSpacesAndWord( cText ) - IF nSpaces > 0 .AND. ( nOff := nSpaces % ::nTabSpaces ) > 0 - qCursor:setPosition( nB ) - qCursor:beginEditBlock() - qCursor:movePosition( QTextCursor_PreviousCharacter, QTextCursor_KeepAnchor, nOff ) - qCursor:removeSelectedText() - qCursor:movePosition( QTextCursor_NextCharacter, QTextCursor_MoveAnchor, nL ) - qEdit:setTextCursor( qCursor ) - qCursor:endEditBlock() - ENDIF - ENDIF - ENDIF - ENDIF - - RETURN .t. - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:findLastIndent() - LOCAL qCursor, qTextBlock, cText, cWord - LOCAL nSpaces := 0 - - qCursor := QTextCursor():configure( ::qEdit:textCursor() ) - qTextBlock := QTextBlock():configure( qCursor:block() ) - - qTextBlock := QTextBlock():configure( qTextBlock:previous() ) - DO WHILE .t. - IF !( qTextBlock:isValid() ) - EXIT - ENDIF - IF !empty( cText := qTextBlock:text() ) - nSpaces := hbide_getFrontSpacesAndWord( cText, @cWord ) - IF !empty( cWord ) - IF hbide_isIndentableKeyword( cWord ) - nSpaces += ::nTabSpaces - ENDIF - EXIT - ENDIF - ENDIF - qTextBlock := QTextBlock():configure( qTextBlock:previous() ) - ENDDO - - RETURN nSpaces - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:handleCurrentIndent() - LOCAL qCursor, nSpaces - - IF ::lIndentIt - ::lIndentIt := .f. - IF ( nSpaces := ::findLastIndent() ) > 0 - qCursor := QTextCursor():configure( ::qEdit:textCursor() ) - qCursor:insertText( space( nSpaces ) ) - ENDIF - ENDIF - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:gotoFunction() - LOCAL cWord - IF !empty( cWord := ::getWord( .f. ) ) - ::oFN:jumpToFunction( cWord, .t. ) - ENDIF - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:clickFuncHelp() - LOCAL cWord - IF !empty( cWord := ::getWord( .f. ) ) - IF ! empty( ::oHL ) - ::oHL:jumpToFunction( cWord ) - ENDIF - ENDIF - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:loadFuncHelp() - LOCAL qEdit, qCursor, qTextBlock, cText, cWord, nCol, cPro - - qEdit := ::qEdit - qCursor := QTextCursor():configure( qEdit:textCursor() ) - qTextBlock := QTextBlock():configure( qCursor:block() ) - cText := qTextBlock:text() - nCol := qCursor:columnNumber() - cWord := hbide_getPreviousWord( cText, nCol ) - - IF !empty( cWord ) - IF ! empty( ::oHL ) - ::oHL:jumpToFunction( cWord ) - ENDIF - IF !empty( cPro := ::oFN:positionToFunction( cWord, .t. ) ) - IF empty( ::cProto ) - ::showPrototype( ::cProto := hbide_formatProto( cPro ) ) - ENDIF - ENDIF - ENDIF - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:resumePrototype() - - ::isSuspended := .f. - IF !empty( ::qEdit ) - IF ::getLineNo() == ::nProtoLine .AND. ::getColumnNo() >= ::nProtoCol - ::qEdit:hbShowPrototype( ::cProto ) - ENDIF - ENDIF - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:suspendPrototype() - - ::isSuspended := .t. - IF !empty( ::qEdit ) - ::qEdit:hbShowPrototype( "" ) - ENDIF - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:showPrototype( cProto ) - - IF ! ::isSuspended .AND. !empty( ::qEdit ) - IF !empty( cProto ) - ::cProto := cProto - ::nProtoLine := ::getLineNo() - ::nProtoCol := ::getColumnNo() - ::qTimer:start() - ENDIF - ::qEdit:hbShowPrototype( ::cProto ) - ENDIF - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:hidePrototype() - - IF !empty( ::qedit ) - ::nProtoLine := -1 - ::nProtoCol := -1 - ::cProto := "" - ::qTimer:stop() - ::qEdit:hbShowPrototype( "" ) - ENDIF - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD IdeEdit:completeCode( p ) - LOCAL qCursor := QTextCursor():from( ::qEdit:textCursor() ) - - qCursor:movePosition( QTextCursor_Left ) - - qCursor:movePosition( QTextCursor_StartOfWord ) - qCursor:movePosition( QTextCursor_EndOfWord, QTextCursor_KeepAnchor ) - qCursor:insertText( p ) - qCursor:movePosition( QTextCursor_Left ) - qCursor:movePosition( QTextCursor_Right ) - - ::qEdit:setTextCursor( qCursor ) - - RETURN Self - -/*----------------------------------------------------------------------*/ - -FUNCTION hbide_getPreviousWord( cText, nPos ) - LOCAL cWord, n - - cText := alltrim( substr( cText, 1, nPos ) ) - IF ( n := rat( " ", cText ) ) > 0 - cWord := substr( cText, n + 1 ) - ELSE - cWord := cText - ENDIF - - RETURN cWord - -/*----------------------------------------------------------------------*/ - -FUNCTION hbide_getFirstWord( cText ) - LOCAL cWord, n - - cText := alltrim( cText ) - IF ( n := at( " ", cText ) ) > 0 - cWord := left( cText, n-1 ) - ELSE - cWord := cText - ENDIF - - RETURN cWord - -/*----------------------------------------------------------------------*/ - -FUNCTION hbide_getFrontSpacesAndWord( cText, cWord ) - LOCAL n := 0 - - DO WHILE .t. - IF substr( cText, ++n, 1 ) != " " - EXIT - ENDIF - ENDDO - n-- - - cWord := hbide_getFirstWord( cText ) - - RETURN n - -/*----------------------------------------------------------------------*/ - -FUNCTION hbide_isStartingKeyword( cWord ) - STATIC s_b_ := { ; - 'function' => NIL,; - 'class' => NIL,; - 'method' => NIL } - - RETURN Lower( cWord ) $ s_b_ - -/*----------------------------------------------------------------------*/ - -FUNCTION hbide_isMinimumIndentableKeyword( cWord ) - STATIC s_b_ := { ; - 'local' => NIL,; - 'static' => NIL,; - 'return' => NIL,; - 'default' => NIL } - - RETURN Lower( cWord ) $ s_b_ - -/*----------------------------------------------------------------------*/ - -FUNCTION hbide_isIndentableKeyword( cWord ) - STATIC s_b_ := { ; - 'if' => NIL,; - 'else' => NIL,; - 'elseif' => NIL,; - 'docase' => NIL,; - 'case' => NIL,; - 'otherwise' => NIL,; - 'do' => NIL,; - 'while' => NIL,; - 'switch' => NIL,; - 'for' => NIL,; - 'next' => NIL,; - 'begin' => NIL,; - 'sequence' => NIL,; - 'try' => NIL,; - 'catch' => NIL,; - 'always' => NIL,; - 'recover' => NIL,; - 'finally' => NIL } - - RETURN Lower( cWord ) $ s_b_ - -/*----------------------------------------------------------------------*/ - -FUNCTION hbide_isHarbourKeyword( cWord ) - STATIC s_b_ := { ; - 'function' => NIL,; - 'return' => NIL,; - 'static' => NIL,; - 'local' => NIL,; - 'default' => NIL,; - 'if' => NIL,; - 'else' => NIL,; - 'elseif' => NIL,; - 'endif' => NIL,; - 'end' => NIL,; - 'endswitch' => NIL,; - 'docase' => NIL,; - 'case' => NIL,; - 'endcase' => NIL,; - 'otherwise' => NIL,; - 'switch' => NIL,; - 'do' => NIL,; - 'while' => NIL,; - 'enddo' => NIL,; - 'exit' => NIL,; - 'for' => NIL,; - 'each' => NIL,; - 'next' => NIL,; - 'step' => NIL,; - 'to' => NIL,; - 'class' => NIL,; - 'endclass' => NIL,; - 'method' => NIL,; - 'data' => NIL,; - 'var' => NIL,; - 'destructor' => NIL,; - 'inline' => NIL,; - 'setget' => NIL,; - 'assign' => NIL,; - 'access' => NIL,; - 'inherit' => NIL,; - 'init' => NIL,; - 'create' => NIL,; - 'virtual' => NIL,; - 'message' => NIL,; - 'begin' => NIL,; - 'sequence' => NIL,; - 'try' => NIL,; - 'catch' => NIL,; - 'always' => NIL,; - 'recover' => NIL,; - 'hb_symbol_unused' => NIL,; - 'error' => NIL,; - 'handler' => NIL,; - 'nil' => NIL,; - 'or' => NIL,; - 'and' => NIL } - - RETURN Lower( cWord ) $ s_b_ - -/*----------------------------------------------------------------------*/ - -FUNCTION hbide_formatProto( cProto ) - LOCAL n, n1, cArgs - - n := at( "(", cProto ) - n1 := at( ")", cProto ) - - IF n > 0 .AND. n1 > 0 - cArgs := substr( cProto, n + 1, n1 - n - 1 ) - cArgs := strtran( cArgs, ",", "" + "," + "" ) - cProto := "

" + "" + substr( cProto, 1, n - 1 ) + "" + ; - "" + "(" + "" + ; - cArgs + ; - "" + ")" + "" + "

" - ENDIF - RETURN cProto - -/*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbide/resources/projectproperties.ui b/harbour/contrib/hbide/resources/projectproperties.ui deleted file mode 100644 index cc5674d4a3..0000000000 --- a/harbour/contrib/hbide/resources/projectproperties.ui +++ /dev/null @@ -1,648 +0,0 @@ - - - ProjectProperties - - - - 0 - 0 - 393 - 478 - - - - - 0 - 0 - - - - Project Properties - - - - - - - - - 0 - - - - General - - - - - - - 75 - true - - - - Project Type: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">A project may be of type Executable|Library|Dll.</span></p></body></html> - - - false - - - - - - - Project Title: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Title will be shown as a node in project tree.</span></p></body></html> - - - - - - - Project Location: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Project location is the folder where project definition file .hbi will be stored. &lt;Project Location&gt; plus &lt;Output Name&gt; will comprise the full file name with .hbp extension.</span></p></body></html> - - - - - - - Working Folder: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Working folder will be used to host HBMK2 compliant </span><span style=" font-size:8pt; font-weight:600;">&lt;Output Name&gt;</span><span style=" font-size:8pt;"> plus </span><span style=" font-size:8pt; font-weight:600;">&lt;hbp&gt;</span><span style=" font-size:8pt;"> and will be designated as current folder when </span><span style=" font-size:8pt; font-weight:600;">HBMK2</span><span style=" font-size:8pt;"> will be invoked.</span></p></body></html> - - - - - - - Destination Folder: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Destination folder is a compatibility slot and is reserved to place the &lt;Output&gt; .exe .a .lib. </p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">But currently this functionality will be achieved through the -o compiler flag.</p></body></html> - - - - - - - Compile/Link Flags: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Compiler/Linker flags may include all commands except the source files list. Additional libraries can be included here.</span></p></body></html> - - - - - - QPlainTextEdit::NoWrap - - - - - - - Launch Parameters: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - Launch Program: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - Backup Location: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Output name is used as final name for .hbi .hbp .exe .lib .a and will be added to the paths retrieved via &lt;Project Location&gt;, &lt;Working Folder&gt;, &lt;Destination Folder&gt;, etc. So this is a very important component.</p></body></html> - - - - - - - Output Name: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - ... - - - - - - - ... - - - - - - - ... - - - - - - - ... - - - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Loading a .hbp project file is essentially a </p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">task of redefining its flow and contents order.</p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">hbIDE rewrites the existing .hbp file if the </p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">"Project Location" points to same folder </p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">where your such loaded .hbp resides.</p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">So</p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">take care to change the "Project Location"</span></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">to different folder than home folder of .hbp.</p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This is done at the time of "Build" process.</p></body></html> - - - ... - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Load an xMate project file.</p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This feature is available only for new projects.</p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">hbIDE attempts to recognize various components</p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">but it is possible that it may not load everything.</p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">So you may need manual editing.</p></body></html> - - - ... - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - Sources - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You can include hereunder any type of file which can be edited via plain text editor. One file per line. You can use meta-keys to define your source paths to make your projects location independant. </p> -<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">NOTE:</p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Only .prg .c .cpp .rc .res files will be supplied to the HBMK2. All other files will be made visible for editing in &lt;Project Tree&gt;.</p></body></html> - - - - - - QPlainTextEdit::NoWrap - - - - - - - Select Sources - - - - - - - - - - Sort by Ascending Order - - - - - - - - - - Sort by Descending Order - - - - - - - - - - Organize by Type and Sort Ascending - - - - - - - - - - - Meta Data - - - - - - - 0 - 0 - - - - background-color: rgb(171, 171, 171); - - - true - - - true - - - HBIDE will employ the concept of meta-data which will be used to parse the paths or other info supplied to the interface. - -Usually meta-key is enclosed in curly braces, but due to the fact that HBMK2 already exploits it, HBIDE will recognize meta-key in angled brackets. - -Please enter meta-keys and their values like : - MySourcePath = c:/dev_sources/vouch -in the QTextEdit below. Then whereever you will supply any key anywhere in the input fields of HBIDE interface, just enclose it in angled brackets like : - <MySourcePath>/vouch.prg. -Note that keys are case sensitive. So MySourcePath <> MYSOURCEPath. - -HBIDE internally employs few keys which are shown below and are always include in the project. These accompany the value as its relevance and not as literal. - -Enjoy -Pritpal Bedi - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Meta-keys are a special way of keeping generic information which is of repeated and/or of dynamic nature. HBIDE implements meta key/value pair more comprehensively. It allows you to write an expression for the value part which get evaluated at the time project is loaded. The only point to take into consideration is that value returned by such expression must be of type character.</p> -<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The expression is evaluated only once and keeps its value until the HBIDE interface is closed. In case of any error, the expression string itself is returned.</p></body></html> - - - - - - QPlainTextEdit::NoWrap - - - - - - - - hbp - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Here you can view in real-time the resultant &lt;hbp&gt; output which will be supplied to HBMK2. This view may give you insight about your source layout and many other facts.</span></p> -<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600; text-decoration: underline;">Enjoy</span></p></body></html> - - - - - - QPlainTextEdit::NoWrap - - - true - - - - - - - - Environments - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">HBIDE employes the concept of keeping everything tied together. It means all complier specific environments are kept together in a convinient way and applied as per need.</span></p> -<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">So here you view/edit all the environments you employ in your applications. At the time you will build the project, a list of stated environments will be presented to choose from.</span></p> -<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">This opens up the possibility to experiment with different compilers without re-opening the IDE or setting up the envvars manually.</span></p></body></html> - - - - - - QPlainTextEdit::NoWrap - - - - - - - - - - 100 - 0 - - - - - 100 - 16777215 - - - - Path to hbmk2 - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - - - - - 100 - 0 - - - - - 100 - 16777215 - - - - Path to hbIDE.env - - - - - - - - - - - - - - - - - - - The environment definitions will not be saved along the project details. You need to click me in order to save it permanently. - - - ... - - - - - - - - - - - - - Save and Exit - - - - - - - Save - - - false - - - true - - - - - - - Cancel - - - false - - - - - - - - - comboPrjType - editPrjTitle - editPrjLoctn - editWrkFolder - editDstFolder - editFlags - editLaunchParams - editLaunchExe - editSources - editMetaData - editMetaHelp - editHbp - editCompilers - tabWidget - - - - diff --git a/harbour/contrib/hbide/resources/projectproperties.uic b/harbour/contrib/hbide/resources/projectproperties.uic deleted file mode 100644 index 57dcbdc4c7..0000000000 --- a/harbour/contrib/hbide/resources/projectproperties.uic +++ /dev/null @@ -1,654 +0,0 @@ -/******************************************************************************** -** Form generated from reading ui file 'projectproperties.ui' -** -** Created: Wed Feb 24 16:25:25 2010 -** by: Qt User Interface Compiler version 4.5.2 -** -** WARNING! All changes made in this file will be lost when recompiling ui file! -********************************************************************************/ - -#ifndef PROJECTPROPERTIES_H -#define PROJECTPROPERTIES_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class Ui_ProjectProperties -{ -public: - QVBoxLayout *verticalLayout; - QTabWidget *tabWidget; - QWidget *tabGeneral; - QGridLayout *gridLayout; - QLabel *label; - QComboBox *comboPrjType; - QLabel *label_2; - QLineEdit *editPrjTitle; - QLabel *label_3; - QLineEdit *editPrjLoctn; - QLabel *label_4; - QLineEdit *editWrkFolder; - QLabel *label_5; - QLineEdit *editDstFolder; - QLabel *label_9; - QPlainTextEdit *editFlags; - QLabel *label_7; - QLineEdit *editLaunchParams; - QLabel *label_8; - QLineEdit *editLaunchExe; - QLabel *label_13; - QLineEdit *editBackup; - QLineEdit *editOutName; - QLabel *label_6; - QToolButton *buttonChoosePrjLoc; - QToolButton *buttonBackup; - QToolButton *buttonChooseDest; - QToolButton *buttonChooseWd; - QHBoxLayout *horizontalLayout_7; - QToolButton *buttonHbp; - QToolButton *buttonXmate; - QSpacerItem *horizontalSpacer; - QWidget *tabFiles; - QGridLayout *gridLayout_2; - QPlainTextEdit *editSources; - QToolButton *buttonSelect; - QToolButton *buttonSort; - QToolButton *buttonSortZA; - QToolButton *buttonSortOrg; - QWidget *tabMeta; - QGridLayout *gridLayout_3; - QPlainTextEdit *editMetaHelp; - QPlainTextEdit *editMetaData; - QWidget *tabHbp; - QGridLayout *gridLayout_4; - QPlainTextEdit *editHbp; - QWidget *tabCompilers; - QGridLayout *gridLayout_5; - QPlainTextEdit *editCompilers; - QHBoxLayout *horizontalLayout_2; - QLabel *label_10; - QLineEdit *editPathMk2; - QToolButton *buttonPathMk2; - QHBoxLayout *horizontalLayout_3; - QLabel *label_12; - QLineEdit *editPathEnv; - QToolButton *buttonPathEnv; - QToolButton *buttonSaveEnv; - QHBoxLayout *horizontalLayout; - QPushButton *buttonSaveExit; - QPushButton *buttonSave; - QPushButton *buttonCn; - - void setupUi(QDialog *ProjectProperties) - { - if (ProjectProperties->objectName().isEmpty()) - ProjectProperties->setObjectName(QString::fromUtf8("ProjectProperties")); - ProjectProperties->resize(393, 478); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(ProjectProperties->sizePolicy().hasHeightForWidth()); - ProjectProperties->setSizePolicy(sizePolicy); - verticalLayout = new QVBoxLayout(ProjectProperties); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); - tabWidget = new QTabWidget(ProjectProperties); - tabWidget->setObjectName(QString::fromUtf8("tabWidget")); - tabGeneral = new QWidget(); - tabGeneral->setObjectName(QString::fromUtf8("tabGeneral")); - gridLayout = new QGridLayout(tabGeneral); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - label = new QLabel(tabGeneral); - label->setObjectName(QString::fromUtf8("label")); - QFont font; - font.setBold(true); - font.setWeight(75); - label->setFont(font); - label->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); - - gridLayout->addWidget(label, 1, 0, 1, 1); - - comboPrjType = new QComboBox(tabGeneral); - comboPrjType->setObjectName(QString::fromUtf8("comboPrjType")); - comboPrjType->setEditable(false); - - gridLayout->addWidget(comboPrjType, 1, 1, 1, 1); - - label_2 = new QLabel(tabGeneral); - label_2->setObjectName(QString::fromUtf8("label_2")); - label_2->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); - - gridLayout->addWidget(label_2, 2, 0, 1, 1); - - editPrjTitle = new QLineEdit(tabGeneral); - editPrjTitle->setObjectName(QString::fromUtf8("editPrjTitle")); - - gridLayout->addWidget(editPrjTitle, 2, 1, 1, 1); - - label_3 = new QLabel(tabGeneral); - label_3->setObjectName(QString::fromUtf8("label_3")); - label_3->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); - - gridLayout->addWidget(label_3, 3, 0, 1, 1); - - editPrjLoctn = new QLineEdit(tabGeneral); - editPrjLoctn->setObjectName(QString::fromUtf8("editPrjLoctn")); - - gridLayout->addWidget(editPrjLoctn, 3, 1, 1, 1); - - label_4 = new QLabel(tabGeneral); - label_4->setObjectName(QString::fromUtf8("label_4")); - label_4->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); - - gridLayout->addWidget(label_4, 5, 0, 1, 1); - - editWrkFolder = new QLineEdit(tabGeneral); - editWrkFolder->setObjectName(QString::fromUtf8("editWrkFolder")); - - gridLayout->addWidget(editWrkFolder, 5, 1, 1, 1); - - label_5 = new QLabel(tabGeneral); - label_5->setObjectName(QString::fromUtf8("label_5")); - label_5->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); - - gridLayout->addWidget(label_5, 6, 0, 1, 1); - - editDstFolder = new QLineEdit(tabGeneral); - editDstFolder->setObjectName(QString::fromUtf8("editDstFolder")); - - gridLayout->addWidget(editDstFolder, 6, 1, 1, 1); - - label_9 = new QLabel(tabGeneral); - label_9->setObjectName(QString::fromUtf8("label_9")); - label_9->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); - - gridLayout->addWidget(label_9, 9, 0, 1, 1); - - editFlags = new QPlainTextEdit(tabGeneral); - editFlags->setObjectName(QString::fromUtf8("editFlags")); - editFlags->setLineWrapMode(QPlainTextEdit::NoWrap); - - gridLayout->addWidget(editFlags, 9, 1, 1, 2); - - label_7 = new QLabel(tabGeneral); - label_7->setObjectName(QString::fromUtf8("label_7")); - label_7->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); - - gridLayout->addWidget(label_7, 10, 0, 1, 1); - - editLaunchParams = new QLineEdit(tabGeneral); - editLaunchParams->setObjectName(QString::fromUtf8("editLaunchParams")); - - gridLayout->addWidget(editLaunchParams, 10, 1, 1, 2); - - label_8 = new QLabel(tabGeneral); - label_8->setObjectName(QString::fromUtf8("label_8")); - label_8->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); - - gridLayout->addWidget(label_8, 11, 0, 1, 1); - - editLaunchExe = new QLineEdit(tabGeneral); - editLaunchExe->setObjectName(QString::fromUtf8("editLaunchExe")); - - gridLayout->addWidget(editLaunchExe, 11, 1, 1, 2); - - label_13 = new QLabel(tabGeneral); - label_13->setObjectName(QString::fromUtf8("label_13")); - label_13->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); - - gridLayout->addWidget(label_13, 8, 0, 1, 1); - - editBackup = new QLineEdit(tabGeneral); - editBackup->setObjectName(QString::fromUtf8("editBackup")); - - gridLayout->addWidget(editBackup, 8, 1, 1, 1); - - editOutName = new QLineEdit(tabGeneral); - editOutName->setObjectName(QString::fromUtf8("editOutName")); - - gridLayout->addWidget(editOutName, 4, 1, 1, 1); - - label_6 = new QLabel(tabGeneral); - label_6->setObjectName(QString::fromUtf8("label_6")); - label_6->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); - - gridLayout->addWidget(label_6, 4, 0, 1, 1); - - buttonChoosePrjLoc = new QToolButton(tabGeneral); - buttonChoosePrjLoc->setObjectName(QString::fromUtf8("buttonChoosePrjLoc")); - - gridLayout->addWidget(buttonChoosePrjLoc, 3, 2, 1, 1); - - buttonBackup = new QToolButton(tabGeneral); - buttonBackup->setObjectName(QString::fromUtf8("buttonBackup")); - - gridLayout->addWidget(buttonBackup, 8, 2, 1, 1); - - buttonChooseDest = new QToolButton(tabGeneral); - buttonChooseDest->setObjectName(QString::fromUtf8("buttonChooseDest")); - - gridLayout->addWidget(buttonChooseDest, 6, 2, 1, 1); - - buttonChooseWd = new QToolButton(tabGeneral); - buttonChooseWd->setObjectName(QString::fromUtf8("buttonChooseWd")); - - gridLayout->addWidget(buttonChooseWd, 5, 2, 1, 1); - - horizontalLayout_7 = new QHBoxLayout(); - horizontalLayout_7->setObjectName(QString::fromUtf8("horizontalLayout_7")); - buttonHbp = new QToolButton(tabGeneral); - buttonHbp->setObjectName(QString::fromUtf8("buttonHbp")); - - horizontalLayout_7->addWidget(buttonHbp); - - buttonXmate = new QToolButton(tabGeneral); - buttonXmate->setObjectName(QString::fromUtf8("buttonXmate")); - - horizontalLayout_7->addWidget(buttonXmate); - - horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_7->addItem(horizontalSpacer); - - - gridLayout->addLayout(horizontalLayout_7, 0, 1, 1, 1); - - tabWidget->addTab(tabGeneral, QString()); - tabFiles = new QWidget(); - tabFiles->setObjectName(QString::fromUtf8("tabFiles")); - gridLayout_2 = new QGridLayout(tabFiles); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); - editSources = new QPlainTextEdit(tabFiles); - editSources->setObjectName(QString::fromUtf8("editSources")); - editSources->setLineWrapMode(QPlainTextEdit::NoWrap); - - gridLayout_2->addWidget(editSources, 1, 1, 1, 11); - - buttonSelect = new QToolButton(tabFiles); - buttonSelect->setObjectName(QString::fromUtf8("buttonSelect")); - - gridLayout_2->addWidget(buttonSelect, 0, 1, 1, 1); - - buttonSort = new QToolButton(tabFiles); - buttonSort->setObjectName(QString::fromUtf8("buttonSort")); - - gridLayout_2->addWidget(buttonSort, 0, 2, 1, 1); - - buttonSortZA = new QToolButton(tabFiles); - buttonSortZA->setObjectName(QString::fromUtf8("buttonSortZA")); - - gridLayout_2->addWidget(buttonSortZA, 0, 3, 1, 1); - - buttonSortOrg = new QToolButton(tabFiles); - buttonSortOrg->setObjectName(QString::fromUtf8("buttonSortOrg")); - - gridLayout_2->addWidget(buttonSortOrg, 0, 4, 1, 1); - - tabWidget->addTab(tabFiles, QString()); - tabMeta = new QWidget(); - tabMeta->setObjectName(QString::fromUtf8("tabMeta")); - gridLayout_3 = new QGridLayout(tabMeta); - gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3")); - editMetaHelp = new QPlainTextEdit(tabMeta); - editMetaHelp->setObjectName(QString::fromUtf8("editMetaHelp")); - QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Minimum); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(editMetaHelp->sizePolicy().hasHeightForWidth()); - editMetaHelp->setSizePolicy(sizePolicy1); - editMetaHelp->setTabChangesFocus(true); - editMetaHelp->setReadOnly(true); - - gridLayout_3->addWidget(editMetaHelp, 0, 0, 1, 1); - - editMetaData = new QPlainTextEdit(tabMeta); - editMetaData->setObjectName(QString::fromUtf8("editMetaData")); - editMetaData->setLineWrapMode(QPlainTextEdit::NoWrap); - - gridLayout_3->addWidget(editMetaData, 1, 0, 1, 1); - - tabWidget->addTab(tabMeta, QString()); - tabHbp = new QWidget(); - tabHbp->setObjectName(QString::fromUtf8("tabHbp")); - gridLayout_4 = new QGridLayout(tabHbp); - gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); - editHbp = new QPlainTextEdit(tabHbp); - editHbp->setObjectName(QString::fromUtf8("editHbp")); - editHbp->setLineWrapMode(QPlainTextEdit::NoWrap); - editHbp->setReadOnly(true); - - gridLayout_4->addWidget(editHbp, 0, 0, 1, 1); - - tabWidget->addTab(tabHbp, QString()); - tabCompilers = new QWidget(); - tabCompilers->setObjectName(QString::fromUtf8("tabCompilers")); - gridLayout_5 = new QGridLayout(tabCompilers); - gridLayout_5->setObjectName(QString::fromUtf8("gridLayout_5")); - editCompilers = new QPlainTextEdit(tabCompilers); - editCompilers->setObjectName(QString::fromUtf8("editCompilers")); - editCompilers->setLineWrapMode(QPlainTextEdit::NoWrap); - - gridLayout_5->addWidget(editCompilers, 3, 1, 1, 1); - - horizontalLayout_2 = new QHBoxLayout(); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); - label_10 = new QLabel(tabCompilers); - label_10->setObjectName(QString::fromUtf8("label_10")); - label_10->setMinimumSize(QSize(100, 0)); - label_10->setMaximumSize(QSize(100, 16777215)); - - horizontalLayout_2->addWidget(label_10); - - editPathMk2 = new QLineEdit(tabCompilers); - editPathMk2->setObjectName(QString::fromUtf8("editPathMk2")); - - horizontalLayout_2->addWidget(editPathMk2); - - buttonPathMk2 = new QToolButton(tabCompilers); - buttonPathMk2->setObjectName(QString::fromUtf8("buttonPathMk2")); - buttonPathMk2->setMinimumSize(QSize(0, 0)); - - horizontalLayout_2->addWidget(buttonPathMk2); - - - gridLayout_5->addLayout(horizontalLayout_2, 0, 1, 1, 1); - - horizontalLayout_3 = new QHBoxLayout(); - horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); - label_12 = new QLabel(tabCompilers); - label_12->setObjectName(QString::fromUtf8("label_12")); - label_12->setMinimumSize(QSize(100, 0)); - label_12->setMaximumSize(QSize(100, 16777215)); - - horizontalLayout_3->addWidget(label_12); - - editPathEnv = new QLineEdit(tabCompilers); - editPathEnv->setObjectName(QString::fromUtf8("editPathEnv")); - - horizontalLayout_3->addWidget(editPathEnv); - - buttonPathEnv = new QToolButton(tabCompilers); - buttonPathEnv->setObjectName(QString::fromUtf8("buttonPathEnv")); - - horizontalLayout_3->addWidget(buttonPathEnv); - - - gridLayout_5->addLayout(horizontalLayout_3, 1, 1, 1, 1); - - buttonSaveEnv = new QToolButton(tabCompilers); - buttonSaveEnv->setObjectName(QString::fromUtf8("buttonSaveEnv")); - - gridLayout_5->addWidget(buttonSaveEnv, 2, 1, 1, 1); - - tabWidget->addTab(tabCompilers, QString()); - - verticalLayout->addWidget(tabWidget); - - horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); - buttonSaveExit = new QPushButton(ProjectProperties); - buttonSaveExit->setObjectName(QString::fromUtf8("buttonSaveExit")); - - horizontalLayout->addWidget(buttonSaveExit); - - buttonSave = new QPushButton(ProjectProperties); - buttonSave->setObjectName(QString::fromUtf8("buttonSave")); - buttonSave->setAutoDefault(false); - buttonSave->setDefault(true); - - horizontalLayout->addWidget(buttonSave); - - buttonCn = new QPushButton(ProjectProperties); - buttonCn->setObjectName(QString::fromUtf8("buttonCn")); - buttonCn->setAutoDefault(false); - - horizontalLayout->addWidget(buttonCn); - - - verticalLayout->addLayout(horizontalLayout); - - QWidget::setTabOrder(comboPrjType, editPrjTitle); - QWidget::setTabOrder(editPrjTitle, editPrjLoctn); - QWidget::setTabOrder(editPrjLoctn, editWrkFolder); - QWidget::setTabOrder(editWrkFolder, editDstFolder); - QWidget::setTabOrder(editDstFolder, editFlags); - QWidget::setTabOrder(editFlags, editLaunchParams); - QWidget::setTabOrder(editLaunchParams, editLaunchExe); - QWidget::setTabOrder(editLaunchExe, editSources); - QWidget::setTabOrder(editSources, editMetaData); - QWidget::setTabOrder(editMetaData, editMetaHelp); - QWidget::setTabOrder(editMetaHelp, editHbp); - QWidget::setTabOrder(editHbp, editCompilers); - QWidget::setTabOrder(editCompilers, tabWidget); - - retranslateUi(ProjectProperties); - - tabWidget->setCurrentIndex(0); - - - QMetaObject::connectSlotsByName(ProjectProperties); - } // setupUi - - void retranslateUi(QDialog *ProjectProperties) - { - ProjectProperties->setWindowTitle(QApplication::translate("ProjectProperties", "Project Properties", 0, QApplication::UnicodeUTF8)); - ProjectProperties->setStyleSheet(QString()); - label->setText(QApplication::translate("ProjectProperties", "Project Type:", 0, QApplication::UnicodeUTF8)); -#ifndef QT_NO_TOOLTIP - comboPrjType->setToolTip(QApplication::translate("ProjectProperties", "\n" -"\n" -"

A project may be of type Executable|Library|Dll.

", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - label_2->setText(QApplication::translate("ProjectProperties", "Project Title:", 0, QApplication::UnicodeUTF8)); -#ifndef QT_NO_TOOLTIP - editPrjTitle->setToolTip(QApplication::translate("ProjectProperties", "\n" -"\n" -"

Title will be shown as a node in project tree.

", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - label_3->setText(QApplication::translate("ProjectProperties", "Project Location:", 0, QApplication::UnicodeUTF8)); -#ifndef QT_NO_TOOLTIP - editPrjLoctn->setToolTip(QApplication::translate("ProjectProperties", "\n" -"\n" -"

Project location is the folder where project definition file .hbi will be stored. <Project Location> plus <Output Name> will comprise the full file name with .hbp extension.

", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - label_4->setText(QApplication::translate("ProjectProperties", "Working Folder:", 0, QApplication::UnicodeUTF8)); -#ifndef QT_NO_TOOLTIP - editWrkFolder->setToolTip(QApplication::translate("ProjectProperties", "\n" -"\n" -"

Working folder will be used to host HBMK2 compliant <Output Name> plus <hbp> and will be designated as current folder when HBMK2 will be invoked.

", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - label_5->setText(QApplication::translate("ProjectProperties", "Destination Folder:", 0, QApplication::UnicodeUTF8)); -#ifndef QT_NO_TOOLTIP - editDstFolder->setToolTip(QApplication::translate("ProjectProperties", "\n" -"\n" -"

Destination folder is a compatibility slot and is reserved to place the <Output> .exe .a .lib.

\n" -"

But currently this functionality will be achieved through the -o compiler flag.

", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - label_9->setText(QApplication::translate("ProjectProperties", "Compile/Link Flags:", 0, QApplication::UnicodeUTF8)); -#ifndef QT_NO_TOOLTIP - editFlags->setToolTip(QApplication::translate("ProjectProperties", "\n" -"\n" -"

Compiler/Linker flags may include all commands except the source files list. Additional libraries can be included here.

", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - editFlags->setStyleSheet(QString()); - label_7->setText(QApplication::translate("ProjectProperties", "Launch Parameters:", 0, QApplication::UnicodeUTF8)); - label_8->setText(QApplication::translate("ProjectProperties", "Launch Program:", 0, QApplication::UnicodeUTF8)); - label_13->setText(QApplication::translate("ProjectProperties", "Backup Location:", 0, QApplication::UnicodeUTF8)); -#ifndef QT_NO_TOOLTIP - editOutName->setToolTip(QApplication::translate("ProjectProperties", "\n" -"\n" -"

Output name is used as final name for .hbi .hbp .exe .lib .a and will be added to the paths retrieved via <Project Location>, <Working Folder>, <Destination Folder>, etc. So this is a very important component.

", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - label_6->setText(QApplication::translate("ProjectProperties", "Output Name:", 0, QApplication::UnicodeUTF8)); - buttonChoosePrjLoc->setText(QApplication::translate("ProjectProperties", "...", 0, QApplication::UnicodeUTF8)); - buttonBackup->setText(QApplication::translate("ProjectProperties", "...", 0, QApplication::UnicodeUTF8)); - buttonChooseDest->setText(QApplication::translate("ProjectProperties", "...", 0, QApplication::UnicodeUTF8)); - buttonChooseWd->setText(QApplication::translate("ProjectProperties", "...", 0, QApplication::UnicodeUTF8)); -#ifndef QT_NO_TOOLTIP - buttonHbp->setToolTip(QApplication::translate("ProjectProperties", "\n" -"\n" -"

Loading a .hbp project file is essentially a

\n" -"

task of redefining its flow and contents order.

\n" -"

hbIDE rewrites the existing .hbp file if the

\n" -"

\"Project Location\" points to same folder

\n" -"

where your such loaded .hbp resides.

\n" -"

So

\n" -"

take care to change the \"Project Location\"

\n" -"

to different folder than home folder of .hbp.

\n" -"

This is done at the time of \"Build\" proces" - "s.

", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - buttonHbp->setText(QApplication::translate("ProjectProperties", "...", 0, QApplication::UnicodeUTF8)); -#ifndef QT_NO_TOOLTIP - buttonXmate->setToolTip(QApplication::translate("ProjectProperties", "\n" -"\n" -"

Load an xMate project file.

\n" -"

This feature is available only for new projects.

\n" -"

hbIDE attempts to recognize various components

\n" -"

but it is possible that it may not load everything.

\n" -"

So you may need manual editing.

", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - buttonXmate->setText(QApplication::translate("ProjectProperties", "...", 0, QApplication::UnicodeUTF8)); - tabWidget->setTabText(tabWidget->indexOf(tabGeneral), QApplication::translate("ProjectProperties", "General", 0, QApplication::UnicodeUTF8)); -#ifndef QT_NO_TOOLTIP - editSources->setToolTip(QApplication::translate("ProjectProperties", "\n" -"\n" -"

You can include hereunder any type of file which can be edited via plain text editor. One file per line. You can use meta-keys to define your source paths to make your projects location independant.

\n" -"

\n" -"

NOTE:

\n" -"

Only .prg .c .cpp .rc .res files will be supplied to the HBMK2. All other files will be made visible for editing in <Project Tree>.

", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - editSources->setStyleSheet(QString()); -#ifndef QT_NO_TOOLTIP - buttonSelect->setToolTip(QApplication::translate("ProjectProperties", "Select Sources", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - buttonSelect->setText(QString()); -#ifndef QT_NO_TOOLTIP - buttonSort->setToolTip(QApplication::translate("ProjectProperties", "Sort by Ascending Order", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - buttonSort->setText(QString()); -#ifndef QT_NO_TOOLTIP - buttonSortZA->setToolTip(QApplication::translate("ProjectProperties", "Sort by Descending Order", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - buttonSortZA->setText(QString()); -#ifndef QT_NO_TOOLTIP - buttonSortOrg->setToolTip(QApplication::translate("ProjectProperties", "Organize by Type and Sort Ascending", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - buttonSortOrg->setText(QString()); - tabWidget->setTabText(tabWidget->indexOf(tabFiles), QApplication::translate("ProjectProperties", "Sources", 0, QApplication::UnicodeUTF8)); - editMetaHelp->setStyleSheet(QApplication::translate("ProjectProperties", "background-color: rgb(171, 171, 171);", 0, QApplication::UnicodeUTF8)); - editMetaHelp->setPlainText(QApplication::translate("ProjectProperties", "HBIDE will employ the concept of meta-data which will be used to parse the paths or other info supplied to the interface.\n" -"\n" -"Usually meta-key is enclosed in curly braces, but due to the fact that HBMK2 already exploits it, HBIDE will recognize meta-key in angled brackets.\n" -"\n" -"Please enter meta-keys and their values like :\n" -" MySourcePath = c:/dev_sources/vouch\n" -"in the QTextEdit below. Then whereever you will supply any key anywhere in the input fields of HBIDE interface, just enclose it in angled brackets like :\n" -" /vouch.prg.\n" -"Note that keys are case sensitive. So MySourcePath <> MYSOURCEPath.\n" -"\n" -"HBIDE internally employs few keys which are shown below and are always include in the project. These accompany the value as its relevance and not as literal.\n" -"\n" -"Enjoy\n" -"Pritpal Bedi", 0, QApplication::UnicodeUTF8)); -#ifndef QT_NO_TOOLTIP - editMetaData->setToolTip(QApplication::translate("ProjectProperties", "\n" -"\n" -"

Meta-keys are a special way of keeping generic information which is of repeated and/or of dynamic nature. HBIDE implements meta key/value pair more comprehensively. It allows you to write an expression for the value part which get evaluated at the time project is loaded. The only point to take into consideration is that value returned by such expression must be of type character.

\n" -"

\n" -"

The expression is evaluated only once and keeps its value until the HBIDE interface is closed. In case of any error, the expression string itself is returned.

", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - editMetaData->setStyleSheet(QString()); - tabWidget->setTabText(tabWidget->indexOf(tabMeta), QApplication::translate("ProjectProperties", "Meta Data", 0, QApplication::UnicodeUTF8)); -#ifndef QT_NO_TOOLTIP - editHbp->setToolTip(QApplication::translate("ProjectProperties", "\n" -"\n" -"

Here you can view in real-time the resultant <hbp> output which will be supplied to HBMK2. This view may give you insight about your source layout and many other facts.

\n" -"

\n" -"

Enjoy

", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - editHbp->setStyleSheet(QString()); - tabWidget->setTabText(tabWidget->indexOf(tabHbp), QApplication::translate("ProjectProperties", "hbp", 0, QApplication::UnicodeUTF8)); -#ifndef QT_NO_TOOLTIP - editCompilers->setToolTip(QApplication::translate("ProjectProperties", "\n" -"\n" -"

HBIDE employes the concept of keeping everything tied together. It means all complier specific environments are kept together in a convinient way and applied as per need.

\n" -"

\n" -"

" - "So here you view/edit all the environments you employ in your applications. At the time you will build the project, a list of stated environments will be presented to choose from.

\n" -"

\n" -"

This opens up the possibility to experiment with different compilers without re-opening the IDE or setting up the envvars manually.

", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - editCompilers->setStyleSheet(QString()); - label_10->setText(QApplication::translate("ProjectProperties", "Path to hbmk2", 0, QApplication::UnicodeUTF8)); - buttonPathMk2->setText(QString()); - label_12->setText(QApplication::translate("ProjectProperties", "Path to hbIDE.env", 0, QApplication::UnicodeUTF8)); - buttonPathEnv->setText(QString()); -#ifndef QT_NO_TOOLTIP - buttonSaveEnv->setToolTip(QApplication::translate("ProjectProperties", "The environment definitions will not be saved along the project details. You need to click me in order to save it permanently.", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - buttonSaveEnv->setText(QApplication::translate("ProjectProperties", "...", 0, QApplication::UnicodeUTF8)); - tabWidget->setTabText(tabWidget->indexOf(tabCompilers), QApplication::translate("ProjectProperties", "Environments", 0, QApplication::UnicodeUTF8)); - buttonSaveExit->setText(QApplication::translate("ProjectProperties", "Save and Exit", 0, QApplication::UnicodeUTF8)); - buttonSave->setText(QApplication::translate("ProjectProperties", "Save", 0, QApplication::UnicodeUTF8)); - buttonCn->setText(QApplication::translate("ProjectProperties", "Cancel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(ProjectProperties); - } // retranslateUi - -}; - -namespace Ui { - class ProjectProperties: public Ui_ProjectProperties {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // PROJECTPROPERTIES_H diff --git a/harbour/contrib/hbide/resources/projectpropertiesex.ui b/harbour/contrib/hbide/resources/projectpropertiesex.ui index 6847f684c8..51cfb9da23 100644 --- a/harbour/contrib/hbide/resources/projectpropertiesex.ui +++ b/harbour/contrib/hbide/resources/projectpropertiesex.ui @@ -284,14 +284,17 @@ p, li { white-space: pre-wrap; } + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You can include hereunder any type of file which can be edited via plain text editor. One file per line. You can use meta-keys to define your source paths to make your projects location independant. </p> -<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">NOTE:</p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Only .prg .c .cpp .rc .res files will be supplied to the HBMK2. All other files will be made visible for editing in &lt;Project Tree&gt;.</p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">You can include hereunder any type of file which can be edited via plain text editor. One file per line. You can use meta-keys to define your source paths to make your projects location independant. </span></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600;">NOTE:</span></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Only .prg .c .cpp .rc .res files will be supplied to the HBMK2. All other files will be made visible for editing in &lt;Project Tree&gt;.</span></p></body></html> @@ -351,13 +354,16 @@ p, li { white-space: pre-wrap; } + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Meta-keys are a special way of keeping generic information which is of repeated and/or of dynamic nature. HBIDE implements meta key/value pair more comprehensively. It allows you to write an expression for the value part which get evaluated at the time project is loaded. The only point to take into consideration is that value returned by such expression must be of type character.</p> -<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The expression is evaluated only once and keeps its value until the HBIDE interface is closed. In case of any error, the expression string itself is returned.</p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Meta-keys are a special way of keeping generic information which is of repeated and/or of dynamic nature. HBIDE implements meta key/value pair more comprehensively. It allows you to write an expression for the value part which get evaluated at the time project is loaded. The only point to take into consideration is that value returned by such expression must be of type character.</span></p> +<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">The expression is evaluated only once and keeps its value until the HBIDE interface is closed. In case of any error, the expression string itself is returned.</span></p></body></html> @@ -377,11 +383,14 @@ p, li { white-space: pre-wrap; } + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Here you can view in real-time the resultant &lt;hbp&gt; output which will be supplied to HBMK2. This view may give you insight about your source layout and many other facts.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Here you can view in real-time the resultant &lt;hbp&gt; output which will be supplied to HBMK2. This view may give you insight about your source layout and many other facts.</span></p> <p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600; text-decoration: underline;">Enjoy</span></p></body></html> diff --git a/harbour/contrib/hbide/resources/projectpropertiesex.uic b/harbour/contrib/hbide/resources/projectpropertiesex.uic index e75f7e8159..41aeebbf37 100644 --- a/harbour/contrib/hbide/resources/projectpropertiesex.uic +++ b/harbour/contrib/hbide/resources/projectpropertiesex.uic @@ -1,8 +1,8 @@ /******************************************************************************** ** Form generated from reading ui file 'projectpropertiesex.ui' ** -** Created: Wed May 5 12:48:51 2010 -** by: Qt User Interface Compiler version 4.5.3 +** Created: Wed May 5 23:38:13 2010 +** by: Qt User Interface Compiler version 4.5.2 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! ********************************************************************************/ @@ -397,16 +397,19 @@ public: checkClp->setText(QApplication::translate("FormProjectPropEx", "Clipper", 0, QApplication::UnicodeUTF8)); tabWidget->setTabText(tabWidget->indexOf(tabGeneral), QApplication::translate("FormProjectPropEx", "General", 0, QApplication::UnicodeUTF8)); #ifndef QT_NO_TOOLTIP - editSources->setToolTip(QApplication::translate("FormProjectPropEx", "\n" + editSources->setToolTip(QString()); +#endif // QT_NO_TOOLTIP +#ifndef QT_NO_WHATSTHIS + editSources->setWhatsThis(QApplication::translate("FormProjectPropEx", "\n" "\n" -"

You can include hereunder any type of file which can be edited via plain text editor. One file per line. You can use meta-keys to define your source paths to make your projects location independant.

\n" -"

\n" -"

NOTE:

\n" -"

Only .prg .c .cpp .rc .res files will be supplied to the HBMK2. All other files will be made visible for editing in <Project Tree>.

", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP +"

You can include hereunder any type of file which can be edited via plain text editor. One file per line. You can use meta-keys to define your source paths to make your projects location independant.

\n" +"

\n" +"

NOTE:

\n" +"

Only .prg .c .cpp .rc .res files will be supplied to the HBMK2. All other files will be made visible for editing in <Project Tree>.

", 0, QApplication::UnicodeUTF8)); +#endif // QT_NO_WHATSTHIS editSources->setStyleSheet(QString()); #ifndef QT_NO_TOOLTIP buttonSelect->setToolTip(QApplication::translate("FormProjectPropEx", "Select Sources", 0, QApplication::UnicodeUTF8)); @@ -426,27 +429,33 @@ public: buttonSortOrg->setText(QString()); tabWidget->setTabText(tabWidget->indexOf(tabFiles), QApplication::translate("FormProjectPropEx", "Sources", 0, QApplication::UnicodeUTF8)); #ifndef QT_NO_TOOLTIP - editFlags->setToolTip(QApplication::translate("FormProjectPropEx", "\n" + editFlags->setToolTip(QString()); +#endif // QT_NO_TOOLTIP +#ifndef QT_NO_WHATSTHIS + editFlags->setWhatsThis(QApplication::translate("FormProjectPropEx", "\n" "\n" -"

Meta-keys are a special way of keeping generic information which is of repeated and/or of dynamic nature. HBIDE implements meta key/value pair more comprehensively. It allows you to write an expression for the value part which get evaluated at the time project is loaded. The only point to take into consideration is that value returned by such expression must be of type character.

\n" -"

\n" -"

The expression is evaluated only once and keeps its value until the HBIDE interface is closed. In case of any error, the expression string itself is returned.

", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP +"

Meta-keys are a special way of keeping generic information which is of repeated and/or of dynamic nature. HBIDE implements meta key/value pair more comprehensively. It allows you to write an expression for the value part which get evaluated at the time project is loaded. The only point to take into consideration is that value returned by such expression must be of type character.

\n" +"

\n" +"

The expression is evaluated only once and keeps its value until the HBIDE interface is closed. In case of any error, the expression string itself is returned.

", 0, QApplication::UnicodeUTF8)); +#endif // QT_NO_WHATSTHIS editFlags->setStyleSheet(QString()); tabWidget->setTabText(tabWidget->indexOf(tabFlags), QApplication::translate("FormProjectPropEx", "Flags", 0, QApplication::UnicodeUTF8)); #ifndef QT_NO_TOOLTIP - editHbp->setToolTip(QApplication::translate("FormProjectPropEx", "\n" + editHbp->setToolTip(QString()); +#endif // QT_NO_TOOLTIP +#ifndef QT_NO_WHATSTHIS + editHbp->setWhatsThis(QApplication::translate("FormProjectPropEx", "\n" "\n" -"

Here you can view in real-time the resultant <hbp> output which will be supplied to HBMK2. This view may give you insight about your source layout and many other facts.

\n" +"

Here you can view in real-time the resultant <hbp> output which will be supplied to HBMK2. This view may give you insight about your source layout and many other facts.

\n" "

\n" -"

Enjoy

", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP +"

Enjoy

", 0, QApplication::UnicodeUTF8)); +#endif // QT_NO_WHATSTHIS editHbp->setStyleSheet(QString()); tabWidget->setTabText(tabWidget->indexOf(tabHbp), QApplication::translate("FormProjectPropEx", "hbp", 0, QApplication::UnicodeUTF8)); buttonSaveExit->setText(QApplication::translate("FormProjectPropEx", "Save and Close", 0, QApplication::UnicodeUTF8)); diff --git a/harbour/contrib/hbide/resources/shortcuts.ui b/harbour/contrib/hbide/resources/shortcuts.ui index 6b0a2ec9c3..f9788ff4a8 100644 --- a/harbour/contrib/hbide/resources/shortcuts.ui +++ b/harbour/contrib/hbide/resources/shortcuts.ui @@ -29,10 +29,18 @@
- + + + Public Methods are avialble as API to configure your key-combination to any degree hbIDE can be exploited. Double-click on any node posts method prototype with blank parameters in <Script> edit box below-right. In the immediate right box a brief description of the navigated node is displayed. + + - + + + Description of the public method highlighted on the left. + + diff --git a/harbour/contrib/hbide/resources/shortcuts.uic b/harbour/contrib/hbide/resources/shortcuts.uic index 94a4ef544a..826fcac392 100644 --- a/harbour/contrib/hbide/resources/shortcuts.uic +++ b/harbour/contrib/hbide/resources/shortcuts.uic @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading ui file 'shortcuts.ui' ** -** Created: Tue Apr 27 00:36:36 2010 +** Created: Wed May 5 23:41:37 2010 ** by: Qt User Interface Compiler version 4.5.2 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! @@ -217,6 +217,12 @@ public: FormShortCuts->setWindowTitle(QApplication::translate("FormShortCuts", "Keyboard Macros", 0, QApplication::UnicodeUTF8)); labelMethods->setText(QApplication::translate("FormShortCuts", "Public Methods", 0, QApplication::UnicodeUTF8)); labelSyntax->setText(QApplication::translate("FormShortCuts", " Description", 0, QApplication::UnicodeUTF8)); +#ifndef QT_NO_WHATSTHIS + listMethods->setWhatsThis(QApplication::translate("FormShortCuts", "Public Methods are avialble as API to configure your key-combination to any degree hbIDE can be exploited. Double-click on any node posts method prototype with blank parameters in