3929 tff = self.textForFind(False) |
3929 tff = self.textForFind(False) |
3930 if tff: |
3930 if tff: |
3931 self.quickFindtextCombo.lineEdit().setText(tff) |
3931 self.quickFindtextCombo.lineEdit().setText(tff) |
3932 self.quickFindtextCombo.lineEdit().setFocus() |
3932 self.quickFindtextCombo.lineEdit().setFocus() |
3933 self.quickFindtextCombo.lineEdit().selectAll() |
3933 self.quickFindtextCombo.lineEdit().selectAll() |
|
3934 self.__quickSearchSetEditColors(False) |
3934 else: |
3935 else: |
3935 self.__quickSearchInEditor(True, False) |
3936 self.__quickSearchInEditor(True, False) |
3936 |
3937 |
3937 def __quickSearchFocusIn(self): |
3938 def __quickSearchFocusIn(self): |
3938 """ |
3939 """ |
3992 tff = self.textForFind(False) |
3993 tff = self.textForFind(False) |
3993 if tff: |
3994 if tff: |
3994 self.quickFindtextCombo.lineEdit().setText(tff) |
3995 self.quickFindtextCombo.lineEdit().setText(tff) |
3995 self.quickFindtextCombo.lineEdit().setFocus() |
3996 self.quickFindtextCombo.lineEdit().setFocus() |
3996 self.quickFindtextCombo.lineEdit().selectAll() |
3997 self.quickFindtextCombo.lineEdit().selectAll() |
|
3998 self.__quickSearchSetEditColors(False) |
3997 else: |
3999 else: |
3998 self.__quickSearchInEditor(True, True) |
4000 self.__quickSearchInEditor(True, True) |
3999 |
4001 |
4000 def __quickSearchMarkOccurrences(self, txt): |
4002 def __quickSearchMarkOccurrences(self, txt): |
4001 """ |
4003 """ |
4062 ok = aw.findFirst(text, False, False, False, True, not back, |
4065 ok = aw.findFirst(text, False, False, False, True, not back, |
4063 cline, cindex) |
4066 cline, cindex) |
4064 else: |
4067 else: |
4065 ok = aw.findFirst(text, False, False, False, True, not back, |
4068 ok = aw.findFirst(text, False, False, False, True, not back, |
4066 lineFrom, indexFrom) |
4069 lineFrom, indexFrom) |
4067 if not ok: |
4070 self.__quickSearchSetEditColors(not ok) |
|
4071 |
|
4072 def __quickSearchSetEditColors(self, error): |
|
4073 """ |
|
4074 Private method to set the quick search edit colors. |
|
4075 |
|
4076 @param error flag indicating an error (boolean) |
|
4077 """ |
|
4078 if error: |
4068 palette = self.quickFindtextCombo.lineEdit().palette() |
4079 palette = self.quickFindtextCombo.lineEdit().palette() |
4069 palette.setColor(QPalette.Base, QColor("red")) |
4080 palette.setColor(QPalette.Base, QColor("red")) |
4070 palette.setColor(QPalette.Text, QColor("white")) |
4081 palette.setColor(QPalette.Text, QColor("white")) |
4071 self.quickFindtextCombo.lineEdit().setPalette(palette) |
4082 self.quickFindtextCombo.lineEdit().setPalette(palette) |
4072 else: |
4083 else: |
4074 palette.setColor(QPalette.Base, |
4085 palette.setColor(QPalette.Base, |
4075 self.quickFindtextCombo.palette().color(QPalette.Base)) |
4086 self.quickFindtextCombo.palette().color(QPalette.Base)) |
4076 palette.setColor(QPalette.Text, |
4087 palette.setColor(QPalette.Text, |
4077 self.quickFindtextCombo.palette().color(QPalette.Text)) |
4088 self.quickFindtextCombo.palette().color(QPalette.Text)) |
4078 self.quickFindtextCombo.lineEdit().setPalette(palette) |
4089 self.quickFindtextCombo.lineEdit().setPalette(palette) |
4079 |
4090 |
4080 def __quickSearchExtend(self): |
4091 def __quickSearchExtend(self): |
4081 """ |
4092 """ |
4082 Private method to handle the quicksearch extend action. |
4093 Private method to handle the quicksearch extend action. |
4083 """ |
4094 """ |
4084 aw = self.activeWindow() |
4095 aw = self.activeWindow() |