Implement file search
Clear found files list on clear button pressed
Make found files header bold
Enable clearing of search box with button click
Add tool tip to search box
Filter data sets on pressing Enter
Add function to filter directories
Closes #10 (closed)
Merge request reports
Activity
requested review from @ldam
389 left_layout.addLayout(search_grid) 393 search_layout = QHBoxLayout() 394 # search_layout.setSpacing(6) 395 left_layout.addLayout(search_layout) 390 396 self.search_line_edit = QLineEdit(self.central_widget) 391 397 self.search_line_edit.setPlaceholderText('Search...') 392 search_grid.addWidget(self.search_line_edit, 0, 0, 1, 3) 398 self.search_line_edit.setToolTip('Filter the list of files based on ' 399 'the content.') 400 search_layout.addWidget(self.search_line_edit) 401 search_layout.addSpacing(2) 393 402 self.clear_button = QPushButton('Clear', self.central_widget) 394 self.clear_button.setFixedWidth(65) 395 search_grid.addWidget(self.clear_button, 0, 3, 1, 1) 403 self.clear_button.setFixedWidth(70) 404 search_layout.addWidget(self.clear_button) - Comment on lines 402 to +404
To have a cleaner look, instead of create a button for clearing text, you may want to add
self.search_line_edit.setClearButtonEnabled(True)
.You can look at search_message_dialog.py, line 166 for reference. Then you can look for signal textChanged, check for empty text for clear action. This isn't very good because when you manually clear text it will have the same affect which is ok in my opinion.
Another way I found online which you may consider to apply for both search and clear buttons: https://stackoverflow.com/questions/58258137/custom-method-on-click-clearbutton-in-qlineedit
Edited by Lan Dam changed this line in version 2 of the diff
The result of search and clear look good.
Please add document for this.
You may want to apply my suggestion to have a better look. But it isn't very important for this phase of coding.
Edited by Lan Damadded 7 commits
- 9591903a - Move clear button to search line edit
- fcb0962e - Get clear search button from search line edit
- 121f2620 - Clear search on clear button pressed
- d7e9340d - Filter folder list on search line edit changed
- e2e0d780 - Remove search button
- 15251020 - Update variable name
- 12380a0a - Remove unused code
Toggle commit listadded 1 commit
- 636b5b43 - Re-filter file list after from data card disabled
@kienle: Look great, work great. But you haven't had the document for this. And also can you move the search box to the top of file list, I think that way is more common.
Once you add document for this, in Help Documents Dialog, please click 2nd button, Recreate Table of Contents to update the table of Contents with new documents. Thank you.
Edited by Lan Damremoved review request for @ldam
requested review from @ldam
added 22 commits
-
76dc3205...fa439689 - 4 commits from branch
master
- fa439689...9c1f727f - 8 earlier commits
- 0188dbf6 - Filter folder list on search line edit changed
- e97e276b - Remove search button
- f04d739a - Update variable name
- 605e02b3 - Remove unused code
- a23ef893 - Re-filter file list after from data card disabled
- 0f4e15e4 - Remove unused code
- 74612b66 - Remove unused code
- 34388c55 - Move search bar on top of open files list
- 01d9939d - Remove layout with only one item
- c7a123dc - Update help
Toggle commit list-
76dc3205...fa439689 - 4 commits from branch
mentioned in commit a35496f6