src/eric7/Preferences/ToolGroupConfigurationDialog.py

branch
eric7
changeset 10428
a071d4065202
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10427:3733e2b23cf7 10428:a071d4065202
25 def __init__(self, toolGroups, currentGroup, parent=None): 25 def __init__(self, toolGroups, currentGroup, parent=None):
26 """ 26 """
27 Constructor 27 Constructor
28 28
29 @param toolGroups list of configured tool groups 29 @param toolGroups list of configured tool groups
30 @param currentGroup number of the active group (integer) 30 @type list
31 @param parent parent widget (QWidget) 31 @param currentGroup number of the active group
32 @type int
33 @param parent parent widget
34 @type QWidget
32 """ 35 """
33 super().__init__(parent) 36 super().__init__(parent)
34 self.setupUi(self) 37 self.setupUi(self)
35 38
36 self.currentGroup = currentGroup 39 self.currentGroup = currentGroup
174 177
175 def on_groupsList_currentRowChanged(self, row): 178 def on_groupsList_currentRowChanged(self, row):
176 """ 179 """
177 Private slot to set the lineedits depending on the selected entry. 180 Private slot to set the lineedits depending on the selected entry.
178 181
179 @param row the row of the selected entry (integer) 182 @param row the row of the selected entry
183 @type int
180 """ 184 """
181 if row >= 0 and row < len(self.toolGroups): 185 if row >= 0 and row < len(self.toolGroups):
182 group = self.toolGroups[row] 186 group = self.toolGroups[row]
183 self.nameEdit.setText(group[0]) 187 self.nameEdit.setText(group[0])
184 188
205 """ 209 """
206 Public method to retrieve the tool groups. 210 Public method to retrieve the tool groups.
207 211
208 @return a list of lists containing the group name and the 212 @return a list of lists containing the group name and the
209 tool group entries 213 tool group entries
214 @rtype list
210 """ 215 """
211 return self.toolGroups[:], self.currentGroup 216 return self.toolGroups[:], self.currentGroup
212 217
213 def __swap(self, itm1, itm2): 218 def __swap(self, itm1, itm2):
214 """ 219 """
215 Private method used two swap two list entries given by their index. 220 Private method used two swap two list entries given by their index.
216 221
217 @param itm1 index of first entry (int) 222 @param itm1 index of first entry
218 @param itm2 index of second entry (int) 223 @type int
224 @param itm2 index of second entry
225 @type int
219 """ 226 """
220 tmp = self.toolGroups[itm1] 227 tmp = self.toolGroups[itm1]
221 self.toolGroups[itm1] = self.toolGroups[itm2] 228 self.toolGroups[itm1] = self.toolGroups[itm2]
222 self.toolGroups[itm2] = tmp 229 self.toolGroups[itm2] = tmp

eric ide

mercurial