64 |
66 |
65 def __findModeIndex(self, shortName): |
67 def __findModeIndex(self, shortName): |
66 """ |
68 """ |
67 Private method to find the mode index by its short name. |
69 Private method to find the mode index by its short name. |
68 |
70 |
69 @param shortName short name of the mode (string) |
71 @param shortName short name of the mode |
70 @return index of the mode (integer) |
72 @type str |
|
73 @return index of the mode |
|
74 @rtype int |
71 """ |
75 """ |
72 for ind, mode in enumerate(self.redirectionModes): |
76 for ind, mode in enumerate(self.redirectionModes): |
73 if mode[0] == shortName: |
77 if mode[0] == shortName: |
74 return ind |
78 return ind |
75 return 1 # default is "show output" |
79 return 1 # default is "show output" |
347 @pyqtSlot(str) |
352 @pyqtSlot(str) |
348 def on_menuEdit_textChanged(self, text): |
353 def on_menuEdit_textChanged(self, text): |
349 """ |
354 """ |
350 Private slot called, when the menu text was changed. |
355 Private slot called, when the menu text was changed. |
351 |
356 |
352 @param text the new text (string) (ignored) |
357 @param text the new text (ignored) |
|
358 @type str |
353 """ |
359 """ |
354 self.__toolEntryChanged() |
360 self.__toolEntryChanged() |
355 |
361 |
356 @pyqtSlot(str) |
362 @pyqtSlot(str) |
357 def on_iconPicker_textChanged(self, text): |
363 def on_iconPicker_textChanged(self, text): |
358 """ |
364 """ |
359 Private slot called, when the icon path was changed. |
365 Private slot called, when the icon path was changed. |
360 |
366 |
361 @param text the new text (string) (ignored) |
367 @param text the new text (ignored) |
|
368 @type str |
362 """ |
369 """ |
363 self.__toolEntryChanged() |
370 self.__toolEntryChanged() |
364 |
371 |
365 @pyqtSlot(str) |
372 @pyqtSlot(str) |
366 def on_executablePicker_textChanged(self, text): |
373 def on_executablePicker_textChanged(self, text): |
367 """ |
374 """ |
368 Private slot called, when the executable was changed. |
375 Private slot called, when the executable was changed. |
369 |
376 |
370 @param text the new text (string) (ignored) |
377 @param text the new text (ignored) |
|
378 @type str |
371 """ |
379 """ |
372 self.__toolEntryChanged() |
380 self.__toolEntryChanged() |
373 |
381 |
374 @pyqtSlot(str) |
382 @pyqtSlot(str) |
375 def on_argumentsEdit_textChanged(self, text): |
383 def on_argumentsEdit_textChanged(self, text): |
376 """ |
384 """ |
377 Private slot called, when the arguments string was changed. |
385 Private slot called, when the arguments string was changed. |
378 |
386 |
379 @param text the new text (string) (ignored) |
387 @param text the new text (ignored) |
|
388 @type str |
380 """ |
389 """ |
381 self.__toolEntryChanged() |
390 self.__toolEntryChanged() |
382 |
391 |
383 @pyqtSlot(int) |
392 @pyqtSlot(int) |
384 def on_redirectCombo_currentIndexChanged(self, index): |
393 def on_redirectCombo_currentIndexChanged(self, index): |
385 """ |
394 """ |
386 Private slot called, when the redirection mode was changed. |
395 Private slot called, when the redirection mode was changed. |
387 |
396 |
388 @param index the selected mode index (integer) (ignored) |
397 @param index the selected mode index (ignored) |
|
398 @type int |
389 """ |
399 """ |
390 self.__toolEntryChanged() |
400 self.__toolEntryChanged() |
391 |
401 |
392 def getToollist(self): |
402 def getToollist(self): |
393 """ |
403 """ |
394 Public method to retrieve the tools list. |
404 Public method to retrieve the tools list. |
395 |
405 |
396 @return a list of tuples containing the menu text, the executable, |
406 @return a list of tuples containing the menu text, the executable, |
397 the executables arguments and a redirection flag |
407 the executables arguments and a redirection flag |
|
408 @rtype list of [tuple of (str, str, list of str, bool)] |
398 """ |
409 """ |
399 return self.toollist[:] |
410 return self.toollist[:] |
400 |
411 |
401 def __swap(self, itm1, itm2): |
412 def __swap(self, itm1, itm2): |
402 """ |
413 """ |
403 Private method used two swap two list entries given by their index. |
414 Private method used two swap two list entries given by their index. |
404 |
415 |
405 @param itm1 index of first entry (int) |
416 @param itm1 index of first entry |
406 @param itm2 index of second entry (int) |
417 @type int |
|
418 @param itm2 index of second entry |
|
419 @type int |
407 """ |
420 """ |
408 tmp = self.toollist[itm1] |
421 tmp = self.toollist[itm1] |
409 self.toollist[itm1] = self.toollist[itm2] |
422 self.toollist[itm1] = self.toollist[itm2] |
410 self.toollist[itm2] = tmp |
423 self.toollist[itm2] = tmp |