2012-08-10 19:43 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/hbqt_hbqplaintextedit.cpp
% Code cleanup.
* contrib/hbide/setup.ui
+ Added: a new page <Intelli-sense> next to <General>.
It holds the user-defined values for next level of
source editing intellisense. Read below.
* contrib/hbide/edit.prg
+ Implemented: most of the next level of editing intellisense
points are configurable by the developer. These include:
1. To activate the closing structure of a statements
as a whole lot [YES]
2. To toggle IF/ENDIF [YES] ELSE [NO] Embrace Lower Lines [NO]
3. To toggle FOR/NEXT [YES]
4. To toggle DO WHILE/ENDDO [YES]
5. To toggle DO CASE/ENDCASE [YES] # CASES [3] OTHERWISE [NO]
6. To toggle SWITCH/ENDSWITCH [YES ] # CASES [3] OTHERWISE [NO]
EXIT on same line [NO]
7. To toggle ADD CLOSING PARENTHESIS of a function [NO]
8. To toggle INSERT SPACES - () >= ( . ) [NO]
9. To toggle ADD CODEBLOCK BODY - {|. => {|.| } [NO]
10.To toggle ADD SPACE AFTER := [NO]
11.To toggle ALIGN := WITH PREVIOUS LINES [NO] [TOBE]
12.To toggle FORMAT LINE AFTER ENTER [NO] [TOBE]
; Please forward your suggessions.
This commit is contained in:
@@ -16,6 +16,35 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-08-10 19:43 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbqt/qtgui/hbqt_hbqplaintextedit.cpp
|
||||
% Code cleanup.
|
||||
|
||||
* contrib/hbide/setup.ui
|
||||
+ Added: a new page <Intelli-sense> next to <General>.
|
||||
It holds the user-defined values for next level of
|
||||
source editing intellisense. Read below.
|
||||
|
||||
* contrib/hbide/edit.prg
|
||||
+ Implemented: most of the next level of editing intellisense
|
||||
points are configurable by the developer. These include:
|
||||
1. To activate the closing structure of a statements
|
||||
as a whole lot [YES]
|
||||
2. To toggle IF/ENDIF [YES] ELSE [NO] Embrace Lower Lines [NO]
|
||||
3. To toggle FOR/NEXT [YES]
|
||||
4. To toggle DO WHILE/ENDDO [YES]
|
||||
5. To toggle DO CASE/ENDCASE [YES] # CASES [3] OTHERWISE [NO]
|
||||
6. To toggle SWITCH/ENDSWITCH [YES ] # CASES [3] OTHERWISE [NO]
|
||||
EXIT on same line [NO]
|
||||
7. To toggle ADD CLOSING PARENTHESIS of a function [NO]
|
||||
8. To toggle INSERT SPACES - () >= ( . ) [NO]
|
||||
9. To toggle ADD CODEBLOCK BODY - {|. => {|.| } [NO]
|
||||
10.To toggle ADD SPACE AFTER := [NO]
|
||||
11.To toggle ALIGN := WITH PREVIOUS LINES [NO] [TOBE]
|
||||
12.To toggle FORMAT LINE AFTER ENTER [NO] [TOBE]
|
||||
|
||||
; Please forward your suggessions.
|
||||
|
||||
2012-08-10 13:44 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbqt/qtcore/hbqt_hbqslots.cpp
|
||||
! Fixed: a wrong variable used in trace call under debug mode.
|
||||
|
||||
@@ -557,7 +557,7 @@ METHOD IdeEdit:execKeyEvent( nMode, nEvent, p, p1 )
|
||||
HB_SYMBOL_UNUSED( p1 )
|
||||
|
||||
SWITCH nEvent
|
||||
CASE QEvent_KeyPress
|
||||
CASE QEvent_KeyPress /* The key is sent here prior TO applying TO editor */
|
||||
key := p:key()
|
||||
kbm := p:modifiers()
|
||||
|
||||
@@ -653,12 +653,6 @@ METHOD IdeEdit:execKeyEvent( nMode, nEvent, p, p1 )
|
||||
::aSelectionInfo := p1
|
||||
::oDK:setButtonState( "SelectionMode", ::aSelectionInfo[ 5 ] > 1 )
|
||||
EXIT
|
||||
CASE 21001
|
||||
::handlePreviousWord( .t. )
|
||||
EXIT
|
||||
CASE 21002
|
||||
::loadFuncHelp()
|
||||
EXIT
|
||||
CASE 21011
|
||||
::copyBlockContents()
|
||||
EXIT
|
||||
@@ -2273,7 +2267,8 @@ METHOD IdeEdit:reformatLine( nPos, nDeleted, nAdded )
|
||||
|
||||
qCursor:beginEditBlock()
|
||||
|
||||
IF cPWord == "." .AND. cPPWord $ ::hLogicals
|
||||
// Group I operations
|
||||
IF cPWord == "." .AND. cPPWord $ ::hLogicals /* ALWAYS */
|
||||
IF ! ::oINI:lSupressHbKWordsToUpper
|
||||
qCursor:movePosition( QTextCursor_PreviousWord, QTextCursor_MoveAnchor, 2 )
|
||||
qCursor:select( QTextCursor_WordUnderCursor )
|
||||
@@ -2282,35 +2277,29 @@ METHOD IdeEdit:reformatLine( nPos, nDeleted, nAdded )
|
||||
qCursor:setPosition( nPostn )
|
||||
ENDIF
|
||||
|
||||
#if 0 /* CONFIGURABLE */
|
||||
ELSEIF cPWord == ":=" .AND. cCWord == "=" .AND. nAdded == 1
|
||||
ELSEIF ::oINI:lISOperator .AND. cPWord == ":=" .AND. cCWord == "=" .AND. nAdded == 1
|
||||
qCursor:insertText( " " )
|
||||
#endif
|
||||
|
||||
ELSEIF cCWord == "(" .AND. hbide_isHarbourFunction( cPPWord, @cCased )
|
||||
ELSEIF ::oINI:lISCodeBlock .AND. Right( cPWord, 2 ) == "{|" .AND. cCWord == "|" .AND. nAdded == 1 .AND. Empty( cRest )
|
||||
qCursor:insertText( "| }" )
|
||||
qCursor:setPosition( nPostn )
|
||||
|
||||
ELSEIF cCWord == "(" .AND. ( hbide_isHarbourFunction( cPPWord, @cCased ) .OR. hbide_isQtFunction( cPPWord, @cCased ) .OR. hbide_isUserFunction( cPPWord, @cCased ) )
|
||||
hbide_replaceWord( qCursor, 2, cCased, nPostn )
|
||||
#if 0 /* CONFIGURABLE */
|
||||
IF ::oINI:lISClosingP
|
||||
IF cCWord == "(" .AND. nAdded == 1
|
||||
qCursor:insertText( " )" )
|
||||
qCursor:insertText( ")" )
|
||||
IF ::oINI:lISSpaceP
|
||||
qCursor:setPosition( nPostn )
|
||||
qCursor:insertText( " " )
|
||||
nPostn++
|
||||
ENDIF
|
||||
ENDIF
|
||||
#endif
|
||||
ENDIF
|
||||
qCursor:setPosition( nPostn )
|
||||
|
||||
ELSEIF cCWord == "(" .AND. hbide_isQtFunction( cPPWord, @cCased )
|
||||
ELSEIF cCWord == " " .AND. hbide_isUserFunction( cPPWord, @cCased ) /* User dictionaries : only keywords */
|
||||
hbide_replaceWord( qCursor, 2, cCased, nPostn )
|
||||
#if 0 /* CONFIGURABLE */
|
||||
IF cCWord == "(" .AND. nAdded == 1
|
||||
qCursor:insertText( " )" )
|
||||
ENDIF
|
||||
#endif
|
||||
qCursor:setPosition( nPostn )
|
||||
|
||||
ELSEIF ( cCWord == "(" .OR. cCWord == " " ) .AND. hbide_isUserFunction( cPPWord, @cCased ) /* User dictionaries : base work */
|
||||
qCursor:movePosition( QTextCursor_PreviousWord, QTextCursor_MoveAnchor, 2 )
|
||||
qCursor:select( QTextCursor_WordUnderCursor )
|
||||
qCursor:removeSelectedText()
|
||||
qCursor:insertText( cCased )
|
||||
qCursor:setPosition( nPostn )
|
||||
|
||||
ELSEIF cCWord == " " .AND. cPPWord != "#" .AND. hbide_isHarbourKeyword( cPWord )
|
||||
IF ! ::oINI:lSupressHbKWordsToUpper
|
||||
@@ -2323,56 +2312,69 @@ METHOD IdeEdit:reformatLine( nPos, nDeleted, nAdded )
|
||||
|
||||
ENDIF
|
||||
|
||||
// Group II operations
|
||||
IF empty( cPPWord ) .AND. cCWord == " "
|
||||
IF hbide_isStartingKeyword( cPWord, ::oIde ) /* FUNCTION PROCEDURE CLASS */
|
||||
qCursor:movePosition( QTextCursor_StartOfBlock )
|
||||
qCursor:movePosition( QTextCursor_NextCharacter, QTextCursor_KeepAnchor, nCPrev )
|
||||
qCursor:removeSelectedText()
|
||||
qCursor:movePosition( QTextCursor_NextCharacter, QTextCursor_MoveAnchor, Len( cPWord ) + 1 )
|
||||
|
||||
ELSEIF hbide_isMinimumIndentableKeyword( cPWord, ::oIde ) .AND. ::oINI:lAutoIndent /* LOCAL STATIC DEFAULT PRIVATE PUBLIC ENDCLASS RETURN */
|
||||
qCursor:movePosition( QTextCursor_StartOfBlock )
|
||||
qCursor:movePosition( QTextCursor_NextCharacter, QTextCursor_KeepAnchor, nCPrev )
|
||||
qCursor:removeSelectedText()
|
||||
qCursor:insertText( space( ::nTabSpaces ) )
|
||||
qCursor:movePosition( QTextCursor_EndOfLine )
|
||||
qCursor:movePosition( QTextCursor_NextCharacter, QTextCursor_MoveAnchor, Len( cPWord ) + 1 )
|
||||
|
||||
ELSEIF hbide_isIndentableKeyword( cPWord, ::oIde ) .AND. ::oINI:lAutoIndent /* IF SWITCH FOR DO */
|
||||
IF nCPrev < ::nTabSpaces
|
||||
nOff := ::nTabSpaces - nCPrev
|
||||
qCursor:movePosition( QTextCursor_StartOfBlock )
|
||||
qCursor:insertText( space( nOff ) )
|
||||
qCursor:movePosition( QTextCursor_EndOfLine )
|
||||
qCursor:setPosition( nPostn + nOff )
|
||||
|
||||
ELSEIF ( nOff := nCPrev % ::nTabSpaces ) > 0
|
||||
ELSEIF ( nOff := nCPrev % ::nTabSpaces ) > 0 /* We always go back to the previous indent */
|
||||
qCursor:movePosition( QTextCursor_StartOfBlock )
|
||||
qCursor:movePosition( QTextCursor_NextCharacter, QTextCursor_KeepAnchor, nOff )
|
||||
qCursor:removeSelectedText()
|
||||
qCursor:movePosition( QTextCursor_EndOfLine )
|
||||
qCursor:setPosition( nPostn - nOff )
|
||||
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF .T. /* CONFIGURABLE */
|
||||
IF cCWord == " " .AND. nAdded == 1
|
||||
// Group III operations
|
||||
IF cCWord == " " .AND. nAdded == 1 .AND. Empty( cRest ) /* Only first time having only word on a line */
|
||||
IF ::oINI:lISClosing
|
||||
cWord := Lower( cPWord )
|
||||
IF cWord == "if"
|
||||
hbide_appendEndif( qCursor, hbide_getFrontSpacesAndWord( qCursor:block():text() ), qCursor:position() )
|
||||
ELSEIF cWord == "for"
|
||||
IF ::oINI:lISIf .AND. cWord == "if"
|
||||
hbide_appendIf( qCursor, hbide_getFrontSpacesAndWord( qCursor:block():text() ), qCursor:position(), ::nTabSpaces, ::oINI:lISElse, ::oINI:lISEmbrace )
|
||||
|
||||
ELSEIF ::oINI:lISFor .AND. cWord == "for"
|
||||
hbide_appendFor( qCursor, hbide_getFrontSpacesAndWord( qCursor:block():text() ), qCursor:position() )
|
||||
ELSEIF cWord == "switch" /* CASE indentation: CONFIGURABLE */
|
||||
hbide_appendSwitch( qCursor, hbide_getFrontSpacesAndWord( qCursor:block():text() ), qCursor:position(), ::nTabSpaces )
|
||||
ELSEIF Lower( cPPWord ) == "do" .AND. cWord == "case" /* CASE indentation: CONFIGURABLE */
|
||||
hbide_appendCase( qCursor, hbide_getFrontSpacesAndWord( qCursor:block():text() ), qCursor:position() )
|
||||
ELSEIF Lower( cPPWord ) == "do" .AND. cWord == "while"
|
||||
|
||||
ELSEIF ::oINI:lISSwitch .AND. cWord == "switch" /* CASE indentation: CONFIGURABLE */
|
||||
hbide_appendSwitch( qCursor, hbide_getFrontSpacesAndWord( qCursor:block():text() ), qCursor:position(), ::nTabSpaces, ::oINI:nISSwitchCases, ::oINI:lISSwitchOWise, ::oINI:lISExitSameLine )
|
||||
|
||||
ELSEIF ::oINI:lISDoCase .AND. Lower( cPPWord ) == "do" .AND. cWord == "case" /* CASE indentation: CONFIGURABLE */
|
||||
hbide_appendCase( qCursor, hbide_getFrontSpacesAndWord( qCursor:block():text() ), qCursor:position(), ::oINI:nISCaseCases, ::oINI:lISCaseOWise )
|
||||
|
||||
ELSEIF ::oINI:lISDoWhile .AND. Lower( cPPWord ) == "do" .AND. cWord == "while"
|
||||
hbide_appendWhile( qCursor, hbide_getFrontSpacesAndWord( qCursor:block():text() ), qCursor:position() )
|
||||
ELSEIF cWord == "elseif" .OR. cWord == "else"
|
||||
hbide_alignToPrevWord( qCursor, "if", "endif", Len( cWord ), nPostn )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF cWord == "elseif" .OR. cWord == "else" .OR. cWord == "endif"
|
||||
hbide_alignToPrevWord( qCursor, "if", "endif", Len( cWord ), nPostn )
|
||||
|
||||
ELSEIF cWord == "next"
|
||||
hbide_alignToPrevWord( qCursor, "for", "next", Len( cWord ), nPostn )
|
||||
ENDIF
|
||||
ENDIF
|
||||
::qEdit:setTextCursor( qCursor )
|
||||
|
||||
qCursor:endEditBlock()
|
||||
::qEdit:setTextCursor( qCursor )
|
||||
ENDIF
|
||||
HB_SYMBOL_UNUSED( nCPrevPrev )
|
||||
ENDIF
|
||||
@@ -2392,7 +2394,6 @@ METHOD IdeEdit:reformatLine( nPos, nDeleted, nAdded )
|
||||
|
||||
HB_SYMBOL_UNUSED( nPos )
|
||||
HB_SYMBOL_UNUSED( nDeleted )
|
||||
HB_SYMBOL_UNUSED( nAdded )
|
||||
|
||||
RETURN cRest
|
||||
|
||||
@@ -2442,45 +2443,49 @@ STATIC FUNCTION hbide_replaceWord( qCursor, nWord, cWord, nPostn )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
STATIC FUNCTION hbide_appendCase( qCursor, nIndent, nCurPos )
|
||||
STATIC FUNCTION hbide_appendCase( qCursor, nIndent, nCurPos, nCases, lOWise )
|
||||
LOCAL i
|
||||
LOCAL nCases := 3 /* CONFIGURABLE */
|
||||
|
||||
// qCursor:beginEditBlock()
|
||||
qCursor:movePosition( QTextCursor_EndOfBlock )
|
||||
FOR i := 1 TO nCases
|
||||
qCursor:insertBlock()
|
||||
qCursor:insertText( Space( nIndent ) + "CASE " )
|
||||
NEXT
|
||||
qCursor:insertBlock()
|
||||
qCursor:insertText( Space( nIndent ) + "OTHERWISE" )
|
||||
IF lOWise
|
||||
qCursor:insertBlock()
|
||||
qCursor:insertText( Space( nIndent ) + "OTHERWISE" )
|
||||
ENDIF
|
||||
qCursor:insertBlock()
|
||||
qCursor:insertText( Space( nIndent ) + "ENDCASE" )
|
||||
qCursor:setPosition( nCurPos )
|
||||
qCursor:movePosition( QTextCursor_NextBlock )
|
||||
qCursor:movePosition( QTextCursor_EndOfLine )
|
||||
// qCursor:endEditBlock()
|
||||
|
||||
RETURN NIL
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
STATIC FUNCTION hbide_appendSwitch( qCursor, nIndent, nCurPos, nTabSpaces )
|
||||
STATIC FUNCTION hbide_appendSwitch( qCursor, nIndent, nCurPos, nTabSpaces, nCases, lOWise, lExitSameLine )
|
||||
LOCAL i
|
||||
LOCAL nCases := 3 /* CONFIGURABLE */
|
||||
|
||||
// qCursor:beginEditBlock()
|
||||
qCursor:movePosition( QTextCursor_EndOfBlock )
|
||||
FOR i := 1 TO nCases
|
||||
qCursor:insertBlock()
|
||||
qCursor:insertText( Space( nIndent ) + "CASE " )
|
||||
qCursor:insertBlock()
|
||||
qCursor:insertText( Space( nIndent + nTabSpaces ) + "EXIT" )
|
||||
IF lExitSameLine
|
||||
qCursor:insertText( Space( nIndent ) + "CASE ; EXIT" )
|
||||
ELSE
|
||||
qCursor:insertText( Space( nIndent ) + "CASE " )
|
||||
qCursor:insertBlock()
|
||||
qCursor:insertText( Space( nIndent + nTabSpaces ) + "EXIT" )
|
||||
ENDIF
|
||||
NEXT
|
||||
IF lOWise
|
||||
qCursor:insertBlock()
|
||||
qCursor:insertText( Space( nIndent ) + "OTHERWISE" )
|
||||
ENDIF
|
||||
qCursor:insertBlock()
|
||||
qCursor:insertText( Space( nIndent ) + "ENDSWITCH" )
|
||||
qCursor:setPosition( nCurPos )
|
||||
// qCursor:endEditBlock()
|
||||
|
||||
RETURN NIL
|
||||
|
||||
@@ -2488,12 +2493,10 @@ STATIC FUNCTION hbide_appendSwitch( qCursor, nIndent, nCurPos, nTabSpaces )
|
||||
|
||||
STATIC FUNCTION hbide_appendWhile( qCursor, nIndent, nCurPos )
|
||||
|
||||
// qCursor:beginEditBlock()
|
||||
qCursor:movePosition( QTextCursor_EndOfBlock )
|
||||
qCursor:insertBlock()
|
||||
qCursor:insertText( Space( nIndent ) + "ENDDO" )
|
||||
qCursor:setPosition( nCurPos )
|
||||
// qCursor:endEditBlock()
|
||||
|
||||
RETURN NIL
|
||||
|
||||
@@ -2501,25 +2504,49 @@ STATIC FUNCTION hbide_appendWhile( qCursor, nIndent, nCurPos )
|
||||
|
||||
STATIC FUNCTION hbide_appendFor( qCursor, nIndent, nCurPos )
|
||||
|
||||
// qCursor:beginEditBlock()
|
||||
qCursor:movePosition( QTextCursor_EndOfBlock )
|
||||
qCursor:insertBlock()
|
||||
qCursor:insertText( Space( nIndent ) + "NEXT" )
|
||||
qCursor:setPosition( nCurPos )
|
||||
// qCursor:endEditBlock()
|
||||
|
||||
RETURN NIL
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
STATIC FUNCTION hbide_appendEndif( qCursor, nIndent, nCurPos )
|
||||
STATIC FUNCTION hbide_appendIf( qCursor, nIndent, nCurPos, nTabSpaces, lElse, lEmbrace )
|
||||
|
||||
IF lEmbrace
|
||||
qCursor:movePosition( QTextCursor_StartOfBlock )
|
||||
IF qCursor:movePosition( QTextCursor_NextBlock )
|
||||
/* First line after IF must be starting on same indent where IF starts ; TO qualify FOR embracing */
|
||||
IF hbide_getFrontSpacesAndWord( qCursor:block():text() ) == nIndent
|
||||
/* We can confirm from developer IF TO embrace ? - Later... */
|
||||
qCursor:insertText( Space( nTabSpaces ) )
|
||||
DO WHILE qCursor:movePosition( QTextCursor_NextBlock )
|
||||
IF ! Empty( qCursor:block():text() )
|
||||
IF hbide_getFrontSpacesAndWord( qCursor:block():text() ) < nIndent
|
||||
qCursor:movePosition( QTextCursor_PreviousBlock )
|
||||
EXIT
|
||||
ENDIF
|
||||
qCursor:insertText( Space( nTabSpaces ) )
|
||||
ENDIF
|
||||
ENDDO
|
||||
ENDIF
|
||||
ELSE
|
||||
qCursor:setPosition( nCurPos )
|
||||
ENDIF
|
||||
ELSE
|
||||
qCursor:setPosition( nCurPos )
|
||||
ENDIF
|
||||
|
||||
// qCursor:beginEditBlock()
|
||||
qCursor:movePosition( QTextCursor_EndOfBlock )
|
||||
IF lElse
|
||||
qCursor:insertBlock()
|
||||
qCursor:insertText( Space( nIndent ) + "ELSE" )
|
||||
ENDIF
|
||||
qCursor:insertBlock()
|
||||
qCursor:insertText( Space( nIndent ) + "ENDIF" )
|
||||
qCursor:setPosition( nCurPos )
|
||||
// qCursor:endEditBlock()
|
||||
|
||||
RETURN NIL
|
||||
|
||||
@@ -2970,8 +2997,8 @@ FUNCTION hbide_isStartingKeyword( cWord, oIde )
|
||||
'function' => NIL,;
|
||||
'procedure' => NIL,;
|
||||
'class' => NIL,;
|
||||
'return' => NIL,;
|
||||
'method' => NIL }
|
||||
'method' => NIL,;
|
||||
'return' => NIL }
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
@@ -2986,11 +3013,11 @@ FUNCTION hbide_isMinimumIndentableKeyword( cWord, oIde )
|
||||
IF ! oIde:oINI:lReturnAsBeginKeyword
|
||||
s_b_ := { ;
|
||||
'local' => NIL,;
|
||||
'static' => NIL,;
|
||||
'return' => NIL,;
|
||||
'private' => NIL,;
|
||||
'public' => NIL,;
|
||||
'default' => NIL }
|
||||
'static' => NIL,;
|
||||
'default' => NIL,;
|
||||
'return' => NIL }
|
||||
ELSE
|
||||
s_b_ := { ;
|
||||
'local' => NIL,;
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
<height>397</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="indentation">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<attribute name="headerVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
@@ -41,7 +44,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="pageGeneral">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
@@ -449,6 +452,326 @@
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="pageIntelli">
|
||||
<widget class="QGroupBox" name="groupBox_27">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>351</width>
|
||||
<height>365</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="grpISClosing">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>8</x>
|
||||
<y>8</y>
|
||||
<width>333</width>
|
||||
<height>125</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Closing Statements</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QCheckBox" name="chkISIf">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>8</x>
|
||||
<y>20</y>
|
||||
<width>72</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>IF</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="chkISFor">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>8</x>
|
||||
<y>40</y>
|
||||
<width>72</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>FOR</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="chkISDoWhile">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>8</x>
|
||||
<y>60</y>
|
||||
<width>72</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>DO WHILE</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="chkISDoCase">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>8</x>
|
||||
<y>80</y>
|
||||
<width>72</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>DO CASE</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="ChkISSwitch">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>8</x>
|
||||
<y>101</y>
|
||||
<width>72</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>SWITCH</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_40">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>80</y>
|
||||
<width>37</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CASEs</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QSpinBox" name="spinISCaseCases">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>116</x>
|
||||
<y>77</y>
|
||||
<width>33</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="chkISCaseOWise">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>156</x>
|
||||
<y>80</y>
|
||||
<width>85</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>OTHERWISE</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="chkISElse">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>156</x>
|
||||
<y>24</y>
|
||||
<width>49</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ELSE</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="chkISSwitchOWise">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>156</x>
|
||||
<y>101</y>
|
||||
<width>85</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>OTHERWISE</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_56">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>101</y>
|
||||
<width>37</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CASEs</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QSpinBox" name="spinISSwitchCases">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>116</x>
|
||||
<y>100</y>
|
||||
<width>29</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="chkISExitSameLine">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>240</x>
|
||||
<y>101</y>
|
||||
<width>89</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>EXIT Same Line</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="chkISEmbrace">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>236</x>
|
||||
<y>24</y>
|
||||
<width>93</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Embrace Lower</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="grpISFuncCall">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>8</x>
|
||||
<y>136</y>
|
||||
<width>333</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Function Calls</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<widget class="QCheckBox" name="chkISClosingP">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>8</x>
|
||||
<y>20</y>
|
||||
<width>149</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add Clsong Parenthesis ?</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="chkISSpaceP">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>156</x>
|
||||
<y>20</y>
|
||||
<width>169</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add Spaces After/Before ()</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_38">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>8</x>
|
||||
<y>180</y>
|
||||
<width>329</width>
|
||||
<height>177</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>General</string>
|
||||
</property>
|
||||
<widget class="QCheckBox" name="chkISCodeBlock">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>8</x>
|
||||
<y>16</y>
|
||||
<width>185</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add Closing Body of CodeBlock ?</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="chkISOperator">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>8</x>
|
||||
<y>36</y>
|
||||
<width>177</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add Space After := Operator ?</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="chkISFmtLine">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>8</x>
|
||||
<y>152</y>
|
||||
<width>205</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Format Line after ENTER is pressed ?</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="chkISAlignAssign">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>8</x>
|
||||
<y>56</y>
|
||||
<width>205</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Align Operator := to Previous Lines ?</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="pageSelections">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="geometry">
|
||||
@@ -1889,7 +2212,7 @@
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page">
|
||||
<widget class="QWidget" name="pageThemes">
|
||||
<widget class="QGroupBox" name="groupBox_21">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
|
||||
@@ -218,11 +218,6 @@ void HBQPlainTextEdit::hbShowPrototype( const QString & tip, int rows, int cols
|
||||
Q_UNUSED( rows );
|
||||
Q_UNUSED( cols );
|
||||
|
||||
if( ! isCompletionTipsActive )
|
||||
{
|
||||
QToolTip::hideText();
|
||||
return;
|
||||
}
|
||||
if( tip == ( QString ) "" )
|
||||
{
|
||||
QToolTip::hideText();
|
||||
@@ -1447,27 +1442,10 @@ bool HBQPlainTextEdit::hbHandlePopup( QKeyEvent * event )
|
||||
case Qt::Key_Escape :
|
||||
case Qt::Key_Tab :
|
||||
case Qt::Key_Backtab :
|
||||
{
|
||||
event->ignore();
|
||||
return true; /* let the completer do default behavior */
|
||||
case Qt::Key_Space:
|
||||
if( block )
|
||||
{
|
||||
PHB_ITEM p1 = hb_itemPutNI( NULL, 21001 );
|
||||
hb_vmEvalBlockV( block, 1, p1 );
|
||||
hb_itemRelease( p1 );
|
||||
hbRefreshCompleter(); /* Watch closely */
|
||||
}
|
||||
break;
|
||||
case Qt::Key_ParenLeft:
|
||||
if( block )
|
||||
{
|
||||
PHB_ITEM p1 = hb_itemPutNI( NULL, 21002 );
|
||||
hb_vmEvalBlockV( block, 1, p1 );
|
||||
hb_itemRelease( p1 );
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user