@@ -489,9 +489,22 @@ def __init__(self, parent=None):
489489 self .findPrevButton .setIcon (QgsApplication .getThemeIcon ("console/iconSearchPrevEditorConsole.png" ))
490490 self .findPrevButton .setIconSize (QSize (24 , 24 ))
491491 self .findPrevButton .setAutoRaise (True )
492+ self .caseSensitive = QCheckBox ()
493+ caseSensTr = QCoreApplication .translate ("PythonConsole" , "Case Sensitive" )
494+ self .caseSensitive .setText (caseSensTr )
495+ self .wholeWord = QCheckBox ()
496+ wholeWordTr = QCoreApplication .translate ("PythonConsole" , "Whole Word" )
497+ self .wholeWord .setText (wholeWordTr )
498+ self .wrapAround = QCheckBox ()
499+ self .wrapAround .setChecked (True )
500+ wrapAroundTr = QCoreApplication .translate ("PythonConsole" , "Wrap Around" )
501+ self .wrapAround .setText (wrapAroundTr )
492502 self .layoutFind .addWidget (self .lineEditFind , 0 , 1 , 1 , 1 )
493- self .layoutFind .addWidget (self .findNextButton , 0 , 3 , 1 , 1 )
494503 self .layoutFind .addWidget (self .findPrevButton , 0 , 2 , 1 , 1 )
504+ self .layoutFind .addWidget (self .findNextButton , 0 , 3 , 1 , 1 )
505+ self .layoutFind .addWidget (self .caseSensitive , 0 , 4 , 1 , 1 )
506+ self .layoutFind .addWidget (self .wholeWord , 0 , 5 , 1 , 1 )
507+ self .layoutFind .addWidget (self .wrapAround , 0 , 6 , 1 , 1 )
495508
496509 ##------------ Add first Tab in Editor -------------------------------
497510
@@ -528,20 +541,20 @@ def __init__(self, parent=None):
528541 self .lineEditFind .textChanged .connect (self ._textFindChanged )
529542
530543 def _findText (self ):
531- self .tabEditorWidget .currentWidget ().newEditor .findText ()
544+ self .tabEditorWidget .currentWidget ().newEditor .findText (True )
532545
533546 def _findNext (self ):
534- self .tabEditorWidget .currentWidget ().newEditor .findText ()
547+ self .tabEditorWidget .currentWidget ().newEditor .findText (True )
535548
536549 def _findPrev (self ):
537- self .tabEditorWidget .currentWidget ().newEditor .findText (True )
538- self .tabEditorWidget .currentWidget ().newEditor .findNext ()
550+ self .tabEditorWidget .currentWidget ().newEditor .findText (False )
539551
540552 def _textFindChanged (self ):
541553 if not self .lineEditFind .text ().isEmpty ():
542554 self .findNextButton .setEnabled (True )
543555 self .findPrevButton .setEnabled (True )
544556 else :
557+ self .lineEditFind .setStyleSheet ('' )
545558 self .findNextButton .setEnabled (False )
546559 self .findPrevButton .setEnabled (False )
547560
0 commit comments