67 Private method to find the mode index by its short name. |
67 Private method to find the mode index by its short name. |
68 |
68 |
69 @param shortName short name of the mode (string) |
69 @param shortName short name of the mode (string) |
70 @return index of the mode (integer) |
70 @return index of the mode (integer) |
71 """ |
71 """ |
72 ind = 0 |
72 for ind, mode in enumerate(self.redirectionModes): |
73 for mode in self.redirectionModes: |
|
74 if mode[0] == shortName: |
73 if mode[0] == shortName: |
75 return ind |
74 return ind |
76 ind += 1 |
|
77 return 1 # default is "show output" |
75 return 1 # default is "show output" |
78 |
76 |
79 @pyqtSlot() |
77 @pyqtSlot() |
80 def on_newButton_clicked(self): |
78 def on_newButton_clicked(self): |
81 """ |
79 """ |