src/eric7/Preferences/ConfigurationPages/EditorAPIsPage.py

branch
eric7
changeset 10428
a071d4065202
parent 10373
093dcebe5ecb
child 10439
21c28b0f9e41
equal deleted inserted replaced
10427:3733e2b23cf7 10428:a071d4065202
207 207
208 def __editorGetApisFromApiList(self): 208 def __editorGetApisFromApiList(self):
209 """ 209 """
210 Private slot to retrieve the api filenames from the list. 210 Private slot to retrieve the api filenames from the list.
211 211
212 @return list of api filenames (list of strings) 212 @return list of api filenames
213 @rtype list of str
213 """ 214 """
214 apis = [] 215 apis = []
215 for row in range(self.apiList.count()): 216 for row in range(self.apiList.count()):
216 apis.append(self.apiList.item(row).text()) 217 apis.append(self.apiList.item(row).text())
217 return apis 218 return apis
337 """ 338 """
338 Public method to save the current state of the widget. 339 Public method to save the current state of the widget.
339 340
340 @return tuple containing the index of the selected lexer language 341 @return tuple containing the index of the selected lexer language
341 and the index of the selected project type 342 and the index of the selected project type
342 @rtype tuple of int and int 343 @rtype tuple of (int, int)
343 """ 344 """
344 return ( 345 return (
345 self.apiLanguageComboBox.currentIndex(), 346 self.apiLanguageComboBox.currentIndex(),
346 self.projectTypeComboBox.currentIndex(), 347 self.projectTypeComboBox.currentIndex(),
347 ) 348 )
349 def setState(self, state): 350 def setState(self, state):
350 """ 351 """
351 Public method to set the state of the widget. 352 Public method to set the state of the widget.
352 353
353 @param state state data generated by saveState 354 @param state state data generated by saveState
355 @type tuple of (int, int)
354 """ 356 """
355 self.apiLanguageComboBox.setCurrentIndex(state[0]) 357 self.apiLanguageComboBox.setCurrentIndex(state[0])
356 self.on_apiLanguageComboBox_activated(self.apiLanguageComboBox.currentIndex()) 358 self.on_apiLanguageComboBox_activated(self.apiLanguageComboBox.currentIndex())
357 359
358 self.projectTypeComboBox.setCurrentIndex(state[1]) 360 self.projectTypeComboBox.setCurrentIndex(state[1])
368 @pyqtSlot(str) 370 @pyqtSlot(str)
369 def on_apiFilePicker_textChanged(self, txt): 371 def on_apiFilePicker_textChanged(self, txt):
370 """ 372 """
371 Private slot to handle the entering of an API file name. 373 Private slot to handle the entering of an API file name.
372 374
373 @param txt text of the line edit (string) 375 @param txt text of the line edit
376 @type str
374 """ 377 """
375 enable = txt != "" 378 enable = txt != ""
376 379
377 if enable: 380 if enable:
378 # check for already added file 381 # check for already added file
387 def create(dlg): # noqa: U100 390 def create(dlg): # noqa: U100
388 """ 391 """
389 Module function to create the configuration page. 392 Module function to create the configuration page.
390 393
391 @param dlg reference to the configuration dialog 394 @param dlg reference to the configuration dialog
392 @return reference to the instantiated page (ConfigurationPageBase) 395 @type ConfigurationDialog
396 @return reference to the instantiated page
397 @rtype ConfigurationPageBase
393 """ 398 """
394 page = EditorAPIsPage() 399 page = EditorAPIsPage()
395 return page 400 return page

eric ide

mercurial