50 self.searchDirPicker.setMode(E5PathPickerModes.DirectoryMode) |
50 self.searchDirPicker.setMode(E5PathPickerModes.DirectoryMode) |
51 |
51 |
52 self.fileList.headerItem().setText(self.fileList.columnCount(), "") |
52 self.fileList.headerItem().setText(self.fileList.columnCount(), "") |
53 |
53 |
54 self.stopButton = self.buttonBox.addButton( |
54 self.stopButton = self.buttonBox.addButton( |
55 self.tr("Stop"), QDialogButtonBox.ActionRole) |
55 self.tr("Stop"), QDialogButtonBox.ButtonRole.ActionRole) |
56 self.stopButton.setToolTip(self.tr("Press to stop the search")) |
56 self.stopButton.setToolTip(self.tr("Press to stop the search")) |
57 self.stopButton.setEnabled(False) |
57 self.stopButton.setEnabled(False) |
58 self.buttonBox.button(QDialogButtonBox.Open).setToolTip( |
58 self.buttonBox.button( |
59 self.tr("Opens the selected file")) |
59 QDialogButtonBox.StandardButton.Open).setToolTip( |
60 self.buttonBox.button(QDialogButtonBox.Open).setEnabled(False) |
60 self.tr("Opens the selected file")) |
|
61 self.buttonBox.button( |
|
62 QDialogButtonBox.StandardButton.Open).setEnabled(False) |
61 |
63 |
62 self.project = project |
64 self.project = project |
63 self.extsepLabel.setText(os.extsep) |
65 self.extsepLabel.setText(os.extsep) |
64 |
66 |
65 self.shouldStop = False |
67 self.shouldStop = False |
70 |
72 |
71 @param button button that was clicked (QAbstractButton) |
73 @param button button that was clicked (QAbstractButton) |
72 """ |
74 """ |
73 if button == self.stopButton: |
75 if button == self.stopButton: |
74 self.shouldStop = True |
76 self.shouldStop = True |
75 elif button == self.buttonBox.button(QDialogButtonBox.Open): |
77 elif button == self.buttonBox.button( |
|
78 QDialogButtonBox.StandardButton.Open |
|
79 ): |
76 self.__openFile() |
80 self.__openFile() |
77 |
81 |
78 def __openFile(self, itm=None): |
82 def __openFile(self, itm=None): |
79 """ |
83 """ |
80 Private slot to open a file. |
84 Private slot to open a file. |
148 QTreeWidgetItem(self.fileList, [fn, fp]) |
152 QTreeWidgetItem(self.fileList, [fn, fp]) |
149 QApplication.processEvents() |
153 QApplication.processEvents() |
150 |
154 |
151 del locations |
155 del locations |
152 self.stopButton.setEnabled(False) |
156 self.stopButton.setEnabled(False) |
153 self.fileList.header().resizeSections(QHeaderView.ResizeToContents) |
157 self.fileList.header().resizeSections( |
|
158 QHeaderView.ResizeMode.ResizeToContents) |
154 self.fileList.header().setStretchLastSection(True) |
159 self.fileList.header().setStretchLastSection(True) |
155 |
160 |
156 if found: |
161 if found: |
157 self.fileList.setCurrentItem(self.fileList.topLevelItem(0)) |
162 self.fileList.setCurrentItem(self.fileList.topLevelItem(0)) |
158 |
163 |
237 Private slot handling a change of the current item. |
242 Private slot handling a change of the current item. |
238 |
243 |
239 @param current current item (QTreeWidgetItem) |
244 @param current current item (QTreeWidgetItem) |
240 @param previous prevoius current item (QTreeWidgetItem) |
245 @param previous prevoius current item (QTreeWidgetItem) |
241 """ |
246 """ |
242 self.buttonBox.button(QDialogButtonBox.Open).setEnabled( |
247 self.buttonBox.button(QDialogButtonBox.StandardButton.Open).setEnabled( |
243 current is not None) |
248 current is not None) |
244 |
249 |
245 def show(self): |
250 def show(self): |
246 """ |
251 """ |
247 Public method to enable/disable the project checkbox. |
252 Public method to enable/disable the project checkbox. |