eric6/E5Gui/E5Action.py

changeset 8218
7c09585bd960
parent 8143
2c730d5fd177
equal deleted inserted replaced
8217:385f60c94548 8218:7c09585bd960
87 raise ArgumentsError( 87 raise ArgumentsError(
88 "Too many arguments, max. {0:d} expected, got {1:d}".format( 88 "Too many arguments, max. {0:d} expected, got {1:d}".format(
89 7 + incr, len(args))) 89 7 + incr, len(args)))
90 90
91 parent = args[4 + incr] 91 parent = args[4 + incr]
92 super(E5Action, self).__init__(parent) 92 super().__init__(parent)
93 name = args[5 + incr] 93 name = args[5 + incr]
94 if name: 94 if name:
95 self.setObjectName(name) 95 self.setObjectName(name)
96 96
97 if args[1 + incr]: 97 if args[1 + incr]:
151 """ 151 """
152 Public slot to set the keyboard shortcut. 152 Public slot to set the keyboard shortcut.
153 153
154 @param shortcut the accelerator (QKeySequence) 154 @param shortcut the accelerator (QKeySequence)
155 """ 155 """
156 super(E5Action, self).setShortcut(shortcut) 156 super().setShortcut(shortcut)
157 self.__ammendToolTip() 157 self.__ammendToolTip()
158 158
159 def setShortcuts(self, shortcuts): 159 def setShortcuts(self, shortcuts):
160 """ 160 """
161 Public slot to set the list of keyboard shortcuts. 161 Public slot to set the list of keyboard shortcuts.
162 162
163 @param shortcuts list of keyboard accelerators (list of QKeySequence) 163 @param shortcuts list of keyboard accelerators (list of QKeySequence)
164 or key for a platform dependent list of accelerators 164 or key for a platform dependent list of accelerators
165 (QKeySequence.StandardKey) 165 (QKeySequence.StandardKey)
166 """ 166 """
167 super(E5Action, self).setShortcuts(shortcuts) 167 super().setShortcuts(shortcuts)
168 self.__ammendToolTip() 168 self.__ammendToolTip()
169 169
170 def setIconText(self, text): 170 def setIconText(self, text):
171 """ 171 """
172 Public slot to set the icon text of the action. 172 Public slot to set the icon text of the action.
173 173
174 @param text new icon text (string) 174 @param text new icon text (string)
175 """ 175 """
176 super(E5Action, self).setIconText(text) 176 super().setIconText(text)
177 self.__ammendToolTip() 177 self.__ammendToolTip()
178 178
179 def __ammendToolTip(self): 179 def __ammendToolTip(self):
180 """ 180 """
181 Private slot to add the primary keyboard accelerator to the tooltip. 181 Private slot to add the primary keyboard accelerator to the tooltip.

eric ide

mercurial