34 |
33 |
35 import UI.PixmapCache |
34 import UI.PixmapCache |
36 import UI.Config |
35 import UI.Config |
37 |
36 |
38 from E5Gui.E5Action import E5Action, createActionGroup |
37 from E5Gui.E5Action import E5Action, createActionGroup |
39 |
|
40 |
|
41 class QuickSearchLineEdit(QLineEdit): |
|
42 """ |
|
43 Class implementing a line edit that reacts to newline and cancel commands. |
|
44 |
|
45 @signal escPressed() emitted after the cancel command was activated |
|
46 @signal gotFocus() emitted when the focus is changed to this widget |
|
47 """ |
|
48 escPressed = pyqtSignal() |
|
49 gotFocus = pyqtSignal() |
|
50 |
|
51 def editorCommand(self, cmd): |
|
52 """ |
|
53 Public method to perform an editor command. |
|
54 |
|
55 @param cmd the scintilla command to be performed |
|
56 """ |
|
57 if cmd == QsciScintilla.SCI_NEWLINE: |
|
58 cb = self.parent() |
|
59 hasEntry = cb.findText(self.text()) != -1 |
|
60 if not hasEntry: |
|
61 if cb.insertPolicy() == QComboBox.InsertAtTop: |
|
62 cb.insertItem(0, self.text()) |
|
63 else: |
|
64 cb.addItem(self.text()) |
|
65 self.returnPressed.emit() |
|
66 elif cmd == QsciScintilla.SCI_CANCEL: |
|
67 self.escPressed.emit() |
|
68 |
|
69 def keyPressEvent(self, evt): |
|
70 """ |
|
71 Protected method to handle the press of the ESC key. |
|
72 |
|
73 @param evt key event (QKeyPressEvent) |
|
74 """ |
|
75 if evt.key() == Qt.Key_Escape: |
|
76 self.escPressed.emit() |
|
77 else: |
|
78 super(QuickSearchLineEdit, self).keyPressEvent(evt) # pass it on |
|
79 |
|
80 def focusInEvent(self, evt): |
|
81 """ |
|
82 Protected method to record the current editor widget. |
|
83 |
|
84 @param evt focus event (QFocusEvent) |
|
85 """ |
|
86 self.gotFocus.emit() |
|
87 super(QuickSearchLineEdit, self).focusInEvent(evt) # pass it on |
|
88 |
38 |
89 |
39 |
90 class ViewManager(QWidget): |
40 class ViewManager(QWidget): |
91 """ |
41 """ |
92 Base class inherited by all specific view manager classes. |
42 Base class inherited by all specific view manager classes. |
3107 )) |
3057 )) |
3108 self.replaceAllAct.triggered.connect( |
3058 self.replaceAllAct.triggered.connect( |
3109 self.__replaceWidget.replaceAll) |
3059 self.__replaceWidget.replaceAll) |
3110 self.searchActions.append(self.replaceAllAct) |
3060 self.searchActions.append(self.replaceAllAct) |
3111 |
3061 |
3112 self.quickSearchAct = E5Action( |
|
3113 QCoreApplication.translate('ViewManager', 'Quicksearch'), |
|
3114 UI.PixmapCache.getIcon("quickFindNext"), |
|
3115 QCoreApplication.translate('ViewManager', '&Quicksearch'), |
|
3116 QKeySequence(QCoreApplication.translate( |
|
3117 'ViewManager', "Ctrl+Shift+K", "Search|Quicksearch")), |
|
3118 0, |
|
3119 self.searchActGrp, 'vm_quicksearch') |
|
3120 self.quickSearchAct.setStatusTip(QCoreApplication.translate( |
|
3121 'ViewManager', 'Perform a quicksearch')) |
|
3122 self.quickSearchAct.setWhatsThis(QCoreApplication.translate( |
|
3123 'ViewManager', |
|
3124 """<b>Quicksearch</b>""" |
|
3125 """<p>This activates the quicksearch function of the IDE by""" |
|
3126 """ giving focus to the quicksearch entry field. If this field""" |
|
3127 """ is already active and contains text, it searches for the""" |
|
3128 """ next occurrence of this text.</p>""" |
|
3129 )) |
|
3130 self.quickSearchAct.triggered.connect(self.__quickSearch) |
|
3131 self.searchActions.append(self.quickSearchAct) |
|
3132 |
|
3133 self.quickSearchBackAct = E5Action( |
|
3134 QCoreApplication.translate( |
|
3135 'ViewManager', 'Quicksearch backwards'), |
|
3136 UI.PixmapCache.getIcon("quickFindPrev"), |
|
3137 QCoreApplication.translate( |
|
3138 'ViewManager', 'Quicksearch &backwards'), |
|
3139 QKeySequence(QCoreApplication.translate( |
|
3140 'ViewManager', |
|
3141 "Ctrl+Shift+J", "Search|Quicksearch backwards")), |
|
3142 0, self.searchActGrp, 'vm_quicksearch_backwards') |
|
3143 self.quickSearchBackAct.setStatusTip(QCoreApplication.translate( |
|
3144 'ViewManager', |
|
3145 'Perform a quicksearch backwards')) |
|
3146 self.quickSearchBackAct.setWhatsThis(QCoreApplication.translate( |
|
3147 'ViewManager', |
|
3148 """<b>Quicksearch backwards</b>""" |
|
3149 """<p>This searches the previous occurrence of the quicksearch""" |
|
3150 """ text.</p>""" |
|
3151 )) |
|
3152 self.quickSearchBackAct.triggered.connect(self.__quickSearchPrev) |
|
3153 self.searchActions.append(self.quickSearchBackAct) |
|
3154 |
|
3155 self.quickSearchExtendAct = E5Action( |
|
3156 QCoreApplication.translate('ViewManager', 'Quicksearch extend'), |
|
3157 UI.PixmapCache.getIcon("quickFindExtend"), |
|
3158 QCoreApplication.translate('ViewManager', 'Quicksearch e&xtend'), |
|
3159 QKeySequence(QCoreApplication.translate( |
|
3160 'ViewManager', "Ctrl+Shift+H", "Search|Quicksearch extend")), |
|
3161 0, |
|
3162 self.searchActGrp, 'vm_quicksearch_extend') |
|
3163 self.quickSearchExtendAct.setStatusTip(QCoreApplication.translate( |
|
3164 'ViewManager', |
|
3165 'Extend the quicksearch to the end of the current word')) |
|
3166 self.quickSearchExtendAct.setWhatsThis(QCoreApplication.translate( |
|
3167 'ViewManager', |
|
3168 """<b>Quicksearch extend</b>""" |
|
3169 """<p>This extends the quicksearch text to the end of the word""" |
|
3170 """ currently found.</p>""" |
|
3171 )) |
|
3172 self.quickSearchExtendAct.triggered.connect( |
|
3173 self.__quickSearchExtend) |
|
3174 self.searchActions.append(self.quickSearchExtendAct) |
|
3175 |
|
3176 self.gotoAct = E5Action( |
3062 self.gotoAct = E5Action( |
3177 QCoreApplication.translate('ViewManager', 'Goto Line'), |
3063 QCoreApplication.translate('ViewManager', 'Goto Line'), |
3178 UI.PixmapCache.getIcon("goto"), |
3064 UI.PixmapCache.getIcon("goto"), |
3179 QCoreApplication.translate('ViewManager', '&Goto Line...'), |
3065 QCoreApplication.translate('ViewManager', '&Goto Line...'), |
3180 QKeySequence(QCoreApplication.translate( |
3066 QKeySequence(QCoreApplication.translate( |
3394 menu.addAction(self.searchOpenFilesAct) |
3278 menu.addAction(self.searchOpenFilesAct) |
3395 menu.addAction(self.replaceOpenFilesAct) |
3279 menu.addAction(self.replaceOpenFilesAct) |
3396 |
3280 |
3397 return menu |
3281 return menu |
3398 |
3282 |
3399 def initSearchToolbars(self, toolbarManager): |
3283 def initSearchToolbar(self, toolbarManager): |
3400 """ |
3284 """ |
3401 Public method to create the Search toolbars. |
3285 Public method to create the Search toolbar. |
3402 |
3286 |
3403 @param toolbarManager reference to a toolbar manager object |
3287 @param toolbarManager reference to a toolbar manager object |
3404 (E5ToolBarManager) |
3288 @type E5ToolBarManager |
3405 @return a tuple of the generated toolbar (search, quicksearch) |
3289 @return generated toolbar |
3406 """ |
3290 @rtype QToolBar |
3407 qtb = QToolBar(QCoreApplication.translate( |
3291 """ |
3408 'ViewManager', 'Quicksearch'), self.ui) |
|
3409 qtb.setIconSize(UI.Config.ToolBarIconSize) |
|
3410 qtb.setObjectName("QuicksearchToolbar") |
|
3411 qtb.setToolTip(QCoreApplication.translate( |
|
3412 'ViewManager', 'Quicksearch')) |
|
3413 |
|
3414 self.quickFindLineEdit = QuickSearchLineEdit(self) |
|
3415 self.quickFindtextCombo = QComboBox(self) |
|
3416 self.quickFindtextCombo.setEditable(True) |
|
3417 self.quickFindtextCombo.setLineEdit(self.quickFindLineEdit) |
|
3418 self.quickFindtextCombo.setDuplicatesEnabled(False) |
|
3419 self.quickFindtextCombo.setInsertPolicy(QComboBox.InsertAtTop) |
|
3420 self.quickFindtextCombo.lastActive = None |
|
3421 self.quickFindtextCombo.lastCursorPos = None |
|
3422 self.quickFindtextCombo.lastSearchText = "" |
|
3423 self.quickFindtextCombo._editor = self.quickFindtextCombo.lineEdit() |
|
3424 # this allows us not to jump across searched text |
|
3425 # just because of autocompletion enabled |
|
3426 self.quickFindtextCombo.setMinimumWidth(250) |
|
3427 self.quickFindtextCombo.setSizeAdjustPolicy( |
|
3428 QComboBox.AdjustToMinimumContentsLengthWithIcon) |
|
3429 self.quickFindtextCombo.addItem("") |
|
3430 self.quickFindtextCombo.setWhatsThis(QCoreApplication.translate( |
|
3431 'ViewManager', |
|
3432 """<p>Enter the searchtext directly into this field.""" |
|
3433 """ The search will be performed case insensitive.""" |
|
3434 """ The quicksearch function is activated upon activation""" |
|
3435 """ of the quicksearch next action (default key Ctrl+Shift+K),""" |
|
3436 """ if this entry field does not have the input focus.""" |
|
3437 """ Otherwise it searches for the next occurrence of the""" |
|
3438 """ text entered. The quicksearch backwards action""" |
|
3439 """ (default key Ctrl+Shift+J) searches backward.""" |
|
3440 """ Activating the 'quicksearch extend' action""" |
|
3441 """ (default key Ctrl+Shift+H) extends the current""" |
|
3442 """ searchtext to the end of the currently found word.""" |
|
3443 """ The quicksearch can be ended by pressing the Return key""" |
|
3444 """ while the quicksearch entry has the the input focus.</p>""" |
|
3445 )) |
|
3446 self.quickFindtextCombo._editor.returnPressed.connect( |
|
3447 self.__quickSearchEnter) |
|
3448 self.quickFindtextCombo._editor.textChanged.connect( |
|
3449 self.__quickSearchText) |
|
3450 self.quickFindtextCombo._editor.escPressed.connect( |
|
3451 self.__quickSearchEscape) |
|
3452 self.quickFindtextCombo._editor.gotFocus.connect( |
|
3453 self.__quickSearchFocusIn) |
|
3454 self.quickFindtextAction = QWidgetAction(self) |
|
3455 self.quickFindtextAction.setDefaultWidget(self.quickFindtextCombo) |
|
3456 self.quickFindtextAction.setObjectName("vm_quickfindtext_action") |
|
3457 self.quickFindtextAction.setText(QCoreApplication.translate( |
|
3458 'ViewManager', "Quicksearch Textedit")) |
|
3459 qtb.addAction(self.quickFindtextAction) |
|
3460 qtb.addAction(self.quickSearchAct) |
|
3461 qtb.addAction(self.quickSearchBackAct) |
|
3462 qtb.addAction(self.quickSearchExtendAct) |
|
3463 self.quickFindtextCombo.setEnabled(False) |
|
3464 self.__quickSearchToolbar = qtb |
|
3465 self.__quickSearchToolbarVisibility = None |
|
3466 |
|
3467 tb = QToolBar(QCoreApplication.translate('ViewManager', 'Search'), |
3292 tb = QToolBar(QCoreApplication.translate('ViewManager', 'Search'), |
3468 self.ui) |
3293 self.ui) |
3469 tb.setIconSize(UI.Config.ToolBarIconSize) |
3294 tb.setIconSize(UI.Config.ToolBarIconSize) |
3470 tb.setObjectName("SearchToolbar") |
3295 tb.setObjectName("SearchToolbar") |
3471 tb.setToolTip(QCoreApplication.translate('ViewManager', 'Search')) |
3296 tb.setToolTip(QCoreApplication.translate('ViewManager', 'Search')) |
3484 tb.addAction(self.gotoLastEditAct) |
3309 tb.addAction(self.gotoLastEditAct) |
3485 |
3310 |
3486 tb.setAllowedAreas( |
3311 tb.setAllowedAreas( |
3487 Qt.ToolBarAreas(Qt.TopToolBarArea | Qt.BottomToolBarArea)) |
3312 Qt.ToolBarAreas(Qt.TopToolBarArea | Qt.BottomToolBarArea)) |
3488 |
3313 |
3489 toolbarManager.addToolBar(qtb, qtb.windowTitle()) |
|
3490 toolbarManager.addToolBar(tb, tb.windowTitle()) |
3314 toolbarManager.addToolBar(tb, tb.windowTitle()) |
3491 toolbarManager.addAction(self.gotoAct, tb.windowTitle()) |
3315 toolbarManager.addAction(self.gotoAct, tb.windowTitle()) |
3492 toolbarManager.addAction(self.gotoBraceAct, tb.windowTitle()) |
3316 toolbarManager.addAction(self.gotoBraceAct, tb.windowTitle()) |
3493 toolbarManager.addAction(self.replaceSelectionAct, tb.windowTitle()) |
3317 toolbarManager.addAction(self.replaceSelectionAct, tb.windowTitle()) |
3494 toolbarManager.addAction(self.replaceAllAct, tb.windowTitle()) |
3318 toolbarManager.addAction(self.replaceAllAct, tb.windowTitle()) |
3495 toolbarManager.addAction(self.replaceAndSearchAct, tb.windowTitle()) |
3319 toolbarManager.addAction(self.replaceAndSearchAct, tb.windowTitle()) |
3496 |
3320 |
3497 return tb, qtb |
3321 return tb |
3498 |
3322 |
3499 ################################################################## |
3323 ################################################################## |
3500 ## Initialize the view related actions, view menu and toolbar |
3324 ## Initialize the view related actions, view menu and toolbar |
3501 ################################################################## |
3325 ################################################################## |
3502 |
3326 |
5738 |
5556 |
5739 @param key list to return (must be 'search' or 'replace') |
5557 @param key list to return (must be 'search' or 'replace') |
5740 @return the requested history list (list of strings) |
5558 @return the requested history list (list of strings) |
5741 """ |
5559 """ |
5742 return self.srHistory[key] |
5560 return self.srHistory[key] |
5743 |
|
5744 def __quickSearch(self): |
|
5745 """ |
|
5746 Private slot to handle the incremental quick search. |
|
5747 """ |
|
5748 # first we have to check if quick search is active |
|
5749 # and try to activate it if not |
|
5750 if self.__quickSearchToolbarVisibility is None: |
|
5751 self.__quickSearchToolbarVisibility = ( |
|
5752 self.__quickSearchToolbar.isVisible() |
|
5753 ) |
|
5754 if not self.__quickSearchToolbar.isVisible(): |
|
5755 self.__quickSearchToolbar.show() |
|
5756 if not self.quickFindtextCombo.lineEdit().hasFocus(): |
|
5757 aw = self.activeWindow() |
|
5758 self.quickFindtextCombo.lastActive = aw |
|
5759 if aw: |
|
5760 self.quickFindtextCombo.lastCursorPos = aw.getCursorPosition() |
|
5761 else: |
|
5762 self.quickFindtextCombo.lastCursorPos = None |
|
5763 tff = self.textForFind(False) |
|
5764 if tff: |
|
5765 self.quickFindtextCombo.lineEdit().setText(tff) |
|
5766 self.quickFindtextCombo.lineEdit().setFocus() |
|
5767 self.quickFindtextCombo.lineEdit().selectAll() |
|
5768 self.__quickSearchSetEditColors(False) |
|
5769 else: |
|
5770 self.__quickSearchInEditor(True, False) |
|
5771 |
|
5772 def __quickSearchFocusIn(self): |
|
5773 """ |
|
5774 Private method to handle a focus in signal of the quicksearch lineedit. |
|
5775 """ |
|
5776 self.quickFindtextCombo.lastActive = self.activeWindow() |
|
5777 |
|
5778 def __quickSearchEnter(self): |
|
5779 """ |
|
5780 Private slot to handle the incremental quick search return pressed |
|
5781 (jump back to text). |
|
5782 """ |
|
5783 if self.quickFindtextCombo.lastActive: |
|
5784 self.quickFindtextCombo.lastActive.setFocus() |
|
5785 if self.__quickSearchToolbarVisibility is not None: |
|
5786 self.__quickSearchToolbar.setVisible( |
|
5787 self.__quickSearchToolbarVisibility) |
|
5788 self.__quickSearchToolbarVisibility = None |
|
5789 |
|
5790 def __quickSearchEscape(self): |
|
5791 """ |
|
5792 Private slot to handle the incremental quick search escape pressed |
|
5793 (jump back to text). |
|
5794 """ |
|
5795 if self.quickFindtextCombo.lastActive: |
|
5796 self.quickFindtextCombo.lastActive.setFocus() |
|
5797 aw = self.activeWindow() |
|
5798 if aw: |
|
5799 aw.hideFindIndicator() |
|
5800 if self.quickFindtextCombo.lastCursorPos: |
|
5801 aw.setCursorPosition( |
|
5802 self.quickFindtextCombo.lastCursorPos[0], |
|
5803 self.quickFindtextCombo.lastCursorPos[1]) |
|
5804 |
|
5805 if self.__quickSearchToolbarVisibility is not None: |
|
5806 self.__quickSearchToolbar.setVisible( |
|
5807 self.__quickSearchToolbarVisibility) |
|
5808 self.__quickSearchToolbarVisibility = None |
|
5809 |
|
5810 def __quickSearchText(self): |
|
5811 """ |
|
5812 Private slot to handle the textChanged signal of the quicksearch edit. |
|
5813 """ |
|
5814 self.__quickSearchInEditor(False, False) |
|
5815 |
|
5816 def __quickSearchPrev(self): |
|
5817 """ |
|
5818 Private slot to handle the quickFindPrev toolbutton action. |
|
5819 """ |
|
5820 # first we have to check if quick search is active |
|
5821 # and try to activate it if not |
|
5822 if self.__quickSearchToolbarVisibility is None: |
|
5823 self.__quickSearchToolbarVisibility = ( |
|
5824 self.__quickSearchToolbar.isVisible() |
|
5825 ) |
|
5826 if not self.__quickSearchToolbar.isVisible(): |
|
5827 self.__quickSearchToolbar.show() |
|
5828 if not self.quickFindtextCombo.lineEdit().hasFocus(): |
|
5829 aw = self.activeWindow() |
|
5830 self.quickFindtextCombo.lastActive = aw |
|
5831 if aw: |
|
5832 self.quickFindtextCombo.lastCursorPos = aw.getCursorPosition() |
|
5833 else: |
|
5834 self.quickFindtextCombo.lastCursorPos = None |
|
5835 tff = self.textForFind(False) |
|
5836 if tff: |
|
5837 self.quickFindtextCombo.lineEdit().setText(tff) |
|
5838 self.quickFindtextCombo.lineEdit().setFocus() |
|
5839 self.quickFindtextCombo.lineEdit().selectAll() |
|
5840 self.__quickSearchSetEditColors(False) |
|
5841 else: |
|
5842 self.__quickSearchInEditor(True, True) |
|
5843 |
|
5844 def __quickSearchMarkOccurrences(self, txt): |
|
5845 """ |
|
5846 Private method to mark all occurrences of the search text. |
|
5847 |
|
5848 @param txt text to search for (string) |
|
5849 """ |
|
5850 aw = self.activeWindow() |
|
5851 |
|
5852 lineFrom = 0 |
|
5853 indexFrom = 0 |
|
5854 lineTo = -1 |
|
5855 indexTo = -1 |
|
5856 |
|
5857 aw.clearSearchIndicators() |
|
5858 ok = aw.findFirstTarget(txt, False, False, False, |
|
5859 lineFrom, indexFrom, lineTo, indexTo) |
|
5860 while ok: |
|
5861 tgtPos, tgtLen = aw.getFoundTarget() |
|
5862 aw.setSearchIndicator(tgtPos, tgtLen) |
|
5863 ok = aw.findNextTarget() |
|
5864 |
|
5865 def __quickSearchInEditor(self, again, back): |
|
5866 """ |
|
5867 Private slot to perform a quick search. |
|
5868 |
|
5869 @param again flag indicating a repeat of the last search (boolean) |
|
5870 @param back flag indicating a backwards search operation (boolean) |
|
5871 """ |
|
5872 aw = self.activeWindow() |
|
5873 if not aw: |
|
5874 return |
|
5875 |
|
5876 aw.hideFindIndicator() |
|
5877 |
|
5878 text = self.quickFindtextCombo.lineEdit().text() |
|
5879 if not text and again: |
|
5880 text = self.quickFindtextCombo.lastSearchText |
|
5881 if not text: |
|
5882 if Preferences.getEditor("QuickSearchMarkersEnabled"): |
|
5883 aw.clearSearchIndicators() |
|
5884 return |
|
5885 else: |
|
5886 self.quickFindtextCombo.lastSearchText = text |
|
5887 |
|
5888 if Preferences.getEditor("QuickSearchMarkersEnabled"): |
|
5889 self.__quickSearchMarkOccurrences(text) |
|
5890 |
|
5891 lineFrom, indexFrom, lineTo, indexTo = aw.getSelection() |
|
5892 cline, cindex = aw.getCursorPosition() |
|
5893 if again: |
|
5894 if back: |
|
5895 if indexFrom != 0: |
|
5896 index = indexFrom - 1 |
|
5897 line = lineFrom |
|
5898 elif lineFrom == 0: |
|
5899 return |
|
5900 else: |
|
5901 line = lineFrom - 1 |
|
5902 index = aw.lineLength(line) |
|
5903 ok = aw.findFirst(text, False, False, False, True, False, |
|
5904 line, index) |
|
5905 else: |
|
5906 ok = aw.findFirst(text, False, False, False, True, not back, |
|
5907 cline, cindex) |
|
5908 else: |
|
5909 ok = aw.findFirst(text, False, False, False, True, not back, |
|
5910 lineFrom, indexFrom) |
|
5911 if ok: |
|
5912 sline, sindex, eline, eindex = aw.getSelection() |
|
5913 aw.showFindIndicator(sline, sindex, eline, eindex) |
|
5914 self.__quickSearchSetEditColors(not ok) |
|
5915 |
|
5916 def __quickSearchSetEditColors(self, error): |
|
5917 """ |
|
5918 Private method to set the quick search edit colors. |
|
5919 |
|
5920 @param error flag indicating an error (boolean) |
|
5921 """ |
|
5922 if error: |
|
5923 palette = self.quickFindtextCombo.lineEdit().palette() |
|
5924 palette.setColor(QPalette.Base, QColor("red")) |
|
5925 palette.setColor(QPalette.Text, QColor("white")) |
|
5926 self.quickFindtextCombo.lineEdit().setPalette(palette) |
|
5927 else: |
|
5928 palette = self.quickFindtextCombo.lineEdit().palette() |
|
5929 palette.setColor( |
|
5930 QPalette.Base, |
|
5931 self.quickFindtextCombo.palette().color(QPalette.Base)) |
|
5932 palette.setColor( |
|
5933 QPalette.Text, |
|
5934 self.quickFindtextCombo.palette().color(QPalette.Text)) |
|
5935 self.quickFindtextCombo.lineEdit().setPalette(palette) |
|
5936 |
|
5937 def __quickSearchExtend(self): |
|
5938 """ |
|
5939 Private method to handle the quicksearch extend action. |
|
5940 """ |
|
5941 aw = self.activeWindow() |
|
5942 if aw is None: |
|
5943 return |
|
5944 |
|
5945 txt = self.quickFindtextCombo.lineEdit().text() |
|
5946 if not txt: |
|
5947 return |
|
5948 |
|
5949 line, index = aw.getCursorPosition() |
|
5950 text = aw.text(line) |
|
5951 |
|
5952 rx = re.compile(r'[^\w_]') |
|
5953 match = rx.search(text, index) |
|
5954 if match: |
|
5955 end = match.start() |
|
5956 if end > index: |
|
5957 ext = text[index:end] |
|
5958 txt += ext |
|
5959 self.quickFindtextCombo.lineEdit().setText(txt) |
|
5960 |
5561 |
5961 def showSearchWidget(self): |
5562 def showSearchWidget(self): |
5962 """ |
5563 """ |
5963 Public method to show the search widget. |
5564 Public method to show the search widget. |
5964 """ |
5565 """ |