src/eric7/ViewManager/BookmarkedFilesDialog.py

branch
eric7
changeset 10436
f6881d10e995
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10435:c712d09cc839 10436:f6881d10e995
25 25
26 def __init__(self, bookmarks, parent=None): 26 def __init__(self, bookmarks, parent=None):
27 """ 27 """
28 Constructor 28 Constructor
29 29
30 @param bookmarks list of bookmarked files (list of strings) 30 @param bookmarks list of bookmarked files
31 @param parent parent widget (QWidget) 31 @type list of str
32 @param parent parent widget
33 @type QWidget
32 """ 34 """
33 super().__init__(parent) 35 super().__init__(parent)
34 self.setupUi(self) 36 self.setupUi(self)
35 37
36 self.filePicker.setMode(EricPathPickerModes.OPEN_FILE_MODE) 38 self.filePicker.setMode(EricPathPickerModes.OPEN_FILE_MODE)
46 48
47 def on_filePicker_textChanged(self, txt): 49 def on_filePicker_textChanged(self, txt):
48 """ 50 """
49 Private slot to handle the textChanged signal of the file edit. 51 Private slot to handle the textChanged signal of the file edit.
50 52
51 @param txt the text of the file edit (string) 53 @param txt the text of the file edit
54 @type str
52 """ 55 """
53 self.addButton.setEnabled(txt != "") 56 self.addButton.setEnabled(txt != "")
54 self.changeButton.setEnabled(txt != "" and self.filesList.currentRow() != -1) 57 self.changeButton.setEnabled(txt != "" and self.filesList.currentRow() != -1)
55 58
56 def on_filesList_currentRowChanged(self, row): 59 def on_filesList_currentRowChanged(self, row):
57 """ 60 """
58 Private slot to set the lineedit depending on the selected entry. 61 Private slot to set the lineedit depending on the selected entry.
59 62
60 @param row the current row (integer) 63 @param row the current row
64 @type int
61 """ 65 """
62 if row == -1: 66 if row == -1:
63 self.filePicker.clear() 67 self.filePicker.clear()
64 self.downButton.setEnabled(False) 68 self.downButton.setEnabled(False)
65 self.upButton.setEnabled(False) 69 self.upButton.setEnabled(False)
160 164
161 def getBookmarkedFiles(self): 165 def getBookmarkedFiles(self):
162 """ 166 """
163 Public method to retrieve the tools list. 167 Public method to retrieve the tools list.
164 168
165 @return a list of filenames (list of strings) 169 @return a list of filenames
170 @rtype list of str
166 """ 171 """
167 return self.bookmarks 172 return self.bookmarks
168 173
169 def __swap(self, itm1, itm2): 174 def __swap(self, itm1, itm2):
170 """ 175 """
171 Private method used two swap two list entries given by their index. 176 Private method used two swap two list entries given by their index.
172 177
173 @param itm1 index of first entry (int) 178 @param itm1 index of first entry
174 @param itm2 index of second entry (int) 179 @type int
180 @param itm2 index of second entry
181 @type int
175 """ 182 """
176 tmp = self.bookmarks[itm1] 183 tmp = self.bookmarks[itm1]
177 self.bookmarks[itm1] = self.bookmarks[itm2] 184 self.bookmarks[itm1] = self.bookmarks[itm2]
178 self.bookmarks[itm2] = tmp 185 self.bookmarks[itm2] = tmp

eric ide

mercurial